Subversion Repositories SmartDukaan

Rev

Rev 1886 | Rev 2383 | 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
    /**
2364 chandransh 89
     * Adds jacket number and IMEI no. to the order. Doesn't update the IMEI no. if a -1 is supplied.
90
     *  Return false if it doesn't find the order with the given ID.
1148 chandransh 91
     * 
92
     * @param orderId
93
     * @param jacketNumber
2364 chandransh 94
     * @param imeiNumber
95
     * @param billedBy
1148 chandransh 96
     */
2364 chandransh 97
    public boolean addJacketNumber(long orderId, long jacketNumber, long imeiNumber, String billedBy) throws TransactionServiceException, TException;
1148 chandransh 98
 
923 rajveer 99
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
100
 
101
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
102
 
1529 ankur.sing 103
    /**
104
     * Returns list of orders for given transaction Id. Also filters based on customer Id so that
105
     * only user who owns the transaction can view its order details.
106
     * 
107
     * @param transactionId
108
     * @param customerId
109
     */
110
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException;
68 ashish 111
 
483 rajveer 112
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 113
 
483 rajveer 114
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 115
 
483 rajveer 116
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 117
 
483 rajveer 118
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 119
 
758 chandransh 120
    /**
1529 ankur.sing 121
     * Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
122
     * Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
123
     * 
124
     * @param orderId
125
     * @param customerId
126
     */
127
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException;
128
 
129
    /**
1221 chandransh 130
     * Create a batch of all the pending orders for the given warehouse.
131
     * The returned list is orderd by created_timestamp.
132
     * If there are no pending orders, an empty list is returned.
133
     * 
134
     * @param warehouseId
135
     */
136
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
137
 
138
    /**
1209 chandransh 139
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
140
     * 
141
     * @param orderId
142
     */
143
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
144
 
145
    /**
758 chandransh 146
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
147
     * 
148
     * @param warehouseId
149
     * @param providerId
150
     */
151
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
152
 
1114 chandransh 153
    /**
154
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
155
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
156
     * Raises an exception if we encounter report for an AWB number that we did not ship.
157
     * 
158
     * @param providerId
159
     * @param pickupDetails
160
     */
1245 chandransh 161
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 162
 
1133 chandransh 163
    /**
164
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
165
     * the name of the receiver.
166
     * Raises an exception if we encounter report for an AWB number that we did not ship.
167
     * 
168
     * @param providerId
169
     * @param deliveredOrders
170
     */
171
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
172
 
173
    /**
174
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
175
     * Raises an exception if we encounter report for an AWB number that we did not ship.
176
     * 
177
     * @param providerId
178
     * @param returnedOrders
179
     */
180
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
181
 
1245 chandransh 182
    /**
183
     * Update the status description of orders whose AWB numbers are keys of the Map.
184
     * 
185
     * @param providerId
186
     * @param undeliveredOrders
187
     */
188
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
189
 
1406 ankur.sing 190
    /**
191
     * Returns the list of orders whose delivery time has passed but have not been
192
     * delivered yet for the given provider and warehouse. To get a complete list of
193
     * undelivered orders, pass them as -1.
194
     * Returns an empty list if no such orders exist.
195
     * 
196
     * @param providerId
197
     * @param warehouseId
198
     */
199
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
200
 
483 rajveer 201
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 202
 
483 rajveer 203
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 204
 
1598 ankur.sing 205
    /**
206
     * Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
207
     */
208
    public long getValidOrderCount() throws TException;
209
 
1629 ankur.sing 210
    /**
211
     * Returns the number of distinct customers who have done successful transactions
212
     */
213
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException;
214
 
215
    /**
1731 ankur.sing 216
     * Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
217
     * List contains two values, first minimum amount and second maximum amount.
1629 ankur.sing 218
     */
1731 ankur.sing 219
    public List<Double> getValidOrdersAmountRange() throws TException;
1629 ankur.sing 220
 
1886 ankur.sing 221
    /**
222
     * Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
223
     * If limit is passed as 0, then all valid Orders are returned.
224
     * 
225
     * @param limit
226
     */
227
    public List<Order> getValidOrders(long limit) throws TException;
228
 
68 ashish 229
  }
230
 
231
  public static class Client implements Iface {
232
    public Client(TProtocol prot)
233
    {
234
      this(prot, prot);
235
    }
236
 
237
    public Client(TProtocol iprot, TProtocol oprot)
238
    {
239
      iprot_ = iprot;
240
      oprot_ = oprot;
241
    }
242
 
243
    protected TProtocol iprot_;
244
    protected TProtocol oprot_;
245
 
246
    protected int seqid_;
247
 
248
    public TProtocol getInputProtocol()
249
    {
250
      return this.iprot_;
251
    }
252
 
253
    public TProtocol getOutputProtocol()
254
    {
255
      return this.oprot_;
256
    }
257
 
764 rajveer 258
    public void closeSession() throws TException
259
    {
260
      send_closeSession();
261
      recv_closeSession();
262
    }
263
 
264
    public void send_closeSession() throws TException
265
    {
266
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
267
      closeSession_args args = new closeSession_args();
268
      args.write(oprot_);
269
      oprot_.writeMessageEnd();
270
      oprot_.getTransport().flush();
271
    }
272
 
273
    public void recv_closeSession() throws TException
274
    {
275
      TMessage msg = iprot_.readMessageBegin();
276
      if (msg.type == TMessageType.EXCEPTION) {
277
        TApplicationException x = TApplicationException.read(iprot_);
278
        iprot_.readMessageEnd();
279
        throw x;
280
      }
281
      closeSession_result result = new closeSession_result();
282
      result.read(iprot_);
283
      iprot_.readMessageEnd();
284
      return;
285
    }
286
 
132 ashish 287
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 288
    {
289
      send_createTransaction(transaction);
132 ashish 290
      return recv_createTransaction();
68 ashish 291
    }
292
 
293
    public void send_createTransaction(Transaction transaction) throws TException
294
    {
295
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
296
      createTransaction_args args = new createTransaction_args();
297
      args.transaction = transaction;
298
      args.write(oprot_);
299
      oprot_.writeMessageEnd();
300
      oprot_.getTransport().flush();
301
    }
302
 
132 ashish 303
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 304
    {
305
      TMessage msg = iprot_.readMessageBegin();
306
      if (msg.type == TMessageType.EXCEPTION) {
307
        TApplicationException x = TApplicationException.read(iprot_);
308
        iprot_.readMessageEnd();
309
        throw x;
310
      }
311
      createTransaction_result result = new createTransaction_result();
312
      result.read(iprot_);
313
      iprot_.readMessageEnd();
132 ashish 314
      if (result.isSetSuccess()) {
315
        return result.success;
316
      }
68 ashish 317
      if (result.ex != null) {
318
        throw result.ex;
319
      }
132 ashish 320
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 321
    }
322
 
323
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
324
    {
325
      send_getTransaction(id);
326
      return recv_getTransaction();
327
    }
328
 
329
    public void send_getTransaction(long id) throws TException
330
    {
331
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
332
      getTransaction_args args = new getTransaction_args();
333
      args.id = id;
334
      args.write(oprot_);
335
      oprot_.writeMessageEnd();
336
      oprot_.getTransport().flush();
337
    }
338
 
339
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
340
    {
341
      TMessage msg = iprot_.readMessageBegin();
342
      if (msg.type == TMessageType.EXCEPTION) {
343
        TApplicationException x = TApplicationException.read(iprot_);
344
        iprot_.readMessageEnd();
345
        throw x;
346
      }
347
      getTransaction_result result = new getTransaction_result();
348
      result.read(iprot_);
349
      iprot_.readMessageEnd();
350
      if (result.isSetSuccess()) {
351
        return result.success;
352
      }
353
      if (result.ex != null) {
354
        throw result.ex;
355
      }
356
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
357
    }
358
 
132 ashish 359
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 360
    {
132 ashish 361
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 362
      return recv_getTransactionsForCustomer();
363
    }
364
 
132 ashish 365
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 366
    {
367
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
368
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
369
      args.customerId = customerId;
132 ashish 370
      args.from_date = from_date;
371
      args.to_date = to_date;
68 ashish 372
      args.status = status;
373
      args.write(oprot_);
374
      oprot_.writeMessageEnd();
375
      oprot_.getTransport().flush();
376
    }
377
 
378
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
379
    {
380
      TMessage msg = iprot_.readMessageBegin();
381
      if (msg.type == TMessageType.EXCEPTION) {
382
        TApplicationException x = TApplicationException.read(iprot_);
383
        iprot_.readMessageEnd();
384
        throw x;
385
      }
386
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
387
      result.read(iprot_);
388
      iprot_.readMessageEnd();
389
      if (result.isSetSuccess()) {
390
        return result.success;
391
      }
392
      if (result.ex != null) {
393
        throw result.ex;
394
      }
395
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
396
    }
397
 
132 ashish 398
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
399
    {
400
      send_getTransactionsForShoppingCartId(shoppingCartId);
401
      return recv_getTransactionsForShoppingCartId();
402
    }
403
 
404
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
405
    {
406
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
407
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
408
      args.shoppingCartId = shoppingCartId;
409
      args.write(oprot_);
410
      oprot_.writeMessageEnd();
411
      oprot_.getTransport().flush();
412
    }
413
 
414
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
415
    {
416
      TMessage msg = iprot_.readMessageBegin();
417
      if (msg.type == TMessageType.EXCEPTION) {
418
        TApplicationException x = TApplicationException.read(iprot_);
419
        iprot_.readMessageEnd();
420
        throw x;
421
      }
422
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
423
      result.read(iprot_);
424
      iprot_.readMessageEnd();
425
      if (result.isSetSuccess()) {
426
        return result.success;
427
      }
428
      if (result.ex != null) {
429
        throw result.ex;
430
      }
431
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
432
    }
433
 
68 ashish 434
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
435
    {
436
      send_getTransactionStatus(transactionId);
437
      return recv_getTransactionStatus();
438
    }
439
 
440
    public void send_getTransactionStatus(long transactionId) throws TException
441
    {
442
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
443
      getTransactionStatus_args args = new getTransactionStatus_args();
444
      args.transactionId = transactionId;
445
      args.write(oprot_);
446
      oprot_.writeMessageEnd();
447
      oprot_.getTransport().flush();
448
    }
449
 
450
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
451
    {
452
      TMessage msg = iprot_.readMessageBegin();
453
      if (msg.type == TMessageType.EXCEPTION) {
454
        TApplicationException x = TApplicationException.read(iprot_);
455
        iprot_.readMessageEnd();
456
        throw x;
457
      }
458
      getTransactionStatus_result result = new getTransactionStatus_result();
459
      result.read(iprot_);
460
      iprot_.readMessageEnd();
461
      if (result.isSetSuccess()) {
462
        return result.success;
463
      }
464
      if (result.ex != null) {
465
        throw result.ex;
466
      }
467
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
468
    }
469
 
470
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
471
    {
472
      send_changeTransactionStatus(transactionId, status, description);
473
      return recv_changeTransactionStatus();
474
    }
475
 
476
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
477
    {
478
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
479
      changeTransactionStatus_args args = new changeTransactionStatus_args();
480
      args.transactionId = transactionId;
481
      args.status = status;
482
      args.description = description;
483
      args.write(oprot_);
484
      oprot_.writeMessageEnd();
485
      oprot_.getTransport().flush();
486
    }
487
 
488
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
489
    {
490
      TMessage msg = iprot_.readMessageBegin();
491
      if (msg.type == TMessageType.EXCEPTION) {
492
        TApplicationException x = TApplicationException.read(iprot_);
493
        iprot_.readMessageEnd();
494
        throw x;
495
      }
496
      changeTransactionStatus_result result = new changeTransactionStatus_result();
497
      result.read(iprot_);
498
      iprot_.readMessageEnd();
499
      if (result.isSetSuccess()) {
500
        return result.success;
501
      }
502
      if (result.ex != null) {
503
        throw result.ex;
504
      }
505
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
506
    }
507
 
1398 varun.gupt 508
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 509
    {
1398 varun.gupt 510
      send_enqueueTransactionInfoEmail(transactionId);
511
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 512
    }
513
 
1398 varun.gupt 514
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 515
    {
1398 varun.gupt 516
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
517
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 518
      args.transactionId = transactionId;
519
      args.write(oprot_);
520
      oprot_.writeMessageEnd();
521
      oprot_.getTransport().flush();
522
    }
523
 
1398 varun.gupt 524
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 525
    {
526
      TMessage msg = iprot_.readMessageBegin();
527
      if (msg.type == TMessageType.EXCEPTION) {
528
        TApplicationException x = TApplicationException.read(iprot_);
529
        iprot_.readMessageEnd();
530
        throw x;
531
      }
1398 varun.gupt 532
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 533
      result.read(iprot_);
534
      iprot_.readMessageEnd();
535
      if (result.isSetSuccess()) {
536
        return result.success;
537
      }
538
      if (result.ex != null) {
539
        throw result.ex;
540
      }
1398 varun.gupt 541
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 542
    }
543
 
483 rajveer 544
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 545
    {
483 rajveer 546
      send_getAllOrders(status, from_date, to_date, warehouse_id);
547
      return recv_getAllOrders();
68 ashish 548
    }
549
 
483 rajveer 550
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 551
    {
483 rajveer 552
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
553
      getAllOrders_args args = new getAllOrders_args();
554
      args.status = status;
555
      args.from_date = from_date;
556
      args.to_date = to_date;
557
      args.warehouse_id = warehouse_id;
68 ashish 558
      args.write(oprot_);
559
      oprot_.writeMessageEnd();
560
      oprot_.getTransport().flush();
561
    }
562
 
483 rajveer 563
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 564
    {
565
      TMessage msg = iprot_.readMessageBegin();
566
      if (msg.type == TMessageType.EXCEPTION) {
567
        TApplicationException x = TApplicationException.read(iprot_);
568
        iprot_.readMessageEnd();
569
        throw x;
570
      }
483 rajveer 571
      getAllOrders_result result = new getAllOrders_result();
68 ashish 572
      result.read(iprot_);
573
      iprot_.readMessageEnd();
574
      if (result.isSetSuccess()) {
575
        return result.success;
576
      }
577
      if (result.ex != null) {
578
        throw result.ex;
579
      }
483 rajveer 580
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 581
    }
582
 
1022 varun.gupt 583
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
584
    {
585
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
586
      return recv_getOrdersByBillingDate();
587
    }
588
 
589
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
590
    {
591
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
592
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
593
      args.status = status;
594
      args.start_billing_date = start_billing_date;
595
      args.end_billing_date = end_billing_date;
596
      args.warehouse_id = warehouse_id;
597
      args.write(oprot_);
598
      oprot_.writeMessageEnd();
599
      oprot_.getTransport().flush();
600
    }
601
 
602
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
603
    {
604
      TMessage msg = iprot_.readMessageBegin();
605
      if (msg.type == TMessageType.EXCEPTION) {
606
        TApplicationException x = TApplicationException.read(iprot_);
607
        iprot_.readMessageEnd();
608
        throw x;
609
      }
610
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
611
      result.read(iprot_);
612
      iprot_.readMessageEnd();
613
      if (result.isSetSuccess()) {
614
        return result.success;
615
      }
616
      if (result.ex != null) {
617
        throw result.ex;
618
      }
619
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
620
    }
621
 
1382 varun.gupt 622
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
623
    {
624
      send_getReturnableOrdersForCustomer(customer_id, limit);
625
      return recv_getReturnableOrdersForCustomer();
626
    }
627
 
628
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
629
    {
630
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
631
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
632
      args.customer_id = customer_id;
633
      args.limit = limit;
634
      args.write(oprot_);
635
      oprot_.writeMessageEnd();
636
      oprot_.getTransport().flush();
637
    }
638
 
639
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
640
    {
641
      TMessage msg = iprot_.readMessageBegin();
642
      if (msg.type == TMessageType.EXCEPTION) {
643
        TApplicationException x = TApplicationException.read(iprot_);
644
        iprot_.readMessageEnd();
645
        throw x;
646
      }
647
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
648
      result.read(iprot_);
649
      iprot_.readMessageEnd();
650
      if (result.isSetSuccess()) {
651
        return result.success;
652
      }
653
      if (result.ex != null) {
654
        throw result.ex;
655
      }
656
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
657
    }
658
 
659
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
660
    {
661
      send_getCancellableOrdersForCustomer(customer_id, limit);
662
      return recv_getCancellableOrdersForCustomer();
663
    }
664
 
665
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
666
    {
667
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
668
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
669
      args.customer_id = customer_id;
670
      args.limit = limit;
671
      args.write(oprot_);
672
      oprot_.writeMessageEnd();
673
      oprot_.getTransport().flush();
674
    }
675
 
676
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
677
    {
678
      TMessage msg = iprot_.readMessageBegin();
679
      if (msg.type == TMessageType.EXCEPTION) {
680
        TApplicationException x = TApplicationException.read(iprot_);
681
        iprot_.readMessageEnd();
682
        throw x;
683
      }
684
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
685
      result.read(iprot_);
686
      iprot_.readMessageEnd();
687
      if (result.isSetSuccess()) {
688
        return result.success;
689
      }
690
      if (result.ex != null) {
691
        throw result.ex;
692
      }
693
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
694
    }
695
 
483 rajveer 696
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 697
    {
483 rajveer 698
      send_changeOrderStatus(orderId, status, description);
699
      return recv_changeOrderStatus();
68 ashish 700
    }
701
 
483 rajveer 702
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 703
    {
483 rajveer 704
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
705
      changeOrderStatus_args args = new changeOrderStatus_args();
706
      args.orderId = orderId;
707
      args.status = status;
708
      args.description = description;
68 ashish 709
      args.write(oprot_);
710
      oprot_.writeMessageEnd();
711
      oprot_.getTransport().flush();
712
    }
713
 
483 rajveer 714
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 715
    {
716
      TMessage msg = iprot_.readMessageBegin();
717
      if (msg.type == TMessageType.EXCEPTION) {
718
        TApplicationException x = TApplicationException.read(iprot_);
719
        iprot_.readMessageEnd();
720
        throw x;
721
      }
483 rajveer 722
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 723
      result.read(iprot_);
724
      iprot_.readMessageEnd();
725
      if (result.isSetSuccess()) {
726
        return result.success;
727
      }
728
      if (result.ex != null) {
729
        throw result.ex;
730
      }
483 rajveer 731
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 732
    }
733
 
1148 chandransh 734
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 735
    {
1148 chandransh 736
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 737
      return recv_addBillingDetails();
738
    }
739
 
1148 chandransh 740
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 741
    {
742
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
743
      addBillingDetails_args args = new addBillingDetails_args();
744
      args.orderId = orderId;
745
      args.invoice_number = invoice_number;
746
      args.billed_by = billed_by;
747
      args.write(oprot_);
748
      oprot_.writeMessageEnd();
749
      oprot_.getTransport().flush();
750
    }
751
 
752
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
753
    {
754
      TMessage msg = iprot_.readMessageBegin();
755
      if (msg.type == TMessageType.EXCEPTION) {
756
        TApplicationException x = TApplicationException.read(iprot_);
757
        iprot_.readMessageEnd();
758
        throw x;
759
      }
760
      addBillingDetails_result result = new addBillingDetails_result();
761
      result.read(iprot_);
762
      iprot_.readMessageEnd();
763
      if (result.isSetSuccess()) {
764
        return result.success;
765
      }
766
      if (result.ex != null) {
767
        throw result.ex;
768
      }
769
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
770
    }
771
 
2364 chandransh 772
    public boolean addJacketNumber(long orderId, long jacketNumber, long imeiNumber, String billedBy) throws TransactionServiceException, TException
1148 chandransh 773
    {
2364 chandransh 774
      send_addJacketNumber(orderId, jacketNumber, imeiNumber, billedBy);
1148 chandransh 775
      return recv_addJacketNumber();
776
    }
777
 
2364 chandransh 778
    public void send_addJacketNumber(long orderId, long jacketNumber, long imeiNumber, String billedBy) throws TException
1148 chandransh 779
    {
780
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
781
      addJacketNumber_args args = new addJacketNumber_args();
782
      args.orderId = orderId;
783
      args.jacketNumber = jacketNumber;
2364 chandransh 784
      args.imeiNumber = imeiNumber;
785
      args.billedBy = billedBy;
1148 chandransh 786
      args.write(oprot_);
787
      oprot_.writeMessageEnd();
788
      oprot_.getTransport().flush();
789
    }
790
 
791
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
792
    {
793
      TMessage msg = iprot_.readMessageBegin();
794
      if (msg.type == TMessageType.EXCEPTION) {
795
        TApplicationException x = TApplicationException.read(iprot_);
796
        iprot_.readMessageEnd();
797
        throw x;
798
      }
799
      addJacketNumber_result result = new addJacketNumber_result();
800
      result.read(iprot_);
801
      iprot_.readMessageEnd();
802
      if (result.isSetSuccess()) {
803
        return result.success;
804
      }
805
      if (result.ex != null) {
806
        throw result.ex;
807
      }
808
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
809
    }
810
 
923 rajveer 811
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
812
    {
813
      send_acceptOrder(orderId);
814
      return recv_acceptOrder();
815
    }
816
 
817
    public void send_acceptOrder(long orderId) throws TException
818
    {
819
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
820
      acceptOrder_args args = new acceptOrder_args();
821
      args.orderId = orderId;
822
      args.write(oprot_);
823
      oprot_.writeMessageEnd();
824
      oprot_.getTransport().flush();
825
    }
826
 
827
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
828
    {
829
      TMessage msg = iprot_.readMessageBegin();
830
      if (msg.type == TMessageType.EXCEPTION) {
831
        TApplicationException x = TApplicationException.read(iprot_);
832
        iprot_.readMessageEnd();
833
        throw x;
834
      }
835
      acceptOrder_result result = new acceptOrder_result();
836
      result.read(iprot_);
837
      iprot_.readMessageEnd();
838
      if (result.isSetSuccess()) {
839
        return result.success;
840
      }
841
      if (result.ex != null) {
842
        throw result.ex;
843
      }
844
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
845
    }
846
 
847
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
848
    {
849
      send_billOrder(orderId);
850
      return recv_billOrder();
851
    }
852
 
853
    public void send_billOrder(long orderId) throws TException
854
    {
855
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
856
      billOrder_args args = new billOrder_args();
857
      args.orderId = orderId;
858
      args.write(oprot_);
859
      oprot_.writeMessageEnd();
860
      oprot_.getTransport().flush();
861
    }
862
 
863
    public boolean recv_billOrder() throws TransactionServiceException, TException
864
    {
865
      TMessage msg = iprot_.readMessageBegin();
866
      if (msg.type == TMessageType.EXCEPTION) {
867
        TApplicationException x = TApplicationException.read(iprot_);
868
        iprot_.readMessageEnd();
869
        throw x;
870
      }
871
      billOrder_result result = new billOrder_result();
872
      result.read(iprot_);
873
      iprot_.readMessageEnd();
874
      if (result.isSetSuccess()) {
875
        return result.success;
876
      }
877
      if (result.ex != null) {
878
        throw result.ex;
879
      }
880
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
881
    }
882
 
1529 ankur.sing 883
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 884
    {
1529 ankur.sing 885
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 886
      return recv_getOrdersForTransaction();
68 ashish 887
    }
888
 
1529 ankur.sing 889
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 890
    {
483 rajveer 891
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
892
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 893
      args.transactionId = transactionId;
1529 ankur.sing 894
      args.customerId = customerId;
68 ashish 895
      args.write(oprot_);
896
      oprot_.writeMessageEnd();
897
      oprot_.getTransport().flush();
898
    }
899
 
483 rajveer 900
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 901
    {
902
      TMessage msg = iprot_.readMessageBegin();
903
      if (msg.type == TMessageType.EXCEPTION) {
904
        TApplicationException x = TApplicationException.read(iprot_);
905
        iprot_.readMessageEnd();
906
        throw x;
907
      }
483 rajveer 908
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 909
      result.read(iprot_);
910
      iprot_.readMessageEnd();
911
      if (result.isSetSuccess()) {
912
        return result.success;
913
      }
914
      if (result.ex != null) {
915
        throw result.ex;
916
      }
483 rajveer 917
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 918
    }
919
 
483 rajveer 920
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 921
    {
483 rajveer 922
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
923
      return recv_getOrdersForCustomer();
68 ashish 924
    }
925
 
483 rajveer 926
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 927
    {
483 rajveer 928
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
929
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
930
      args.customerId = customerId;
931
      args.from_date = from_date;
932
      args.to_date = to_date;
933
      args.status = status;
68 ashish 934
      args.write(oprot_);
935
      oprot_.writeMessageEnd();
936
      oprot_.getTransport().flush();
937
    }
938
 
483 rajveer 939
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 940
    {
941
      TMessage msg = iprot_.readMessageBegin();
942
      if (msg.type == TMessageType.EXCEPTION) {
943
        TApplicationException x = TApplicationException.read(iprot_);
944
        iprot_.readMessageEnd();
945
        throw x;
946
      }
483 rajveer 947
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 948
      result.read(iprot_);
949
      iprot_.readMessageEnd();
950
      if (result.isSetSuccess()) {
951
        return result.success;
952
      }
953
      if (result.ex != null) {
954
        throw result.ex;
955
      }
483 rajveer 956
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 957
    }
958
 
483 rajveer 959
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 960
    {
483 rajveer 961
      send_createOrder(order);
962
      return recv_createOrder();
68 ashish 963
    }
964
 
483 rajveer 965
    public void send_createOrder(Order order) throws TException
68 ashish 966
    {
483 rajveer 967
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
968
      createOrder_args args = new createOrder_args();
969
      args.order = order;
68 ashish 970
      args.write(oprot_);
971
      oprot_.writeMessageEnd();
972
      oprot_.getTransport().flush();
973
    }
974
 
483 rajveer 975
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 976
    {
977
      TMessage msg = iprot_.readMessageBegin();
978
      if (msg.type == TMessageType.EXCEPTION) {
979
        TApplicationException x = TApplicationException.read(iprot_);
980
        iprot_.readMessageEnd();
981
        throw x;
982
      }
483 rajveer 983
      createOrder_result result = new createOrder_result();
68 ashish 984
      result.read(iprot_);
985
      iprot_.readMessageEnd();
986
      if (result.isSetSuccess()) {
987
        return result.success;
988
      }
989
      if (result.ex != null) {
990
        throw result.ex;
991
      }
483 rajveer 992
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 993
    }
994
 
483 rajveer 995
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 996
    {
483 rajveer 997
      send_getOrder(id);
998
      return recv_getOrder();
68 ashish 999
    }
1000
 
483 rajveer 1001
    public void send_getOrder(long id) throws TException
68 ashish 1002
    {
483 rajveer 1003
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
1004
      getOrder_args args = new getOrder_args();
1005
      args.id = id;
68 ashish 1006
      args.write(oprot_);
1007
      oprot_.writeMessageEnd();
1008
      oprot_.getTransport().flush();
1009
    }
1010
 
483 rajveer 1011
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 1012
    {
1013
      TMessage msg = iprot_.readMessageBegin();
1014
      if (msg.type == TMessageType.EXCEPTION) {
1015
        TApplicationException x = TApplicationException.read(iprot_);
1016
        iprot_.readMessageEnd();
1017
        throw x;
1018
      }
483 rajveer 1019
      getOrder_result result = new getOrder_result();
68 ashish 1020
      result.read(iprot_);
1021
      iprot_.readMessageEnd();
1022
      if (result.isSetSuccess()) {
1023
        return result.success;
1024
      }
1025
      if (result.ex != null) {
1026
        throw result.ex;
1027
      }
483 rajveer 1028
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1029
    }
1030
 
483 rajveer 1031
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1032
    {
483 rajveer 1033
      send_getLineItemsForOrder(orderId);
1034
      return recv_getLineItemsForOrder();
68 ashish 1035
    }
1036
 
483 rajveer 1037
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1038
    {
483 rajveer 1039
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1040
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1041
      args.orderId = orderId;
68 ashish 1042
      args.write(oprot_);
1043
      oprot_.writeMessageEnd();
1044
      oprot_.getTransport().flush();
1045
    }
1046
 
483 rajveer 1047
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1048
    {
1049
      TMessage msg = iprot_.readMessageBegin();
1050
      if (msg.type == TMessageType.EXCEPTION) {
1051
        TApplicationException x = TApplicationException.read(iprot_);
1052
        iprot_.readMessageEnd();
1053
        throw x;
1054
      }
483 rajveer 1055
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1056
      result.read(iprot_);
1057
      iprot_.readMessageEnd();
1058
      if (result.isSetSuccess()) {
1059
        return result.success;
1060
      }
1061
      if (result.ex != null) {
1062
        throw result.ex;
1063
      }
483 rajveer 1064
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1065
    }
1066
 
1529 ankur.sing 1067
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1068
    {
1069
      send_getOrderForCustomer(orderId, customerId);
1070
      return recv_getOrderForCustomer();
1071
    }
1072
 
1073
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1074
    {
1075
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1076
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1077
      args.orderId = orderId;
1078
      args.customerId = customerId;
1079
      args.write(oprot_);
1080
      oprot_.writeMessageEnd();
1081
      oprot_.getTransport().flush();
1082
    }
1083
 
1084
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1085
    {
1086
      TMessage msg = iprot_.readMessageBegin();
1087
      if (msg.type == TMessageType.EXCEPTION) {
1088
        TApplicationException x = TApplicationException.read(iprot_);
1089
        iprot_.readMessageEnd();
1090
        throw x;
1091
      }
1092
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1093
      result.read(iprot_);
1094
      iprot_.readMessageEnd();
1095
      if (result.isSetSuccess()) {
1096
        return result.success;
1097
      }
1098
      if (result.ex != null) {
1099
        throw result.ex;
1100
      }
1101
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1102
    }
1103
 
1221 chandransh 1104
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1105
    {
1106
      send_batchOrders(warehouseId);
1107
      return recv_batchOrders();
1108
    }
1109
 
1110
    public void send_batchOrders(long warehouseId) throws TException
1111
    {
1112
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1113
      batchOrders_args args = new batchOrders_args();
1114
      args.warehouseId = warehouseId;
1115
      args.write(oprot_);
1116
      oprot_.writeMessageEnd();
1117
      oprot_.getTransport().flush();
1118
    }
1119
 
1120
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1121
    {
1122
      TMessage msg = iprot_.readMessageBegin();
1123
      if (msg.type == TMessageType.EXCEPTION) {
1124
        TApplicationException x = TApplicationException.read(iprot_);
1125
        iprot_.readMessageEnd();
1126
        throw x;
1127
      }
1128
      batchOrders_result result = new batchOrders_result();
1129
      result.read(iprot_);
1130
      iprot_.readMessageEnd();
1131
      if (result.isSetSuccess()) {
1132
        return result.success;
1133
      }
1134
      if (result.ex != null) {
1135
        throw result.ex;
1136
      }
1137
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1138
    }
1139
 
1209 chandransh 1140
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1141
    {
1142
      send_markOrderAsOutOfStock(orderId);
1143
      return recv_markOrderAsOutOfStock();
1144
    }
1145
 
1146
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1147
    {
1148
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1149
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1150
      args.orderId = orderId;
1151
      args.write(oprot_);
1152
      oprot_.writeMessageEnd();
1153
      oprot_.getTransport().flush();
1154
    }
1155
 
1156
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1157
    {
1158
      TMessage msg = iprot_.readMessageBegin();
1159
      if (msg.type == TMessageType.EXCEPTION) {
1160
        TApplicationException x = TApplicationException.read(iprot_);
1161
        iprot_.readMessageEnd();
1162
        throw x;
1163
      }
1164
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1165
      result.read(iprot_);
1166
      iprot_.readMessageEnd();
1167
      if (result.isSetSuccess()) {
1168
        return result.success;
1169
      }
1170
      if (result.ex != null) {
1171
        throw result.ex;
1172
      }
1173
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1174
    }
1175
 
758 chandransh 1176
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1177
    {
1178
      send_markOrdersAsManifested(warehouseId, providerId);
1179
      return recv_markOrdersAsManifested();
1180
    }
1181
 
1182
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1183
    {
1184
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1185
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1186
      args.warehouseId = warehouseId;
1187
      args.providerId = providerId;
1188
      args.write(oprot_);
1189
      oprot_.writeMessageEnd();
1190
      oprot_.getTransport().flush();
1191
    }
1192
 
1193
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1194
    {
1195
      TMessage msg = iprot_.readMessageBegin();
1196
      if (msg.type == TMessageType.EXCEPTION) {
1197
        TApplicationException x = TApplicationException.read(iprot_);
1198
        iprot_.readMessageEnd();
1199
        throw x;
1200
      }
1201
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1202
      result.read(iprot_);
1203
      iprot_.readMessageEnd();
1204
      if (result.isSetSuccess()) {
1205
        return result.success;
1206
      }
1207
      if (result.ex != null) {
1208
        throw result.ex;
1209
      }
1210
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1211
    }
1212
 
1245 chandransh 1213
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1214
    {
1215
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1216
      return recv_markOrdersAsPickedUp();
1217
    }
1218
 
1245 chandransh 1219
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1220
    {
1221
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1222
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1223
      args.providerId = providerId;
1224
      args.pickupDetails = pickupDetails;
1225
      args.write(oprot_);
1226
      oprot_.writeMessageEnd();
1227
      oprot_.getTransport().flush();
1228
    }
1229
 
1230
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1231
    {
1232
      TMessage msg = iprot_.readMessageBegin();
1233
      if (msg.type == TMessageType.EXCEPTION) {
1234
        TApplicationException x = TApplicationException.read(iprot_);
1235
        iprot_.readMessageEnd();
1236
        throw x;
1237
      }
1238
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1239
      result.read(iprot_);
1240
      iprot_.readMessageEnd();
1241
      if (result.isSetSuccess()) {
1242
        return result.success;
1243
      }
1244
      if (result.ex != null) {
1245
        throw result.ex;
1246
      }
1247
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1248
    }
1249
 
1133 chandransh 1250
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1251
    {
1252
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1253
      recv_markOrdersAsDelivered();
1254
    }
1255
 
1256
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1257
    {
1258
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1259
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1260
      args.providerId = providerId;
1261
      args.deliveredOrders = deliveredOrders;
1262
      args.write(oprot_);
1263
      oprot_.writeMessageEnd();
1264
      oprot_.getTransport().flush();
1265
    }
1266
 
1267
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1268
    {
1269
      TMessage msg = iprot_.readMessageBegin();
1270
      if (msg.type == TMessageType.EXCEPTION) {
1271
        TApplicationException x = TApplicationException.read(iprot_);
1272
        iprot_.readMessageEnd();
1273
        throw x;
1274
      }
1275
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1276
      result.read(iprot_);
1277
      iprot_.readMessageEnd();
1278
      if (result.ex != null) {
1279
        throw result.ex;
1280
      }
1281
      return;
1282
    }
1283
 
1284
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1285
    {
1286
      send_markOrdersAsFailed(providerId, returnedOrders);
1287
      recv_markOrdersAsFailed();
1288
    }
1289
 
1290
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1291
    {
1292
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1293
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1294
      args.providerId = providerId;
1295
      args.returnedOrders = returnedOrders;
1296
      args.write(oprot_);
1297
      oprot_.writeMessageEnd();
1298
      oprot_.getTransport().flush();
1299
    }
1300
 
1301
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1302
    {
1303
      TMessage msg = iprot_.readMessageBegin();
1304
      if (msg.type == TMessageType.EXCEPTION) {
1305
        TApplicationException x = TApplicationException.read(iprot_);
1306
        iprot_.readMessageEnd();
1307
        throw x;
1308
      }
1309
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1310
      result.read(iprot_);
1311
      iprot_.readMessageEnd();
1312
      if (result.ex != null) {
1313
        throw result.ex;
1314
      }
1315
      return;
1316
    }
1317
 
1245 chandransh 1318
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1319
    {
1320
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1321
      recv_updateNonDeliveryReason();
1322
    }
1323
 
1324
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1325
    {
1326
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1327
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1328
      args.providerId = providerId;
1329
      args.undeliveredOrders = undeliveredOrders;
1330
      args.write(oprot_);
1331
      oprot_.writeMessageEnd();
1332
      oprot_.getTransport().flush();
1333
    }
1334
 
1335
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1336
    {
1337
      TMessage msg = iprot_.readMessageBegin();
1338
      if (msg.type == TMessageType.EXCEPTION) {
1339
        TApplicationException x = TApplicationException.read(iprot_);
1340
        iprot_.readMessageEnd();
1341
        throw x;
1342
      }
1343
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1344
      result.read(iprot_);
1345
      iprot_.readMessageEnd();
1346
      if (result.ex != null) {
1347
        throw result.ex;
1348
      }
1349
      return;
1350
    }
1351
 
1406 ankur.sing 1352
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1353
    {
1354
      send_getUndeliveredOrders(providerId, warehouseId);
1355
      return recv_getUndeliveredOrders();
1356
    }
1357
 
1358
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1359
    {
1360
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1361
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1362
      args.providerId = providerId;
1363
      args.warehouseId = warehouseId;
1364
      args.write(oprot_);
1365
      oprot_.writeMessageEnd();
1366
      oprot_.getTransport().flush();
1367
    }
1368
 
1369
    public List<Order> recv_getUndeliveredOrders() throws TException
1370
    {
1371
      TMessage msg = iprot_.readMessageBegin();
1372
      if (msg.type == TMessageType.EXCEPTION) {
1373
        TApplicationException x = TApplicationException.read(iprot_);
1374
        iprot_.readMessageEnd();
1375
        throw x;
1376
      }
1377
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1378
      result.read(iprot_);
1379
      iprot_.readMessageEnd();
1380
      if (result.isSetSuccess()) {
1381
        return result.success;
1382
      }
1383
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1384
    }
1385
 
483 rajveer 1386
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1387
    {
483 rajveer 1388
      send_getAlerts(orderId, valid);
305 ashish 1389
      return recv_getAlerts();
1390
    }
1391
 
483 rajveer 1392
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1393
    {
1394
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1395
      getAlerts_args args = new getAlerts_args();
483 rajveer 1396
      args.orderId = orderId;
305 ashish 1397
      args.valid = valid;
1398
      args.write(oprot_);
1399
      oprot_.writeMessageEnd();
1400
      oprot_.getTransport().flush();
1401
    }
1402
 
1403
    public List<Alert> recv_getAlerts() throws TException
1404
    {
1405
      TMessage msg = iprot_.readMessageBegin();
1406
      if (msg.type == TMessageType.EXCEPTION) {
1407
        TApplicationException x = TApplicationException.read(iprot_);
1408
        iprot_.readMessageEnd();
1409
        throw x;
1410
      }
1411
      getAlerts_result result = new getAlerts_result();
1412
      result.read(iprot_);
1413
      iprot_.readMessageEnd();
1414
      if (result.isSetSuccess()) {
1415
        return result.success;
1416
      }
1417
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1418
    }
1419
 
483 rajveer 1420
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1421
    {
483 rajveer 1422
      send_setAlert(orderId, unset, type, comment);
305 ashish 1423
      recv_setAlert();
1424
    }
1425
 
483 rajveer 1426
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1427
    {
1428
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1429
      setAlert_args args = new setAlert_args();
483 rajveer 1430
      args.orderId = orderId;
305 ashish 1431
      args.unset = unset;
1432
      args.type = type;
1433
      args.comment = comment;
1434
      args.write(oprot_);
1435
      oprot_.writeMessageEnd();
1436
      oprot_.getTransport().flush();
1437
    }
1438
 
1439
    public void recv_setAlert() throws TException
1440
    {
1441
      TMessage msg = iprot_.readMessageBegin();
1442
      if (msg.type == TMessageType.EXCEPTION) {
1443
        TApplicationException x = TApplicationException.read(iprot_);
1444
        iprot_.readMessageEnd();
1445
        throw x;
1446
      }
1447
      setAlert_result result = new setAlert_result();
1448
      result.read(iprot_);
1449
      iprot_.readMessageEnd();
1450
      return;
1451
    }
1452
 
1598 ankur.sing 1453
    public long getValidOrderCount() throws TException
1454
    {
1455
      send_getValidOrderCount();
1456
      return recv_getValidOrderCount();
1457
    }
1458
 
1459
    public void send_getValidOrderCount() throws TException
1460
    {
1461
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1462
      getValidOrderCount_args args = new getValidOrderCount_args();
1463
      args.write(oprot_);
1464
      oprot_.writeMessageEnd();
1465
      oprot_.getTransport().flush();
1466
    }
1467
 
1468
    public long recv_getValidOrderCount() throws TException
1469
    {
1470
      TMessage msg = iprot_.readMessageBegin();
1471
      if (msg.type == TMessageType.EXCEPTION) {
1472
        TApplicationException x = TApplicationException.read(iprot_);
1473
        iprot_.readMessageEnd();
1474
        throw x;
1475
      }
1476
      getValidOrderCount_result result = new getValidOrderCount_result();
1477
      result.read(iprot_);
1478
      iprot_.readMessageEnd();
1479
      if (result.isSetSuccess()) {
1480
        return result.success;
1481
      }
1482
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1483
    }
1484
 
1629 ankur.sing 1485
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException
1486
    {
1487
      send_getNoOfCustomersWithSuccessfulTransaction();
1488
      return recv_getNoOfCustomersWithSuccessfulTransaction();
1489
    }
1490
 
1491
    public void send_getNoOfCustomersWithSuccessfulTransaction() throws TException
1492
    {
1493
      oprot_.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.CALL, seqid_));
1494
      getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
1495
      args.write(oprot_);
1496
      oprot_.writeMessageEnd();
1497
      oprot_.getTransport().flush();
1498
    }
1499
 
1500
    public long recv_getNoOfCustomersWithSuccessfulTransaction() throws TException
1501
    {
1502
      TMessage msg = iprot_.readMessageBegin();
1503
      if (msg.type == TMessageType.EXCEPTION) {
1504
        TApplicationException x = TApplicationException.read(iprot_);
1505
        iprot_.readMessageEnd();
1506
        throw x;
1507
      }
1508
      getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
1509
      result.read(iprot_);
1510
      iprot_.readMessageEnd();
1511
      if (result.isSetSuccess()) {
1512
        return result.success;
1513
      }
1514
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1515
    }
1516
 
1731 ankur.sing 1517
    public List<Double> getValidOrdersAmountRange() throws TException
1629 ankur.sing 1518
    {
1731 ankur.sing 1519
      send_getValidOrdersAmountRange();
1520
      return recv_getValidOrdersAmountRange();
1629 ankur.sing 1521
    }
1522
 
1731 ankur.sing 1523
    public void send_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1524
    {
1731 ankur.sing 1525
      oprot_.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.CALL, seqid_));
1526
      getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 1527
      args.write(oprot_);
1528
      oprot_.writeMessageEnd();
1529
      oprot_.getTransport().flush();
1530
    }
1531
 
1731 ankur.sing 1532
    public List<Double> recv_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1533
    {
1534
      TMessage msg = iprot_.readMessageBegin();
1535
      if (msg.type == TMessageType.EXCEPTION) {
1536
        TApplicationException x = TApplicationException.read(iprot_);
1537
        iprot_.readMessageEnd();
1538
        throw x;
1539
      }
1731 ankur.sing 1540
      getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
1629 ankur.sing 1541
      result.read(iprot_);
1542
      iprot_.readMessageEnd();
1543
      if (result.isSetSuccess()) {
1544
        return result.success;
1545
      }
1731 ankur.sing 1546
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1629 ankur.sing 1547
    }
1548
 
1886 ankur.sing 1549
    public List<Order> getValidOrders(long limit) throws TException
1550
    {
1551
      send_getValidOrders(limit);
1552
      return recv_getValidOrders();
1553
    }
1554
 
1555
    public void send_getValidOrders(long limit) throws TException
1556
    {
1557
      oprot_.writeMessageBegin(new TMessage("getValidOrders", TMessageType.CALL, seqid_));
1558
      getValidOrders_args args = new getValidOrders_args();
1559
      args.limit = limit;
1560
      args.write(oprot_);
1561
      oprot_.writeMessageEnd();
1562
      oprot_.getTransport().flush();
1563
    }
1564
 
1565
    public List<Order> recv_getValidOrders() throws TException
1566
    {
1567
      TMessage msg = iprot_.readMessageBegin();
1568
      if (msg.type == TMessageType.EXCEPTION) {
1569
        TApplicationException x = TApplicationException.read(iprot_);
1570
        iprot_.readMessageEnd();
1571
        throw x;
1572
      }
1573
      getValidOrders_result result = new getValidOrders_result();
1574
      result.read(iprot_);
1575
      iprot_.readMessageEnd();
1576
      if (result.isSetSuccess()) {
1577
        return result.success;
1578
      }
1579
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1580
    }
1581
 
68 ashish 1582
  }
1583
  public static class Processor implements TProcessor {
1584
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1585
    public Processor(Iface iface)
1586
    {
1587
      iface_ = iface;
764 rajveer 1588
      processMap_.put("closeSession", new closeSession());
68 ashish 1589
      processMap_.put("createTransaction", new createTransaction());
1590
      processMap_.put("getTransaction", new getTransaction());
1591
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1592
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1593
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1594
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1595
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1596
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1597
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1598
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1599
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1600
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1601
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1602
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1603
      processMap_.put("acceptOrder", new acceptOrder());
1604
      processMap_.put("billOrder", new billOrder());
483 rajveer 1605
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1606
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1607
      processMap_.put("createOrder", new createOrder());
1608
      processMap_.put("getOrder", new getOrder());
1609
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 1610
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 1611
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1612
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1613
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1614
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1615
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1616
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1617
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1618
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1619
      processMap_.put("getAlerts", new getAlerts());
1620
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 1621
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1629 ankur.sing 1622
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1731 ankur.sing 1623
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1886 ankur.sing 1624
      processMap_.put("getValidOrders", new getValidOrders());
68 ashish 1625
    }
1626
 
1627
    protected static interface ProcessFunction {
1628
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1629
    }
1630
 
1631
    private Iface iface_;
1632
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1633
 
1634
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1635
    {
1636
      TMessage msg = iprot.readMessageBegin();
1637
      ProcessFunction fn = processMap_.get(msg.name);
1638
      if (fn == null) {
1639
        TProtocolUtil.skip(iprot, TType.STRUCT);
1640
        iprot.readMessageEnd();
1641
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1642
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1643
        x.write(oprot);
1644
        oprot.writeMessageEnd();
1645
        oprot.getTransport().flush();
1646
        return true;
1647
      }
1648
      fn.process(msg.seqid, iprot, oprot);
1649
      return true;
1650
    }
1651
 
764 rajveer 1652
    private class closeSession implements ProcessFunction {
1653
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1654
      {
1655
        closeSession_args args = new closeSession_args();
1656
        args.read(iprot);
1657
        iprot.readMessageEnd();
1658
        closeSession_result result = new closeSession_result();
1659
        iface_.closeSession();
1660
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1661
        result.write(oprot);
1662
        oprot.writeMessageEnd();
1663
        oprot.getTransport().flush();
1664
      }
1665
 
1666
    }
1667
 
68 ashish 1668
    private class createTransaction implements ProcessFunction {
1669
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1670
      {
1671
        createTransaction_args args = new createTransaction_args();
1672
        args.read(iprot);
1673
        iprot.readMessageEnd();
1674
        createTransaction_result result = new createTransaction_result();
1675
        try {
132 ashish 1676
          result.success = iface_.createTransaction(args.transaction);
1677
          result.setSuccessIsSet(true);
68 ashish 1678
        } catch (TransactionServiceException ex) {
1679
          result.ex = ex;
1680
        } catch (Throwable th) {
1681
          LOGGER.error("Internal error processing createTransaction", th);
1682
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1683
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1684
          x.write(oprot);
1685
          oprot.writeMessageEnd();
1686
          oprot.getTransport().flush();
1687
          return;
1688
        }
1689
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1690
        result.write(oprot);
1691
        oprot.writeMessageEnd();
1692
        oprot.getTransport().flush();
1693
      }
1694
 
1695
    }
1696
 
1697
    private class getTransaction implements ProcessFunction {
1698
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1699
      {
1700
        getTransaction_args args = new getTransaction_args();
1701
        args.read(iprot);
1702
        iprot.readMessageEnd();
1703
        getTransaction_result result = new getTransaction_result();
1704
        try {
1705
          result.success = iface_.getTransaction(args.id);
1706
        } catch (TransactionServiceException ex) {
1707
          result.ex = ex;
1708
        } catch (Throwable th) {
1709
          LOGGER.error("Internal error processing getTransaction", th);
1710
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1711
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1712
          x.write(oprot);
1713
          oprot.writeMessageEnd();
1714
          oprot.getTransport().flush();
1715
          return;
1716
        }
1717
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1718
        result.write(oprot);
1719
        oprot.writeMessageEnd();
1720
        oprot.getTransport().flush();
1721
      }
1722
 
1723
    }
1724
 
1725
    private class getTransactionsForCustomer implements ProcessFunction {
1726
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1727
      {
1728
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1729
        args.read(iprot);
1730
        iprot.readMessageEnd();
1731
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1732
        try {
132 ashish 1733
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1734
        } catch (TransactionServiceException ex) {
1735
          result.ex = ex;
1736
        } catch (Throwable th) {
1737
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1738
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1739
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1740
          x.write(oprot);
1741
          oprot.writeMessageEnd();
1742
          oprot.getTransport().flush();
1743
          return;
1744
        }
1745
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1746
        result.write(oprot);
1747
        oprot.writeMessageEnd();
1748
        oprot.getTransport().flush();
1749
      }
1750
 
1751
    }
1752
 
132 ashish 1753
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1754
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1755
      {
1756
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1757
        args.read(iprot);
1758
        iprot.readMessageEnd();
1759
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1760
        try {
1761
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1762
        } catch (TransactionServiceException ex) {
1763
          result.ex = ex;
1764
        } catch (Throwable th) {
1765
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1766
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1767
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1768
          x.write(oprot);
1769
          oprot.writeMessageEnd();
1770
          oprot.getTransport().flush();
1771
          return;
1772
        }
1773
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1774
        result.write(oprot);
1775
        oprot.writeMessageEnd();
1776
        oprot.getTransport().flush();
1777
      }
1778
 
1779
    }
1780
 
68 ashish 1781
    private class getTransactionStatus implements ProcessFunction {
1782
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1783
      {
1784
        getTransactionStatus_args args = new getTransactionStatus_args();
1785
        args.read(iprot);
1786
        iprot.readMessageEnd();
1787
        getTransactionStatus_result result = new getTransactionStatus_result();
1788
        try {
1789
          result.success = iface_.getTransactionStatus(args.transactionId);
1790
        } catch (TransactionServiceException ex) {
1791
          result.ex = ex;
1792
        } catch (Throwable th) {
1793
          LOGGER.error("Internal error processing getTransactionStatus", th);
1794
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1795
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1796
          x.write(oprot);
1797
          oprot.writeMessageEnd();
1798
          oprot.getTransport().flush();
1799
          return;
1800
        }
1801
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1802
        result.write(oprot);
1803
        oprot.writeMessageEnd();
1804
        oprot.getTransport().flush();
1805
      }
1806
 
1807
    }
1808
 
1809
    private class changeTransactionStatus implements ProcessFunction {
1810
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1811
      {
1812
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1813
        args.read(iprot);
1814
        iprot.readMessageEnd();
1815
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1816
        try {
1817
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1818
          result.setSuccessIsSet(true);
1819
        } catch (TransactionServiceException ex) {
1820
          result.ex = ex;
1821
        } catch (Throwable th) {
1822
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1823
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1824
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1825
          x.write(oprot);
1826
          oprot.writeMessageEnd();
1827
          oprot.getTransport().flush();
1828
          return;
1829
        }
1830
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1831
        result.write(oprot);
1832
        oprot.writeMessageEnd();
1833
        oprot.getTransport().flush();
1834
      }
1835
 
1836
    }
1837
 
1398 varun.gupt 1838
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 1839
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1840
      {
1398 varun.gupt 1841
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 1842
        args.read(iprot);
1843
        iprot.readMessageEnd();
1398 varun.gupt 1844
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 1845
        try {
1398 varun.gupt 1846
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 1847
          result.setSuccessIsSet(true);
1848
        } catch (TransactionServiceException ex) {
1849
          result.ex = ex;
1850
        } catch (Throwable th) {
1398 varun.gupt 1851
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
1852
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
1853
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 1854
          x.write(oprot);
1855
          oprot.writeMessageEnd();
1856
          oprot.getTransport().flush();
1857
          return;
1858
        }
1398 varun.gupt 1859
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 1860
        result.write(oprot);
1861
        oprot.writeMessageEnd();
1862
        oprot.getTransport().flush();
1863
      }
1864
 
1865
    }
1866
 
483 rajveer 1867
    private class getAllOrders implements ProcessFunction {
68 ashish 1868
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1869
      {
483 rajveer 1870
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1871
        args.read(iprot);
1872
        iprot.readMessageEnd();
483 rajveer 1873
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1874
        try {
483 rajveer 1875
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1876
        } catch (TransactionServiceException ex) {
1877
          result.ex = ex;
1878
        } catch (Throwable th) {
483 rajveer 1879
          LOGGER.error("Internal error processing getAllOrders", th);
1880
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1881
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1882
          x.write(oprot);
1883
          oprot.writeMessageEnd();
1884
          oprot.getTransport().flush();
1885
          return;
1886
        }
483 rajveer 1887
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1888
        result.write(oprot);
1889
        oprot.writeMessageEnd();
1890
        oprot.getTransport().flush();
1891
      }
1892
 
1893
    }
1894
 
1022 varun.gupt 1895
    private class getOrdersByBillingDate implements ProcessFunction {
1896
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1897
      {
1898
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1899
        args.read(iprot);
1900
        iprot.readMessageEnd();
1901
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1902
        try {
1903
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1904
        } catch (TransactionServiceException ex) {
1905
          result.ex = ex;
1906
        } catch (Throwable th) {
1907
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1908
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1909
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1910
          x.write(oprot);
1911
          oprot.writeMessageEnd();
1912
          oprot.getTransport().flush();
1913
          return;
1914
        }
1915
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1916
        result.write(oprot);
1917
        oprot.writeMessageEnd();
1918
        oprot.getTransport().flush();
1919
      }
1920
 
1921
    }
1922
 
1382 varun.gupt 1923
    private class getReturnableOrdersForCustomer implements ProcessFunction {
1924
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1925
      {
1926
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
1927
        args.read(iprot);
1928
        iprot.readMessageEnd();
1929
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
1930
        try {
1931
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
1932
        } catch (TransactionServiceException ex) {
1933
          result.ex = ex;
1934
        } catch (Throwable th) {
1935
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
1936
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
1937
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1938
          x.write(oprot);
1939
          oprot.writeMessageEnd();
1940
          oprot.getTransport().flush();
1941
          return;
1942
        }
1943
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
1944
        result.write(oprot);
1945
        oprot.writeMessageEnd();
1946
        oprot.getTransport().flush();
1947
      }
1948
 
1949
    }
1950
 
1951
    private class getCancellableOrdersForCustomer implements ProcessFunction {
1952
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1953
      {
1954
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
1955
        args.read(iprot);
1956
        iprot.readMessageEnd();
1957
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
1958
        try {
1959
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
1960
        } catch (TransactionServiceException ex) {
1961
          result.ex = ex;
1962
        } catch (Throwable th) {
1963
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
1964
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
1965
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1966
          x.write(oprot);
1967
          oprot.writeMessageEnd();
1968
          oprot.getTransport().flush();
1969
          return;
1970
        }
1971
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
1972
        result.write(oprot);
1973
        oprot.writeMessageEnd();
1974
        oprot.getTransport().flush();
1975
      }
1976
 
1977
    }
1978
 
483 rajveer 1979
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1980
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1981
      {
483 rajveer 1982
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1983
        args.read(iprot);
1984
        iprot.readMessageEnd();
483 rajveer 1985
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1986
        try {
483 rajveer 1987
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1988
          result.setSuccessIsSet(true);
1989
        } catch (TransactionServiceException ex) {
1990
          result.ex = ex;
1991
        } catch (Throwable th) {
483 rajveer 1992
          LOGGER.error("Internal error processing changeOrderStatus", th);
1993
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1994
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1995
          x.write(oprot);
1996
          oprot.writeMessageEnd();
1997
          oprot.getTransport().flush();
1998
          return;
1999
        }
483 rajveer 2000
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 2001
        result.write(oprot);
2002
        oprot.writeMessageEnd();
2003
        oprot.getTransport().flush();
2004
      }
2005
 
2006
    }
2007
 
495 rajveer 2008
    private class addBillingDetails implements ProcessFunction {
2009
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2010
      {
2011
        addBillingDetails_args args = new addBillingDetails_args();
2012
        args.read(iprot);
2013
        iprot.readMessageEnd();
2014
        addBillingDetails_result result = new addBillingDetails_result();
2015
        try {
1148 chandransh 2016
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 2017
          result.setSuccessIsSet(true);
2018
        } catch (TransactionServiceException ex) {
2019
          result.ex = ex;
2020
        } catch (Throwable th) {
2021
          LOGGER.error("Internal error processing addBillingDetails", th);
2022
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
2023
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
2024
          x.write(oprot);
2025
          oprot.writeMessageEnd();
2026
          oprot.getTransport().flush();
2027
          return;
2028
        }
2029
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
2030
        result.write(oprot);
2031
        oprot.writeMessageEnd();
2032
        oprot.getTransport().flush();
2033
      }
2034
 
2035
    }
2036
 
1148 chandransh 2037
    private class addJacketNumber implements ProcessFunction {
2038
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2039
      {
2040
        addJacketNumber_args args = new addJacketNumber_args();
2041
        args.read(iprot);
2042
        iprot.readMessageEnd();
2043
        addJacketNumber_result result = new addJacketNumber_result();
2044
        try {
2364 chandransh 2045
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber, args.imeiNumber, args.billedBy);
1148 chandransh 2046
          result.setSuccessIsSet(true);
2047
        } catch (TransactionServiceException ex) {
2048
          result.ex = ex;
2049
        } catch (Throwable th) {
2050
          LOGGER.error("Internal error processing addJacketNumber", th);
2051
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
2052
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
2053
          x.write(oprot);
2054
          oprot.writeMessageEnd();
2055
          oprot.getTransport().flush();
2056
          return;
2057
        }
2058
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
2059
        result.write(oprot);
2060
        oprot.writeMessageEnd();
2061
        oprot.getTransport().flush();
2062
      }
2063
 
2064
    }
2065
 
923 rajveer 2066
    private class acceptOrder implements ProcessFunction {
2067
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2068
      {
2069
        acceptOrder_args args = new acceptOrder_args();
2070
        args.read(iprot);
2071
        iprot.readMessageEnd();
2072
        acceptOrder_result result = new acceptOrder_result();
2073
        try {
2074
          result.success = iface_.acceptOrder(args.orderId);
2075
          result.setSuccessIsSet(true);
2076
        } catch (TransactionServiceException ex) {
2077
          result.ex = ex;
2078
        } catch (Throwable th) {
2079
          LOGGER.error("Internal error processing acceptOrder", th);
2080
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
2081
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
2082
          x.write(oprot);
2083
          oprot.writeMessageEnd();
2084
          oprot.getTransport().flush();
2085
          return;
2086
        }
2087
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
2088
        result.write(oprot);
2089
        oprot.writeMessageEnd();
2090
        oprot.getTransport().flush();
2091
      }
2092
 
2093
    }
2094
 
2095
    private class billOrder implements ProcessFunction {
2096
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2097
      {
2098
        billOrder_args args = new billOrder_args();
2099
        args.read(iprot);
2100
        iprot.readMessageEnd();
2101
        billOrder_result result = new billOrder_result();
2102
        try {
2103
          result.success = iface_.billOrder(args.orderId);
2104
          result.setSuccessIsSet(true);
2105
        } catch (TransactionServiceException ex) {
2106
          result.ex = ex;
2107
        } catch (Throwable th) {
2108
          LOGGER.error("Internal error processing billOrder", th);
2109
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
2110
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
2111
          x.write(oprot);
2112
          oprot.writeMessageEnd();
2113
          oprot.getTransport().flush();
2114
          return;
2115
        }
2116
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
2117
        result.write(oprot);
2118
        oprot.writeMessageEnd();
2119
        oprot.getTransport().flush();
2120
      }
2121
 
2122
    }
2123
 
483 rajveer 2124
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2125
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2126
      {
483 rajveer 2127
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2128
        args.read(iprot);
2129
        iprot.readMessageEnd();
483 rajveer 2130
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2131
        try {
1529 ankur.sing 2132
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2133
        } catch (TransactionServiceException ex) {
2134
          result.ex = ex;
2135
        } catch (Throwable th) {
483 rajveer 2136
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2137
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2138
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2139
          x.write(oprot);
2140
          oprot.writeMessageEnd();
2141
          oprot.getTransport().flush();
2142
          return;
2143
        }
483 rajveer 2144
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2145
        result.write(oprot);
2146
        oprot.writeMessageEnd();
2147
        oprot.getTransport().flush();
2148
      }
2149
 
2150
    }
2151
 
483 rajveer 2152
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2153
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2154
      {
483 rajveer 2155
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2156
        args.read(iprot);
2157
        iprot.readMessageEnd();
483 rajveer 2158
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2159
        try {
483 rajveer 2160
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2161
        } catch (TransactionServiceException ex) {
2162
          result.ex = ex;
2163
        } catch (Throwable th) {
483 rajveer 2164
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2165
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2166
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2167
          x.write(oprot);
2168
          oprot.writeMessageEnd();
2169
          oprot.getTransport().flush();
2170
          return;
2171
        }
483 rajveer 2172
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2173
        result.write(oprot);
2174
        oprot.writeMessageEnd();
2175
        oprot.getTransport().flush();
2176
      }
2177
 
2178
    }
2179
 
483 rajveer 2180
    private class createOrder implements ProcessFunction {
68 ashish 2181
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2182
      {
483 rajveer 2183
        createOrder_args args = new createOrder_args();
68 ashish 2184
        args.read(iprot);
2185
        iprot.readMessageEnd();
483 rajveer 2186
        createOrder_result result = new createOrder_result();
68 ashish 2187
        try {
483 rajveer 2188
          result.success = iface_.createOrder(args.order);
68 ashish 2189
          result.setSuccessIsSet(true);
2190
        } catch (TransactionServiceException ex) {
2191
          result.ex = ex;
2192
        } catch (Throwable th) {
483 rajveer 2193
          LOGGER.error("Internal error processing createOrder", th);
2194
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2195
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2196
          x.write(oprot);
2197
          oprot.writeMessageEnd();
2198
          oprot.getTransport().flush();
2199
          return;
2200
        }
483 rajveer 2201
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2202
        result.write(oprot);
2203
        oprot.writeMessageEnd();
2204
        oprot.getTransport().flush();
2205
      }
2206
 
2207
    }
2208
 
483 rajveer 2209
    private class getOrder implements ProcessFunction {
68 ashish 2210
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2211
      {
483 rajveer 2212
        getOrder_args args = new getOrder_args();
68 ashish 2213
        args.read(iprot);
2214
        iprot.readMessageEnd();
483 rajveer 2215
        getOrder_result result = new getOrder_result();
68 ashish 2216
        try {
483 rajveer 2217
          result.success = iface_.getOrder(args.id);
68 ashish 2218
        } catch (TransactionServiceException ex) {
2219
          result.ex = ex;
2220
        } catch (Throwable th) {
483 rajveer 2221
          LOGGER.error("Internal error processing getOrder", th);
2222
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2223
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2224
          x.write(oprot);
2225
          oprot.writeMessageEnd();
2226
          oprot.getTransport().flush();
2227
          return;
2228
        }
483 rajveer 2229
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2230
        result.write(oprot);
2231
        oprot.writeMessageEnd();
2232
        oprot.getTransport().flush();
2233
      }
2234
 
2235
    }
2236
 
483 rajveer 2237
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2238
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2239
      {
483 rajveer 2240
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2241
        args.read(iprot);
2242
        iprot.readMessageEnd();
483 rajveer 2243
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2244
        try {
483 rajveer 2245
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2246
        } catch (TransactionServiceException ex) {
2247
          result.ex = ex;
2248
        } catch (Throwable th) {
483 rajveer 2249
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2250
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2251
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2252
          x.write(oprot);
2253
          oprot.writeMessageEnd();
2254
          oprot.getTransport().flush();
2255
          return;
2256
        }
483 rajveer 2257
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2258
        result.write(oprot);
2259
        oprot.writeMessageEnd();
2260
        oprot.getTransport().flush();
2261
      }
2262
 
2263
    }
2264
 
1529 ankur.sing 2265
    private class getOrderForCustomer implements ProcessFunction {
2266
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2267
      {
2268
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2269
        args.read(iprot);
2270
        iprot.readMessageEnd();
2271
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2272
        try {
2273
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2274
        } catch (TransactionServiceException ex) {
2275
          result.ex = ex;
2276
        } catch (Throwable th) {
2277
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2278
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2279
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2280
          x.write(oprot);
2281
          oprot.writeMessageEnd();
2282
          oprot.getTransport().flush();
2283
          return;
2284
        }
2285
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2286
        result.write(oprot);
2287
        oprot.writeMessageEnd();
2288
        oprot.getTransport().flush();
2289
      }
2290
 
2291
    }
2292
 
1221 chandransh 2293
    private class batchOrders implements ProcessFunction {
2294
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2295
      {
2296
        batchOrders_args args = new batchOrders_args();
2297
        args.read(iprot);
2298
        iprot.readMessageEnd();
2299
        batchOrders_result result = new batchOrders_result();
2300
        try {
2301
          result.success = iface_.batchOrders(args.warehouseId);
2302
        } catch (TransactionServiceException ex) {
2303
          result.ex = ex;
2304
        } catch (Throwable th) {
2305
          LOGGER.error("Internal error processing batchOrders", th);
2306
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2307
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2308
          x.write(oprot);
2309
          oprot.writeMessageEnd();
2310
          oprot.getTransport().flush();
2311
          return;
2312
        }
2313
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2314
        result.write(oprot);
2315
        oprot.writeMessageEnd();
2316
        oprot.getTransport().flush();
2317
      }
2318
 
2319
    }
2320
 
1209 chandransh 2321
    private class markOrderAsOutOfStock implements ProcessFunction {
2322
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2323
      {
2324
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2325
        args.read(iprot);
2326
        iprot.readMessageEnd();
2327
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2328
        try {
2329
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2330
          result.setSuccessIsSet(true);
2331
        } catch (TransactionServiceException ex) {
2332
          result.ex = ex;
2333
        } catch (Throwable th) {
2334
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2335
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2336
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2337
          x.write(oprot);
2338
          oprot.writeMessageEnd();
2339
          oprot.getTransport().flush();
2340
          return;
2341
        }
2342
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2343
        result.write(oprot);
2344
        oprot.writeMessageEnd();
2345
        oprot.getTransport().flush();
2346
      }
2347
 
2348
    }
2349
 
758 chandransh 2350
    private class markOrdersAsManifested implements ProcessFunction {
2351
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2352
      {
2353
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2354
        args.read(iprot);
2355
        iprot.readMessageEnd();
2356
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2357
        try {
2358
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2359
          result.setSuccessIsSet(true);
2360
        } catch (TransactionServiceException ex) {
2361
          result.ex = ex;
2362
        } catch (Throwable th) {
2363
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2364
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2365
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2366
          x.write(oprot);
2367
          oprot.writeMessageEnd();
2368
          oprot.getTransport().flush();
2369
          return;
2370
        }
2371
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2372
        result.write(oprot);
2373
        oprot.writeMessageEnd();
2374
        oprot.getTransport().flush();
2375
      }
2376
 
2377
    }
2378
 
1114 chandransh 2379
    private class markOrdersAsPickedUp implements ProcessFunction {
2380
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2381
      {
2382
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2383
        args.read(iprot);
2384
        iprot.readMessageEnd();
2385
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2386
        try {
2387
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2388
        } catch (TransactionServiceException ex) {
2389
          result.ex = ex;
2390
        } catch (Throwable th) {
2391
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2392
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2393
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2394
          x.write(oprot);
2395
          oprot.writeMessageEnd();
2396
          oprot.getTransport().flush();
2397
          return;
2398
        }
2399
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2400
        result.write(oprot);
2401
        oprot.writeMessageEnd();
2402
        oprot.getTransport().flush();
2403
      }
2404
 
2405
    }
2406
 
1133 chandransh 2407
    private class markOrdersAsDelivered implements ProcessFunction {
2408
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2409
      {
2410
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2411
        args.read(iprot);
2412
        iprot.readMessageEnd();
2413
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2414
        try {
2415
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2416
        } catch (TransactionServiceException ex) {
2417
          result.ex = ex;
2418
        } catch (Throwable th) {
2419
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2420
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2421
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2422
          x.write(oprot);
2423
          oprot.writeMessageEnd();
2424
          oprot.getTransport().flush();
2425
          return;
2426
        }
2427
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2428
        result.write(oprot);
2429
        oprot.writeMessageEnd();
2430
        oprot.getTransport().flush();
2431
      }
2432
 
2433
    }
2434
 
2435
    private class markOrdersAsFailed implements ProcessFunction {
2436
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2437
      {
2438
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2439
        args.read(iprot);
2440
        iprot.readMessageEnd();
2441
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2442
        try {
2443
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2444
        } catch (TransactionServiceException ex) {
2445
          result.ex = ex;
2446
        } catch (Throwable th) {
2447
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2448
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2449
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2450
          x.write(oprot);
2451
          oprot.writeMessageEnd();
2452
          oprot.getTransport().flush();
2453
          return;
2454
        }
2455
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2456
        result.write(oprot);
2457
        oprot.writeMessageEnd();
2458
        oprot.getTransport().flush();
2459
      }
2460
 
2461
    }
2462
 
1245 chandransh 2463
    private class updateNonDeliveryReason implements ProcessFunction {
2464
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2465
      {
2466
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2467
        args.read(iprot);
2468
        iprot.readMessageEnd();
2469
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2470
        try {
2471
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2472
        } catch (TransactionServiceException ex) {
2473
          result.ex = ex;
2474
        } catch (Throwable th) {
2475
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2476
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2477
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2478
          x.write(oprot);
2479
          oprot.writeMessageEnd();
2480
          oprot.getTransport().flush();
2481
          return;
2482
        }
2483
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2484
        result.write(oprot);
2485
        oprot.writeMessageEnd();
2486
        oprot.getTransport().flush();
2487
      }
2488
 
2489
    }
2490
 
1406 ankur.sing 2491
    private class getUndeliveredOrders implements ProcessFunction {
2492
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2493
      {
2494
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2495
        args.read(iprot);
2496
        iprot.readMessageEnd();
2497
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2498
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2499
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2500
        result.write(oprot);
2501
        oprot.writeMessageEnd();
2502
        oprot.getTransport().flush();
2503
      }
2504
 
2505
    }
2506
 
305 ashish 2507
    private class getAlerts implements ProcessFunction {
2508
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2509
      {
2510
        getAlerts_args args = new getAlerts_args();
2511
        args.read(iprot);
2512
        iprot.readMessageEnd();
2513
        getAlerts_result result = new getAlerts_result();
483 rajveer 2514
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2515
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2516
        result.write(oprot);
2517
        oprot.writeMessageEnd();
2518
        oprot.getTransport().flush();
2519
      }
2520
 
2521
    }
2522
 
2523
    private class setAlert implements ProcessFunction {
2524
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2525
      {
2526
        setAlert_args args = new setAlert_args();
2527
        args.read(iprot);
2528
        iprot.readMessageEnd();
2529
        setAlert_result result = new setAlert_result();
483 rajveer 2530
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2531
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2532
        result.write(oprot);
2533
        oprot.writeMessageEnd();
2534
        oprot.getTransport().flush();
2535
      }
2536
 
2537
    }
2538
 
1598 ankur.sing 2539
    private class getValidOrderCount implements ProcessFunction {
2540
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2541
      {
2542
        getValidOrderCount_args args = new getValidOrderCount_args();
2543
        args.read(iprot);
2544
        iprot.readMessageEnd();
2545
        getValidOrderCount_result result = new getValidOrderCount_result();
2546
        result.success = iface_.getValidOrderCount();
2547
        result.setSuccessIsSet(true);
2548
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
2549
        result.write(oprot);
2550
        oprot.writeMessageEnd();
2551
        oprot.getTransport().flush();
2552
      }
2553
 
2554
    }
2555
 
1629 ankur.sing 2556
    private class getNoOfCustomersWithSuccessfulTransaction implements ProcessFunction {
2557
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2558
      {
2559
        getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
2560
        args.read(iprot);
2561
        iprot.readMessageEnd();
2562
        getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
2563
        result.success = iface_.getNoOfCustomersWithSuccessfulTransaction();
2564
        result.setSuccessIsSet(true);
2565
        oprot.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid));
2566
        result.write(oprot);
2567
        oprot.writeMessageEnd();
2568
        oprot.getTransport().flush();
2569
      }
2570
 
2571
    }
2572
 
1731 ankur.sing 2573
    private class getValidOrdersAmountRange implements ProcessFunction {
1629 ankur.sing 2574
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2575
      {
1731 ankur.sing 2576
        getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 2577
        args.read(iprot);
2578
        iprot.readMessageEnd();
1731 ankur.sing 2579
        getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
2580
        result.success = iface_.getValidOrdersAmountRange();
2581
        oprot.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 2582
        result.write(oprot);
2583
        oprot.writeMessageEnd();
2584
        oprot.getTransport().flush();
2585
      }
2586
 
2587
    }
2588
 
1886 ankur.sing 2589
    private class getValidOrders implements ProcessFunction {
2590
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2591
      {
2592
        getValidOrders_args args = new getValidOrders_args();
2593
        args.read(iprot);
2594
        iprot.readMessageEnd();
2595
        getValidOrders_result result = new getValidOrders_result();
2596
        result.success = iface_.getValidOrders(args.limit);
2597
        oprot.writeMessageBegin(new TMessage("getValidOrders", TMessageType.REPLY, seqid));
2598
        result.write(oprot);
2599
        oprot.writeMessageEnd();
2600
        oprot.getTransport().flush();
2601
      }
2602
 
2603
    }
2604
 
68 ashish 2605
  }
2606
 
764 rajveer 2607
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2608
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2609
 
2610
 
2611
 
2612
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2613
    public enum _Fields implements TFieldIdEnum {
2614
;
2615
 
2616
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2617
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2618
 
2619
      static {
2620
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2621
          byId.put((int)field._thriftId, field);
2622
          byName.put(field.getFieldName(), field);
2623
        }
2624
      }
2625
 
2626
      /**
2627
       * Find the _Fields constant that matches fieldId, or null if its not found.
2628
       */
2629
      public static _Fields findByThriftId(int fieldId) {
2630
        return byId.get(fieldId);
2631
      }
2632
 
2633
      /**
2634
       * Find the _Fields constant that matches fieldId, throwing an exception
2635
       * if it is not found.
2636
       */
2637
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2638
        _Fields fields = findByThriftId(fieldId);
2639
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2640
        return fields;
2641
      }
2642
 
2643
      /**
2644
       * Find the _Fields constant that matches name, or null if its not found.
2645
       */
2646
      public static _Fields findByName(String name) {
2647
        return byName.get(name);
2648
      }
2649
 
2650
      private final short _thriftId;
2651
      private final String _fieldName;
2652
 
2653
      _Fields(short thriftId, String fieldName) {
2654
        _thriftId = thriftId;
2655
        _fieldName = fieldName;
2656
      }
2657
 
2658
      public short getThriftFieldId() {
2659
        return _thriftId;
2660
      }
2661
 
2662
      public String getFieldName() {
2663
        return _fieldName;
2664
      }
2665
    }
2666
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2667
    }});
2668
 
2669
    static {
2670
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2671
    }
2672
 
2673
    public closeSession_args() {
2674
    }
2675
 
2676
    /**
2677
     * Performs a deep copy on <i>other</i>.
2678
     */
2679
    public closeSession_args(closeSession_args other) {
2680
    }
2681
 
2682
    public closeSession_args deepCopy() {
2683
      return new closeSession_args(this);
2684
    }
2685
 
2686
    @Deprecated
2687
    public closeSession_args clone() {
2688
      return new closeSession_args(this);
2689
    }
2690
 
2691
    public void setFieldValue(_Fields field, Object value) {
2692
      switch (field) {
2693
      }
2694
    }
2695
 
2696
    public void setFieldValue(int fieldID, Object value) {
2697
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2698
    }
2699
 
2700
    public Object getFieldValue(_Fields field) {
2701
      switch (field) {
2702
      }
2703
      throw new IllegalStateException();
2704
    }
2705
 
2706
    public Object getFieldValue(int fieldId) {
2707
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2708
    }
2709
 
2710
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2711
    public boolean isSet(_Fields field) {
2712
      switch (field) {
2713
      }
2714
      throw new IllegalStateException();
2715
    }
2716
 
2717
    public boolean isSet(int fieldID) {
2718
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2719
    }
2720
 
2721
    @Override
2722
    public boolean equals(Object that) {
2723
      if (that == null)
2724
        return false;
2725
      if (that instanceof closeSession_args)
2726
        return this.equals((closeSession_args)that);
2727
      return false;
2728
    }
2729
 
2730
    public boolean equals(closeSession_args that) {
2731
      if (that == null)
2732
        return false;
2733
 
2734
      return true;
2735
    }
2736
 
2737
    @Override
2738
    public int hashCode() {
2739
      return 0;
2740
    }
2741
 
2742
    public int compareTo(closeSession_args other) {
2743
      if (!getClass().equals(other.getClass())) {
2744
        return getClass().getName().compareTo(other.getClass().getName());
2745
      }
2746
 
2747
      int lastComparison = 0;
2748
      closeSession_args typedOther = (closeSession_args)other;
2749
 
2750
      return 0;
2751
    }
2752
 
2753
    public void read(TProtocol iprot) throws TException {
2754
      TField field;
2755
      iprot.readStructBegin();
2756
      while (true)
2757
      {
2758
        field = iprot.readFieldBegin();
2759
        if (field.type == TType.STOP) { 
2760
          break;
2761
        }
2762
        _Fields fieldId = _Fields.findByThriftId(field.id);
2763
        if (fieldId == null) {
2764
          TProtocolUtil.skip(iprot, field.type);
2765
        } else {
2766
          switch (fieldId) {
2767
          }
2768
          iprot.readFieldEnd();
2769
        }
2770
      }
2771
      iprot.readStructEnd();
2772
      validate();
2773
    }
2774
 
2775
    public void write(TProtocol oprot) throws TException {
2776
      validate();
2777
 
2778
      oprot.writeStructBegin(STRUCT_DESC);
2779
      oprot.writeFieldStop();
2780
      oprot.writeStructEnd();
2781
    }
2782
 
2783
    @Override
2784
    public String toString() {
2785
      StringBuilder sb = new StringBuilder("closeSession_args(");
2786
      boolean first = true;
2787
 
2788
      sb.append(")");
2789
      return sb.toString();
2790
    }
2791
 
2792
    public void validate() throws TException {
2793
      // check for required fields
2794
    }
2795
 
2796
  }
2797
 
2798
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2799
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2800
 
2801
 
2802
 
2803
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2804
    public enum _Fields implements TFieldIdEnum {
2805
;
2806
 
2807
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2808
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2809
 
2810
      static {
2811
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2812
          byId.put((int)field._thriftId, field);
2813
          byName.put(field.getFieldName(), field);
2814
        }
2815
      }
2816
 
2817
      /**
2818
       * Find the _Fields constant that matches fieldId, or null if its not found.
2819
       */
2820
      public static _Fields findByThriftId(int fieldId) {
2821
        return byId.get(fieldId);
2822
      }
2823
 
2824
      /**
2825
       * Find the _Fields constant that matches fieldId, throwing an exception
2826
       * if it is not found.
2827
       */
2828
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2829
        _Fields fields = findByThriftId(fieldId);
2830
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2831
        return fields;
2832
      }
2833
 
2834
      /**
2835
       * Find the _Fields constant that matches name, or null if its not found.
2836
       */
2837
      public static _Fields findByName(String name) {
2838
        return byName.get(name);
2839
      }
2840
 
2841
      private final short _thriftId;
2842
      private final String _fieldName;
2843
 
2844
      _Fields(short thriftId, String fieldName) {
2845
        _thriftId = thriftId;
2846
        _fieldName = fieldName;
2847
      }
2848
 
2849
      public short getThriftFieldId() {
2850
        return _thriftId;
2851
      }
2852
 
2853
      public String getFieldName() {
2854
        return _fieldName;
2855
      }
2856
    }
2857
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2858
    }});
2859
 
2860
    static {
2861
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2862
    }
2863
 
2864
    public closeSession_result() {
2865
    }
2866
 
2867
    /**
2868
     * Performs a deep copy on <i>other</i>.
2869
     */
2870
    public closeSession_result(closeSession_result other) {
2871
    }
2872
 
2873
    public closeSession_result deepCopy() {
2874
      return new closeSession_result(this);
2875
    }
2876
 
2877
    @Deprecated
2878
    public closeSession_result clone() {
2879
      return new closeSession_result(this);
2880
    }
2881
 
2882
    public void setFieldValue(_Fields field, Object value) {
2883
      switch (field) {
2884
      }
2885
    }
2886
 
2887
    public void setFieldValue(int fieldID, Object value) {
2888
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2889
    }
2890
 
2891
    public Object getFieldValue(_Fields field) {
2892
      switch (field) {
2893
      }
2894
      throw new IllegalStateException();
2895
    }
2896
 
2897
    public Object getFieldValue(int fieldId) {
2898
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2899
    }
2900
 
2901
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2902
    public boolean isSet(_Fields field) {
2903
      switch (field) {
2904
      }
2905
      throw new IllegalStateException();
2906
    }
2907
 
2908
    public boolean isSet(int fieldID) {
2909
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2910
    }
2911
 
2912
    @Override
2913
    public boolean equals(Object that) {
2914
      if (that == null)
2915
        return false;
2916
      if (that instanceof closeSession_result)
2917
        return this.equals((closeSession_result)that);
2918
      return false;
2919
    }
2920
 
2921
    public boolean equals(closeSession_result that) {
2922
      if (that == null)
2923
        return false;
2924
 
2925
      return true;
2926
    }
2927
 
2928
    @Override
2929
    public int hashCode() {
2930
      return 0;
2931
    }
2932
 
2933
    public int compareTo(closeSession_result other) {
2934
      if (!getClass().equals(other.getClass())) {
2935
        return getClass().getName().compareTo(other.getClass().getName());
2936
      }
2937
 
2938
      int lastComparison = 0;
2939
      closeSession_result typedOther = (closeSession_result)other;
2940
 
2941
      return 0;
2942
    }
2943
 
2944
    public void read(TProtocol iprot) throws TException {
2945
      TField field;
2946
      iprot.readStructBegin();
2947
      while (true)
2948
      {
2949
        field = iprot.readFieldBegin();
2950
        if (field.type == TType.STOP) { 
2951
          break;
2952
        }
2953
        _Fields fieldId = _Fields.findByThriftId(field.id);
2954
        if (fieldId == null) {
2955
          TProtocolUtil.skip(iprot, field.type);
2956
        } else {
2957
          switch (fieldId) {
2958
          }
2959
          iprot.readFieldEnd();
2960
        }
2961
      }
2962
      iprot.readStructEnd();
2963
      validate();
2964
    }
2965
 
2966
    public void write(TProtocol oprot) throws TException {
2967
      oprot.writeStructBegin(STRUCT_DESC);
2968
 
2969
      oprot.writeFieldStop();
2970
      oprot.writeStructEnd();
2971
    }
2972
 
2973
    @Override
2974
    public String toString() {
2975
      StringBuilder sb = new StringBuilder("closeSession_result(");
2976
      boolean first = true;
2977
 
2978
      sb.append(")");
2979
      return sb.toString();
2980
    }
2981
 
2982
    public void validate() throws TException {
2983
      // check for required fields
2984
    }
2985
 
2986
  }
2987
 
684 chandransh 2988
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2989
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2990
 
2991
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2992
 
2993
    private Transaction transaction;
2994
 
2995
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2996
    public enum _Fields implements TFieldIdEnum {
2997
      TRANSACTION((short)1, "transaction");
2998
 
2999
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3000
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3001
 
3002
      static {
3003
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3004
          byId.put((int)field._thriftId, field);
3005
          byName.put(field.getFieldName(), field);
3006
        }
3007
      }
3008
 
3009
      /**
3010
       * Find the _Fields constant that matches fieldId, or null if its not found.
3011
       */
3012
      public static _Fields findByThriftId(int fieldId) {
3013
        return byId.get(fieldId);
3014
      }
3015
 
3016
      /**
3017
       * Find the _Fields constant that matches fieldId, throwing an exception
3018
       * if it is not found.
3019
       */
3020
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3021
        _Fields fields = findByThriftId(fieldId);
3022
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3023
        return fields;
3024
      }
3025
 
3026
      /**
3027
       * Find the _Fields constant that matches name, or null if its not found.
3028
       */
3029
      public static _Fields findByName(String name) {
3030
        return byName.get(name);
3031
      }
3032
 
3033
      private final short _thriftId;
3034
      private final String _fieldName;
3035
 
3036
      _Fields(short thriftId, String fieldName) {
3037
        _thriftId = thriftId;
3038
        _fieldName = fieldName;
3039
      }
3040
 
3041
      public short getThriftFieldId() {
3042
        return _thriftId;
3043
      }
3044
 
3045
      public String getFieldName() {
3046
        return _fieldName;
3047
      }
3048
    }
3049
 
3050
    // isset id assignments
3051
 
3052
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3053
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
3054
          new StructMetaData(TType.STRUCT, Transaction.class)));
3055
    }});
3056
 
3057
    static {
3058
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
3059
    }
3060
 
3061
    public createTransaction_args() {
3062
    }
3063
 
3064
    public createTransaction_args(
3065
      Transaction transaction)
3066
    {
3067
      this();
3068
      this.transaction = transaction;
3069
    }
3070
 
3071
    /**
3072
     * Performs a deep copy on <i>other</i>.
3073
     */
3074
    public createTransaction_args(createTransaction_args other) {
3075
      if (other.isSetTransaction()) {
3076
        this.transaction = new Transaction(other.transaction);
3077
      }
3078
    }
3079
 
3080
    public createTransaction_args deepCopy() {
3081
      return new createTransaction_args(this);
3082
    }
3083
 
3084
    @Deprecated
3085
    public createTransaction_args clone() {
3086
      return new createTransaction_args(this);
3087
    }
3088
 
3089
    public Transaction getTransaction() {
3090
      return this.transaction;
3091
    }
3092
 
3093
    public createTransaction_args setTransaction(Transaction transaction) {
3094
      this.transaction = transaction;
3095
      return this;
3096
    }
3097
 
3098
    public void unsetTransaction() {
3099
      this.transaction = null;
3100
    }
3101
 
3102
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
3103
    public boolean isSetTransaction() {
3104
      return this.transaction != null;
3105
    }
3106
 
3107
    public void setTransactionIsSet(boolean value) {
3108
      if (!value) {
3109
        this.transaction = null;
3110
      }
3111
    }
3112
 
3113
    public void setFieldValue(_Fields field, Object value) {
3114
      switch (field) {
3115
      case TRANSACTION:
3116
        if (value == null) {
3117
          unsetTransaction();
3118
        } else {
3119
          setTransaction((Transaction)value);
3120
        }
3121
        break;
3122
 
3123
      }
3124
    }
3125
 
3126
    public void setFieldValue(int fieldID, Object value) {
3127
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3128
    }
3129
 
3130
    public Object getFieldValue(_Fields field) {
3131
      switch (field) {
3132
      case TRANSACTION:
3133
        return getTransaction();
3134
 
3135
      }
3136
      throw new IllegalStateException();
3137
    }
3138
 
3139
    public Object getFieldValue(int fieldId) {
3140
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3141
    }
3142
 
3143
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3144
    public boolean isSet(_Fields field) {
3145
      switch (field) {
3146
      case TRANSACTION:
3147
        return isSetTransaction();
3148
      }
3149
      throw new IllegalStateException();
3150
    }
3151
 
3152
    public boolean isSet(int fieldID) {
3153
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3154
    }
3155
 
3156
    @Override
3157
    public boolean equals(Object that) {
3158
      if (that == null)
3159
        return false;
3160
      if (that instanceof createTransaction_args)
3161
        return this.equals((createTransaction_args)that);
3162
      return false;
3163
    }
3164
 
3165
    public boolean equals(createTransaction_args that) {
3166
      if (that == null)
3167
        return false;
3168
 
3169
      boolean this_present_transaction = true && this.isSetTransaction();
3170
      boolean that_present_transaction = true && that.isSetTransaction();
3171
      if (this_present_transaction || that_present_transaction) {
3172
        if (!(this_present_transaction && that_present_transaction))
3173
          return false;
3174
        if (!this.transaction.equals(that.transaction))
3175
          return false;
3176
      }
3177
 
3178
      return true;
3179
    }
3180
 
3181
    @Override
3182
    public int hashCode() {
3183
      return 0;
3184
    }
3185
 
684 chandransh 3186
    public int compareTo(createTransaction_args other) {
3187
      if (!getClass().equals(other.getClass())) {
3188
        return getClass().getName().compareTo(other.getClass().getName());
3189
      }
3190
 
3191
      int lastComparison = 0;
3192
      createTransaction_args typedOther = (createTransaction_args)other;
3193
 
3194
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
3195
      if (lastComparison != 0) {
3196
        return lastComparison;
3197
      }
3198
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
3199
      if (lastComparison != 0) {
3200
        return lastComparison;
3201
      }
3202
      return 0;
3203
    }
3204
 
68 ashish 3205
    public void read(TProtocol iprot) throws TException {
3206
      TField field;
3207
      iprot.readStructBegin();
3208
      while (true)
3209
      {
3210
        field = iprot.readFieldBegin();
3211
        if (field.type == TType.STOP) { 
3212
          break;
3213
        }
3214
        _Fields fieldId = _Fields.findByThriftId(field.id);
3215
        if (fieldId == null) {
3216
          TProtocolUtil.skip(iprot, field.type);
3217
        } else {
3218
          switch (fieldId) {
3219
            case TRANSACTION:
3220
              if (field.type == TType.STRUCT) {
3221
                this.transaction = new Transaction();
3222
                this.transaction.read(iprot);
3223
              } else { 
3224
                TProtocolUtil.skip(iprot, field.type);
3225
              }
3226
              break;
3227
          }
3228
          iprot.readFieldEnd();
3229
        }
3230
      }
3231
      iprot.readStructEnd();
3232
      validate();
3233
    }
3234
 
3235
    public void write(TProtocol oprot) throws TException {
3236
      validate();
3237
 
3238
      oprot.writeStructBegin(STRUCT_DESC);
3239
      if (this.transaction != null) {
3240
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
3241
        this.transaction.write(oprot);
3242
        oprot.writeFieldEnd();
3243
      }
3244
      oprot.writeFieldStop();
3245
      oprot.writeStructEnd();
3246
    }
3247
 
3248
    @Override
3249
    public String toString() {
3250
      StringBuilder sb = new StringBuilder("createTransaction_args(");
3251
      boolean first = true;
3252
 
3253
      sb.append("transaction:");
3254
      if (this.transaction == null) {
3255
        sb.append("null");
3256
      } else {
3257
        sb.append(this.transaction);
3258
      }
3259
      first = false;
3260
      sb.append(")");
3261
      return sb.toString();
3262
    }
3263
 
3264
    public void validate() throws TException {
3265
      // check for required fields
3266
    }
3267
 
3268
  }
3269
 
3270
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
3271
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
3272
 
132 ashish 3273
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 3274
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3275
 
132 ashish 3276
    private long success;
68 ashish 3277
    private TransactionServiceException ex;
3278
 
3279
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3280
    public enum _Fields implements TFieldIdEnum {
132 ashish 3281
      SUCCESS((short)0, "success"),
68 ashish 3282
      EX((short)1, "ex");
3283
 
3284
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3285
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3286
 
3287
      static {
3288
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3289
          byId.put((int)field._thriftId, field);
3290
          byName.put(field.getFieldName(), field);
3291
        }
3292
      }
3293
 
3294
      /**
3295
       * Find the _Fields constant that matches fieldId, or null if its not found.
3296
       */
3297
      public static _Fields findByThriftId(int fieldId) {
3298
        return byId.get(fieldId);
3299
      }
3300
 
3301
      /**
3302
       * Find the _Fields constant that matches fieldId, throwing an exception
3303
       * if it is not found.
3304
       */
3305
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3306
        _Fields fields = findByThriftId(fieldId);
3307
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3308
        return fields;
3309
      }
3310
 
3311
      /**
3312
       * Find the _Fields constant that matches name, or null if its not found.
3313
       */
3314
      public static _Fields findByName(String name) {
3315
        return byName.get(name);
3316
      }
3317
 
3318
      private final short _thriftId;
3319
      private final String _fieldName;
3320
 
3321
      _Fields(short thriftId, String fieldName) {
3322
        _thriftId = thriftId;
3323
        _fieldName = fieldName;
3324
      }
3325
 
3326
      public short getThriftFieldId() {
3327
        return _thriftId;
3328
      }
3329
 
3330
      public String getFieldName() {
3331
        return _fieldName;
3332
      }
3333
    }
3334
 
3335
    // isset id assignments
132 ashish 3336
    private static final int __SUCCESS_ISSET_ID = 0;
3337
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3338
 
3339
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3340
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3341
          new FieldValueMetaData(TType.I64)));
68 ashish 3342
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3343
          new FieldValueMetaData(TType.STRUCT)));
3344
    }});
3345
 
3346
    static {
3347
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3348
    }
3349
 
3350
    public createTransaction_result() {
3351
    }
3352
 
3353
    public createTransaction_result(
132 ashish 3354
      long success,
68 ashish 3355
      TransactionServiceException ex)
3356
    {
3357
      this();
132 ashish 3358
      this.success = success;
3359
      setSuccessIsSet(true);
68 ashish 3360
      this.ex = ex;
3361
    }
3362
 
3363
    /**
3364
     * Performs a deep copy on <i>other</i>.
3365
     */
3366
    public createTransaction_result(createTransaction_result other) {
132 ashish 3367
      __isset_bit_vector.clear();
3368
      __isset_bit_vector.or(other.__isset_bit_vector);
3369
      this.success = other.success;
68 ashish 3370
      if (other.isSetEx()) {
3371
        this.ex = new TransactionServiceException(other.ex);
3372
      }
3373
    }
3374
 
3375
    public createTransaction_result deepCopy() {
3376
      return new createTransaction_result(this);
3377
    }
3378
 
3379
    @Deprecated
3380
    public createTransaction_result clone() {
3381
      return new createTransaction_result(this);
3382
    }
3383
 
132 ashish 3384
    public long getSuccess() {
3385
      return this.success;
3386
    }
3387
 
3388
    public createTransaction_result setSuccess(long success) {
3389
      this.success = success;
3390
      setSuccessIsSet(true);
3391
      return this;
3392
    }
3393
 
3394
    public void unsetSuccess() {
3395
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3396
    }
3397
 
3398
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3399
    public boolean isSetSuccess() {
3400
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3401
    }
3402
 
3403
    public void setSuccessIsSet(boolean value) {
3404
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3405
    }
3406
 
68 ashish 3407
    public TransactionServiceException getEx() {
3408
      return this.ex;
3409
    }
3410
 
3411
    public createTransaction_result setEx(TransactionServiceException ex) {
3412
      this.ex = ex;
3413
      return this;
3414
    }
3415
 
3416
    public void unsetEx() {
3417
      this.ex = null;
3418
    }
3419
 
3420
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3421
    public boolean isSetEx() {
3422
      return this.ex != null;
3423
    }
3424
 
3425
    public void setExIsSet(boolean value) {
3426
      if (!value) {
3427
        this.ex = null;
3428
      }
3429
    }
3430
 
3431
    public void setFieldValue(_Fields field, Object value) {
3432
      switch (field) {
132 ashish 3433
      case SUCCESS:
3434
        if (value == null) {
3435
          unsetSuccess();
3436
        } else {
3437
          setSuccess((Long)value);
3438
        }
3439
        break;
3440
 
68 ashish 3441
      case EX:
3442
        if (value == null) {
3443
          unsetEx();
3444
        } else {
3445
          setEx((TransactionServiceException)value);
3446
        }
3447
        break;
3448
 
3449
      }
3450
    }
3451
 
3452
    public void setFieldValue(int fieldID, Object value) {
3453
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3454
    }
3455
 
3456
    public Object getFieldValue(_Fields field) {
3457
      switch (field) {
132 ashish 3458
      case SUCCESS:
3459
        return new Long(getSuccess());
3460
 
68 ashish 3461
      case EX:
3462
        return getEx();
3463
 
3464
      }
3465
      throw new IllegalStateException();
3466
    }
3467
 
3468
    public Object getFieldValue(int fieldId) {
3469
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3470
    }
3471
 
3472
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3473
    public boolean isSet(_Fields field) {
3474
      switch (field) {
132 ashish 3475
      case SUCCESS:
3476
        return isSetSuccess();
68 ashish 3477
      case EX:
3478
        return isSetEx();
3479
      }
3480
      throw new IllegalStateException();
3481
    }
3482
 
3483
    public boolean isSet(int fieldID) {
3484
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3485
    }
3486
 
3487
    @Override
3488
    public boolean equals(Object that) {
3489
      if (that == null)
3490
        return false;
3491
      if (that instanceof createTransaction_result)
3492
        return this.equals((createTransaction_result)that);
3493
      return false;
3494
    }
3495
 
3496
    public boolean equals(createTransaction_result that) {
3497
      if (that == null)
3498
        return false;
3499
 
132 ashish 3500
      boolean this_present_success = true;
3501
      boolean that_present_success = true;
3502
      if (this_present_success || that_present_success) {
3503
        if (!(this_present_success && that_present_success))
3504
          return false;
3505
        if (this.success != that.success)
3506
          return false;
3507
      }
3508
 
68 ashish 3509
      boolean this_present_ex = true && this.isSetEx();
3510
      boolean that_present_ex = true && that.isSetEx();
3511
      if (this_present_ex || that_present_ex) {
3512
        if (!(this_present_ex && that_present_ex))
3513
          return false;
3514
        if (!this.ex.equals(that.ex))
3515
          return false;
3516
      }
3517
 
3518
      return true;
3519
    }
3520
 
3521
    @Override
3522
    public int hashCode() {
3523
      return 0;
3524
    }
3525
 
3526
    public int compareTo(createTransaction_result other) {
3527
      if (!getClass().equals(other.getClass())) {
3528
        return getClass().getName().compareTo(other.getClass().getName());
3529
      }
3530
 
3531
      int lastComparison = 0;
3532
      createTransaction_result typedOther = (createTransaction_result)other;
3533
 
132 ashish 3534
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3535
      if (lastComparison != 0) {
3536
        return lastComparison;
3537
      }
3538
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3539
      if (lastComparison != 0) {
3540
        return lastComparison;
3541
      }
68 ashish 3542
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3543
      if (lastComparison != 0) {
3544
        return lastComparison;
3545
      }
3546
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3547
      if (lastComparison != 0) {
3548
        return lastComparison;
3549
      }
3550
      return 0;
3551
    }
3552
 
3553
    public void read(TProtocol iprot) throws TException {
3554
      TField field;
3555
      iprot.readStructBegin();
3556
      while (true)
3557
      {
3558
        field = iprot.readFieldBegin();
3559
        if (field.type == TType.STOP) { 
3560
          break;
3561
        }
3562
        _Fields fieldId = _Fields.findByThriftId(field.id);
3563
        if (fieldId == null) {
3564
          TProtocolUtil.skip(iprot, field.type);
3565
        } else {
3566
          switch (fieldId) {
132 ashish 3567
            case SUCCESS:
3568
              if (field.type == TType.I64) {
3569
                this.success = iprot.readI64();
3570
                setSuccessIsSet(true);
3571
              } else { 
3572
                TProtocolUtil.skip(iprot, field.type);
3573
              }
3574
              break;
68 ashish 3575
            case EX:
3576
              if (field.type == TType.STRUCT) {
3577
                this.ex = new TransactionServiceException();
3578
                this.ex.read(iprot);
3579
              } else { 
3580
                TProtocolUtil.skip(iprot, field.type);
3581
              }
3582
              break;
3583
          }
3584
          iprot.readFieldEnd();
3585
        }
3586
      }
3587
      iprot.readStructEnd();
3588
      validate();
3589
    }
3590
 
3591
    public void write(TProtocol oprot) throws TException {
3592
      oprot.writeStructBegin(STRUCT_DESC);
3593
 
132 ashish 3594
      if (this.isSetSuccess()) {
3595
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3596
        oprot.writeI64(this.success);
3597
        oprot.writeFieldEnd();
3598
      } else if (this.isSetEx()) {
68 ashish 3599
        oprot.writeFieldBegin(EX_FIELD_DESC);
3600
        this.ex.write(oprot);
3601
        oprot.writeFieldEnd();
3602
      }
3603
      oprot.writeFieldStop();
3604
      oprot.writeStructEnd();
3605
    }
3606
 
3607
    @Override
3608
    public String toString() {
3609
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3610
      boolean first = true;
3611
 
132 ashish 3612
      sb.append("success:");
3613
      sb.append(this.success);
3614
      first = false;
3615
      if (!first) sb.append(", ");
68 ashish 3616
      sb.append("ex:");
3617
      if (this.ex == null) {
3618
        sb.append("null");
3619
      } else {
3620
        sb.append(this.ex);
3621
      }
3622
      first = false;
3623
      sb.append(")");
3624
      return sb.toString();
3625
    }
3626
 
3627
    public void validate() throws TException {
3628
      // check for required fields
3629
    }
3630
 
3631
  }
3632
 
3633
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3634
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3635
 
3636
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3637
 
3638
    private long id;
3639
 
3640
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3641
    public enum _Fields implements TFieldIdEnum {
3642
      ID((short)1, "id");
3643
 
3644
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3645
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3646
 
3647
      static {
3648
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3649
          byId.put((int)field._thriftId, field);
3650
          byName.put(field.getFieldName(), field);
3651
        }
3652
      }
3653
 
3654
      /**
3655
       * Find the _Fields constant that matches fieldId, or null if its not found.
3656
       */
3657
      public static _Fields findByThriftId(int fieldId) {
3658
        return byId.get(fieldId);
3659
      }
3660
 
3661
      /**
3662
       * Find the _Fields constant that matches fieldId, throwing an exception
3663
       * if it is not found.
3664
       */
3665
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3666
        _Fields fields = findByThriftId(fieldId);
3667
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3668
        return fields;
3669
      }
3670
 
3671
      /**
3672
       * Find the _Fields constant that matches name, or null if its not found.
3673
       */
3674
      public static _Fields findByName(String name) {
3675
        return byName.get(name);
3676
      }
3677
 
3678
      private final short _thriftId;
3679
      private final String _fieldName;
3680
 
3681
      _Fields(short thriftId, String fieldName) {
3682
        _thriftId = thriftId;
3683
        _fieldName = fieldName;
3684
      }
3685
 
3686
      public short getThriftFieldId() {
3687
        return _thriftId;
3688
      }
3689
 
3690
      public String getFieldName() {
3691
        return _fieldName;
3692
      }
3693
    }
3694
 
3695
    // isset id assignments
3696
    private static final int __ID_ISSET_ID = 0;
3697
    private BitSet __isset_bit_vector = new BitSet(1);
3698
 
3699
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3700
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3701
          new FieldValueMetaData(TType.I64)));
3702
    }});
3703
 
3704
    static {
3705
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3706
    }
3707
 
3708
    public getTransaction_args() {
3709
    }
3710
 
3711
    public getTransaction_args(
3712
      long id)
3713
    {
3714
      this();
3715
      this.id = id;
3716
      setIdIsSet(true);
3717
    }
3718
 
3719
    /**
3720
     * Performs a deep copy on <i>other</i>.
3721
     */
3722
    public getTransaction_args(getTransaction_args other) {
3723
      __isset_bit_vector.clear();
3724
      __isset_bit_vector.or(other.__isset_bit_vector);
3725
      this.id = other.id;
3726
    }
3727
 
3728
    public getTransaction_args deepCopy() {
3729
      return new getTransaction_args(this);
3730
    }
3731
 
3732
    @Deprecated
3733
    public getTransaction_args clone() {
3734
      return new getTransaction_args(this);
3735
    }
3736
 
3737
    public long getId() {
3738
      return this.id;
3739
    }
3740
 
3741
    public getTransaction_args setId(long id) {
3742
      this.id = id;
3743
      setIdIsSet(true);
3744
      return this;
3745
    }
3746
 
3747
    public void unsetId() {
3748
      __isset_bit_vector.clear(__ID_ISSET_ID);
3749
    }
3750
 
3751
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3752
    public boolean isSetId() {
3753
      return __isset_bit_vector.get(__ID_ISSET_ID);
3754
    }
3755
 
3756
    public void setIdIsSet(boolean value) {
3757
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3758
    }
3759
 
3760
    public void setFieldValue(_Fields field, Object value) {
3761
      switch (field) {
3762
      case ID:
3763
        if (value == null) {
3764
          unsetId();
3765
        } else {
3766
          setId((Long)value);
3767
        }
3768
        break;
3769
 
3770
      }
3771
    }
3772
 
3773
    public void setFieldValue(int fieldID, Object value) {
3774
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3775
    }
3776
 
3777
    public Object getFieldValue(_Fields field) {
3778
      switch (field) {
3779
      case ID:
3780
        return new Long(getId());
3781
 
3782
      }
3783
      throw new IllegalStateException();
3784
    }
3785
 
3786
    public Object getFieldValue(int fieldId) {
3787
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3788
    }
3789
 
3790
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3791
    public boolean isSet(_Fields field) {
3792
      switch (field) {
3793
      case ID:
3794
        return isSetId();
3795
      }
3796
      throw new IllegalStateException();
3797
    }
3798
 
3799
    public boolean isSet(int fieldID) {
3800
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3801
    }
3802
 
3803
    @Override
3804
    public boolean equals(Object that) {
3805
      if (that == null)
3806
        return false;
3807
      if (that instanceof getTransaction_args)
3808
        return this.equals((getTransaction_args)that);
3809
      return false;
3810
    }
3811
 
3812
    public boolean equals(getTransaction_args that) {
3813
      if (that == null)
3814
        return false;
3815
 
3816
      boolean this_present_id = true;
3817
      boolean that_present_id = true;
3818
      if (this_present_id || that_present_id) {
3819
        if (!(this_present_id && that_present_id))
3820
          return false;
3821
        if (this.id != that.id)
3822
          return false;
3823
      }
3824
 
3825
      return true;
3826
    }
3827
 
3828
    @Override
3829
    public int hashCode() {
3830
      return 0;
3831
    }
3832
 
3833
    public int compareTo(getTransaction_args other) {
3834
      if (!getClass().equals(other.getClass())) {
3835
        return getClass().getName().compareTo(other.getClass().getName());
3836
      }
3837
 
3838
      int lastComparison = 0;
3839
      getTransaction_args typedOther = (getTransaction_args)other;
3840
 
3841
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3842
      if (lastComparison != 0) {
3843
        return lastComparison;
3844
      }
3845
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3846
      if (lastComparison != 0) {
3847
        return lastComparison;
3848
      }
3849
      return 0;
3850
    }
3851
 
3852
    public void read(TProtocol iprot) throws TException {
3853
      TField field;
3854
      iprot.readStructBegin();
3855
      while (true)
3856
      {
3857
        field = iprot.readFieldBegin();
3858
        if (field.type == TType.STOP) { 
3859
          break;
3860
        }
3861
        _Fields fieldId = _Fields.findByThriftId(field.id);
3862
        if (fieldId == null) {
3863
          TProtocolUtil.skip(iprot, field.type);
3864
        } else {
3865
          switch (fieldId) {
3866
            case ID:
3867
              if (field.type == TType.I64) {
3868
                this.id = iprot.readI64();
3869
                setIdIsSet(true);
3870
              } else { 
3871
                TProtocolUtil.skip(iprot, field.type);
3872
              }
3873
              break;
3874
          }
3875
          iprot.readFieldEnd();
3876
        }
3877
      }
3878
      iprot.readStructEnd();
3879
      validate();
3880
    }
3881
 
3882
    public void write(TProtocol oprot) throws TException {
3883
      validate();
3884
 
3885
      oprot.writeStructBegin(STRUCT_DESC);
3886
      oprot.writeFieldBegin(ID_FIELD_DESC);
3887
      oprot.writeI64(this.id);
3888
      oprot.writeFieldEnd();
3889
      oprot.writeFieldStop();
3890
      oprot.writeStructEnd();
3891
    }
3892
 
3893
    @Override
3894
    public String toString() {
3895
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3896
      boolean first = true;
3897
 
3898
      sb.append("id:");
3899
      sb.append(this.id);
3900
      first = false;
3901
      sb.append(")");
3902
      return sb.toString();
3903
    }
3904
 
3905
    public void validate() throws TException {
3906
      // check for required fields
3907
    }
3908
 
3909
  }
3910
 
684 chandransh 3911
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3912
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3913
 
3914
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3915
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3916
 
3917
    private Transaction success;
3918
    private TransactionServiceException ex;
3919
 
3920
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3921
    public enum _Fields implements TFieldIdEnum {
3922
      SUCCESS((short)0, "success"),
3923
      EX((short)1, "ex");
3924
 
3925
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3926
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3927
 
3928
      static {
3929
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3930
          byId.put((int)field._thriftId, field);
3931
          byName.put(field.getFieldName(), field);
3932
        }
3933
      }
3934
 
3935
      /**
3936
       * Find the _Fields constant that matches fieldId, or null if its not found.
3937
       */
3938
      public static _Fields findByThriftId(int fieldId) {
3939
        return byId.get(fieldId);
3940
      }
3941
 
3942
      /**
3943
       * Find the _Fields constant that matches fieldId, throwing an exception
3944
       * if it is not found.
3945
       */
3946
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3947
        _Fields fields = findByThriftId(fieldId);
3948
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3949
        return fields;
3950
      }
3951
 
3952
      /**
3953
       * Find the _Fields constant that matches name, or null if its not found.
3954
       */
3955
      public static _Fields findByName(String name) {
3956
        return byName.get(name);
3957
      }
3958
 
3959
      private final short _thriftId;
3960
      private final String _fieldName;
3961
 
3962
      _Fields(short thriftId, String fieldName) {
3963
        _thriftId = thriftId;
3964
        _fieldName = fieldName;
3965
      }
3966
 
3967
      public short getThriftFieldId() {
3968
        return _thriftId;
3969
      }
3970
 
3971
      public String getFieldName() {
3972
        return _fieldName;
3973
      }
3974
    }
3975
 
3976
    // isset id assignments
3977
 
3978
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3979
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3980
          new StructMetaData(TType.STRUCT, Transaction.class)));
3981
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3982
          new FieldValueMetaData(TType.STRUCT)));
3983
    }});
3984
 
3985
    static {
3986
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3987
    }
3988
 
3989
    public getTransaction_result() {
3990
    }
3991
 
3992
    public getTransaction_result(
3993
      Transaction success,
3994
      TransactionServiceException ex)
3995
    {
3996
      this();
3997
      this.success = success;
3998
      this.ex = ex;
3999
    }
4000
 
4001
    /**
4002
     * Performs a deep copy on <i>other</i>.
4003
     */
4004
    public getTransaction_result(getTransaction_result other) {
4005
      if (other.isSetSuccess()) {
4006
        this.success = new Transaction(other.success);
4007
      }
4008
      if (other.isSetEx()) {
4009
        this.ex = new TransactionServiceException(other.ex);
4010
      }
4011
    }
4012
 
4013
    public getTransaction_result deepCopy() {
4014
      return new getTransaction_result(this);
4015
    }
4016
 
4017
    @Deprecated
4018
    public getTransaction_result clone() {
4019
      return new getTransaction_result(this);
4020
    }
4021
 
4022
    public Transaction getSuccess() {
4023
      return this.success;
4024
    }
4025
 
4026
    public getTransaction_result setSuccess(Transaction success) {
4027
      this.success = success;
4028
      return this;
4029
    }
4030
 
4031
    public void unsetSuccess() {
4032
      this.success = null;
4033
    }
4034
 
4035
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4036
    public boolean isSetSuccess() {
4037
      return this.success != null;
4038
    }
4039
 
4040
    public void setSuccessIsSet(boolean value) {
4041
      if (!value) {
4042
        this.success = null;
4043
      }
4044
    }
4045
 
4046
    public TransactionServiceException getEx() {
4047
      return this.ex;
4048
    }
4049
 
4050
    public getTransaction_result setEx(TransactionServiceException ex) {
4051
      this.ex = ex;
4052
      return this;
4053
    }
4054
 
4055
    public void unsetEx() {
4056
      this.ex = null;
4057
    }
4058
 
4059
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4060
    public boolean isSetEx() {
4061
      return this.ex != null;
4062
    }
4063
 
4064
    public void setExIsSet(boolean value) {
4065
      if (!value) {
4066
        this.ex = null;
4067
      }
4068
    }
4069
 
4070
    public void setFieldValue(_Fields field, Object value) {
4071
      switch (field) {
4072
      case SUCCESS:
4073
        if (value == null) {
4074
          unsetSuccess();
4075
        } else {
4076
          setSuccess((Transaction)value);
4077
        }
4078
        break;
4079
 
4080
      case EX:
4081
        if (value == null) {
4082
          unsetEx();
4083
        } else {
4084
          setEx((TransactionServiceException)value);
4085
        }
4086
        break;
4087
 
4088
      }
4089
    }
4090
 
4091
    public void setFieldValue(int fieldID, Object value) {
4092
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4093
    }
4094
 
4095
    public Object getFieldValue(_Fields field) {
4096
      switch (field) {
4097
      case SUCCESS:
4098
        return getSuccess();
4099
 
4100
      case EX:
4101
        return getEx();
4102
 
4103
      }
4104
      throw new IllegalStateException();
4105
    }
4106
 
4107
    public Object getFieldValue(int fieldId) {
4108
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4109
    }
4110
 
4111
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4112
    public boolean isSet(_Fields field) {
4113
      switch (field) {
4114
      case SUCCESS:
4115
        return isSetSuccess();
4116
      case EX:
4117
        return isSetEx();
4118
      }
4119
      throw new IllegalStateException();
4120
    }
4121
 
4122
    public boolean isSet(int fieldID) {
4123
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4124
    }
4125
 
4126
    @Override
4127
    public boolean equals(Object that) {
4128
      if (that == null)
4129
        return false;
4130
      if (that instanceof getTransaction_result)
4131
        return this.equals((getTransaction_result)that);
4132
      return false;
4133
    }
4134
 
4135
    public boolean equals(getTransaction_result that) {
4136
      if (that == null)
4137
        return false;
4138
 
4139
      boolean this_present_success = true && this.isSetSuccess();
4140
      boolean that_present_success = true && that.isSetSuccess();
4141
      if (this_present_success || that_present_success) {
4142
        if (!(this_present_success && that_present_success))
4143
          return false;
4144
        if (!this.success.equals(that.success))
4145
          return false;
4146
      }
4147
 
4148
      boolean this_present_ex = true && this.isSetEx();
4149
      boolean that_present_ex = true && that.isSetEx();
4150
      if (this_present_ex || that_present_ex) {
4151
        if (!(this_present_ex && that_present_ex))
4152
          return false;
4153
        if (!this.ex.equals(that.ex))
4154
          return false;
4155
      }
4156
 
4157
      return true;
4158
    }
4159
 
4160
    @Override
4161
    public int hashCode() {
4162
      return 0;
4163
    }
4164
 
684 chandransh 4165
    public int compareTo(getTransaction_result other) {
4166
      if (!getClass().equals(other.getClass())) {
4167
        return getClass().getName().compareTo(other.getClass().getName());
4168
      }
4169
 
4170
      int lastComparison = 0;
4171
      getTransaction_result typedOther = (getTransaction_result)other;
4172
 
4173
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4174
      if (lastComparison != 0) {
4175
        return lastComparison;
4176
      }
4177
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4178
      if (lastComparison != 0) {
4179
        return lastComparison;
4180
      }
4181
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4182
      if (lastComparison != 0) {
4183
        return lastComparison;
4184
      }
4185
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4186
      if (lastComparison != 0) {
4187
        return lastComparison;
4188
      }
4189
      return 0;
4190
    }
4191
 
68 ashish 4192
    public void read(TProtocol iprot) throws TException {
4193
      TField field;
4194
      iprot.readStructBegin();
4195
      while (true)
4196
      {
4197
        field = iprot.readFieldBegin();
4198
        if (field.type == TType.STOP) { 
4199
          break;
4200
        }
4201
        _Fields fieldId = _Fields.findByThriftId(field.id);
4202
        if (fieldId == null) {
4203
          TProtocolUtil.skip(iprot, field.type);
4204
        } else {
4205
          switch (fieldId) {
4206
            case SUCCESS:
4207
              if (field.type == TType.STRUCT) {
4208
                this.success = new Transaction();
4209
                this.success.read(iprot);
4210
              } else { 
4211
                TProtocolUtil.skip(iprot, field.type);
4212
              }
4213
              break;
4214
            case EX:
4215
              if (field.type == TType.STRUCT) {
4216
                this.ex = new TransactionServiceException();
4217
                this.ex.read(iprot);
4218
              } else { 
4219
                TProtocolUtil.skip(iprot, field.type);
4220
              }
4221
              break;
4222
          }
4223
          iprot.readFieldEnd();
4224
        }
4225
      }
4226
      iprot.readStructEnd();
4227
      validate();
4228
    }
4229
 
4230
    public void write(TProtocol oprot) throws TException {
4231
      oprot.writeStructBegin(STRUCT_DESC);
4232
 
4233
      if (this.isSetSuccess()) {
4234
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4235
        this.success.write(oprot);
4236
        oprot.writeFieldEnd();
4237
      } else if (this.isSetEx()) {
4238
        oprot.writeFieldBegin(EX_FIELD_DESC);
4239
        this.ex.write(oprot);
4240
        oprot.writeFieldEnd();
4241
      }
4242
      oprot.writeFieldStop();
4243
      oprot.writeStructEnd();
4244
    }
4245
 
4246
    @Override
4247
    public String toString() {
4248
      StringBuilder sb = new StringBuilder("getTransaction_result(");
4249
      boolean first = true;
4250
 
4251
      sb.append("success:");
4252
      if (this.success == null) {
4253
        sb.append("null");
4254
      } else {
4255
        sb.append(this.success);
4256
      }
4257
      first = false;
4258
      if (!first) sb.append(", ");
4259
      sb.append("ex:");
4260
      if (this.ex == null) {
4261
        sb.append("null");
4262
      } else {
4263
        sb.append(this.ex);
4264
      }
4265
      first = false;
4266
      sb.append(")");
4267
      return sb.toString();
4268
    }
4269
 
4270
    public void validate() throws TException {
4271
      // check for required fields
4272
    }
4273
 
4274
  }
4275
 
4276
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4277
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4278
 
4279
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4280
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4281
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4282
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4283
 
4284
    private long customerId;
132 ashish 4285
    private long from_date;
4286
    private long to_date;
68 ashish 4287
    private TransactionStatus status;
4288
 
4289
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4290
    public enum _Fields implements TFieldIdEnum {
4291
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4292
      FROM_DATE((short)2, "from_date"),
4293
      TO_DATE((short)3, "to_date"),
68 ashish 4294
      /**
4295
       * 
4296
       * @see TransactionStatus
4297
       */
4298
      STATUS((short)4, "status");
4299
 
4300
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4301
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4302
 
4303
      static {
4304
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4305
          byId.put((int)field._thriftId, field);
4306
          byName.put(field.getFieldName(), field);
4307
        }
4308
      }
4309
 
4310
      /**
4311
       * Find the _Fields constant that matches fieldId, or null if its not found.
4312
       */
4313
      public static _Fields findByThriftId(int fieldId) {
4314
        return byId.get(fieldId);
4315
      }
4316
 
4317
      /**
4318
       * Find the _Fields constant that matches fieldId, throwing an exception
4319
       * if it is not found.
4320
       */
4321
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4322
        _Fields fields = findByThriftId(fieldId);
4323
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4324
        return fields;
4325
      }
4326
 
4327
      /**
4328
       * Find the _Fields constant that matches name, or null if its not found.
4329
       */
4330
      public static _Fields findByName(String name) {
4331
        return byName.get(name);
4332
      }
4333
 
4334
      private final short _thriftId;
4335
      private final String _fieldName;
4336
 
4337
      _Fields(short thriftId, String fieldName) {
4338
        _thriftId = thriftId;
4339
        _fieldName = fieldName;
4340
      }
4341
 
4342
      public short getThriftFieldId() {
4343
        return _thriftId;
4344
      }
4345
 
4346
      public String getFieldName() {
4347
        return _fieldName;
4348
      }
4349
    }
4350
 
4351
    // isset id assignments
4352
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4353
    private static final int __FROM_DATE_ISSET_ID = 1;
4354
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4355
    private BitSet __isset_bit_vector = new BitSet(3);
4356
 
4357
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4358
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4359
          new FieldValueMetaData(TType.I64)));
132 ashish 4360
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4361
          new FieldValueMetaData(TType.I64)));
132 ashish 4362
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4363
          new FieldValueMetaData(TType.I64)));
4364
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4365
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4366
    }});
4367
 
4368
    static {
4369
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4370
    }
4371
 
4372
    public getTransactionsForCustomer_args() {
4373
    }
4374
 
4375
    public getTransactionsForCustomer_args(
4376
      long customerId,
132 ashish 4377
      long from_date,
4378
      long to_date,
68 ashish 4379
      TransactionStatus status)
4380
    {
4381
      this();
4382
      this.customerId = customerId;
4383
      setCustomerIdIsSet(true);
132 ashish 4384
      this.from_date = from_date;
4385
      setFrom_dateIsSet(true);
4386
      this.to_date = to_date;
4387
      setTo_dateIsSet(true);
68 ashish 4388
      this.status = status;
4389
    }
4390
 
4391
    /**
4392
     * Performs a deep copy on <i>other</i>.
4393
     */
4394
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4395
      __isset_bit_vector.clear();
4396
      __isset_bit_vector.or(other.__isset_bit_vector);
4397
      this.customerId = other.customerId;
132 ashish 4398
      this.from_date = other.from_date;
4399
      this.to_date = other.to_date;
68 ashish 4400
      if (other.isSetStatus()) {
4401
        this.status = other.status;
4402
      }
4403
    }
4404
 
4405
    public getTransactionsForCustomer_args deepCopy() {
4406
      return new getTransactionsForCustomer_args(this);
4407
    }
4408
 
4409
    @Deprecated
4410
    public getTransactionsForCustomer_args clone() {
4411
      return new getTransactionsForCustomer_args(this);
4412
    }
4413
 
4414
    public long getCustomerId() {
4415
      return this.customerId;
4416
    }
4417
 
4418
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4419
      this.customerId = customerId;
4420
      setCustomerIdIsSet(true);
4421
      return this;
4422
    }
4423
 
4424
    public void unsetCustomerId() {
4425
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4426
    }
4427
 
4428
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4429
    public boolean isSetCustomerId() {
4430
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4431
    }
4432
 
4433
    public void setCustomerIdIsSet(boolean value) {
4434
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4435
    }
4436
 
132 ashish 4437
    public long getFrom_date() {
4438
      return this.from_date;
68 ashish 4439
    }
4440
 
132 ashish 4441
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4442
      this.from_date = from_date;
4443
      setFrom_dateIsSet(true);
68 ashish 4444
      return this;
4445
    }
4446
 
132 ashish 4447
    public void unsetFrom_date() {
4448
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4449
    }
4450
 
132 ashish 4451
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4452
    public boolean isSetFrom_date() {
4453
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4454
    }
4455
 
132 ashish 4456
    public void setFrom_dateIsSet(boolean value) {
4457
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4458
    }
4459
 
132 ashish 4460
    public long getTo_date() {
4461
      return this.to_date;
68 ashish 4462
    }
4463
 
132 ashish 4464
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4465
      this.to_date = to_date;
4466
      setTo_dateIsSet(true);
68 ashish 4467
      return this;
4468
    }
4469
 
132 ashish 4470
    public void unsetTo_date() {
4471
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4472
    }
4473
 
132 ashish 4474
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4475
    public boolean isSetTo_date() {
4476
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4477
    }
4478
 
132 ashish 4479
    public void setTo_dateIsSet(boolean value) {
4480
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4481
    }
4482
 
4483
    /**
4484
     * 
4485
     * @see TransactionStatus
4486
     */
4487
    public TransactionStatus getStatus() {
4488
      return this.status;
4489
    }
4490
 
4491
    /**
4492
     * 
4493
     * @see TransactionStatus
4494
     */
4495
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4496
      this.status = status;
4497
      return this;
4498
    }
4499
 
4500
    public void unsetStatus() {
4501
      this.status = null;
4502
    }
4503
 
4504
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4505
    public boolean isSetStatus() {
4506
      return this.status != null;
4507
    }
4508
 
4509
    public void setStatusIsSet(boolean value) {
4510
      if (!value) {
4511
        this.status = null;
4512
      }
4513
    }
4514
 
4515
    public void setFieldValue(_Fields field, Object value) {
4516
      switch (field) {
4517
      case CUSTOMER_ID:
4518
        if (value == null) {
4519
          unsetCustomerId();
4520
        } else {
4521
          setCustomerId((Long)value);
4522
        }
4523
        break;
4524
 
132 ashish 4525
      case FROM_DATE:
68 ashish 4526
        if (value == null) {
132 ashish 4527
          unsetFrom_date();
68 ashish 4528
        } else {
132 ashish 4529
          setFrom_date((Long)value);
68 ashish 4530
        }
4531
        break;
4532
 
132 ashish 4533
      case TO_DATE:
68 ashish 4534
        if (value == null) {
132 ashish 4535
          unsetTo_date();
68 ashish 4536
        } else {
132 ashish 4537
          setTo_date((Long)value);
68 ashish 4538
        }
4539
        break;
4540
 
4541
      case STATUS:
4542
        if (value == null) {
4543
          unsetStatus();
4544
        } else {
4545
          setStatus((TransactionStatus)value);
4546
        }
4547
        break;
4548
 
4549
      }
4550
    }
4551
 
4552
    public void setFieldValue(int fieldID, Object value) {
4553
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4554
    }
4555
 
4556
    public Object getFieldValue(_Fields field) {
4557
      switch (field) {
4558
      case CUSTOMER_ID:
4559
        return new Long(getCustomerId());
4560
 
132 ashish 4561
      case FROM_DATE:
4562
        return new Long(getFrom_date());
68 ashish 4563
 
132 ashish 4564
      case TO_DATE:
4565
        return new Long(getTo_date());
68 ashish 4566
 
4567
      case STATUS:
4568
        return getStatus();
4569
 
4570
      }
4571
      throw new IllegalStateException();
4572
    }
4573
 
4574
    public Object getFieldValue(int fieldId) {
4575
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4576
    }
4577
 
4578
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4579
    public boolean isSet(_Fields field) {
4580
      switch (field) {
4581
      case CUSTOMER_ID:
4582
        return isSetCustomerId();
132 ashish 4583
      case FROM_DATE:
4584
        return isSetFrom_date();
4585
      case TO_DATE:
4586
        return isSetTo_date();
68 ashish 4587
      case STATUS:
4588
        return isSetStatus();
4589
      }
4590
      throw new IllegalStateException();
4591
    }
4592
 
4593
    public boolean isSet(int fieldID) {
4594
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4595
    }
4596
 
4597
    @Override
4598
    public boolean equals(Object that) {
4599
      if (that == null)
4600
        return false;
4601
      if (that instanceof getTransactionsForCustomer_args)
4602
        return this.equals((getTransactionsForCustomer_args)that);
4603
      return false;
4604
    }
4605
 
4606
    public boolean equals(getTransactionsForCustomer_args that) {
4607
      if (that == null)
4608
        return false;
4609
 
4610
      boolean this_present_customerId = true;
4611
      boolean that_present_customerId = true;
4612
      if (this_present_customerId || that_present_customerId) {
4613
        if (!(this_present_customerId && that_present_customerId))
4614
          return false;
4615
        if (this.customerId != that.customerId)
4616
          return false;
4617
      }
4618
 
132 ashish 4619
      boolean this_present_from_date = true;
4620
      boolean that_present_from_date = true;
4621
      if (this_present_from_date || that_present_from_date) {
4622
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4623
          return false;
132 ashish 4624
        if (this.from_date != that.from_date)
68 ashish 4625
          return false;
4626
      }
4627
 
132 ashish 4628
      boolean this_present_to_date = true;
4629
      boolean that_present_to_date = true;
4630
      if (this_present_to_date || that_present_to_date) {
4631
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4632
          return false;
132 ashish 4633
        if (this.to_date != that.to_date)
68 ashish 4634
          return false;
4635
      }
4636
 
4637
      boolean this_present_status = true && this.isSetStatus();
4638
      boolean that_present_status = true && that.isSetStatus();
4639
      if (this_present_status || that_present_status) {
4640
        if (!(this_present_status && that_present_status))
4641
          return false;
4642
        if (!this.status.equals(that.status))
4643
          return false;
4644
      }
4645
 
4646
      return true;
4647
    }
4648
 
4649
    @Override
4650
    public int hashCode() {
4651
      return 0;
4652
    }
4653
 
4654
    public int compareTo(getTransactionsForCustomer_args other) {
4655
      if (!getClass().equals(other.getClass())) {
4656
        return getClass().getName().compareTo(other.getClass().getName());
4657
      }
4658
 
4659
      int lastComparison = 0;
4660
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4661
 
4662
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4663
      if (lastComparison != 0) {
4664
        return lastComparison;
4665
      }
4666
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4667
      if (lastComparison != 0) {
4668
        return lastComparison;
4669
      }
132 ashish 4670
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4671
      if (lastComparison != 0) {
4672
        return lastComparison;
4673
      }
132 ashish 4674
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4675
      if (lastComparison != 0) {
4676
        return lastComparison;
4677
      }
132 ashish 4678
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4679
      if (lastComparison != 0) {
4680
        return lastComparison;
4681
      }
132 ashish 4682
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4683
      if (lastComparison != 0) {
4684
        return lastComparison;
4685
      }
4686
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4687
      if (lastComparison != 0) {
4688
        return lastComparison;
4689
      }
4690
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4691
      if (lastComparison != 0) {
4692
        return lastComparison;
4693
      }
4694
      return 0;
4695
    }
4696
 
4697
    public void read(TProtocol iprot) throws TException {
4698
      TField field;
4699
      iprot.readStructBegin();
4700
      while (true)
4701
      {
4702
        field = iprot.readFieldBegin();
4703
        if (field.type == TType.STOP) { 
4704
          break;
4705
        }
4706
        _Fields fieldId = _Fields.findByThriftId(field.id);
4707
        if (fieldId == null) {
4708
          TProtocolUtil.skip(iprot, field.type);
4709
        } else {
4710
          switch (fieldId) {
4711
            case CUSTOMER_ID:
4712
              if (field.type == TType.I64) {
4713
                this.customerId = iprot.readI64();
4714
                setCustomerIdIsSet(true);
4715
              } else { 
4716
                TProtocolUtil.skip(iprot, field.type);
4717
              }
4718
              break;
132 ashish 4719
            case FROM_DATE:
68 ashish 4720
              if (field.type == TType.I64) {
132 ashish 4721
                this.from_date = iprot.readI64();
4722
                setFrom_dateIsSet(true);
68 ashish 4723
              } else { 
4724
                TProtocolUtil.skip(iprot, field.type);
4725
              }
4726
              break;
132 ashish 4727
            case TO_DATE:
68 ashish 4728
              if (field.type == TType.I64) {
132 ashish 4729
                this.to_date = iprot.readI64();
4730
                setTo_dateIsSet(true);
68 ashish 4731
              } else { 
4732
                TProtocolUtil.skip(iprot, field.type);
4733
              }
4734
              break;
4735
            case STATUS:
4736
              if (field.type == TType.I32) {
4737
                this.status = TransactionStatus.findByValue(iprot.readI32());
4738
              } else { 
4739
                TProtocolUtil.skip(iprot, field.type);
4740
              }
4741
              break;
4742
          }
4743
          iprot.readFieldEnd();
4744
        }
4745
      }
4746
      iprot.readStructEnd();
4747
      validate();
4748
    }
4749
 
4750
    public void write(TProtocol oprot) throws TException {
4751
      validate();
4752
 
4753
      oprot.writeStructBegin(STRUCT_DESC);
4754
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4755
      oprot.writeI64(this.customerId);
4756
      oprot.writeFieldEnd();
132 ashish 4757
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4758
      oprot.writeI64(this.from_date);
68 ashish 4759
      oprot.writeFieldEnd();
132 ashish 4760
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4761
      oprot.writeI64(this.to_date);
68 ashish 4762
      oprot.writeFieldEnd();
4763
      if (this.status != null) {
4764
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4765
        oprot.writeI32(this.status.getValue());
4766
        oprot.writeFieldEnd();
4767
      }
4768
      oprot.writeFieldStop();
4769
      oprot.writeStructEnd();
4770
    }
4771
 
4772
    @Override
4773
    public String toString() {
4774
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4775
      boolean first = true;
4776
 
4777
      sb.append("customerId:");
4778
      sb.append(this.customerId);
4779
      first = false;
4780
      if (!first) sb.append(", ");
132 ashish 4781
      sb.append("from_date:");
4782
      sb.append(this.from_date);
68 ashish 4783
      first = false;
4784
      if (!first) sb.append(", ");
132 ashish 4785
      sb.append("to_date:");
4786
      sb.append(this.to_date);
68 ashish 4787
      first = false;
4788
      if (!first) sb.append(", ");
4789
      sb.append("status:");
4790
      if (this.status == null) {
4791
        sb.append("null");
4792
      } else {
4793
        String status_name = status.name();
4794
        if (status_name != null) {
4795
          sb.append(status_name);
4796
          sb.append(" (");
4797
        }
4798
        sb.append(this.status);
4799
        if (status_name != null) {
4800
          sb.append(")");
4801
        }
4802
      }
4803
      first = false;
4804
      sb.append(")");
4805
      return sb.toString();
4806
    }
4807
 
4808
    public void validate() throws TException {
4809
      // check for required fields
4810
    }
4811
 
4812
  }
4813
 
684 chandransh 4814
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4815
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4816
 
4817
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4818
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4819
 
4820
    private List<Transaction> success;
4821
    private TransactionServiceException ex;
4822
 
4823
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4824
    public enum _Fields implements TFieldIdEnum {
4825
      SUCCESS((short)0, "success"),
4826
      EX((short)1, "ex");
4827
 
4828
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4829
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4830
 
4831
      static {
4832
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4833
          byId.put((int)field._thriftId, field);
4834
          byName.put(field.getFieldName(), field);
4835
        }
4836
      }
4837
 
4838
      /**
4839
       * Find the _Fields constant that matches fieldId, or null if its not found.
4840
       */
4841
      public static _Fields findByThriftId(int fieldId) {
4842
        return byId.get(fieldId);
4843
      }
4844
 
4845
      /**
4846
       * Find the _Fields constant that matches fieldId, throwing an exception
4847
       * if it is not found.
4848
       */
4849
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4850
        _Fields fields = findByThriftId(fieldId);
4851
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4852
        return fields;
4853
      }
4854
 
4855
      /**
4856
       * Find the _Fields constant that matches name, or null if its not found.
4857
       */
4858
      public static _Fields findByName(String name) {
4859
        return byName.get(name);
4860
      }
4861
 
4862
      private final short _thriftId;
4863
      private final String _fieldName;
4864
 
4865
      _Fields(short thriftId, String fieldName) {
4866
        _thriftId = thriftId;
4867
        _fieldName = fieldName;
4868
      }
4869
 
4870
      public short getThriftFieldId() {
4871
        return _thriftId;
4872
      }
4873
 
4874
      public String getFieldName() {
4875
        return _fieldName;
4876
      }
4877
    }
4878
 
4879
    // isset id assignments
4880
 
4881
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4882
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4883
          new ListMetaData(TType.LIST, 
4884
              new StructMetaData(TType.STRUCT, Transaction.class))));
4885
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4886
          new FieldValueMetaData(TType.STRUCT)));
4887
    }});
4888
 
4889
    static {
4890
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4891
    }
4892
 
4893
    public getTransactionsForCustomer_result() {
4894
    }
4895
 
4896
    public getTransactionsForCustomer_result(
4897
      List<Transaction> success,
4898
      TransactionServiceException ex)
4899
    {
4900
      this();
4901
      this.success = success;
4902
      this.ex = ex;
4903
    }
4904
 
4905
    /**
4906
     * Performs a deep copy on <i>other</i>.
4907
     */
4908
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4909
      if (other.isSetSuccess()) {
4910
        List<Transaction> __this__success = new ArrayList<Transaction>();
4911
        for (Transaction other_element : other.success) {
4912
          __this__success.add(new Transaction(other_element));
4913
        }
4914
        this.success = __this__success;
4915
      }
4916
      if (other.isSetEx()) {
4917
        this.ex = new TransactionServiceException(other.ex);
4918
      }
4919
    }
4920
 
4921
    public getTransactionsForCustomer_result deepCopy() {
4922
      return new getTransactionsForCustomer_result(this);
4923
    }
4924
 
4925
    @Deprecated
4926
    public getTransactionsForCustomer_result clone() {
4927
      return new getTransactionsForCustomer_result(this);
4928
    }
4929
 
4930
    public int getSuccessSize() {
4931
      return (this.success == null) ? 0 : this.success.size();
4932
    }
4933
 
4934
    public java.util.Iterator<Transaction> getSuccessIterator() {
4935
      return (this.success == null) ? null : this.success.iterator();
4936
    }
4937
 
4938
    public void addToSuccess(Transaction elem) {
4939
      if (this.success == null) {
4940
        this.success = new ArrayList<Transaction>();
4941
      }
4942
      this.success.add(elem);
4943
    }
4944
 
4945
    public List<Transaction> getSuccess() {
4946
      return this.success;
4947
    }
4948
 
4949
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4950
      this.success = success;
4951
      return this;
4952
    }
4953
 
4954
    public void unsetSuccess() {
4955
      this.success = null;
4956
    }
4957
 
4958
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4959
    public boolean isSetSuccess() {
4960
      return this.success != null;
4961
    }
4962
 
4963
    public void setSuccessIsSet(boolean value) {
4964
      if (!value) {
4965
        this.success = null;
4966
      }
4967
    }
4968
 
4969
    public TransactionServiceException getEx() {
4970
      return this.ex;
4971
    }
4972
 
4973
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4974
      this.ex = ex;
4975
      return this;
4976
    }
4977
 
4978
    public void unsetEx() {
4979
      this.ex = null;
4980
    }
4981
 
4982
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4983
    public boolean isSetEx() {
4984
      return this.ex != null;
4985
    }
4986
 
4987
    public void setExIsSet(boolean value) {
4988
      if (!value) {
4989
        this.ex = null;
4990
      }
4991
    }
4992
 
4993
    public void setFieldValue(_Fields field, Object value) {
4994
      switch (field) {
4995
      case SUCCESS:
4996
        if (value == null) {
4997
          unsetSuccess();
4998
        } else {
4999
          setSuccess((List<Transaction>)value);
5000
        }
5001
        break;
5002
 
5003
      case EX:
5004
        if (value == null) {
5005
          unsetEx();
5006
        } else {
5007
          setEx((TransactionServiceException)value);
5008
        }
5009
        break;
5010
 
5011
      }
5012
    }
5013
 
5014
    public void setFieldValue(int fieldID, Object value) {
5015
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5016
    }
5017
 
5018
    public Object getFieldValue(_Fields field) {
5019
      switch (field) {
5020
      case SUCCESS:
5021
        return getSuccess();
5022
 
5023
      case EX:
5024
        return getEx();
5025
 
5026
      }
5027
      throw new IllegalStateException();
5028
    }
5029
 
5030
    public Object getFieldValue(int fieldId) {
5031
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5032
    }
5033
 
5034
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5035
    public boolean isSet(_Fields field) {
5036
      switch (field) {
5037
      case SUCCESS:
5038
        return isSetSuccess();
5039
      case EX:
5040
        return isSetEx();
5041
      }
5042
      throw new IllegalStateException();
5043
    }
5044
 
5045
    public boolean isSet(int fieldID) {
5046
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5047
    }
5048
 
5049
    @Override
5050
    public boolean equals(Object that) {
5051
      if (that == null)
5052
        return false;
5053
      if (that instanceof getTransactionsForCustomer_result)
5054
        return this.equals((getTransactionsForCustomer_result)that);
5055
      return false;
5056
    }
5057
 
5058
    public boolean equals(getTransactionsForCustomer_result that) {
5059
      if (that == null)
5060
        return false;
5061
 
5062
      boolean this_present_success = true && this.isSetSuccess();
5063
      boolean that_present_success = true && that.isSetSuccess();
5064
      if (this_present_success || that_present_success) {
5065
        if (!(this_present_success && that_present_success))
5066
          return false;
5067
        if (!this.success.equals(that.success))
5068
          return false;
5069
      }
5070
 
5071
      boolean this_present_ex = true && this.isSetEx();
5072
      boolean that_present_ex = true && that.isSetEx();
5073
      if (this_present_ex || that_present_ex) {
5074
        if (!(this_present_ex && that_present_ex))
5075
          return false;
5076
        if (!this.ex.equals(that.ex))
5077
          return false;
5078
      }
5079
 
5080
      return true;
5081
    }
5082
 
5083
    @Override
5084
    public int hashCode() {
5085
      return 0;
5086
    }
5087
 
684 chandransh 5088
    public int compareTo(getTransactionsForCustomer_result other) {
5089
      if (!getClass().equals(other.getClass())) {
5090
        return getClass().getName().compareTo(other.getClass().getName());
5091
      }
5092
 
5093
      int lastComparison = 0;
5094
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
5095
 
5096
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5097
      if (lastComparison != 0) {
5098
        return lastComparison;
5099
      }
5100
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5101
      if (lastComparison != 0) {
5102
        return lastComparison;
5103
      }
5104
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5105
      if (lastComparison != 0) {
5106
        return lastComparison;
5107
      }
5108
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5109
      if (lastComparison != 0) {
5110
        return lastComparison;
5111
      }
5112
      return 0;
5113
    }
5114
 
68 ashish 5115
    public void read(TProtocol iprot) throws TException {
5116
      TField field;
5117
      iprot.readStructBegin();
5118
      while (true)
5119
      {
5120
        field = iprot.readFieldBegin();
5121
        if (field.type == TType.STOP) { 
5122
          break;
5123
        }
5124
        _Fields fieldId = _Fields.findByThriftId(field.id);
5125
        if (fieldId == null) {
5126
          TProtocolUtil.skip(iprot, field.type);
5127
        } else {
5128
          switch (fieldId) {
5129
            case SUCCESS:
5130
              if (field.type == TType.LIST) {
5131
                {
684 chandransh 5132
                  TList _list8 = iprot.readListBegin();
5133
                  this.success = new ArrayList<Transaction>(_list8.size);
5134
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 5135
                  {
684 chandransh 5136
                    Transaction _elem10;
5137
                    _elem10 = new Transaction();
5138
                    _elem10.read(iprot);
5139
                    this.success.add(_elem10);
68 ashish 5140
                  }
5141
                  iprot.readListEnd();
5142
                }
5143
              } else { 
5144
                TProtocolUtil.skip(iprot, field.type);
5145
              }
5146
              break;
5147
            case EX:
5148
              if (field.type == TType.STRUCT) {
5149
                this.ex = new TransactionServiceException();
5150
                this.ex.read(iprot);
5151
              } else { 
5152
                TProtocolUtil.skip(iprot, field.type);
5153
              }
5154
              break;
5155
          }
5156
          iprot.readFieldEnd();
5157
        }
5158
      }
5159
      iprot.readStructEnd();
5160
      validate();
5161
    }
5162
 
5163
    public void write(TProtocol oprot) throws TException {
5164
      oprot.writeStructBegin(STRUCT_DESC);
5165
 
5166
      if (this.isSetSuccess()) {
5167
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5168
        {
5169
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5170
          for (Transaction _iter11 : this.success)
68 ashish 5171
          {
684 chandransh 5172
            _iter11.write(oprot);
68 ashish 5173
          }
5174
          oprot.writeListEnd();
5175
        }
5176
        oprot.writeFieldEnd();
5177
      } else if (this.isSetEx()) {
5178
        oprot.writeFieldBegin(EX_FIELD_DESC);
5179
        this.ex.write(oprot);
5180
        oprot.writeFieldEnd();
5181
      }
5182
      oprot.writeFieldStop();
5183
      oprot.writeStructEnd();
5184
    }
5185
 
5186
    @Override
5187
    public String toString() {
5188
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5189
      boolean first = true;
5190
 
5191
      sb.append("success:");
5192
      if (this.success == null) {
5193
        sb.append("null");
5194
      } else {
5195
        sb.append(this.success);
5196
      }
5197
      first = false;
5198
      if (!first) sb.append(", ");
5199
      sb.append("ex:");
5200
      if (this.ex == null) {
5201
        sb.append("null");
5202
      } else {
5203
        sb.append(this.ex);
5204
      }
5205
      first = false;
5206
      sb.append(")");
5207
      return sb.toString();
5208
    }
5209
 
5210
    public void validate() throws TException {
5211
      // check for required fields
5212
    }
5213
 
5214
  }
5215
 
132 ashish 5216
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
5217
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
5218
 
5219
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
5220
 
5221
    private long shoppingCartId;
5222
 
5223
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5224
    public enum _Fields implements TFieldIdEnum {
5225
      SHOPPING_CART_ID((short)1, "shoppingCartId");
5226
 
5227
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5228
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5229
 
5230
      static {
5231
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5232
          byId.put((int)field._thriftId, field);
5233
          byName.put(field.getFieldName(), field);
5234
        }
5235
      }
5236
 
5237
      /**
5238
       * Find the _Fields constant that matches fieldId, or null if its not found.
5239
       */
5240
      public static _Fields findByThriftId(int fieldId) {
5241
        return byId.get(fieldId);
5242
      }
5243
 
5244
      /**
5245
       * Find the _Fields constant that matches fieldId, throwing an exception
5246
       * if it is not found.
5247
       */
5248
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5249
        _Fields fields = findByThriftId(fieldId);
5250
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5251
        return fields;
5252
      }
5253
 
5254
      /**
5255
       * Find the _Fields constant that matches name, or null if its not found.
5256
       */
5257
      public static _Fields findByName(String name) {
5258
        return byName.get(name);
5259
      }
5260
 
5261
      private final short _thriftId;
5262
      private final String _fieldName;
5263
 
5264
      _Fields(short thriftId, String fieldName) {
5265
        _thriftId = thriftId;
5266
        _fieldName = fieldName;
5267
      }
5268
 
5269
      public short getThriftFieldId() {
5270
        return _thriftId;
5271
      }
5272
 
5273
      public String getFieldName() {
5274
        return _fieldName;
5275
      }
5276
    }
5277
 
5278
    // isset id assignments
5279
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
5280
    private BitSet __isset_bit_vector = new BitSet(1);
5281
 
5282
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5283
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
5284
          new FieldValueMetaData(TType.I64)));
5285
    }});
5286
 
5287
    static {
5288
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
5289
    }
5290
 
5291
    public getTransactionsForShoppingCartId_args() {
5292
    }
5293
 
5294
    public getTransactionsForShoppingCartId_args(
5295
      long shoppingCartId)
5296
    {
5297
      this();
5298
      this.shoppingCartId = shoppingCartId;
5299
      setShoppingCartIdIsSet(true);
5300
    }
5301
 
5302
    /**
5303
     * Performs a deep copy on <i>other</i>.
5304
     */
5305
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
5306
      __isset_bit_vector.clear();
5307
      __isset_bit_vector.or(other.__isset_bit_vector);
5308
      this.shoppingCartId = other.shoppingCartId;
5309
    }
5310
 
5311
    public getTransactionsForShoppingCartId_args deepCopy() {
5312
      return new getTransactionsForShoppingCartId_args(this);
5313
    }
5314
 
5315
    @Deprecated
5316
    public getTransactionsForShoppingCartId_args clone() {
5317
      return new getTransactionsForShoppingCartId_args(this);
5318
    }
5319
 
5320
    public long getShoppingCartId() {
5321
      return this.shoppingCartId;
5322
    }
5323
 
5324
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5325
      this.shoppingCartId = shoppingCartId;
5326
      setShoppingCartIdIsSet(true);
5327
      return this;
5328
    }
5329
 
5330
    public void unsetShoppingCartId() {
5331
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5332
    }
5333
 
5334
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5335
    public boolean isSetShoppingCartId() {
5336
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5337
    }
5338
 
5339
    public void setShoppingCartIdIsSet(boolean value) {
5340
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5341
    }
5342
 
5343
    public void setFieldValue(_Fields field, Object value) {
5344
      switch (field) {
5345
      case SHOPPING_CART_ID:
5346
        if (value == null) {
5347
          unsetShoppingCartId();
5348
        } else {
5349
          setShoppingCartId((Long)value);
5350
        }
5351
        break;
5352
 
5353
      }
5354
    }
5355
 
5356
    public void setFieldValue(int fieldID, Object value) {
5357
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5358
    }
5359
 
5360
    public Object getFieldValue(_Fields field) {
5361
      switch (field) {
5362
      case SHOPPING_CART_ID:
5363
        return new Long(getShoppingCartId());
5364
 
5365
      }
5366
      throw new IllegalStateException();
5367
    }
5368
 
5369
    public Object getFieldValue(int fieldId) {
5370
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5371
    }
5372
 
5373
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5374
    public boolean isSet(_Fields field) {
5375
      switch (field) {
5376
      case SHOPPING_CART_ID:
5377
        return isSetShoppingCartId();
5378
      }
5379
      throw new IllegalStateException();
5380
    }
5381
 
5382
    public boolean isSet(int fieldID) {
5383
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5384
    }
5385
 
5386
    @Override
5387
    public boolean equals(Object that) {
5388
      if (that == null)
5389
        return false;
5390
      if (that instanceof getTransactionsForShoppingCartId_args)
5391
        return this.equals((getTransactionsForShoppingCartId_args)that);
5392
      return false;
5393
    }
5394
 
5395
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5396
      if (that == null)
5397
        return false;
5398
 
5399
      boolean this_present_shoppingCartId = true;
5400
      boolean that_present_shoppingCartId = true;
5401
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5402
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5403
          return false;
5404
        if (this.shoppingCartId != that.shoppingCartId)
5405
          return false;
5406
      }
5407
 
5408
      return true;
5409
    }
5410
 
5411
    @Override
5412
    public int hashCode() {
5413
      return 0;
5414
    }
5415
 
5416
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5417
      if (!getClass().equals(other.getClass())) {
5418
        return getClass().getName().compareTo(other.getClass().getName());
5419
      }
5420
 
5421
      int lastComparison = 0;
5422
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5423
 
5424
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5425
      if (lastComparison != 0) {
5426
        return lastComparison;
5427
      }
5428
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5429
      if (lastComparison != 0) {
5430
        return lastComparison;
5431
      }
5432
      return 0;
5433
    }
5434
 
5435
    public void read(TProtocol iprot) throws TException {
5436
      TField field;
5437
      iprot.readStructBegin();
5438
      while (true)
5439
      {
5440
        field = iprot.readFieldBegin();
5441
        if (field.type == TType.STOP) { 
5442
          break;
5443
        }
5444
        _Fields fieldId = _Fields.findByThriftId(field.id);
5445
        if (fieldId == null) {
5446
          TProtocolUtil.skip(iprot, field.type);
5447
        } else {
5448
          switch (fieldId) {
5449
            case SHOPPING_CART_ID:
5450
              if (field.type == TType.I64) {
5451
                this.shoppingCartId = iprot.readI64();
5452
                setShoppingCartIdIsSet(true);
5453
              } else { 
5454
                TProtocolUtil.skip(iprot, field.type);
5455
              }
5456
              break;
5457
          }
5458
          iprot.readFieldEnd();
5459
        }
5460
      }
5461
      iprot.readStructEnd();
5462
      validate();
5463
    }
5464
 
5465
    public void write(TProtocol oprot) throws TException {
5466
      validate();
5467
 
5468
      oprot.writeStructBegin(STRUCT_DESC);
5469
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5470
      oprot.writeI64(this.shoppingCartId);
5471
      oprot.writeFieldEnd();
5472
      oprot.writeFieldStop();
5473
      oprot.writeStructEnd();
5474
    }
5475
 
5476
    @Override
5477
    public String toString() {
5478
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5479
      boolean first = true;
5480
 
5481
      sb.append("shoppingCartId:");
5482
      sb.append(this.shoppingCartId);
5483
      first = false;
5484
      sb.append(")");
5485
      return sb.toString();
5486
    }
5487
 
5488
    public void validate() throws TException {
5489
      // check for required fields
5490
    }
5491
 
5492
  }
5493
 
684 chandransh 5494
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5495
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5496
 
5497
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5498
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5499
 
5500
    private List<Transaction> success;
5501
    private TransactionServiceException ex;
5502
 
5503
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5504
    public enum _Fields implements TFieldIdEnum {
5505
      SUCCESS((short)0, "success"),
5506
      EX((short)1, "ex");
5507
 
5508
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5509
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5510
 
5511
      static {
5512
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5513
          byId.put((int)field._thriftId, field);
5514
          byName.put(field.getFieldName(), field);
5515
        }
5516
      }
5517
 
5518
      /**
5519
       * Find the _Fields constant that matches fieldId, or null if its not found.
5520
       */
5521
      public static _Fields findByThriftId(int fieldId) {
5522
        return byId.get(fieldId);
5523
      }
5524
 
5525
      /**
5526
       * Find the _Fields constant that matches fieldId, throwing an exception
5527
       * if it is not found.
5528
       */
5529
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5530
        _Fields fields = findByThriftId(fieldId);
5531
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5532
        return fields;
5533
      }
5534
 
5535
      /**
5536
       * Find the _Fields constant that matches name, or null if its not found.
5537
       */
5538
      public static _Fields findByName(String name) {
5539
        return byName.get(name);
5540
      }
5541
 
5542
      private final short _thriftId;
5543
      private final String _fieldName;
5544
 
5545
      _Fields(short thriftId, String fieldName) {
5546
        _thriftId = thriftId;
5547
        _fieldName = fieldName;
5548
      }
5549
 
5550
      public short getThriftFieldId() {
5551
        return _thriftId;
5552
      }
5553
 
5554
      public String getFieldName() {
5555
        return _fieldName;
5556
      }
5557
    }
5558
 
5559
    // isset id assignments
5560
 
5561
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5562
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5563
          new ListMetaData(TType.LIST, 
5564
              new StructMetaData(TType.STRUCT, Transaction.class))));
5565
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5566
          new FieldValueMetaData(TType.STRUCT)));
5567
    }});
5568
 
5569
    static {
5570
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5571
    }
5572
 
5573
    public getTransactionsForShoppingCartId_result() {
5574
    }
5575
 
5576
    public getTransactionsForShoppingCartId_result(
5577
      List<Transaction> success,
5578
      TransactionServiceException ex)
5579
    {
5580
      this();
5581
      this.success = success;
5582
      this.ex = ex;
5583
    }
5584
 
5585
    /**
5586
     * Performs a deep copy on <i>other</i>.
5587
     */
5588
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5589
      if (other.isSetSuccess()) {
5590
        List<Transaction> __this__success = new ArrayList<Transaction>();
5591
        for (Transaction other_element : other.success) {
5592
          __this__success.add(new Transaction(other_element));
5593
        }
5594
        this.success = __this__success;
5595
      }
5596
      if (other.isSetEx()) {
5597
        this.ex = new TransactionServiceException(other.ex);
5598
      }
5599
    }
5600
 
5601
    public getTransactionsForShoppingCartId_result deepCopy() {
5602
      return new getTransactionsForShoppingCartId_result(this);
5603
    }
5604
 
5605
    @Deprecated
5606
    public getTransactionsForShoppingCartId_result clone() {
5607
      return new getTransactionsForShoppingCartId_result(this);
5608
    }
5609
 
5610
    public int getSuccessSize() {
5611
      return (this.success == null) ? 0 : this.success.size();
5612
    }
5613
 
5614
    public java.util.Iterator<Transaction> getSuccessIterator() {
5615
      return (this.success == null) ? null : this.success.iterator();
5616
    }
5617
 
5618
    public void addToSuccess(Transaction elem) {
5619
      if (this.success == null) {
5620
        this.success = new ArrayList<Transaction>();
5621
      }
5622
      this.success.add(elem);
5623
    }
5624
 
5625
    public List<Transaction> getSuccess() {
5626
      return this.success;
5627
    }
5628
 
5629
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5630
      this.success = success;
5631
      return this;
5632
    }
5633
 
5634
    public void unsetSuccess() {
5635
      this.success = null;
5636
    }
5637
 
5638
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5639
    public boolean isSetSuccess() {
5640
      return this.success != null;
5641
    }
5642
 
5643
    public void setSuccessIsSet(boolean value) {
5644
      if (!value) {
5645
        this.success = null;
5646
      }
5647
    }
5648
 
5649
    public TransactionServiceException getEx() {
5650
      return this.ex;
5651
    }
5652
 
5653
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5654
      this.ex = ex;
5655
      return this;
5656
    }
5657
 
5658
    public void unsetEx() {
5659
      this.ex = null;
5660
    }
5661
 
5662
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5663
    public boolean isSetEx() {
5664
      return this.ex != null;
5665
    }
5666
 
5667
    public void setExIsSet(boolean value) {
5668
      if (!value) {
5669
        this.ex = null;
5670
      }
5671
    }
5672
 
5673
    public void setFieldValue(_Fields field, Object value) {
5674
      switch (field) {
5675
      case SUCCESS:
5676
        if (value == null) {
5677
          unsetSuccess();
5678
        } else {
5679
          setSuccess((List<Transaction>)value);
5680
        }
5681
        break;
5682
 
5683
      case EX:
5684
        if (value == null) {
5685
          unsetEx();
5686
        } else {
5687
          setEx((TransactionServiceException)value);
5688
        }
5689
        break;
5690
 
5691
      }
5692
    }
5693
 
5694
    public void setFieldValue(int fieldID, Object value) {
5695
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5696
    }
5697
 
5698
    public Object getFieldValue(_Fields field) {
5699
      switch (field) {
5700
      case SUCCESS:
5701
        return getSuccess();
5702
 
5703
      case EX:
5704
        return getEx();
5705
 
5706
      }
5707
      throw new IllegalStateException();
5708
    }
5709
 
5710
    public Object getFieldValue(int fieldId) {
5711
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5712
    }
5713
 
5714
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5715
    public boolean isSet(_Fields field) {
5716
      switch (field) {
5717
      case SUCCESS:
5718
        return isSetSuccess();
5719
      case EX:
5720
        return isSetEx();
5721
      }
5722
      throw new IllegalStateException();
5723
    }
5724
 
5725
    public boolean isSet(int fieldID) {
5726
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5727
    }
5728
 
5729
    @Override
5730
    public boolean equals(Object that) {
5731
      if (that == null)
5732
        return false;
5733
      if (that instanceof getTransactionsForShoppingCartId_result)
5734
        return this.equals((getTransactionsForShoppingCartId_result)that);
5735
      return false;
5736
    }
5737
 
5738
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5739
      if (that == null)
5740
        return false;
5741
 
5742
      boolean this_present_success = true && this.isSetSuccess();
5743
      boolean that_present_success = true && that.isSetSuccess();
5744
      if (this_present_success || that_present_success) {
5745
        if (!(this_present_success && that_present_success))
5746
          return false;
5747
        if (!this.success.equals(that.success))
5748
          return false;
5749
      }
5750
 
5751
      boolean this_present_ex = true && this.isSetEx();
5752
      boolean that_present_ex = true && that.isSetEx();
5753
      if (this_present_ex || that_present_ex) {
5754
        if (!(this_present_ex && that_present_ex))
5755
          return false;
5756
        if (!this.ex.equals(that.ex))
5757
          return false;
5758
      }
5759
 
5760
      return true;
5761
    }
5762
 
5763
    @Override
5764
    public int hashCode() {
5765
      return 0;
5766
    }
5767
 
684 chandransh 5768
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5769
      if (!getClass().equals(other.getClass())) {
5770
        return getClass().getName().compareTo(other.getClass().getName());
5771
      }
5772
 
5773
      int lastComparison = 0;
5774
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5775
 
5776
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5777
      if (lastComparison != 0) {
5778
        return lastComparison;
5779
      }
5780
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5781
      if (lastComparison != 0) {
5782
        return lastComparison;
5783
      }
5784
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5785
      if (lastComparison != 0) {
5786
        return lastComparison;
5787
      }
5788
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5789
      if (lastComparison != 0) {
5790
        return lastComparison;
5791
      }
5792
      return 0;
5793
    }
5794
 
132 ashish 5795
    public void read(TProtocol iprot) throws TException {
5796
      TField field;
5797
      iprot.readStructBegin();
5798
      while (true)
5799
      {
5800
        field = iprot.readFieldBegin();
5801
        if (field.type == TType.STOP) { 
5802
          break;
5803
        }
5804
        _Fields fieldId = _Fields.findByThriftId(field.id);
5805
        if (fieldId == null) {
5806
          TProtocolUtil.skip(iprot, field.type);
5807
        } else {
5808
          switch (fieldId) {
5809
            case SUCCESS:
5810
              if (field.type == TType.LIST) {
5811
                {
684 chandransh 5812
                  TList _list12 = iprot.readListBegin();
5813
                  this.success = new ArrayList<Transaction>(_list12.size);
5814
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5815
                  {
684 chandransh 5816
                    Transaction _elem14;
5817
                    _elem14 = new Transaction();
5818
                    _elem14.read(iprot);
5819
                    this.success.add(_elem14);
132 ashish 5820
                  }
5821
                  iprot.readListEnd();
5822
                }
5823
              } else { 
5824
                TProtocolUtil.skip(iprot, field.type);
5825
              }
5826
              break;
5827
            case EX:
5828
              if (field.type == TType.STRUCT) {
5829
                this.ex = new TransactionServiceException();
5830
                this.ex.read(iprot);
5831
              } else { 
5832
                TProtocolUtil.skip(iprot, field.type);
5833
              }
5834
              break;
5835
          }
5836
          iprot.readFieldEnd();
5837
        }
5838
      }
5839
      iprot.readStructEnd();
5840
      validate();
5841
    }
5842
 
5843
    public void write(TProtocol oprot) throws TException {
5844
      oprot.writeStructBegin(STRUCT_DESC);
5845
 
5846
      if (this.isSetSuccess()) {
5847
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5848
        {
5849
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5850
          for (Transaction _iter15 : this.success)
132 ashish 5851
          {
684 chandransh 5852
            _iter15.write(oprot);
132 ashish 5853
          }
5854
          oprot.writeListEnd();
5855
        }
5856
        oprot.writeFieldEnd();
5857
      } else if (this.isSetEx()) {
5858
        oprot.writeFieldBegin(EX_FIELD_DESC);
5859
        this.ex.write(oprot);
5860
        oprot.writeFieldEnd();
5861
      }
5862
      oprot.writeFieldStop();
5863
      oprot.writeStructEnd();
5864
    }
5865
 
5866
    @Override
5867
    public String toString() {
5868
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5869
      boolean first = true;
5870
 
5871
      sb.append("success:");
5872
      if (this.success == null) {
5873
        sb.append("null");
5874
      } else {
5875
        sb.append(this.success);
5876
      }
5877
      first = false;
5878
      if (!first) sb.append(", ");
5879
      sb.append("ex:");
5880
      if (this.ex == null) {
5881
        sb.append("null");
5882
      } else {
5883
        sb.append(this.ex);
5884
      }
5885
      first = false;
5886
      sb.append(")");
5887
      return sb.toString();
5888
    }
5889
 
5890
    public void validate() throws TException {
5891
      // check for required fields
5892
    }
5893
 
5894
  }
5895
 
68 ashish 5896
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5897
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5898
 
5899
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5900
 
5901
    private long transactionId;
5902
 
5903
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5904
    public enum _Fields implements TFieldIdEnum {
5905
      TRANSACTION_ID((short)1, "transactionId");
5906
 
5907
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5908
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5909
 
5910
      static {
5911
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5912
          byId.put((int)field._thriftId, field);
5913
          byName.put(field.getFieldName(), field);
5914
        }
5915
      }
5916
 
5917
      /**
5918
       * Find the _Fields constant that matches fieldId, or null if its not found.
5919
       */
5920
      public static _Fields findByThriftId(int fieldId) {
5921
        return byId.get(fieldId);
5922
      }
5923
 
5924
      /**
5925
       * Find the _Fields constant that matches fieldId, throwing an exception
5926
       * if it is not found.
5927
       */
5928
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5929
        _Fields fields = findByThriftId(fieldId);
5930
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5931
        return fields;
5932
      }
5933
 
5934
      /**
5935
       * Find the _Fields constant that matches name, or null if its not found.
5936
       */
5937
      public static _Fields findByName(String name) {
5938
        return byName.get(name);
5939
      }
5940
 
5941
      private final short _thriftId;
5942
      private final String _fieldName;
5943
 
5944
      _Fields(short thriftId, String fieldName) {
5945
        _thriftId = thriftId;
5946
        _fieldName = fieldName;
5947
      }
5948
 
5949
      public short getThriftFieldId() {
5950
        return _thriftId;
5951
      }
5952
 
5953
      public String getFieldName() {
5954
        return _fieldName;
5955
      }
5956
    }
5957
 
5958
    // isset id assignments
5959
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5960
    private BitSet __isset_bit_vector = new BitSet(1);
5961
 
5962
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5963
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5964
          new FieldValueMetaData(TType.I64)));
5965
    }});
5966
 
5967
    static {
5968
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5969
    }
5970
 
5971
    public getTransactionStatus_args() {
5972
    }
5973
 
5974
    public getTransactionStatus_args(
5975
      long transactionId)
5976
    {
5977
      this();
5978
      this.transactionId = transactionId;
5979
      setTransactionIdIsSet(true);
5980
    }
5981
 
5982
    /**
5983
     * Performs a deep copy on <i>other</i>.
5984
     */
5985
    public getTransactionStatus_args(getTransactionStatus_args other) {
5986
      __isset_bit_vector.clear();
5987
      __isset_bit_vector.or(other.__isset_bit_vector);
5988
      this.transactionId = other.transactionId;
5989
    }
5990
 
5991
    public getTransactionStatus_args deepCopy() {
5992
      return new getTransactionStatus_args(this);
5993
    }
5994
 
5995
    @Deprecated
5996
    public getTransactionStatus_args clone() {
5997
      return new getTransactionStatus_args(this);
5998
    }
5999
 
6000
    public long getTransactionId() {
6001
      return this.transactionId;
6002
    }
6003
 
6004
    public getTransactionStatus_args setTransactionId(long transactionId) {
6005
      this.transactionId = transactionId;
6006
      setTransactionIdIsSet(true);
6007
      return this;
6008
    }
6009
 
6010
    public void unsetTransactionId() {
6011
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6012
    }
6013
 
6014
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6015
    public boolean isSetTransactionId() {
6016
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6017
    }
6018
 
6019
    public void setTransactionIdIsSet(boolean value) {
6020
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6021
    }
6022
 
6023
    public void setFieldValue(_Fields field, Object value) {
6024
      switch (field) {
6025
      case TRANSACTION_ID:
6026
        if (value == null) {
6027
          unsetTransactionId();
6028
        } else {
6029
          setTransactionId((Long)value);
6030
        }
6031
        break;
6032
 
6033
      }
6034
    }
6035
 
6036
    public void setFieldValue(int fieldID, Object value) {
6037
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6038
    }
6039
 
6040
    public Object getFieldValue(_Fields field) {
6041
      switch (field) {
6042
      case TRANSACTION_ID:
6043
        return new Long(getTransactionId());
6044
 
6045
      }
6046
      throw new IllegalStateException();
6047
    }
6048
 
6049
    public Object getFieldValue(int fieldId) {
6050
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6051
    }
6052
 
6053
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6054
    public boolean isSet(_Fields field) {
6055
      switch (field) {
6056
      case TRANSACTION_ID:
6057
        return isSetTransactionId();
6058
      }
6059
      throw new IllegalStateException();
6060
    }
6061
 
6062
    public boolean isSet(int fieldID) {
6063
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6064
    }
6065
 
6066
    @Override
6067
    public boolean equals(Object that) {
6068
      if (that == null)
6069
        return false;
6070
      if (that instanceof getTransactionStatus_args)
6071
        return this.equals((getTransactionStatus_args)that);
6072
      return false;
6073
    }
6074
 
6075
    public boolean equals(getTransactionStatus_args that) {
6076
      if (that == null)
6077
        return false;
6078
 
6079
      boolean this_present_transactionId = true;
6080
      boolean that_present_transactionId = true;
6081
      if (this_present_transactionId || that_present_transactionId) {
6082
        if (!(this_present_transactionId && that_present_transactionId))
6083
          return false;
6084
        if (this.transactionId != that.transactionId)
6085
          return false;
6086
      }
6087
 
6088
      return true;
6089
    }
6090
 
6091
    @Override
6092
    public int hashCode() {
6093
      return 0;
6094
    }
6095
 
6096
    public int compareTo(getTransactionStatus_args other) {
6097
      if (!getClass().equals(other.getClass())) {
6098
        return getClass().getName().compareTo(other.getClass().getName());
6099
      }
6100
 
6101
      int lastComparison = 0;
6102
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
6103
 
6104
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6105
      if (lastComparison != 0) {
6106
        return lastComparison;
6107
      }
6108
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6109
      if (lastComparison != 0) {
6110
        return lastComparison;
6111
      }
6112
      return 0;
6113
    }
6114
 
6115
    public void read(TProtocol iprot) throws TException {
6116
      TField field;
6117
      iprot.readStructBegin();
6118
      while (true)
6119
      {
6120
        field = iprot.readFieldBegin();
6121
        if (field.type == TType.STOP) { 
6122
          break;
6123
        }
6124
        _Fields fieldId = _Fields.findByThriftId(field.id);
6125
        if (fieldId == null) {
6126
          TProtocolUtil.skip(iprot, field.type);
6127
        } else {
6128
          switch (fieldId) {
6129
            case TRANSACTION_ID:
6130
              if (field.type == TType.I64) {
6131
                this.transactionId = iprot.readI64();
6132
                setTransactionIdIsSet(true);
6133
              } else { 
6134
                TProtocolUtil.skip(iprot, field.type);
6135
              }
6136
              break;
6137
          }
6138
          iprot.readFieldEnd();
6139
        }
6140
      }
6141
      iprot.readStructEnd();
6142
      validate();
6143
    }
6144
 
6145
    public void write(TProtocol oprot) throws TException {
6146
      validate();
6147
 
6148
      oprot.writeStructBegin(STRUCT_DESC);
6149
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6150
      oprot.writeI64(this.transactionId);
6151
      oprot.writeFieldEnd();
6152
      oprot.writeFieldStop();
6153
      oprot.writeStructEnd();
6154
    }
6155
 
6156
    @Override
6157
    public String toString() {
6158
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
6159
      boolean first = true;
6160
 
6161
      sb.append("transactionId:");
6162
      sb.append(this.transactionId);
6163
      first = false;
6164
      sb.append(")");
6165
      return sb.toString();
6166
    }
6167
 
6168
    public void validate() throws TException {
6169
      // check for required fields
6170
    }
6171
 
6172
  }
6173
 
6174
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
6175
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
6176
 
6177
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
6178
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6179
 
6180
    private TransactionStatus success;
6181
    private TransactionServiceException ex;
6182
 
6183
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6184
    public enum _Fields implements TFieldIdEnum {
6185
      /**
6186
       * 
6187
       * @see TransactionStatus
6188
       */
6189
      SUCCESS((short)0, "success"),
6190
      EX((short)1, "ex");
6191
 
6192
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6193
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6194
 
6195
      static {
6196
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6197
          byId.put((int)field._thriftId, field);
6198
          byName.put(field.getFieldName(), field);
6199
        }
6200
      }
6201
 
6202
      /**
6203
       * Find the _Fields constant that matches fieldId, or null if its not found.
6204
       */
6205
      public static _Fields findByThriftId(int fieldId) {
6206
        return byId.get(fieldId);
6207
      }
6208
 
6209
      /**
6210
       * Find the _Fields constant that matches fieldId, throwing an exception
6211
       * if it is not found.
6212
       */
6213
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6214
        _Fields fields = findByThriftId(fieldId);
6215
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6216
        return fields;
6217
      }
6218
 
6219
      /**
6220
       * Find the _Fields constant that matches name, or null if its not found.
6221
       */
6222
      public static _Fields findByName(String name) {
6223
        return byName.get(name);
6224
      }
6225
 
6226
      private final short _thriftId;
6227
      private final String _fieldName;
6228
 
6229
      _Fields(short thriftId, String fieldName) {
6230
        _thriftId = thriftId;
6231
        _fieldName = fieldName;
6232
      }
6233
 
6234
      public short getThriftFieldId() {
6235
        return _thriftId;
6236
      }
6237
 
6238
      public String getFieldName() {
6239
        return _fieldName;
6240
      }
6241
    }
6242
 
6243
    // isset id assignments
6244
 
6245
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6246
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6247
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6248
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6249
          new FieldValueMetaData(TType.STRUCT)));
6250
    }});
6251
 
6252
    static {
6253
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
6254
    }
6255
 
6256
    public getTransactionStatus_result() {
6257
    }
6258
 
6259
    public getTransactionStatus_result(
6260
      TransactionStatus success,
6261
      TransactionServiceException ex)
6262
    {
6263
      this();
6264
      this.success = success;
6265
      this.ex = ex;
6266
    }
6267
 
6268
    /**
6269
     * Performs a deep copy on <i>other</i>.
6270
     */
6271
    public getTransactionStatus_result(getTransactionStatus_result other) {
6272
      if (other.isSetSuccess()) {
6273
        this.success = other.success;
6274
      }
6275
      if (other.isSetEx()) {
6276
        this.ex = new TransactionServiceException(other.ex);
6277
      }
6278
    }
6279
 
6280
    public getTransactionStatus_result deepCopy() {
6281
      return new getTransactionStatus_result(this);
6282
    }
6283
 
6284
    @Deprecated
6285
    public getTransactionStatus_result clone() {
6286
      return new getTransactionStatus_result(this);
6287
    }
6288
 
6289
    /**
6290
     * 
6291
     * @see TransactionStatus
6292
     */
6293
    public TransactionStatus getSuccess() {
6294
      return this.success;
6295
    }
6296
 
6297
    /**
6298
     * 
6299
     * @see TransactionStatus
6300
     */
6301
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
6302
      this.success = success;
6303
      return this;
6304
    }
6305
 
6306
    public void unsetSuccess() {
6307
      this.success = null;
6308
    }
6309
 
6310
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6311
    public boolean isSetSuccess() {
6312
      return this.success != null;
6313
    }
6314
 
6315
    public void setSuccessIsSet(boolean value) {
6316
      if (!value) {
6317
        this.success = null;
6318
      }
6319
    }
6320
 
6321
    public TransactionServiceException getEx() {
6322
      return this.ex;
6323
    }
6324
 
6325
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6326
      this.ex = ex;
6327
      return this;
6328
    }
6329
 
6330
    public void unsetEx() {
6331
      this.ex = null;
6332
    }
6333
 
6334
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6335
    public boolean isSetEx() {
6336
      return this.ex != null;
6337
    }
6338
 
6339
    public void setExIsSet(boolean value) {
6340
      if (!value) {
6341
        this.ex = null;
6342
      }
6343
    }
6344
 
6345
    public void setFieldValue(_Fields field, Object value) {
6346
      switch (field) {
6347
      case SUCCESS:
6348
        if (value == null) {
6349
          unsetSuccess();
6350
        } else {
6351
          setSuccess((TransactionStatus)value);
6352
        }
6353
        break;
6354
 
6355
      case EX:
6356
        if (value == null) {
6357
          unsetEx();
6358
        } else {
6359
          setEx((TransactionServiceException)value);
6360
        }
6361
        break;
6362
 
6363
      }
6364
    }
6365
 
6366
    public void setFieldValue(int fieldID, Object value) {
6367
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6368
    }
6369
 
6370
    public Object getFieldValue(_Fields field) {
6371
      switch (field) {
6372
      case SUCCESS:
6373
        return getSuccess();
6374
 
6375
      case EX:
6376
        return getEx();
6377
 
6378
      }
6379
      throw new IllegalStateException();
6380
    }
6381
 
6382
    public Object getFieldValue(int fieldId) {
6383
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6384
    }
6385
 
6386
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6387
    public boolean isSet(_Fields field) {
6388
      switch (field) {
6389
      case SUCCESS:
6390
        return isSetSuccess();
6391
      case EX:
6392
        return isSetEx();
6393
      }
6394
      throw new IllegalStateException();
6395
    }
6396
 
6397
    public boolean isSet(int fieldID) {
6398
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6399
    }
6400
 
6401
    @Override
6402
    public boolean equals(Object that) {
6403
      if (that == null)
6404
        return false;
6405
      if (that instanceof getTransactionStatus_result)
6406
        return this.equals((getTransactionStatus_result)that);
6407
      return false;
6408
    }
6409
 
6410
    public boolean equals(getTransactionStatus_result that) {
6411
      if (that == null)
6412
        return false;
6413
 
6414
      boolean this_present_success = true && this.isSetSuccess();
6415
      boolean that_present_success = true && that.isSetSuccess();
6416
      if (this_present_success || that_present_success) {
6417
        if (!(this_present_success && that_present_success))
6418
          return false;
6419
        if (!this.success.equals(that.success))
6420
          return false;
6421
      }
6422
 
6423
      boolean this_present_ex = true && this.isSetEx();
6424
      boolean that_present_ex = true && that.isSetEx();
6425
      if (this_present_ex || that_present_ex) {
6426
        if (!(this_present_ex && that_present_ex))
6427
          return false;
6428
        if (!this.ex.equals(that.ex))
6429
          return false;
6430
      }
6431
 
6432
      return true;
6433
    }
6434
 
6435
    @Override
6436
    public int hashCode() {
6437
      return 0;
6438
    }
6439
 
6440
    public int compareTo(getTransactionStatus_result other) {
6441
      if (!getClass().equals(other.getClass())) {
6442
        return getClass().getName().compareTo(other.getClass().getName());
6443
      }
6444
 
6445
      int lastComparison = 0;
6446
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6447
 
6448
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6449
      if (lastComparison != 0) {
6450
        return lastComparison;
6451
      }
6452
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6453
      if (lastComparison != 0) {
6454
        return lastComparison;
6455
      }
6456
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6457
      if (lastComparison != 0) {
6458
        return lastComparison;
6459
      }
6460
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6461
      if (lastComparison != 0) {
6462
        return lastComparison;
6463
      }
6464
      return 0;
6465
    }
6466
 
6467
    public void read(TProtocol iprot) throws TException {
6468
      TField field;
6469
      iprot.readStructBegin();
6470
      while (true)
6471
      {
6472
        field = iprot.readFieldBegin();
6473
        if (field.type == TType.STOP) { 
6474
          break;
6475
        }
6476
        _Fields fieldId = _Fields.findByThriftId(field.id);
6477
        if (fieldId == null) {
6478
          TProtocolUtil.skip(iprot, field.type);
6479
        } else {
6480
          switch (fieldId) {
6481
            case SUCCESS:
6482
              if (field.type == TType.I32) {
6483
                this.success = TransactionStatus.findByValue(iprot.readI32());
6484
              } else { 
6485
                TProtocolUtil.skip(iprot, field.type);
6486
              }
6487
              break;
6488
            case EX:
6489
              if (field.type == TType.STRUCT) {
6490
                this.ex = new TransactionServiceException();
6491
                this.ex.read(iprot);
6492
              } else { 
6493
                TProtocolUtil.skip(iprot, field.type);
6494
              }
6495
              break;
6496
          }
6497
          iprot.readFieldEnd();
6498
        }
6499
      }
6500
      iprot.readStructEnd();
6501
      validate();
6502
    }
6503
 
6504
    public void write(TProtocol oprot) throws TException {
6505
      oprot.writeStructBegin(STRUCT_DESC);
6506
 
6507
      if (this.isSetSuccess()) {
6508
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6509
        oprot.writeI32(this.success.getValue());
6510
        oprot.writeFieldEnd();
6511
      } else if (this.isSetEx()) {
6512
        oprot.writeFieldBegin(EX_FIELD_DESC);
6513
        this.ex.write(oprot);
6514
        oprot.writeFieldEnd();
6515
      }
6516
      oprot.writeFieldStop();
6517
      oprot.writeStructEnd();
6518
    }
6519
 
6520
    @Override
6521
    public String toString() {
6522
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6523
      boolean first = true;
6524
 
6525
      sb.append("success:");
6526
      if (this.success == null) {
6527
        sb.append("null");
6528
      } else {
6529
        String success_name = success.name();
6530
        if (success_name != null) {
6531
          sb.append(success_name);
6532
          sb.append(" (");
6533
        }
6534
        sb.append(this.success);
6535
        if (success_name != null) {
6536
          sb.append(")");
6537
        }
6538
      }
6539
      first = false;
6540
      if (!first) sb.append(", ");
6541
      sb.append("ex:");
6542
      if (this.ex == null) {
6543
        sb.append("null");
6544
      } else {
6545
        sb.append(this.ex);
6546
      }
6547
      first = false;
6548
      sb.append(")");
6549
      return sb.toString();
6550
    }
6551
 
6552
    public void validate() throws TException {
6553
      // check for required fields
6554
    }
6555
 
6556
  }
6557
 
6558
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6559
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6560
 
6561
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6562
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6563
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6564
 
6565
    private long transactionId;
6566
    private TransactionStatus status;
6567
    private String description;
6568
 
6569
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6570
    public enum _Fields implements TFieldIdEnum {
6571
      TRANSACTION_ID((short)1, "transactionId"),
6572
      /**
6573
       * 
6574
       * @see TransactionStatus
6575
       */
6576
      STATUS((short)2, "status"),
6577
      DESCRIPTION((short)3, "description");
6578
 
6579
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6580
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6581
 
6582
      static {
6583
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6584
          byId.put((int)field._thriftId, field);
6585
          byName.put(field.getFieldName(), field);
6586
        }
6587
      }
6588
 
6589
      /**
6590
       * Find the _Fields constant that matches fieldId, or null if its not found.
6591
       */
6592
      public static _Fields findByThriftId(int fieldId) {
6593
        return byId.get(fieldId);
6594
      }
6595
 
6596
      /**
6597
       * Find the _Fields constant that matches fieldId, throwing an exception
6598
       * if it is not found.
6599
       */
6600
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6601
        _Fields fields = findByThriftId(fieldId);
6602
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6603
        return fields;
6604
      }
6605
 
6606
      /**
6607
       * Find the _Fields constant that matches name, or null if its not found.
6608
       */
6609
      public static _Fields findByName(String name) {
6610
        return byName.get(name);
6611
      }
6612
 
6613
      private final short _thriftId;
6614
      private final String _fieldName;
6615
 
6616
      _Fields(short thriftId, String fieldName) {
6617
        _thriftId = thriftId;
6618
        _fieldName = fieldName;
6619
      }
6620
 
6621
      public short getThriftFieldId() {
6622
        return _thriftId;
6623
      }
6624
 
6625
      public String getFieldName() {
6626
        return _fieldName;
6627
      }
6628
    }
6629
 
6630
    // isset id assignments
6631
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6632
    private BitSet __isset_bit_vector = new BitSet(1);
6633
 
6634
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6635
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6636
          new FieldValueMetaData(TType.I64)));
6637
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6638
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6639
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6640
          new FieldValueMetaData(TType.STRING)));
6641
    }});
6642
 
6643
    static {
6644
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6645
    }
6646
 
6647
    public changeTransactionStatus_args() {
6648
    }
6649
 
6650
    public changeTransactionStatus_args(
6651
      long transactionId,
6652
      TransactionStatus status,
6653
      String description)
6654
    {
6655
      this();
6656
      this.transactionId = transactionId;
6657
      setTransactionIdIsSet(true);
6658
      this.status = status;
6659
      this.description = description;
6660
    }
6661
 
6662
    /**
6663
     * Performs a deep copy on <i>other</i>.
6664
     */
6665
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6666
      __isset_bit_vector.clear();
6667
      __isset_bit_vector.or(other.__isset_bit_vector);
6668
      this.transactionId = other.transactionId;
6669
      if (other.isSetStatus()) {
6670
        this.status = other.status;
6671
      }
6672
      if (other.isSetDescription()) {
6673
        this.description = other.description;
6674
      }
6675
    }
6676
 
6677
    public changeTransactionStatus_args deepCopy() {
6678
      return new changeTransactionStatus_args(this);
6679
    }
6680
 
6681
    @Deprecated
6682
    public changeTransactionStatus_args clone() {
6683
      return new changeTransactionStatus_args(this);
6684
    }
6685
 
6686
    public long getTransactionId() {
6687
      return this.transactionId;
6688
    }
6689
 
6690
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6691
      this.transactionId = transactionId;
6692
      setTransactionIdIsSet(true);
6693
      return this;
6694
    }
6695
 
6696
    public void unsetTransactionId() {
6697
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6698
    }
6699
 
6700
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6701
    public boolean isSetTransactionId() {
6702
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6703
    }
6704
 
6705
    public void setTransactionIdIsSet(boolean value) {
6706
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6707
    }
6708
 
6709
    /**
6710
     * 
6711
     * @see TransactionStatus
6712
     */
6713
    public TransactionStatus getStatus() {
6714
      return this.status;
6715
    }
6716
 
6717
    /**
6718
     * 
6719
     * @see TransactionStatus
6720
     */
6721
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6722
      this.status = status;
6723
      return this;
6724
    }
6725
 
6726
    public void unsetStatus() {
6727
      this.status = null;
6728
    }
6729
 
6730
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6731
    public boolean isSetStatus() {
6732
      return this.status != null;
6733
    }
6734
 
6735
    public void setStatusIsSet(boolean value) {
6736
      if (!value) {
6737
        this.status = null;
6738
      }
6739
    }
6740
 
6741
    public String getDescription() {
6742
      return this.description;
6743
    }
6744
 
6745
    public changeTransactionStatus_args setDescription(String description) {
6746
      this.description = description;
6747
      return this;
6748
    }
6749
 
6750
    public void unsetDescription() {
6751
      this.description = null;
6752
    }
6753
 
6754
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6755
    public boolean isSetDescription() {
6756
      return this.description != null;
6757
    }
6758
 
6759
    public void setDescriptionIsSet(boolean value) {
6760
      if (!value) {
6761
        this.description = null;
6762
      }
6763
    }
6764
 
6765
    public void setFieldValue(_Fields field, Object value) {
6766
      switch (field) {
6767
      case TRANSACTION_ID:
6768
        if (value == null) {
6769
          unsetTransactionId();
6770
        } else {
6771
          setTransactionId((Long)value);
6772
        }
6773
        break;
6774
 
6775
      case STATUS:
6776
        if (value == null) {
6777
          unsetStatus();
6778
        } else {
6779
          setStatus((TransactionStatus)value);
6780
        }
6781
        break;
6782
 
6783
      case DESCRIPTION:
6784
        if (value == null) {
6785
          unsetDescription();
6786
        } else {
6787
          setDescription((String)value);
6788
        }
6789
        break;
6790
 
6791
      }
6792
    }
6793
 
6794
    public void setFieldValue(int fieldID, Object value) {
6795
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6796
    }
6797
 
6798
    public Object getFieldValue(_Fields field) {
6799
      switch (field) {
6800
      case TRANSACTION_ID:
6801
        return new Long(getTransactionId());
6802
 
6803
      case STATUS:
6804
        return getStatus();
6805
 
6806
      case DESCRIPTION:
6807
        return getDescription();
6808
 
6809
      }
6810
      throw new IllegalStateException();
6811
    }
6812
 
6813
    public Object getFieldValue(int fieldId) {
6814
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6815
    }
6816
 
6817
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6818
    public boolean isSet(_Fields field) {
6819
      switch (field) {
6820
      case TRANSACTION_ID:
6821
        return isSetTransactionId();
6822
      case STATUS:
6823
        return isSetStatus();
6824
      case DESCRIPTION:
6825
        return isSetDescription();
6826
      }
6827
      throw new IllegalStateException();
6828
    }
6829
 
6830
    public boolean isSet(int fieldID) {
6831
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6832
    }
6833
 
6834
    @Override
6835
    public boolean equals(Object that) {
6836
      if (that == null)
6837
        return false;
6838
      if (that instanceof changeTransactionStatus_args)
6839
        return this.equals((changeTransactionStatus_args)that);
6840
      return false;
6841
    }
6842
 
6843
    public boolean equals(changeTransactionStatus_args that) {
6844
      if (that == null)
6845
        return false;
6846
 
6847
      boolean this_present_transactionId = true;
6848
      boolean that_present_transactionId = true;
6849
      if (this_present_transactionId || that_present_transactionId) {
6850
        if (!(this_present_transactionId && that_present_transactionId))
6851
          return false;
6852
        if (this.transactionId != that.transactionId)
6853
          return false;
6854
      }
6855
 
6856
      boolean this_present_status = true && this.isSetStatus();
6857
      boolean that_present_status = true && that.isSetStatus();
6858
      if (this_present_status || that_present_status) {
6859
        if (!(this_present_status && that_present_status))
6860
          return false;
6861
        if (!this.status.equals(that.status))
6862
          return false;
6863
      }
6864
 
6865
      boolean this_present_description = true && this.isSetDescription();
6866
      boolean that_present_description = true && that.isSetDescription();
6867
      if (this_present_description || that_present_description) {
6868
        if (!(this_present_description && that_present_description))
6869
          return false;
6870
        if (!this.description.equals(that.description))
6871
          return false;
6872
      }
6873
 
6874
      return true;
6875
    }
6876
 
6877
    @Override
6878
    public int hashCode() {
6879
      return 0;
6880
    }
6881
 
6882
    public int compareTo(changeTransactionStatus_args other) {
6883
      if (!getClass().equals(other.getClass())) {
6884
        return getClass().getName().compareTo(other.getClass().getName());
6885
      }
6886
 
6887
      int lastComparison = 0;
6888
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6889
 
6890
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6891
      if (lastComparison != 0) {
6892
        return lastComparison;
6893
      }
6894
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6895
      if (lastComparison != 0) {
6896
        return lastComparison;
6897
      }
6898
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6899
      if (lastComparison != 0) {
6900
        return lastComparison;
6901
      }
6902
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6903
      if (lastComparison != 0) {
6904
        return lastComparison;
6905
      }
6906
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6907
      if (lastComparison != 0) {
6908
        return lastComparison;
6909
      }
6910
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6911
      if (lastComparison != 0) {
6912
        return lastComparison;
6913
      }
6914
      return 0;
6915
    }
6916
 
6917
    public void read(TProtocol iprot) throws TException {
6918
      TField field;
6919
      iprot.readStructBegin();
6920
      while (true)
6921
      {
6922
        field = iprot.readFieldBegin();
6923
        if (field.type == TType.STOP) { 
6924
          break;
6925
        }
6926
        _Fields fieldId = _Fields.findByThriftId(field.id);
6927
        if (fieldId == null) {
6928
          TProtocolUtil.skip(iprot, field.type);
6929
        } else {
6930
          switch (fieldId) {
6931
            case TRANSACTION_ID:
6932
              if (field.type == TType.I64) {
6933
                this.transactionId = iprot.readI64();
6934
                setTransactionIdIsSet(true);
6935
              } else { 
6936
                TProtocolUtil.skip(iprot, field.type);
6937
              }
6938
              break;
6939
            case STATUS:
6940
              if (field.type == TType.I32) {
6941
                this.status = TransactionStatus.findByValue(iprot.readI32());
6942
              } else { 
6943
                TProtocolUtil.skip(iprot, field.type);
6944
              }
6945
              break;
6946
            case DESCRIPTION:
6947
              if (field.type == TType.STRING) {
6948
                this.description = iprot.readString();
6949
              } else { 
6950
                TProtocolUtil.skip(iprot, field.type);
6951
              }
6952
              break;
6953
          }
6954
          iprot.readFieldEnd();
6955
        }
6956
      }
6957
      iprot.readStructEnd();
6958
      validate();
6959
    }
6960
 
6961
    public void write(TProtocol oprot) throws TException {
6962
      validate();
6963
 
6964
      oprot.writeStructBegin(STRUCT_DESC);
6965
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6966
      oprot.writeI64(this.transactionId);
6967
      oprot.writeFieldEnd();
6968
      if (this.status != null) {
6969
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6970
        oprot.writeI32(this.status.getValue());
6971
        oprot.writeFieldEnd();
6972
      }
6973
      if (this.description != null) {
6974
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6975
        oprot.writeString(this.description);
6976
        oprot.writeFieldEnd();
6977
      }
6978
      oprot.writeFieldStop();
6979
      oprot.writeStructEnd();
6980
    }
6981
 
6982
    @Override
6983
    public String toString() {
6984
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6985
      boolean first = true;
6986
 
6987
      sb.append("transactionId:");
6988
      sb.append(this.transactionId);
6989
      first = false;
6990
      if (!first) sb.append(", ");
6991
      sb.append("status:");
6992
      if (this.status == null) {
6993
        sb.append("null");
6994
      } else {
6995
        String status_name = status.name();
6996
        if (status_name != null) {
6997
          sb.append(status_name);
6998
          sb.append(" (");
6999
        }
7000
        sb.append(this.status);
7001
        if (status_name != null) {
7002
          sb.append(")");
7003
        }
7004
      }
7005
      first = false;
7006
      if (!first) sb.append(", ");
7007
      sb.append("description:");
7008
      if (this.description == null) {
7009
        sb.append("null");
7010
      } else {
7011
        sb.append(this.description);
7012
      }
7013
      first = false;
7014
      sb.append(")");
7015
      return sb.toString();
7016
    }
7017
 
7018
    public void validate() throws TException {
7019
      // check for required fields
7020
    }
7021
 
7022
  }
7023
 
7024
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
7025
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
7026
 
7027
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7028
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7029
 
7030
    private boolean success;
7031
    private TransactionServiceException ex;
7032
 
7033
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7034
    public enum _Fields implements TFieldIdEnum {
7035
      SUCCESS((short)0, "success"),
7036
      EX((short)1, "ex");
7037
 
7038
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7039
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7040
 
7041
      static {
7042
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7043
          byId.put((int)field._thriftId, field);
7044
          byName.put(field.getFieldName(), field);
7045
        }
7046
      }
7047
 
7048
      /**
7049
       * Find the _Fields constant that matches fieldId, or null if its not found.
7050
       */
7051
      public static _Fields findByThriftId(int fieldId) {
7052
        return byId.get(fieldId);
7053
      }
7054
 
7055
      /**
7056
       * Find the _Fields constant that matches fieldId, throwing an exception
7057
       * if it is not found.
7058
       */
7059
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7060
        _Fields fields = findByThriftId(fieldId);
7061
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7062
        return fields;
7063
      }
7064
 
7065
      /**
7066
       * Find the _Fields constant that matches name, or null if its not found.
7067
       */
7068
      public static _Fields findByName(String name) {
7069
        return byName.get(name);
7070
      }
7071
 
7072
      private final short _thriftId;
7073
      private final String _fieldName;
7074
 
7075
      _Fields(short thriftId, String fieldName) {
7076
        _thriftId = thriftId;
7077
        _fieldName = fieldName;
7078
      }
7079
 
7080
      public short getThriftFieldId() {
7081
        return _thriftId;
7082
      }
7083
 
7084
      public String getFieldName() {
7085
        return _fieldName;
7086
      }
7087
    }
7088
 
7089
    // isset id assignments
7090
    private static final int __SUCCESS_ISSET_ID = 0;
7091
    private BitSet __isset_bit_vector = new BitSet(1);
7092
 
7093
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7094
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7095
          new FieldValueMetaData(TType.BOOL)));
7096
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7097
          new FieldValueMetaData(TType.STRUCT)));
7098
    }});
7099
 
7100
    static {
7101
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
7102
    }
7103
 
7104
    public changeTransactionStatus_result() {
7105
    }
7106
 
7107
    public changeTransactionStatus_result(
7108
      boolean success,
7109
      TransactionServiceException ex)
7110
    {
7111
      this();
7112
      this.success = success;
7113
      setSuccessIsSet(true);
7114
      this.ex = ex;
7115
    }
7116
 
7117
    /**
7118
     * Performs a deep copy on <i>other</i>.
7119
     */
7120
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
7121
      __isset_bit_vector.clear();
7122
      __isset_bit_vector.or(other.__isset_bit_vector);
7123
      this.success = other.success;
7124
      if (other.isSetEx()) {
7125
        this.ex = new TransactionServiceException(other.ex);
7126
      }
7127
    }
7128
 
7129
    public changeTransactionStatus_result deepCopy() {
7130
      return new changeTransactionStatus_result(this);
7131
    }
7132
 
7133
    @Deprecated
7134
    public changeTransactionStatus_result clone() {
7135
      return new changeTransactionStatus_result(this);
7136
    }
7137
 
7138
    public boolean isSuccess() {
7139
      return this.success;
7140
    }
7141
 
7142
    public changeTransactionStatus_result setSuccess(boolean success) {
7143
      this.success = success;
7144
      setSuccessIsSet(true);
7145
      return this;
7146
    }
7147
 
7148
    public void unsetSuccess() {
7149
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7150
    }
7151
 
7152
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7153
    public boolean isSetSuccess() {
7154
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7155
    }
7156
 
7157
    public void setSuccessIsSet(boolean value) {
7158
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7159
    }
7160
 
7161
    public TransactionServiceException getEx() {
7162
      return this.ex;
7163
    }
7164
 
7165
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
7166
      this.ex = ex;
7167
      return this;
7168
    }
7169
 
7170
    public void unsetEx() {
7171
      this.ex = null;
7172
    }
7173
 
7174
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7175
    public boolean isSetEx() {
7176
      return this.ex != null;
7177
    }
7178
 
7179
    public void setExIsSet(boolean value) {
7180
      if (!value) {
7181
        this.ex = null;
7182
      }
7183
    }
7184
 
7185
    public void setFieldValue(_Fields field, Object value) {
7186
      switch (field) {
7187
      case SUCCESS:
7188
        if (value == null) {
7189
          unsetSuccess();
7190
        } else {
7191
          setSuccess((Boolean)value);
7192
        }
7193
        break;
7194
 
7195
      case EX:
7196
        if (value == null) {
7197
          unsetEx();
7198
        } else {
7199
          setEx((TransactionServiceException)value);
7200
        }
7201
        break;
7202
 
7203
      }
7204
    }
7205
 
7206
    public void setFieldValue(int fieldID, Object value) {
7207
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7208
    }
7209
 
7210
    public Object getFieldValue(_Fields field) {
7211
      switch (field) {
7212
      case SUCCESS:
7213
        return new Boolean(isSuccess());
7214
 
7215
      case EX:
7216
        return getEx();
7217
 
7218
      }
7219
      throw new IllegalStateException();
7220
    }
7221
 
7222
    public Object getFieldValue(int fieldId) {
7223
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7224
    }
7225
 
7226
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7227
    public boolean isSet(_Fields field) {
7228
      switch (field) {
7229
      case SUCCESS:
7230
        return isSetSuccess();
7231
      case EX:
7232
        return isSetEx();
7233
      }
7234
      throw new IllegalStateException();
7235
    }
7236
 
7237
    public boolean isSet(int fieldID) {
7238
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7239
    }
7240
 
7241
    @Override
7242
    public boolean equals(Object that) {
7243
      if (that == null)
7244
        return false;
7245
      if (that instanceof changeTransactionStatus_result)
7246
        return this.equals((changeTransactionStatus_result)that);
7247
      return false;
7248
    }
7249
 
7250
    public boolean equals(changeTransactionStatus_result that) {
7251
      if (that == null)
7252
        return false;
7253
 
7254
      boolean this_present_success = true;
7255
      boolean that_present_success = true;
7256
      if (this_present_success || that_present_success) {
7257
        if (!(this_present_success && that_present_success))
7258
          return false;
7259
        if (this.success != that.success)
7260
          return false;
7261
      }
7262
 
7263
      boolean this_present_ex = true && this.isSetEx();
7264
      boolean that_present_ex = true && that.isSetEx();
7265
      if (this_present_ex || that_present_ex) {
7266
        if (!(this_present_ex && that_present_ex))
7267
          return false;
7268
        if (!this.ex.equals(that.ex))
7269
          return false;
7270
      }
7271
 
7272
      return true;
7273
    }
7274
 
7275
    @Override
7276
    public int hashCode() {
7277
      return 0;
7278
    }
7279
 
7280
    public int compareTo(changeTransactionStatus_result other) {
7281
      if (!getClass().equals(other.getClass())) {
7282
        return getClass().getName().compareTo(other.getClass().getName());
7283
      }
7284
 
7285
      int lastComparison = 0;
7286
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
7287
 
7288
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7289
      if (lastComparison != 0) {
7290
        return lastComparison;
7291
      }
7292
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7293
      if (lastComparison != 0) {
7294
        return lastComparison;
7295
      }
7296
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7297
      if (lastComparison != 0) {
7298
        return lastComparison;
7299
      }
7300
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7301
      if (lastComparison != 0) {
7302
        return lastComparison;
7303
      }
7304
      return 0;
7305
    }
7306
 
7307
    public void read(TProtocol iprot) throws TException {
7308
      TField field;
7309
      iprot.readStructBegin();
7310
      while (true)
7311
      {
7312
        field = iprot.readFieldBegin();
7313
        if (field.type == TType.STOP) { 
7314
          break;
7315
        }
7316
        _Fields fieldId = _Fields.findByThriftId(field.id);
7317
        if (fieldId == null) {
7318
          TProtocolUtil.skip(iprot, field.type);
7319
        } else {
7320
          switch (fieldId) {
7321
            case SUCCESS:
7322
              if (field.type == TType.BOOL) {
7323
                this.success = iprot.readBool();
7324
                setSuccessIsSet(true);
7325
              } else { 
7326
                TProtocolUtil.skip(iprot, field.type);
7327
              }
7328
              break;
7329
            case EX:
7330
              if (field.type == TType.STRUCT) {
7331
                this.ex = new TransactionServiceException();
7332
                this.ex.read(iprot);
7333
              } else { 
7334
                TProtocolUtil.skip(iprot, field.type);
7335
              }
7336
              break;
7337
          }
7338
          iprot.readFieldEnd();
7339
        }
7340
      }
7341
      iprot.readStructEnd();
7342
      validate();
7343
    }
7344
 
7345
    public void write(TProtocol oprot) throws TException {
7346
      oprot.writeStructBegin(STRUCT_DESC);
7347
 
7348
      if (this.isSetSuccess()) {
7349
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7350
        oprot.writeBool(this.success);
7351
        oprot.writeFieldEnd();
7352
      } else if (this.isSetEx()) {
7353
        oprot.writeFieldBegin(EX_FIELD_DESC);
7354
        this.ex.write(oprot);
7355
        oprot.writeFieldEnd();
7356
      }
7357
      oprot.writeFieldStop();
7358
      oprot.writeStructEnd();
7359
    }
7360
 
7361
    @Override
7362
    public String toString() {
7363
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7364
      boolean first = true;
7365
 
7366
      sb.append("success:");
7367
      sb.append(this.success);
7368
      first = false;
7369
      if (!first) sb.append(", ");
7370
      sb.append("ex:");
7371
      if (this.ex == null) {
7372
        sb.append("null");
7373
      } else {
7374
        sb.append(this.ex);
7375
      }
7376
      first = false;
7377
      sb.append(")");
7378
      return sb.toString();
7379
    }
7380
 
7381
    public void validate() throws TException {
7382
      // check for required fields
7383
    }
7384
 
7385
  }
7386
 
1398 varun.gupt 7387
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7388
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7389
 
7390
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7391
 
7392
    private long transactionId;
7393
 
7394
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7395
    public enum _Fields implements TFieldIdEnum {
7396
      TRANSACTION_ID((short)1, "transactionId");
7397
 
7398
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7399
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7400
 
7401
      static {
7402
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7403
          byId.put((int)field._thriftId, field);
7404
          byName.put(field.getFieldName(), field);
7405
        }
7406
      }
7407
 
7408
      /**
7409
       * Find the _Fields constant that matches fieldId, or null if its not found.
7410
       */
7411
      public static _Fields findByThriftId(int fieldId) {
7412
        return byId.get(fieldId);
7413
      }
7414
 
7415
      /**
7416
       * Find the _Fields constant that matches fieldId, throwing an exception
7417
       * if it is not found.
7418
       */
7419
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7420
        _Fields fields = findByThriftId(fieldId);
7421
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7422
        return fields;
7423
      }
7424
 
7425
      /**
7426
       * Find the _Fields constant that matches name, or null if its not found.
7427
       */
7428
      public static _Fields findByName(String name) {
7429
        return byName.get(name);
7430
      }
7431
 
7432
      private final short _thriftId;
7433
      private final String _fieldName;
7434
 
7435
      _Fields(short thriftId, String fieldName) {
7436
        _thriftId = thriftId;
7437
        _fieldName = fieldName;
7438
      }
7439
 
7440
      public short getThriftFieldId() {
7441
        return _thriftId;
7442
      }
7443
 
7444
      public String getFieldName() {
7445
        return _fieldName;
7446
      }
7447
    }
7448
 
7449
    // isset id assignments
7450
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7451
    private BitSet __isset_bit_vector = new BitSet(1);
7452
 
7453
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7454
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7455
          new FieldValueMetaData(TType.I64)));
7456
    }});
7457
 
7458
    static {
1398 varun.gupt 7459
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7460
    }
7461
 
1398 varun.gupt 7462
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7463
    }
7464
 
1398 varun.gupt 7465
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7466
      long transactionId)
7467
    {
7468
      this();
7469
      this.transactionId = transactionId;
7470
      setTransactionIdIsSet(true);
7471
    }
7472
 
7473
    /**
7474
     * Performs a deep copy on <i>other</i>.
7475
     */
1398 varun.gupt 7476
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7477
      __isset_bit_vector.clear();
7478
      __isset_bit_vector.or(other.__isset_bit_vector);
7479
      this.transactionId = other.transactionId;
7480
    }
7481
 
1398 varun.gupt 7482
    public enqueueTransactionInfoEmail_args deepCopy() {
7483
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7484
    }
7485
 
7486
    @Deprecated
1398 varun.gupt 7487
    public enqueueTransactionInfoEmail_args clone() {
7488
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7489
    }
7490
 
7491
    public long getTransactionId() {
7492
      return this.transactionId;
7493
    }
7494
 
1398 varun.gupt 7495
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7496
      this.transactionId = transactionId;
7497
      setTransactionIdIsSet(true);
7498
      return this;
7499
    }
7500
 
7501
    public void unsetTransactionId() {
7502
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7503
    }
7504
 
7505
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7506
    public boolean isSetTransactionId() {
7507
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7508
    }
7509
 
7510
    public void setTransactionIdIsSet(boolean value) {
7511
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7512
    }
7513
 
7514
    public void setFieldValue(_Fields field, Object value) {
7515
      switch (field) {
7516
      case TRANSACTION_ID:
7517
        if (value == null) {
7518
          unsetTransactionId();
7519
        } else {
7520
          setTransactionId((Long)value);
7521
        }
7522
        break;
7523
 
7524
      }
7525
    }
7526
 
7527
    public void setFieldValue(int fieldID, Object value) {
7528
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7529
    }
7530
 
7531
    public Object getFieldValue(_Fields field) {
7532
      switch (field) {
7533
      case TRANSACTION_ID:
7534
        return new Long(getTransactionId());
7535
 
7536
      }
7537
      throw new IllegalStateException();
7538
    }
7539
 
7540
    public Object getFieldValue(int fieldId) {
7541
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7542
    }
7543
 
7544
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7545
    public boolean isSet(_Fields field) {
7546
      switch (field) {
7547
      case TRANSACTION_ID:
7548
        return isSetTransactionId();
7549
      }
7550
      throw new IllegalStateException();
7551
    }
7552
 
7553
    public boolean isSet(int fieldID) {
7554
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7555
    }
7556
 
7557
    @Override
7558
    public boolean equals(Object that) {
7559
      if (that == null)
7560
        return false;
1398 varun.gupt 7561
      if (that instanceof enqueueTransactionInfoEmail_args)
7562
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7563
      return false;
7564
    }
7565
 
1398 varun.gupt 7566
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7567
      if (that == null)
7568
        return false;
7569
 
7570
      boolean this_present_transactionId = true;
7571
      boolean that_present_transactionId = true;
7572
      if (this_present_transactionId || that_present_transactionId) {
7573
        if (!(this_present_transactionId && that_present_transactionId))
7574
          return false;
7575
        if (this.transactionId != that.transactionId)
7576
          return false;
7577
      }
7578
 
7579
      return true;
7580
    }
7581
 
7582
    @Override
7583
    public int hashCode() {
7584
      return 0;
7585
    }
7586
 
1398 varun.gupt 7587
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7588
      if (!getClass().equals(other.getClass())) {
7589
        return getClass().getName().compareTo(other.getClass().getName());
7590
      }
7591
 
7592
      int lastComparison = 0;
1398 varun.gupt 7593
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7594
 
7595
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7596
      if (lastComparison != 0) {
7597
        return lastComparison;
7598
      }
7599
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7600
      if (lastComparison != 0) {
7601
        return lastComparison;
7602
      }
7603
      return 0;
7604
    }
7605
 
7606
    public void read(TProtocol iprot) throws TException {
7607
      TField field;
7608
      iprot.readStructBegin();
7609
      while (true)
7610
      {
7611
        field = iprot.readFieldBegin();
7612
        if (field.type == TType.STOP) { 
7613
          break;
7614
        }
7615
        _Fields fieldId = _Fields.findByThriftId(field.id);
7616
        if (fieldId == null) {
7617
          TProtocolUtil.skip(iprot, field.type);
7618
        } else {
7619
          switch (fieldId) {
7620
            case TRANSACTION_ID:
7621
              if (field.type == TType.I64) {
7622
                this.transactionId = iprot.readI64();
7623
                setTransactionIdIsSet(true);
7624
              } else { 
7625
                TProtocolUtil.skip(iprot, field.type);
7626
              }
7627
              break;
7628
          }
7629
          iprot.readFieldEnd();
7630
        }
7631
      }
7632
      iprot.readStructEnd();
7633
      validate();
7634
    }
7635
 
7636
    public void write(TProtocol oprot) throws TException {
7637
      validate();
7638
 
7639
      oprot.writeStructBegin(STRUCT_DESC);
7640
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7641
      oprot.writeI64(this.transactionId);
7642
      oprot.writeFieldEnd();
7643
      oprot.writeFieldStop();
7644
      oprot.writeStructEnd();
7645
    }
7646
 
7647
    @Override
7648
    public String toString() {
1398 varun.gupt 7649
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 7650
      boolean first = true;
7651
 
7652
      sb.append("transactionId:");
7653
      sb.append(this.transactionId);
7654
      first = false;
7655
      sb.append(")");
7656
      return sb.toString();
7657
    }
7658
 
7659
    public void validate() throws TException {
7660
      // check for required fields
7661
    }
7662
 
7663
  }
7664
 
1398 varun.gupt 7665
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
7666
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 7667
 
7668
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7669
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7670
 
7671
    private boolean success;
7672
    private TransactionServiceException ex;
7673
 
7674
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7675
    public enum _Fields implements TFieldIdEnum {
7676
      SUCCESS((short)0, "success"),
7677
      EX((short)1, "ex");
7678
 
7679
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7681
 
7682
      static {
7683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7684
          byId.put((int)field._thriftId, field);
7685
          byName.put(field.getFieldName(), field);
7686
        }
7687
      }
7688
 
7689
      /**
7690
       * Find the _Fields constant that matches fieldId, or null if its not found.
7691
       */
7692
      public static _Fields findByThriftId(int fieldId) {
7693
        return byId.get(fieldId);
7694
      }
7695
 
7696
      /**
7697
       * Find the _Fields constant that matches fieldId, throwing an exception
7698
       * if it is not found.
7699
       */
7700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7701
        _Fields fields = findByThriftId(fieldId);
7702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7703
        return fields;
7704
      }
7705
 
7706
      /**
7707
       * Find the _Fields constant that matches name, or null if its not found.
7708
       */
7709
      public static _Fields findByName(String name) {
7710
        return byName.get(name);
7711
      }
7712
 
7713
      private final short _thriftId;
7714
      private final String _fieldName;
7715
 
7716
      _Fields(short thriftId, String fieldName) {
7717
        _thriftId = thriftId;
7718
        _fieldName = fieldName;
7719
      }
7720
 
7721
      public short getThriftFieldId() {
7722
        return _thriftId;
7723
      }
7724
 
7725
      public String getFieldName() {
7726
        return _fieldName;
7727
      }
7728
    }
7729
 
7730
    // isset id assignments
7731
    private static final int __SUCCESS_ISSET_ID = 0;
7732
    private BitSet __isset_bit_vector = new BitSet(1);
7733
 
7734
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7735
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7736
          new FieldValueMetaData(TType.BOOL)));
7737
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7738
          new FieldValueMetaData(TType.STRUCT)));
7739
    }});
7740
 
7741
    static {
1398 varun.gupt 7742
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 7743
    }
7744
 
1398 varun.gupt 7745
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 7746
    }
7747
 
1398 varun.gupt 7748
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 7749
      boolean success,
7750
      TransactionServiceException ex)
7751
    {
7752
      this();
7753
      this.success = success;
7754
      setSuccessIsSet(true);
7755
      this.ex = ex;
7756
    }
7757
 
7758
    /**
7759
     * Performs a deep copy on <i>other</i>.
7760
     */
1398 varun.gupt 7761
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7762
      __isset_bit_vector.clear();
7763
      __isset_bit_vector.or(other.__isset_bit_vector);
7764
      this.success = other.success;
7765
      if (other.isSetEx()) {
7766
        this.ex = new TransactionServiceException(other.ex);
7767
      }
7768
    }
7769
 
1398 varun.gupt 7770
    public enqueueTransactionInfoEmail_result deepCopy() {
7771
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7772
    }
7773
 
7774
    @Deprecated
1398 varun.gupt 7775
    public enqueueTransactionInfoEmail_result clone() {
7776
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7777
    }
7778
 
7779
    public boolean isSuccess() {
7780
      return this.success;
7781
    }
7782
 
1398 varun.gupt 7783
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 7784
      this.success = success;
7785
      setSuccessIsSet(true);
7786
      return this;
7787
    }
7788
 
7789
    public void unsetSuccess() {
7790
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7791
    }
7792
 
7793
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7794
    public boolean isSetSuccess() {
7795
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7796
    }
7797
 
7798
    public void setSuccessIsSet(boolean value) {
7799
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7800
    }
7801
 
7802
    public TransactionServiceException getEx() {
7803
      return this.ex;
7804
    }
7805
 
1398 varun.gupt 7806
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 7807
      this.ex = ex;
7808
      return this;
7809
    }
7810
 
7811
    public void unsetEx() {
7812
      this.ex = null;
7813
    }
7814
 
7815
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7816
    public boolean isSetEx() {
7817
      return this.ex != null;
7818
    }
7819
 
7820
    public void setExIsSet(boolean value) {
7821
      if (!value) {
7822
        this.ex = null;
7823
      }
7824
    }
7825
 
7826
    public void setFieldValue(_Fields field, Object value) {
7827
      switch (field) {
7828
      case SUCCESS:
7829
        if (value == null) {
7830
          unsetSuccess();
7831
        } else {
7832
          setSuccess((Boolean)value);
7833
        }
7834
        break;
7835
 
7836
      case EX:
7837
        if (value == null) {
7838
          unsetEx();
7839
        } else {
7840
          setEx((TransactionServiceException)value);
7841
        }
7842
        break;
7843
 
7844
      }
7845
    }
7846
 
7847
    public void setFieldValue(int fieldID, Object value) {
7848
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7849
    }
7850
 
7851
    public Object getFieldValue(_Fields field) {
7852
      switch (field) {
7853
      case SUCCESS:
7854
        return new Boolean(isSuccess());
7855
 
7856
      case EX:
7857
        return getEx();
7858
 
7859
      }
7860
      throw new IllegalStateException();
7861
    }
7862
 
7863
    public Object getFieldValue(int fieldId) {
7864
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7865
    }
7866
 
7867
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7868
    public boolean isSet(_Fields field) {
7869
      switch (field) {
7870
      case SUCCESS:
7871
        return isSetSuccess();
7872
      case EX:
7873
        return isSetEx();
7874
      }
7875
      throw new IllegalStateException();
7876
    }
7877
 
7878
    public boolean isSet(int fieldID) {
7879
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7880
    }
7881
 
7882
    @Override
7883
    public boolean equals(Object that) {
7884
      if (that == null)
7885
        return false;
1398 varun.gupt 7886
      if (that instanceof enqueueTransactionInfoEmail_result)
7887
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 7888
      return false;
7889
    }
7890
 
1398 varun.gupt 7891
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 7892
      if (that == null)
7893
        return false;
7894
 
7895
      boolean this_present_success = true;
7896
      boolean that_present_success = true;
7897
      if (this_present_success || that_present_success) {
7898
        if (!(this_present_success && that_present_success))
7899
          return false;
7900
        if (this.success != that.success)
7901
          return false;
7902
      }
7903
 
7904
      boolean this_present_ex = true && this.isSetEx();
7905
      boolean that_present_ex = true && that.isSetEx();
7906
      if (this_present_ex || that_present_ex) {
7907
        if (!(this_present_ex && that_present_ex))
7908
          return false;
7909
        if (!this.ex.equals(that.ex))
7910
          return false;
7911
      }
7912
 
7913
      return true;
7914
    }
7915
 
7916
    @Override
7917
    public int hashCode() {
7918
      return 0;
7919
    }
7920
 
1398 varun.gupt 7921
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7922
      if (!getClass().equals(other.getClass())) {
7923
        return getClass().getName().compareTo(other.getClass().getName());
7924
      }
7925
 
7926
      int lastComparison = 0;
1398 varun.gupt 7927
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 7928
 
7929
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7930
      if (lastComparison != 0) {
7931
        return lastComparison;
7932
      }
7933
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7934
      if (lastComparison != 0) {
7935
        return lastComparison;
7936
      }
7937
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7938
      if (lastComparison != 0) {
7939
        return lastComparison;
7940
      }
7941
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7942
      if (lastComparison != 0) {
7943
        return lastComparison;
7944
      }
7945
      return 0;
7946
    }
7947
 
7948
    public void read(TProtocol iprot) throws TException {
7949
      TField field;
7950
      iprot.readStructBegin();
7951
      while (true)
7952
      {
7953
        field = iprot.readFieldBegin();
7954
        if (field.type == TType.STOP) { 
7955
          break;
7956
        }
7957
        _Fields fieldId = _Fields.findByThriftId(field.id);
7958
        if (fieldId == null) {
7959
          TProtocolUtil.skip(iprot, field.type);
7960
        } else {
7961
          switch (fieldId) {
7962
            case SUCCESS:
7963
              if (field.type == TType.BOOL) {
7964
                this.success = iprot.readBool();
7965
                setSuccessIsSet(true);
7966
              } else { 
7967
                TProtocolUtil.skip(iprot, field.type);
7968
              }
7969
              break;
7970
            case EX:
7971
              if (field.type == TType.STRUCT) {
7972
                this.ex = new TransactionServiceException();
7973
                this.ex.read(iprot);
7974
              } else { 
7975
                TProtocolUtil.skip(iprot, field.type);
7976
              }
7977
              break;
7978
          }
7979
          iprot.readFieldEnd();
7980
        }
7981
      }
7982
      iprot.readStructEnd();
7983
      validate();
7984
    }
7985
 
7986
    public void write(TProtocol oprot) throws TException {
7987
      oprot.writeStructBegin(STRUCT_DESC);
7988
 
7989
      if (this.isSetSuccess()) {
7990
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7991
        oprot.writeBool(this.success);
7992
        oprot.writeFieldEnd();
7993
      } else if (this.isSetEx()) {
7994
        oprot.writeFieldBegin(EX_FIELD_DESC);
7995
        this.ex.write(oprot);
7996
        oprot.writeFieldEnd();
7997
      }
7998
      oprot.writeFieldStop();
7999
      oprot.writeStructEnd();
8000
    }
8001
 
8002
    @Override
8003
    public String toString() {
1398 varun.gupt 8004
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 8005
      boolean first = true;
8006
 
8007
      sb.append("success:");
8008
      sb.append(this.success);
8009
      first = false;
8010
      if (!first) sb.append(", ");
8011
      sb.append("ex:");
8012
      if (this.ex == null) {
8013
        sb.append("null");
8014
      } else {
8015
        sb.append(this.ex);
8016
      }
8017
      first = false;
8018
      sb.append(")");
8019
      return sb.toString();
8020
    }
8021
 
8022
    public void validate() throws TException {
8023
      // check for required fields
8024
    }
8025
 
8026
  }
8027
 
483 rajveer 8028
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
8029
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 8030
 
483 rajveer 8031
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8032
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
8033
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
8034
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 8035
 
483 rajveer 8036
    private OrderStatus status;
8037
    private long from_date;
8038
    private long to_date;
8039
    private long warehouse_id;
68 ashish 8040
 
8041
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8042
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8043
      /**
8044
       * 
8045
       * @see OrderStatus
8046
       */
8047
      STATUS((short)1, "status"),
8048
      FROM_DATE((short)2, "from_date"),
8049
      TO_DATE((short)3, "to_date"),
8050
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 8051
 
8052
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8053
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8054
 
8055
      static {
8056
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8057
          byId.put((int)field._thriftId, field);
8058
          byName.put(field.getFieldName(), field);
8059
        }
8060
      }
8061
 
8062
      /**
8063
       * Find the _Fields constant that matches fieldId, or null if its not found.
8064
       */
8065
      public static _Fields findByThriftId(int fieldId) {
8066
        return byId.get(fieldId);
8067
      }
8068
 
8069
      /**
8070
       * Find the _Fields constant that matches fieldId, throwing an exception
8071
       * if it is not found.
8072
       */
8073
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8074
        _Fields fields = findByThriftId(fieldId);
8075
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8076
        return fields;
8077
      }
8078
 
8079
      /**
8080
       * Find the _Fields constant that matches name, or null if its not found.
8081
       */
8082
      public static _Fields findByName(String name) {
8083
        return byName.get(name);
8084
      }
8085
 
8086
      private final short _thriftId;
8087
      private final String _fieldName;
8088
 
8089
      _Fields(short thriftId, String fieldName) {
8090
        _thriftId = thriftId;
8091
        _fieldName = fieldName;
8092
      }
8093
 
8094
      public short getThriftFieldId() {
8095
        return _thriftId;
8096
      }
8097
 
8098
      public String getFieldName() {
8099
        return _fieldName;
8100
      }
8101
    }
8102
 
8103
    // isset id assignments
483 rajveer 8104
    private static final int __FROM_DATE_ISSET_ID = 0;
8105
    private static final int __TO_DATE_ISSET_ID = 1;
8106
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8107
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 8108
 
8109
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8110
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8111
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8112
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 8113
          new FieldValueMetaData(TType.I64)));
483 rajveer 8114
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
8115
          new FieldValueMetaData(TType.I64)));
8116
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8117
          new FieldValueMetaData(TType.I64)));
68 ashish 8118
    }});
8119
 
8120
    static {
483 rajveer 8121
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 8122
    }
8123
 
483 rajveer 8124
    public getAllOrders_args() {
68 ashish 8125
    }
8126
 
483 rajveer 8127
    public getAllOrders_args(
8128
      OrderStatus status,
8129
      long from_date,
8130
      long to_date,
8131
      long warehouse_id)
68 ashish 8132
    {
8133
      this();
483 rajveer 8134
      this.status = status;
8135
      this.from_date = from_date;
8136
      setFrom_dateIsSet(true);
8137
      this.to_date = to_date;
8138
      setTo_dateIsSet(true);
8139
      this.warehouse_id = warehouse_id;
8140
      setWarehouse_idIsSet(true);
68 ashish 8141
    }
8142
 
8143
    /**
8144
     * Performs a deep copy on <i>other</i>.
8145
     */
483 rajveer 8146
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 8147
      __isset_bit_vector.clear();
8148
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8149
      if (other.isSetStatus()) {
8150
        this.status = other.status;
8151
      }
8152
      this.from_date = other.from_date;
8153
      this.to_date = other.to_date;
8154
      this.warehouse_id = other.warehouse_id;
68 ashish 8155
    }
8156
 
483 rajveer 8157
    public getAllOrders_args deepCopy() {
8158
      return new getAllOrders_args(this);
68 ashish 8159
    }
8160
 
8161
    @Deprecated
483 rajveer 8162
    public getAllOrders_args clone() {
8163
      return new getAllOrders_args(this);
68 ashish 8164
    }
8165
 
483 rajveer 8166
    /**
8167
     * 
8168
     * @see OrderStatus
8169
     */
8170
    public OrderStatus getStatus() {
8171
      return this.status;
68 ashish 8172
    }
8173
 
483 rajveer 8174
    /**
8175
     * 
8176
     * @see OrderStatus
8177
     */
8178
    public getAllOrders_args setStatus(OrderStatus status) {
8179
      this.status = status;
68 ashish 8180
      return this;
8181
    }
8182
 
483 rajveer 8183
    public void unsetStatus() {
8184
      this.status = null;
68 ashish 8185
    }
8186
 
483 rajveer 8187
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8188
    public boolean isSetStatus() {
8189
      return this.status != null;
68 ashish 8190
    }
8191
 
483 rajveer 8192
    public void setStatusIsSet(boolean value) {
8193
      if (!value) {
8194
        this.status = null;
68 ashish 8195
      }
8196
    }
8197
 
483 rajveer 8198
    public long getFrom_date() {
8199
      return this.from_date;
68 ashish 8200
    }
8201
 
483 rajveer 8202
    public getAllOrders_args setFrom_date(long from_date) {
8203
      this.from_date = from_date;
8204
      setFrom_dateIsSet(true);
8205
      return this;
68 ashish 8206
    }
8207
 
483 rajveer 8208
    public void unsetFrom_date() {
8209
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 8210
    }
8211
 
483 rajveer 8212
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
8213
    public boolean isSetFrom_date() {
8214
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 8215
    }
8216
 
483 rajveer 8217
    public void setFrom_dateIsSet(boolean value) {
8218
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 8219
    }
8220
 
483 rajveer 8221
    public long getTo_date() {
8222
      return this.to_date;
68 ashish 8223
    }
8224
 
483 rajveer 8225
    public getAllOrders_args setTo_date(long to_date) {
8226
      this.to_date = to_date;
8227
      setTo_dateIsSet(true);
68 ashish 8228
      return this;
8229
    }
8230
 
483 rajveer 8231
    public void unsetTo_date() {
8232
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 8233
    }
8234
 
483 rajveer 8235
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
8236
    public boolean isSetTo_date() {
8237
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 8238
    }
8239
 
483 rajveer 8240
    public void setTo_dateIsSet(boolean value) {
8241
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 8242
    }
8243
 
483 rajveer 8244
    public long getWarehouse_id() {
8245
      return this.warehouse_id;
68 ashish 8246
    }
8247
 
483 rajveer 8248
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
8249
      this.warehouse_id = warehouse_id;
8250
      setWarehouse_idIsSet(true);
68 ashish 8251
      return this;
8252
    }
8253
 
483 rajveer 8254
    public void unsetWarehouse_id() {
8255
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8256
    }
8257
 
483 rajveer 8258
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8259
    public boolean isSetWarehouse_id() {
8260
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8261
    }
8262
 
483 rajveer 8263
    public void setWarehouse_idIsSet(boolean value) {
8264
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 8265
    }
8266
 
8267
    public void setFieldValue(_Fields field, Object value) {
8268
      switch (field) {
483 rajveer 8269
      case STATUS:
68 ashish 8270
        if (value == null) {
483 rajveer 8271
          unsetStatus();
68 ashish 8272
        } else {
483 rajveer 8273
          setStatus((OrderStatus)value);
68 ashish 8274
        }
8275
        break;
8276
 
483 rajveer 8277
      case FROM_DATE:
68 ashish 8278
        if (value == null) {
483 rajveer 8279
          unsetFrom_date();
68 ashish 8280
        } else {
483 rajveer 8281
          setFrom_date((Long)value);
68 ashish 8282
        }
8283
        break;
8284
 
483 rajveer 8285
      case TO_DATE:
8286
        if (value == null) {
8287
          unsetTo_date();
8288
        } else {
8289
          setTo_date((Long)value);
8290
        }
8291
        break;
8292
 
8293
      case WAREHOUSE_ID:
8294
        if (value == null) {
8295
          unsetWarehouse_id();
8296
        } else {
8297
          setWarehouse_id((Long)value);
8298
        }
8299
        break;
8300
 
68 ashish 8301
      }
8302
    }
8303
 
8304
    public void setFieldValue(int fieldID, Object value) {
8305
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8306
    }
8307
 
8308
    public Object getFieldValue(_Fields field) {
8309
      switch (field) {
483 rajveer 8310
      case STATUS:
8311
        return getStatus();
68 ashish 8312
 
483 rajveer 8313
      case FROM_DATE:
8314
        return new Long(getFrom_date());
68 ashish 8315
 
483 rajveer 8316
      case TO_DATE:
8317
        return new Long(getTo_date());
8318
 
8319
      case WAREHOUSE_ID:
8320
        return new Long(getWarehouse_id());
8321
 
68 ashish 8322
      }
8323
      throw new IllegalStateException();
8324
    }
8325
 
8326
    public Object getFieldValue(int fieldId) {
8327
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8328
    }
8329
 
8330
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8331
    public boolean isSet(_Fields field) {
8332
      switch (field) {
483 rajveer 8333
      case STATUS:
8334
        return isSetStatus();
8335
      case FROM_DATE:
8336
        return isSetFrom_date();
8337
      case TO_DATE:
8338
        return isSetTo_date();
8339
      case WAREHOUSE_ID:
8340
        return isSetWarehouse_id();
68 ashish 8341
      }
8342
      throw new IllegalStateException();
8343
    }
8344
 
8345
    public boolean isSet(int fieldID) {
8346
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8347
    }
8348
 
8349
    @Override
8350
    public boolean equals(Object that) {
8351
      if (that == null)
8352
        return false;
483 rajveer 8353
      if (that instanceof getAllOrders_args)
8354
        return this.equals((getAllOrders_args)that);
68 ashish 8355
      return false;
8356
    }
8357
 
483 rajveer 8358
    public boolean equals(getAllOrders_args that) {
68 ashish 8359
      if (that == null)
8360
        return false;
8361
 
483 rajveer 8362
      boolean this_present_status = true && this.isSetStatus();
8363
      boolean that_present_status = true && that.isSetStatus();
8364
      if (this_present_status || that_present_status) {
8365
        if (!(this_present_status && that_present_status))
68 ashish 8366
          return false;
483 rajveer 8367
        if (!this.status.equals(that.status))
68 ashish 8368
          return false;
8369
      }
8370
 
483 rajveer 8371
      boolean this_present_from_date = true;
8372
      boolean that_present_from_date = true;
8373
      if (this_present_from_date || that_present_from_date) {
8374
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8375
          return false;
483 rajveer 8376
        if (this.from_date != that.from_date)
68 ashish 8377
          return false;
8378
      }
8379
 
483 rajveer 8380
      boolean this_present_to_date = true;
8381
      boolean that_present_to_date = true;
8382
      if (this_present_to_date || that_present_to_date) {
8383
        if (!(this_present_to_date && that_present_to_date))
8384
          return false;
8385
        if (this.to_date != that.to_date)
8386
          return false;
68 ashish 8387
      }
8388
 
483 rajveer 8389
      boolean this_present_warehouse_id = true;
8390
      boolean that_present_warehouse_id = true;
8391
      if (this_present_warehouse_id || that_present_warehouse_id) {
8392
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8393
          return false;
483 rajveer 8394
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8395
          return false;
8396
      }
8397
 
8398
      return true;
8399
    }
8400
 
8401
    @Override
8402
    public int hashCode() {
8403
      return 0;
8404
    }
8405
 
483 rajveer 8406
    public int compareTo(getAllOrders_args other) {
68 ashish 8407
      if (!getClass().equals(other.getClass())) {
8408
        return getClass().getName().compareTo(other.getClass().getName());
8409
      }
8410
 
8411
      int lastComparison = 0;
483 rajveer 8412
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8413
 
483 rajveer 8414
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8415
      if (lastComparison != 0) {
8416
        return lastComparison;
8417
      }
483 rajveer 8418
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8419
      if (lastComparison != 0) {
8420
        return lastComparison;
8421
      }
483 rajveer 8422
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8423
      if (lastComparison != 0) {
8424
        return lastComparison;
8425
      }
8426
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8427
      if (lastComparison != 0) {
8428
        return lastComparison;
8429
      }
8430
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8431
      if (lastComparison != 0) {
8432
        return lastComparison;
8433
      }
8434
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8435
      if (lastComparison != 0) {
8436
        return lastComparison;
8437
      }
8438
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8439
      if (lastComparison != 0) {
8440
        return lastComparison;
8441
      }
8442
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8443
      if (lastComparison != 0) {
8444
        return lastComparison;
8445
      }
68 ashish 8446
      return 0;
8447
    }
8448
 
8449
    public void read(TProtocol iprot) throws TException {
8450
      TField field;
8451
      iprot.readStructBegin();
8452
      while (true)
8453
      {
8454
        field = iprot.readFieldBegin();
8455
        if (field.type == TType.STOP) { 
8456
          break;
8457
        }
8458
        _Fields fieldId = _Fields.findByThriftId(field.id);
8459
        if (fieldId == null) {
8460
          TProtocolUtil.skip(iprot, field.type);
8461
        } else {
8462
          switch (fieldId) {
483 rajveer 8463
            case STATUS:
8464
              if (field.type == TType.I32) {
8465
                this.status = OrderStatus.findByValue(iprot.readI32());
8466
              } else { 
8467
                TProtocolUtil.skip(iprot, field.type);
8468
              }
8469
              break;
8470
            case FROM_DATE:
68 ashish 8471
              if (field.type == TType.I64) {
483 rajveer 8472
                this.from_date = iprot.readI64();
8473
                setFrom_dateIsSet(true);
68 ashish 8474
              } else { 
8475
                TProtocolUtil.skip(iprot, field.type);
8476
              }
8477
              break;
483 rajveer 8478
            case TO_DATE:
8479
              if (field.type == TType.I64) {
8480
                this.to_date = iprot.readI64();
8481
                setTo_dateIsSet(true);
8482
              } else { 
8483
                TProtocolUtil.skip(iprot, field.type);
8484
              }
8485
              break;
8486
            case WAREHOUSE_ID:
8487
              if (field.type == TType.I64) {
8488
                this.warehouse_id = iprot.readI64();
8489
                setWarehouse_idIsSet(true);
8490
              } else { 
8491
                TProtocolUtil.skip(iprot, field.type);
8492
              }
8493
              break;
68 ashish 8494
          }
8495
          iprot.readFieldEnd();
8496
        }
8497
      }
8498
      iprot.readStructEnd();
8499
      validate();
8500
    }
8501
 
8502
    public void write(TProtocol oprot) throws TException {
8503
      validate();
8504
 
8505
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8506
      if (this.status != null) {
8507
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8508
        oprot.writeI32(this.status.getValue());
8509
        oprot.writeFieldEnd();
8510
      }
8511
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8512
      oprot.writeI64(this.from_date);
68 ashish 8513
      oprot.writeFieldEnd();
483 rajveer 8514
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8515
      oprot.writeI64(this.to_date);
8516
      oprot.writeFieldEnd();
8517
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8518
      oprot.writeI64(this.warehouse_id);
8519
      oprot.writeFieldEnd();
68 ashish 8520
      oprot.writeFieldStop();
8521
      oprot.writeStructEnd();
8522
    }
8523
 
8524
    @Override
8525
    public String toString() {
483 rajveer 8526
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8527
      boolean first = true;
8528
 
483 rajveer 8529
      sb.append("status:");
8530
      if (this.status == null) {
8531
        sb.append("null");
8532
      } else {
8533
        String status_name = status.name();
8534
        if (status_name != null) {
8535
          sb.append(status_name);
8536
          sb.append(" (");
8537
        }
8538
        sb.append(this.status);
8539
        if (status_name != null) {
8540
          sb.append(")");
8541
        }
8542
      }
68 ashish 8543
      first = false;
483 rajveer 8544
      if (!first) sb.append(", ");
8545
      sb.append("from_date:");
8546
      sb.append(this.from_date);
8547
      first = false;
8548
      if (!first) sb.append(", ");
8549
      sb.append("to_date:");
8550
      sb.append(this.to_date);
8551
      first = false;
8552
      if (!first) sb.append(", ");
8553
      sb.append("warehouse_id:");
8554
      sb.append(this.warehouse_id);
8555
      first = false;
68 ashish 8556
      sb.append(")");
8557
      return sb.toString();
8558
    }
8559
 
8560
    public void validate() throws TException {
8561
      // check for required fields
8562
    }
8563
 
8564
  }
8565
 
483 rajveer 8566
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8567
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8568
 
483 rajveer 8569
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8570
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8571
 
483 rajveer 8572
    private List<Order> success;
68 ashish 8573
    private TransactionServiceException ex;
8574
 
8575
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8576
    public enum _Fields implements TFieldIdEnum {
8577
      SUCCESS((short)0, "success"),
8578
      EX((short)1, "ex");
8579
 
8580
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8581
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8582
 
8583
      static {
8584
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8585
          byId.put((int)field._thriftId, field);
8586
          byName.put(field.getFieldName(), field);
8587
        }
8588
      }
8589
 
8590
      /**
8591
       * Find the _Fields constant that matches fieldId, or null if its not found.
8592
       */
8593
      public static _Fields findByThriftId(int fieldId) {
8594
        return byId.get(fieldId);
8595
      }
8596
 
8597
      /**
8598
       * Find the _Fields constant that matches fieldId, throwing an exception
8599
       * if it is not found.
8600
       */
8601
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8602
        _Fields fields = findByThriftId(fieldId);
8603
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8604
        return fields;
8605
      }
8606
 
8607
      /**
8608
       * Find the _Fields constant that matches name, or null if its not found.
8609
       */
8610
      public static _Fields findByName(String name) {
8611
        return byName.get(name);
8612
      }
8613
 
8614
      private final short _thriftId;
8615
      private final String _fieldName;
8616
 
8617
      _Fields(short thriftId, String fieldName) {
8618
        _thriftId = thriftId;
8619
        _fieldName = fieldName;
8620
      }
8621
 
8622
      public short getThriftFieldId() {
8623
        return _thriftId;
8624
      }
8625
 
8626
      public String getFieldName() {
8627
        return _fieldName;
8628
      }
8629
    }
8630
 
8631
    // isset id assignments
8632
 
8633
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8634
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 8635
          new ListMetaData(TType.LIST, 
8636
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 8637
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8638
          new FieldValueMetaData(TType.STRUCT)));
8639
    }});
8640
 
8641
    static {
483 rajveer 8642
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 8643
    }
8644
 
483 rajveer 8645
    public getAllOrders_result() {
68 ashish 8646
    }
8647
 
483 rajveer 8648
    public getAllOrders_result(
8649
      List<Order> success,
68 ashish 8650
      TransactionServiceException ex)
8651
    {
8652
      this();
8653
      this.success = success;
8654
      this.ex = ex;
8655
    }
8656
 
8657
    /**
8658
     * Performs a deep copy on <i>other</i>.
8659
     */
483 rajveer 8660
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 8661
      if (other.isSetSuccess()) {
483 rajveer 8662
        List<Order> __this__success = new ArrayList<Order>();
8663
        for (Order other_element : other.success) {
8664
          __this__success.add(new Order(other_element));
8665
        }
8666
        this.success = __this__success;
68 ashish 8667
      }
8668
      if (other.isSetEx()) {
8669
        this.ex = new TransactionServiceException(other.ex);
8670
      }
8671
    }
8672
 
483 rajveer 8673
    public getAllOrders_result deepCopy() {
8674
      return new getAllOrders_result(this);
68 ashish 8675
    }
8676
 
8677
    @Deprecated
483 rajveer 8678
    public getAllOrders_result clone() {
8679
      return new getAllOrders_result(this);
68 ashish 8680
    }
8681
 
483 rajveer 8682
    public int getSuccessSize() {
8683
      return (this.success == null) ? 0 : this.success.size();
8684
    }
8685
 
8686
    public java.util.Iterator<Order> getSuccessIterator() {
8687
      return (this.success == null) ? null : this.success.iterator();
8688
    }
8689
 
8690
    public void addToSuccess(Order elem) {
8691
      if (this.success == null) {
8692
        this.success = new ArrayList<Order>();
8693
      }
8694
      this.success.add(elem);
8695
    }
8696
 
8697
    public List<Order> getSuccess() {
68 ashish 8698
      return this.success;
8699
    }
8700
 
483 rajveer 8701
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 8702
      this.success = success;
8703
      return this;
8704
    }
8705
 
8706
    public void unsetSuccess() {
8707
      this.success = null;
8708
    }
8709
 
8710
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8711
    public boolean isSetSuccess() {
8712
      return this.success != null;
8713
    }
8714
 
8715
    public void setSuccessIsSet(boolean value) {
8716
      if (!value) {
8717
        this.success = null;
8718
      }
8719
    }
8720
 
8721
    public TransactionServiceException getEx() {
8722
      return this.ex;
8723
    }
8724
 
483 rajveer 8725
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 8726
      this.ex = ex;
8727
      return this;
8728
    }
8729
 
8730
    public void unsetEx() {
8731
      this.ex = null;
8732
    }
8733
 
8734
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8735
    public boolean isSetEx() {
8736
      return this.ex != null;
8737
    }
8738
 
8739
    public void setExIsSet(boolean value) {
8740
      if (!value) {
8741
        this.ex = null;
8742
      }
8743
    }
8744
 
8745
    public void setFieldValue(_Fields field, Object value) {
8746
      switch (field) {
8747
      case SUCCESS:
8748
        if (value == null) {
8749
          unsetSuccess();
8750
        } else {
483 rajveer 8751
          setSuccess((List<Order>)value);
68 ashish 8752
        }
8753
        break;
8754
 
8755
      case EX:
8756
        if (value == null) {
8757
          unsetEx();
8758
        } else {
8759
          setEx((TransactionServiceException)value);
8760
        }
8761
        break;
8762
 
8763
      }
8764
    }
8765
 
8766
    public void setFieldValue(int fieldID, Object value) {
8767
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8768
    }
8769
 
8770
    public Object getFieldValue(_Fields field) {
8771
      switch (field) {
8772
      case SUCCESS:
8773
        return getSuccess();
8774
 
8775
      case EX:
8776
        return getEx();
8777
 
8778
      }
8779
      throw new IllegalStateException();
8780
    }
8781
 
8782
    public Object getFieldValue(int fieldId) {
8783
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8784
    }
8785
 
8786
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8787
    public boolean isSet(_Fields field) {
8788
      switch (field) {
8789
      case SUCCESS:
8790
        return isSetSuccess();
8791
      case EX:
8792
        return isSetEx();
8793
      }
8794
      throw new IllegalStateException();
8795
    }
8796
 
8797
    public boolean isSet(int fieldID) {
8798
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8799
    }
8800
 
8801
    @Override
8802
    public boolean equals(Object that) {
8803
      if (that == null)
8804
        return false;
483 rajveer 8805
      if (that instanceof getAllOrders_result)
8806
        return this.equals((getAllOrders_result)that);
68 ashish 8807
      return false;
8808
    }
8809
 
483 rajveer 8810
    public boolean equals(getAllOrders_result that) {
68 ashish 8811
      if (that == null)
8812
        return false;
8813
 
8814
      boolean this_present_success = true && this.isSetSuccess();
8815
      boolean that_present_success = true && that.isSetSuccess();
8816
      if (this_present_success || that_present_success) {
8817
        if (!(this_present_success && that_present_success))
8818
          return false;
8819
        if (!this.success.equals(that.success))
8820
          return false;
8821
      }
8822
 
8823
      boolean this_present_ex = true && this.isSetEx();
8824
      boolean that_present_ex = true && that.isSetEx();
8825
      if (this_present_ex || that_present_ex) {
8826
        if (!(this_present_ex && that_present_ex))
8827
          return false;
8828
        if (!this.ex.equals(that.ex))
8829
          return false;
8830
      }
8831
 
8832
      return true;
8833
    }
8834
 
8835
    @Override
8836
    public int hashCode() {
8837
      return 0;
8838
    }
8839
 
483 rajveer 8840
    public int compareTo(getAllOrders_result other) {
8841
      if (!getClass().equals(other.getClass())) {
8842
        return getClass().getName().compareTo(other.getClass().getName());
8843
      }
8844
 
8845
      int lastComparison = 0;
8846
      getAllOrders_result typedOther = (getAllOrders_result)other;
8847
 
8848
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8849
      if (lastComparison != 0) {
8850
        return lastComparison;
8851
      }
8852
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8853
      if (lastComparison != 0) {
8854
        return lastComparison;
8855
      }
8856
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8857
      if (lastComparison != 0) {
8858
        return lastComparison;
8859
      }
8860
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8861
      if (lastComparison != 0) {
8862
        return lastComparison;
8863
      }
8864
      return 0;
8865
    }
8866
 
68 ashish 8867
    public void read(TProtocol iprot) throws TException {
8868
      TField field;
8869
      iprot.readStructBegin();
8870
      while (true)
8871
      {
8872
        field = iprot.readFieldBegin();
8873
        if (field.type == TType.STOP) { 
8874
          break;
8875
        }
8876
        _Fields fieldId = _Fields.findByThriftId(field.id);
8877
        if (fieldId == null) {
8878
          TProtocolUtil.skip(iprot, field.type);
8879
        } else {
8880
          switch (fieldId) {
8881
            case SUCCESS:
483 rajveer 8882
              if (field.type == TType.LIST) {
8883
                {
684 chandransh 8884
                  TList _list16 = iprot.readListBegin();
8885
                  this.success = new ArrayList<Order>(_list16.size);
8886
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 8887
                  {
684 chandransh 8888
                    Order _elem18;
8889
                    _elem18 = new Order();
8890
                    _elem18.read(iprot);
8891
                    this.success.add(_elem18);
483 rajveer 8892
                  }
8893
                  iprot.readListEnd();
8894
                }
68 ashish 8895
              } else { 
8896
                TProtocolUtil.skip(iprot, field.type);
8897
              }
8898
              break;
8899
            case EX:
8900
              if (field.type == TType.STRUCT) {
8901
                this.ex = new TransactionServiceException();
8902
                this.ex.read(iprot);
8903
              } else { 
8904
                TProtocolUtil.skip(iprot, field.type);
8905
              }
8906
              break;
8907
          }
8908
          iprot.readFieldEnd();
8909
        }
8910
      }
8911
      iprot.readStructEnd();
8912
      validate();
8913
    }
8914
 
8915
    public void write(TProtocol oprot) throws TException {
8916
      oprot.writeStructBegin(STRUCT_DESC);
8917
 
8918
      if (this.isSetSuccess()) {
8919
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 8920
        {
8921
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 8922
          for (Order _iter19 : this.success)
483 rajveer 8923
          {
684 chandransh 8924
            _iter19.write(oprot);
483 rajveer 8925
          }
8926
          oprot.writeListEnd();
8927
        }
68 ashish 8928
        oprot.writeFieldEnd();
8929
      } else if (this.isSetEx()) {
8930
        oprot.writeFieldBegin(EX_FIELD_DESC);
8931
        this.ex.write(oprot);
8932
        oprot.writeFieldEnd();
8933
      }
8934
      oprot.writeFieldStop();
8935
      oprot.writeStructEnd();
8936
    }
8937
 
8938
    @Override
8939
    public String toString() {
483 rajveer 8940
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 8941
      boolean first = true;
8942
 
8943
      sb.append("success:");
8944
      if (this.success == null) {
8945
        sb.append("null");
8946
      } else {
8947
        sb.append(this.success);
8948
      }
8949
      first = false;
8950
      if (!first) sb.append(", ");
8951
      sb.append("ex:");
8952
      if (this.ex == null) {
8953
        sb.append("null");
8954
      } else {
8955
        sb.append(this.ex);
8956
      }
8957
      first = false;
8958
      sb.append(")");
8959
      return sb.toString();
8960
    }
8961
 
8962
    public void validate() throws TException {
8963
      // check for required fields
8964
    }
8965
 
8966
  }
8967
 
1022 varun.gupt 8968
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
8969
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
8970
 
8971
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8972
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
8973
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
8974
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
8975
 
8976
    private OrderStatus status;
8977
    private long start_billing_date;
8978
    private long end_billing_date;
8979
    private long warehouse_id;
8980
 
8981
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8982
    public enum _Fields implements TFieldIdEnum {
8983
      /**
8984
       * 
8985
       * @see OrderStatus
8986
       */
8987
      STATUS((short)1, "status"),
8988
      START_BILLING_DATE((short)2, "start_billing_date"),
8989
      END_BILLING_DATE((short)3, "end_billing_date"),
8990
      WAREHOUSE_ID((short)4, "warehouse_id");
8991
 
8992
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8993
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8994
 
8995
      static {
8996
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8997
          byId.put((int)field._thriftId, field);
8998
          byName.put(field.getFieldName(), field);
8999
        }
9000
      }
9001
 
9002
      /**
9003
       * Find the _Fields constant that matches fieldId, or null if its not found.
9004
       */
9005
      public static _Fields findByThriftId(int fieldId) {
9006
        return byId.get(fieldId);
9007
      }
9008
 
9009
      /**
9010
       * Find the _Fields constant that matches fieldId, throwing an exception
9011
       * if it is not found.
9012
       */
9013
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9014
        _Fields fields = findByThriftId(fieldId);
9015
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9016
        return fields;
9017
      }
9018
 
9019
      /**
9020
       * Find the _Fields constant that matches name, or null if its not found.
9021
       */
9022
      public static _Fields findByName(String name) {
9023
        return byName.get(name);
9024
      }
9025
 
9026
      private final short _thriftId;
9027
      private final String _fieldName;
9028
 
9029
      _Fields(short thriftId, String fieldName) {
9030
        _thriftId = thriftId;
9031
        _fieldName = fieldName;
9032
      }
9033
 
9034
      public short getThriftFieldId() {
9035
        return _thriftId;
9036
      }
9037
 
9038
      public String getFieldName() {
9039
        return _fieldName;
9040
      }
9041
    }
9042
 
9043
    // isset id assignments
9044
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
9045
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
9046
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
9047
    private BitSet __isset_bit_vector = new BitSet(3);
9048
 
9049
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9050
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
9051
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
9052
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
9053
          new FieldValueMetaData(TType.I64)));
9054
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
9055
          new FieldValueMetaData(TType.I64)));
9056
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
9057
          new FieldValueMetaData(TType.I64)));
9058
    }});
9059
 
9060
    static {
9061
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
9062
    }
9063
 
9064
    public getOrdersByBillingDate_args() {
9065
    }
9066
 
9067
    public getOrdersByBillingDate_args(
9068
      OrderStatus status,
9069
      long start_billing_date,
9070
      long end_billing_date,
9071
      long warehouse_id)
9072
    {
9073
      this();
9074
      this.status = status;
9075
      this.start_billing_date = start_billing_date;
9076
      setStart_billing_dateIsSet(true);
9077
      this.end_billing_date = end_billing_date;
9078
      setEnd_billing_dateIsSet(true);
9079
      this.warehouse_id = warehouse_id;
9080
      setWarehouse_idIsSet(true);
9081
    }
9082
 
9083
    /**
9084
     * Performs a deep copy on <i>other</i>.
9085
     */
9086
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
9087
      __isset_bit_vector.clear();
9088
      __isset_bit_vector.or(other.__isset_bit_vector);
9089
      if (other.isSetStatus()) {
9090
        this.status = other.status;
9091
      }
9092
      this.start_billing_date = other.start_billing_date;
9093
      this.end_billing_date = other.end_billing_date;
9094
      this.warehouse_id = other.warehouse_id;
9095
    }
9096
 
9097
    public getOrdersByBillingDate_args deepCopy() {
9098
      return new getOrdersByBillingDate_args(this);
9099
    }
9100
 
9101
    @Deprecated
9102
    public getOrdersByBillingDate_args clone() {
9103
      return new getOrdersByBillingDate_args(this);
9104
    }
9105
 
9106
    /**
9107
     * 
9108
     * @see OrderStatus
9109
     */
9110
    public OrderStatus getStatus() {
9111
      return this.status;
9112
    }
9113
 
9114
    /**
9115
     * 
9116
     * @see OrderStatus
9117
     */
9118
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
9119
      this.status = status;
9120
      return this;
9121
    }
9122
 
9123
    public void unsetStatus() {
9124
      this.status = null;
9125
    }
9126
 
9127
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9128
    public boolean isSetStatus() {
9129
      return this.status != null;
9130
    }
9131
 
9132
    public void setStatusIsSet(boolean value) {
9133
      if (!value) {
9134
        this.status = null;
9135
      }
9136
    }
9137
 
9138
    public long getStart_billing_date() {
9139
      return this.start_billing_date;
9140
    }
9141
 
9142
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
9143
      this.start_billing_date = start_billing_date;
9144
      setStart_billing_dateIsSet(true);
9145
      return this;
9146
    }
9147
 
9148
    public void unsetStart_billing_date() {
9149
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
9150
    }
9151
 
9152
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
9153
    public boolean isSetStart_billing_date() {
9154
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
9155
    }
9156
 
9157
    public void setStart_billing_dateIsSet(boolean value) {
9158
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
9159
    }
9160
 
9161
    public long getEnd_billing_date() {
9162
      return this.end_billing_date;
9163
    }
9164
 
9165
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
9166
      this.end_billing_date = end_billing_date;
9167
      setEnd_billing_dateIsSet(true);
9168
      return this;
9169
    }
9170
 
9171
    public void unsetEnd_billing_date() {
9172
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
9173
    }
9174
 
9175
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
9176
    public boolean isSetEnd_billing_date() {
9177
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
9178
    }
9179
 
9180
    public void setEnd_billing_dateIsSet(boolean value) {
9181
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
9182
    }
9183
 
9184
    public long getWarehouse_id() {
9185
      return this.warehouse_id;
9186
    }
9187
 
9188
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
9189
      this.warehouse_id = warehouse_id;
9190
      setWarehouse_idIsSet(true);
9191
      return this;
9192
    }
9193
 
9194
    public void unsetWarehouse_id() {
9195
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
9196
    }
9197
 
9198
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9199
    public boolean isSetWarehouse_id() {
9200
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
9201
    }
9202
 
9203
    public void setWarehouse_idIsSet(boolean value) {
9204
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
9205
    }
9206
 
9207
    public void setFieldValue(_Fields field, Object value) {
9208
      switch (field) {
9209
      case STATUS:
9210
        if (value == null) {
9211
          unsetStatus();
9212
        } else {
9213
          setStatus((OrderStatus)value);
9214
        }
9215
        break;
9216
 
9217
      case START_BILLING_DATE:
9218
        if (value == null) {
9219
          unsetStart_billing_date();
9220
        } else {
9221
          setStart_billing_date((Long)value);
9222
        }
9223
        break;
9224
 
9225
      case END_BILLING_DATE:
9226
        if (value == null) {
9227
          unsetEnd_billing_date();
9228
        } else {
9229
          setEnd_billing_date((Long)value);
9230
        }
9231
        break;
9232
 
9233
      case WAREHOUSE_ID:
9234
        if (value == null) {
9235
          unsetWarehouse_id();
9236
        } else {
9237
          setWarehouse_id((Long)value);
9238
        }
9239
        break;
9240
 
9241
      }
9242
    }
9243
 
9244
    public void setFieldValue(int fieldID, Object value) {
9245
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9246
    }
9247
 
9248
    public Object getFieldValue(_Fields field) {
9249
      switch (field) {
9250
      case STATUS:
9251
        return getStatus();
9252
 
9253
      case START_BILLING_DATE:
9254
        return new Long(getStart_billing_date());
9255
 
9256
      case END_BILLING_DATE:
9257
        return new Long(getEnd_billing_date());
9258
 
9259
      case WAREHOUSE_ID:
9260
        return new Long(getWarehouse_id());
9261
 
9262
      }
9263
      throw new IllegalStateException();
9264
    }
9265
 
9266
    public Object getFieldValue(int fieldId) {
9267
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9268
    }
9269
 
9270
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9271
    public boolean isSet(_Fields field) {
9272
      switch (field) {
9273
      case STATUS:
9274
        return isSetStatus();
9275
      case START_BILLING_DATE:
9276
        return isSetStart_billing_date();
9277
      case END_BILLING_DATE:
9278
        return isSetEnd_billing_date();
9279
      case WAREHOUSE_ID:
9280
        return isSetWarehouse_id();
9281
      }
9282
      throw new IllegalStateException();
9283
    }
9284
 
9285
    public boolean isSet(int fieldID) {
9286
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9287
    }
9288
 
9289
    @Override
9290
    public boolean equals(Object that) {
9291
      if (that == null)
9292
        return false;
9293
      if (that instanceof getOrdersByBillingDate_args)
9294
        return this.equals((getOrdersByBillingDate_args)that);
9295
      return false;
9296
    }
9297
 
9298
    public boolean equals(getOrdersByBillingDate_args that) {
9299
      if (that == null)
9300
        return false;
9301
 
9302
      boolean this_present_status = true && this.isSetStatus();
9303
      boolean that_present_status = true && that.isSetStatus();
9304
      if (this_present_status || that_present_status) {
9305
        if (!(this_present_status && that_present_status))
9306
          return false;
9307
        if (!this.status.equals(that.status))
9308
          return false;
9309
      }
9310
 
9311
      boolean this_present_start_billing_date = true;
9312
      boolean that_present_start_billing_date = true;
9313
      if (this_present_start_billing_date || that_present_start_billing_date) {
9314
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9315
          return false;
9316
        if (this.start_billing_date != that.start_billing_date)
9317
          return false;
9318
      }
9319
 
9320
      boolean this_present_end_billing_date = true;
9321
      boolean that_present_end_billing_date = true;
9322
      if (this_present_end_billing_date || that_present_end_billing_date) {
9323
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9324
          return false;
9325
        if (this.end_billing_date != that.end_billing_date)
9326
          return false;
9327
      }
9328
 
9329
      boolean this_present_warehouse_id = true;
9330
      boolean that_present_warehouse_id = true;
9331
      if (this_present_warehouse_id || that_present_warehouse_id) {
9332
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9333
          return false;
9334
        if (this.warehouse_id != that.warehouse_id)
9335
          return false;
9336
      }
9337
 
9338
      return true;
9339
    }
9340
 
9341
    @Override
9342
    public int hashCode() {
9343
      return 0;
9344
    }
9345
 
9346
    public int compareTo(getOrdersByBillingDate_args other) {
9347
      if (!getClass().equals(other.getClass())) {
9348
        return getClass().getName().compareTo(other.getClass().getName());
9349
      }
9350
 
9351
      int lastComparison = 0;
9352
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9353
 
9354
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9355
      if (lastComparison != 0) {
9356
        return lastComparison;
9357
      }
9358
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9359
      if (lastComparison != 0) {
9360
        return lastComparison;
9361
      }
9362
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9363
      if (lastComparison != 0) {
9364
        return lastComparison;
9365
      }
9366
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9367
      if (lastComparison != 0) {
9368
        return lastComparison;
9369
      }
9370
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9371
      if (lastComparison != 0) {
9372
        return lastComparison;
9373
      }
9374
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9375
      if (lastComparison != 0) {
9376
        return lastComparison;
9377
      }
9378
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9379
      if (lastComparison != 0) {
9380
        return lastComparison;
9381
      }
9382
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9383
      if (lastComparison != 0) {
9384
        return lastComparison;
9385
      }
9386
      return 0;
9387
    }
9388
 
9389
    public void read(TProtocol iprot) throws TException {
9390
      TField field;
9391
      iprot.readStructBegin();
9392
      while (true)
9393
      {
9394
        field = iprot.readFieldBegin();
9395
        if (field.type == TType.STOP) { 
9396
          break;
9397
        }
9398
        _Fields fieldId = _Fields.findByThriftId(field.id);
9399
        if (fieldId == null) {
9400
          TProtocolUtil.skip(iprot, field.type);
9401
        } else {
9402
          switch (fieldId) {
9403
            case STATUS:
9404
              if (field.type == TType.I32) {
9405
                this.status = OrderStatus.findByValue(iprot.readI32());
9406
              } else { 
9407
                TProtocolUtil.skip(iprot, field.type);
9408
              }
9409
              break;
9410
            case START_BILLING_DATE:
9411
              if (field.type == TType.I64) {
9412
                this.start_billing_date = iprot.readI64();
9413
                setStart_billing_dateIsSet(true);
9414
              } else { 
9415
                TProtocolUtil.skip(iprot, field.type);
9416
              }
9417
              break;
9418
            case END_BILLING_DATE:
9419
              if (field.type == TType.I64) {
9420
                this.end_billing_date = iprot.readI64();
9421
                setEnd_billing_dateIsSet(true);
9422
              } else { 
9423
                TProtocolUtil.skip(iprot, field.type);
9424
              }
9425
              break;
9426
            case WAREHOUSE_ID:
9427
              if (field.type == TType.I64) {
9428
                this.warehouse_id = iprot.readI64();
9429
                setWarehouse_idIsSet(true);
9430
              } else { 
9431
                TProtocolUtil.skip(iprot, field.type);
9432
              }
9433
              break;
9434
          }
9435
          iprot.readFieldEnd();
9436
        }
9437
      }
9438
      iprot.readStructEnd();
9439
      validate();
9440
    }
9441
 
9442
    public void write(TProtocol oprot) throws TException {
9443
      validate();
9444
 
9445
      oprot.writeStructBegin(STRUCT_DESC);
9446
      if (this.status != null) {
9447
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9448
        oprot.writeI32(this.status.getValue());
9449
        oprot.writeFieldEnd();
9450
      }
9451
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9452
      oprot.writeI64(this.start_billing_date);
9453
      oprot.writeFieldEnd();
9454
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9455
      oprot.writeI64(this.end_billing_date);
9456
      oprot.writeFieldEnd();
9457
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9458
      oprot.writeI64(this.warehouse_id);
9459
      oprot.writeFieldEnd();
9460
      oprot.writeFieldStop();
9461
      oprot.writeStructEnd();
9462
    }
9463
 
9464
    @Override
9465
    public String toString() {
9466
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9467
      boolean first = true;
9468
 
9469
      sb.append("status:");
9470
      if (this.status == null) {
9471
        sb.append("null");
9472
      } else {
9473
        String status_name = status.name();
9474
        if (status_name != null) {
9475
          sb.append(status_name);
9476
          sb.append(" (");
9477
        }
9478
        sb.append(this.status);
9479
        if (status_name != null) {
9480
          sb.append(")");
9481
        }
9482
      }
9483
      first = false;
9484
      if (!first) sb.append(", ");
9485
      sb.append("start_billing_date:");
9486
      sb.append(this.start_billing_date);
9487
      first = false;
9488
      if (!first) sb.append(", ");
9489
      sb.append("end_billing_date:");
9490
      sb.append(this.end_billing_date);
9491
      first = false;
9492
      if (!first) sb.append(", ");
9493
      sb.append("warehouse_id:");
9494
      sb.append(this.warehouse_id);
9495
      first = false;
9496
      sb.append(")");
9497
      return sb.toString();
9498
    }
9499
 
9500
    public void validate() throws TException {
9501
      // check for required fields
9502
    }
9503
 
9504
  }
9505
 
9506
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9507
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9508
 
9509
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9510
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9511
 
9512
    private List<Order> success;
9513
    private TransactionServiceException ex;
9514
 
9515
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9516
    public enum _Fields implements TFieldIdEnum {
9517
      SUCCESS((short)0, "success"),
9518
      EX((short)1, "ex");
9519
 
9520
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9521
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9522
 
9523
      static {
9524
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9525
          byId.put((int)field._thriftId, field);
9526
          byName.put(field.getFieldName(), field);
9527
        }
9528
      }
9529
 
9530
      /**
9531
       * Find the _Fields constant that matches fieldId, or null if its not found.
9532
       */
9533
      public static _Fields findByThriftId(int fieldId) {
9534
        return byId.get(fieldId);
9535
      }
9536
 
9537
      /**
9538
       * Find the _Fields constant that matches fieldId, throwing an exception
9539
       * if it is not found.
9540
       */
9541
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9542
        _Fields fields = findByThriftId(fieldId);
9543
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9544
        return fields;
9545
      }
9546
 
9547
      /**
9548
       * Find the _Fields constant that matches name, or null if its not found.
9549
       */
9550
      public static _Fields findByName(String name) {
9551
        return byName.get(name);
9552
      }
9553
 
9554
      private final short _thriftId;
9555
      private final String _fieldName;
9556
 
9557
      _Fields(short thriftId, String fieldName) {
9558
        _thriftId = thriftId;
9559
        _fieldName = fieldName;
9560
      }
9561
 
9562
      public short getThriftFieldId() {
9563
        return _thriftId;
9564
      }
9565
 
9566
      public String getFieldName() {
9567
        return _fieldName;
9568
      }
9569
    }
9570
 
9571
    // isset id assignments
9572
 
9573
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9574
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9575
          new ListMetaData(TType.LIST, 
9576
              new StructMetaData(TType.STRUCT, Order.class))));
9577
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9578
          new FieldValueMetaData(TType.STRUCT)));
9579
    }});
9580
 
9581
    static {
9582
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9583
    }
9584
 
9585
    public getOrdersByBillingDate_result() {
9586
    }
9587
 
9588
    public getOrdersByBillingDate_result(
9589
      List<Order> success,
9590
      TransactionServiceException ex)
9591
    {
9592
      this();
9593
      this.success = success;
9594
      this.ex = ex;
9595
    }
9596
 
9597
    /**
9598
     * Performs a deep copy on <i>other</i>.
9599
     */
9600
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9601
      if (other.isSetSuccess()) {
9602
        List<Order> __this__success = new ArrayList<Order>();
9603
        for (Order other_element : other.success) {
9604
          __this__success.add(new Order(other_element));
9605
        }
9606
        this.success = __this__success;
9607
      }
9608
      if (other.isSetEx()) {
9609
        this.ex = new TransactionServiceException(other.ex);
9610
      }
9611
    }
9612
 
9613
    public getOrdersByBillingDate_result deepCopy() {
9614
      return new getOrdersByBillingDate_result(this);
9615
    }
9616
 
9617
    @Deprecated
9618
    public getOrdersByBillingDate_result clone() {
9619
      return new getOrdersByBillingDate_result(this);
9620
    }
9621
 
9622
    public int getSuccessSize() {
9623
      return (this.success == null) ? 0 : this.success.size();
9624
    }
9625
 
9626
    public java.util.Iterator<Order> getSuccessIterator() {
9627
      return (this.success == null) ? null : this.success.iterator();
9628
    }
9629
 
9630
    public void addToSuccess(Order elem) {
9631
      if (this.success == null) {
9632
        this.success = new ArrayList<Order>();
9633
      }
9634
      this.success.add(elem);
9635
    }
9636
 
9637
    public List<Order> getSuccess() {
9638
      return this.success;
9639
    }
9640
 
9641
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
9642
      this.success = success;
9643
      return this;
9644
    }
9645
 
9646
    public void unsetSuccess() {
9647
      this.success = null;
9648
    }
9649
 
9650
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9651
    public boolean isSetSuccess() {
9652
      return this.success != null;
9653
    }
9654
 
9655
    public void setSuccessIsSet(boolean value) {
9656
      if (!value) {
9657
        this.success = null;
9658
      }
9659
    }
9660
 
9661
    public TransactionServiceException getEx() {
9662
      return this.ex;
9663
    }
9664
 
9665
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
9666
      this.ex = ex;
9667
      return this;
9668
    }
9669
 
9670
    public void unsetEx() {
9671
      this.ex = null;
9672
    }
9673
 
9674
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9675
    public boolean isSetEx() {
9676
      return this.ex != null;
9677
    }
9678
 
9679
    public void setExIsSet(boolean value) {
9680
      if (!value) {
9681
        this.ex = null;
9682
      }
9683
    }
9684
 
9685
    public void setFieldValue(_Fields field, Object value) {
9686
      switch (field) {
9687
      case SUCCESS:
9688
        if (value == null) {
9689
          unsetSuccess();
9690
        } else {
9691
          setSuccess((List<Order>)value);
9692
        }
9693
        break;
9694
 
9695
      case EX:
9696
        if (value == null) {
9697
          unsetEx();
9698
        } else {
9699
          setEx((TransactionServiceException)value);
9700
        }
9701
        break;
9702
 
9703
      }
9704
    }
9705
 
9706
    public void setFieldValue(int fieldID, Object value) {
9707
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9708
    }
9709
 
9710
    public Object getFieldValue(_Fields field) {
9711
      switch (field) {
9712
      case SUCCESS:
9713
        return getSuccess();
9714
 
9715
      case EX:
9716
        return getEx();
9717
 
9718
      }
9719
      throw new IllegalStateException();
9720
    }
9721
 
9722
    public Object getFieldValue(int fieldId) {
9723
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9724
    }
9725
 
9726
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9727
    public boolean isSet(_Fields field) {
9728
      switch (field) {
9729
      case SUCCESS:
9730
        return isSetSuccess();
9731
      case EX:
9732
        return isSetEx();
9733
      }
9734
      throw new IllegalStateException();
9735
    }
9736
 
9737
    public boolean isSet(int fieldID) {
9738
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9739
    }
9740
 
9741
    @Override
9742
    public boolean equals(Object that) {
9743
      if (that == null)
9744
        return false;
9745
      if (that instanceof getOrdersByBillingDate_result)
9746
        return this.equals((getOrdersByBillingDate_result)that);
9747
      return false;
9748
    }
9749
 
9750
    public boolean equals(getOrdersByBillingDate_result that) {
9751
      if (that == null)
9752
        return false;
9753
 
9754
      boolean this_present_success = true && this.isSetSuccess();
9755
      boolean that_present_success = true && that.isSetSuccess();
9756
      if (this_present_success || that_present_success) {
9757
        if (!(this_present_success && that_present_success))
9758
          return false;
9759
        if (!this.success.equals(that.success))
9760
          return false;
9761
      }
9762
 
9763
      boolean this_present_ex = true && this.isSetEx();
9764
      boolean that_present_ex = true && that.isSetEx();
9765
      if (this_present_ex || that_present_ex) {
9766
        if (!(this_present_ex && that_present_ex))
9767
          return false;
9768
        if (!this.ex.equals(that.ex))
9769
          return false;
9770
      }
9771
 
9772
      return true;
9773
    }
9774
 
9775
    @Override
9776
    public int hashCode() {
9777
      return 0;
9778
    }
9779
 
9780
    public int compareTo(getOrdersByBillingDate_result other) {
9781
      if (!getClass().equals(other.getClass())) {
9782
        return getClass().getName().compareTo(other.getClass().getName());
9783
      }
9784
 
9785
      int lastComparison = 0;
9786
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
9787
 
9788
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9789
      if (lastComparison != 0) {
9790
        return lastComparison;
9791
      }
9792
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9793
      if (lastComparison != 0) {
9794
        return lastComparison;
9795
      }
9796
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9797
      if (lastComparison != 0) {
9798
        return lastComparison;
9799
      }
9800
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9801
      if (lastComparison != 0) {
9802
        return lastComparison;
9803
      }
9804
      return 0;
9805
    }
9806
 
9807
    public void read(TProtocol iprot) throws TException {
9808
      TField field;
9809
      iprot.readStructBegin();
9810
      while (true)
9811
      {
9812
        field = iprot.readFieldBegin();
9813
        if (field.type == TType.STOP) { 
9814
          break;
9815
        }
9816
        _Fields fieldId = _Fields.findByThriftId(field.id);
9817
        if (fieldId == null) {
9818
          TProtocolUtil.skip(iprot, field.type);
9819
        } else {
9820
          switch (fieldId) {
9821
            case SUCCESS:
9822
              if (field.type == TType.LIST) {
9823
                {
9824
                  TList _list20 = iprot.readListBegin();
9825
                  this.success = new ArrayList<Order>(_list20.size);
9826
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
9827
                  {
9828
                    Order _elem22;
9829
                    _elem22 = new Order();
9830
                    _elem22.read(iprot);
9831
                    this.success.add(_elem22);
9832
                  }
9833
                  iprot.readListEnd();
9834
                }
9835
              } else { 
9836
                TProtocolUtil.skip(iprot, field.type);
9837
              }
9838
              break;
9839
            case EX:
9840
              if (field.type == TType.STRUCT) {
9841
                this.ex = new TransactionServiceException();
9842
                this.ex.read(iprot);
9843
              } else { 
9844
                TProtocolUtil.skip(iprot, field.type);
9845
              }
9846
              break;
9847
          }
9848
          iprot.readFieldEnd();
9849
        }
9850
      }
9851
      iprot.readStructEnd();
9852
      validate();
9853
    }
9854
 
9855
    public void write(TProtocol oprot) throws TException {
9856
      oprot.writeStructBegin(STRUCT_DESC);
9857
 
9858
      if (this.isSetSuccess()) {
9859
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9860
        {
9861
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
9862
          for (Order _iter23 : this.success)
9863
          {
9864
            _iter23.write(oprot);
9865
          }
9866
          oprot.writeListEnd();
9867
        }
9868
        oprot.writeFieldEnd();
9869
      } else if (this.isSetEx()) {
9870
        oprot.writeFieldBegin(EX_FIELD_DESC);
9871
        this.ex.write(oprot);
9872
        oprot.writeFieldEnd();
9873
      }
9874
      oprot.writeFieldStop();
9875
      oprot.writeStructEnd();
9876
    }
9877
 
9878
    @Override
9879
    public String toString() {
9880
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
9881
      boolean first = true;
9882
 
9883
      sb.append("success:");
9884
      if (this.success == null) {
9885
        sb.append("null");
9886
      } else {
9887
        sb.append(this.success);
9888
      }
9889
      first = false;
9890
      if (!first) sb.append(", ");
9891
      sb.append("ex:");
9892
      if (this.ex == null) {
9893
        sb.append("null");
9894
      } else {
9895
        sb.append(this.ex);
9896
      }
9897
      first = false;
9898
      sb.append(")");
9899
      return sb.toString();
9900
    }
9901
 
9902
    public void validate() throws TException {
9903
      // check for required fields
9904
    }
9905
 
9906
  }
9907
 
1382 varun.gupt 9908
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
9909
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
9910
 
9911
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
9912
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
9913
 
9914
    private long customer_id;
9915
    private long limit;
9916
 
9917
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9918
    public enum _Fields implements TFieldIdEnum {
9919
      CUSTOMER_ID((short)1, "customer_id"),
9920
      LIMIT((short)2, "limit");
9921
 
9922
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9923
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9924
 
9925
      static {
9926
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9927
          byId.put((int)field._thriftId, field);
9928
          byName.put(field.getFieldName(), field);
9929
        }
9930
      }
9931
 
9932
      /**
9933
       * Find the _Fields constant that matches fieldId, or null if its not found.
9934
       */
9935
      public static _Fields findByThriftId(int fieldId) {
9936
        return byId.get(fieldId);
9937
      }
9938
 
9939
      /**
9940
       * Find the _Fields constant that matches fieldId, throwing an exception
9941
       * if it is not found.
9942
       */
9943
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9944
        _Fields fields = findByThriftId(fieldId);
9945
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9946
        return fields;
9947
      }
9948
 
9949
      /**
9950
       * Find the _Fields constant that matches name, or null if its not found.
9951
       */
9952
      public static _Fields findByName(String name) {
9953
        return byName.get(name);
9954
      }
9955
 
9956
      private final short _thriftId;
9957
      private final String _fieldName;
9958
 
9959
      _Fields(short thriftId, String fieldName) {
9960
        _thriftId = thriftId;
9961
        _fieldName = fieldName;
9962
      }
9963
 
9964
      public short getThriftFieldId() {
9965
        return _thriftId;
9966
      }
9967
 
9968
      public String getFieldName() {
9969
        return _fieldName;
9970
      }
9971
    }
9972
 
9973
    // isset id assignments
9974
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
9975
    private static final int __LIMIT_ISSET_ID = 1;
9976
    private BitSet __isset_bit_vector = new BitSet(2);
9977
 
9978
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9979
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
9980
          new FieldValueMetaData(TType.I64)));
9981
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
9982
          new FieldValueMetaData(TType.I64)));
9983
    }});
9984
 
9985
    static {
9986
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
9987
    }
9988
 
9989
    public getReturnableOrdersForCustomer_args() {
9990
    }
9991
 
9992
    public getReturnableOrdersForCustomer_args(
9993
      long customer_id,
9994
      long limit)
9995
    {
9996
      this();
9997
      this.customer_id = customer_id;
9998
      setCustomer_idIsSet(true);
9999
      this.limit = limit;
10000
      setLimitIsSet(true);
10001
    }
10002
 
10003
    /**
10004
     * Performs a deep copy on <i>other</i>.
10005
     */
10006
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
10007
      __isset_bit_vector.clear();
10008
      __isset_bit_vector.or(other.__isset_bit_vector);
10009
      this.customer_id = other.customer_id;
10010
      this.limit = other.limit;
10011
    }
10012
 
10013
    public getReturnableOrdersForCustomer_args deepCopy() {
10014
      return new getReturnableOrdersForCustomer_args(this);
10015
    }
10016
 
10017
    @Deprecated
10018
    public getReturnableOrdersForCustomer_args clone() {
10019
      return new getReturnableOrdersForCustomer_args(this);
10020
    }
10021
 
10022
    public long getCustomer_id() {
10023
      return this.customer_id;
10024
    }
10025
 
10026
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
10027
      this.customer_id = customer_id;
10028
      setCustomer_idIsSet(true);
10029
      return this;
10030
    }
10031
 
10032
    public void unsetCustomer_id() {
10033
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10034
    }
10035
 
10036
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10037
    public boolean isSetCustomer_id() {
10038
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10039
    }
10040
 
10041
    public void setCustomer_idIsSet(boolean value) {
10042
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10043
    }
10044
 
10045
    public long getLimit() {
10046
      return this.limit;
10047
    }
10048
 
10049
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
10050
      this.limit = limit;
10051
      setLimitIsSet(true);
10052
      return this;
10053
    }
10054
 
10055
    public void unsetLimit() {
10056
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10057
    }
10058
 
10059
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10060
    public boolean isSetLimit() {
10061
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10062
    }
10063
 
10064
    public void setLimitIsSet(boolean value) {
10065
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10066
    }
10067
 
10068
    public void setFieldValue(_Fields field, Object value) {
10069
      switch (field) {
10070
      case CUSTOMER_ID:
10071
        if (value == null) {
10072
          unsetCustomer_id();
10073
        } else {
10074
          setCustomer_id((Long)value);
10075
        }
10076
        break;
10077
 
10078
      case LIMIT:
10079
        if (value == null) {
10080
          unsetLimit();
10081
        } else {
10082
          setLimit((Long)value);
10083
        }
10084
        break;
10085
 
10086
      }
10087
    }
10088
 
10089
    public void setFieldValue(int fieldID, Object value) {
10090
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10091
    }
10092
 
10093
    public Object getFieldValue(_Fields field) {
10094
      switch (field) {
10095
      case CUSTOMER_ID:
10096
        return new Long(getCustomer_id());
10097
 
10098
      case LIMIT:
10099
        return new Long(getLimit());
10100
 
10101
      }
10102
      throw new IllegalStateException();
10103
    }
10104
 
10105
    public Object getFieldValue(int fieldId) {
10106
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10107
    }
10108
 
10109
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10110
    public boolean isSet(_Fields field) {
10111
      switch (field) {
10112
      case CUSTOMER_ID:
10113
        return isSetCustomer_id();
10114
      case LIMIT:
10115
        return isSetLimit();
10116
      }
10117
      throw new IllegalStateException();
10118
    }
10119
 
10120
    public boolean isSet(int fieldID) {
10121
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10122
    }
10123
 
10124
    @Override
10125
    public boolean equals(Object that) {
10126
      if (that == null)
10127
        return false;
10128
      if (that instanceof getReturnableOrdersForCustomer_args)
10129
        return this.equals((getReturnableOrdersForCustomer_args)that);
10130
      return false;
10131
    }
10132
 
10133
    public boolean equals(getReturnableOrdersForCustomer_args that) {
10134
      if (that == null)
10135
        return false;
10136
 
10137
      boolean this_present_customer_id = true;
10138
      boolean that_present_customer_id = true;
10139
      if (this_present_customer_id || that_present_customer_id) {
10140
        if (!(this_present_customer_id && that_present_customer_id))
10141
          return false;
10142
        if (this.customer_id != that.customer_id)
10143
          return false;
10144
      }
10145
 
10146
      boolean this_present_limit = true;
10147
      boolean that_present_limit = true;
10148
      if (this_present_limit || that_present_limit) {
10149
        if (!(this_present_limit && that_present_limit))
10150
          return false;
10151
        if (this.limit != that.limit)
10152
          return false;
10153
      }
10154
 
10155
      return true;
10156
    }
10157
 
10158
    @Override
10159
    public int hashCode() {
10160
      return 0;
10161
    }
10162
 
10163
    public int compareTo(getReturnableOrdersForCustomer_args other) {
10164
      if (!getClass().equals(other.getClass())) {
10165
        return getClass().getName().compareTo(other.getClass().getName());
10166
      }
10167
 
10168
      int lastComparison = 0;
10169
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
10170
 
10171
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10172
      if (lastComparison != 0) {
10173
        return lastComparison;
10174
      }
10175
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10176
      if (lastComparison != 0) {
10177
        return lastComparison;
10178
      }
10179
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10180
      if (lastComparison != 0) {
10181
        return lastComparison;
10182
      }
10183
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10184
      if (lastComparison != 0) {
10185
        return lastComparison;
10186
      }
10187
      return 0;
10188
    }
10189
 
10190
    public void read(TProtocol iprot) throws TException {
10191
      TField field;
10192
      iprot.readStructBegin();
10193
      while (true)
10194
      {
10195
        field = iprot.readFieldBegin();
10196
        if (field.type == TType.STOP) { 
10197
          break;
10198
        }
10199
        _Fields fieldId = _Fields.findByThriftId(field.id);
10200
        if (fieldId == null) {
10201
          TProtocolUtil.skip(iprot, field.type);
10202
        } else {
10203
          switch (fieldId) {
10204
            case CUSTOMER_ID:
10205
              if (field.type == TType.I64) {
10206
                this.customer_id = iprot.readI64();
10207
                setCustomer_idIsSet(true);
10208
              } else { 
10209
                TProtocolUtil.skip(iprot, field.type);
10210
              }
10211
              break;
10212
            case LIMIT:
10213
              if (field.type == TType.I64) {
10214
                this.limit = iprot.readI64();
10215
                setLimitIsSet(true);
10216
              } else { 
10217
                TProtocolUtil.skip(iprot, field.type);
10218
              }
10219
              break;
10220
          }
10221
          iprot.readFieldEnd();
10222
        }
10223
      }
10224
      iprot.readStructEnd();
10225
      validate();
10226
    }
10227
 
10228
    public void write(TProtocol oprot) throws TException {
10229
      validate();
10230
 
10231
      oprot.writeStructBegin(STRUCT_DESC);
10232
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10233
      oprot.writeI64(this.customer_id);
10234
      oprot.writeFieldEnd();
10235
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10236
      oprot.writeI64(this.limit);
10237
      oprot.writeFieldEnd();
10238
      oprot.writeFieldStop();
10239
      oprot.writeStructEnd();
10240
    }
10241
 
10242
    @Override
10243
    public String toString() {
10244
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
10245
      boolean first = true;
10246
 
10247
      sb.append("customer_id:");
10248
      sb.append(this.customer_id);
10249
      first = false;
10250
      if (!first) sb.append(", ");
10251
      sb.append("limit:");
10252
      sb.append(this.limit);
10253
      first = false;
10254
      sb.append(")");
10255
      return sb.toString();
10256
    }
10257
 
10258
    public void validate() throws TException {
10259
      // check for required fields
10260
    }
10261
 
10262
  }
10263
 
10264
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
10265
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
10266
 
10267
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10268
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10269
 
10270
    private List<Long> success;
10271
    private TransactionServiceException ex;
10272
 
10273
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10274
    public enum _Fields implements TFieldIdEnum {
10275
      SUCCESS((short)0, "success"),
10276
      EX((short)1, "ex");
10277
 
10278
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10279
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10280
 
10281
      static {
10282
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10283
          byId.put((int)field._thriftId, field);
10284
          byName.put(field.getFieldName(), field);
10285
        }
10286
      }
10287
 
10288
      /**
10289
       * Find the _Fields constant that matches fieldId, or null if its not found.
10290
       */
10291
      public static _Fields findByThriftId(int fieldId) {
10292
        return byId.get(fieldId);
10293
      }
10294
 
10295
      /**
10296
       * Find the _Fields constant that matches fieldId, throwing an exception
10297
       * if it is not found.
10298
       */
10299
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10300
        _Fields fields = findByThriftId(fieldId);
10301
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10302
        return fields;
10303
      }
10304
 
10305
      /**
10306
       * Find the _Fields constant that matches name, or null if its not found.
10307
       */
10308
      public static _Fields findByName(String name) {
10309
        return byName.get(name);
10310
      }
10311
 
10312
      private final short _thriftId;
10313
      private final String _fieldName;
10314
 
10315
      _Fields(short thriftId, String fieldName) {
10316
        _thriftId = thriftId;
10317
        _fieldName = fieldName;
10318
      }
10319
 
10320
      public short getThriftFieldId() {
10321
        return _thriftId;
10322
      }
10323
 
10324
      public String getFieldName() {
10325
        return _fieldName;
10326
      }
10327
    }
10328
 
10329
    // isset id assignments
10330
 
10331
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10332
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10333
          new ListMetaData(TType.LIST, 
10334
              new FieldValueMetaData(TType.I64))));
10335
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10336
          new FieldValueMetaData(TType.STRUCT)));
10337
    }});
10338
 
10339
    static {
10340
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10341
    }
10342
 
10343
    public getReturnableOrdersForCustomer_result() {
10344
    }
10345
 
10346
    public getReturnableOrdersForCustomer_result(
10347
      List<Long> success,
10348
      TransactionServiceException ex)
10349
    {
10350
      this();
10351
      this.success = success;
10352
      this.ex = ex;
10353
    }
10354
 
10355
    /**
10356
     * Performs a deep copy on <i>other</i>.
10357
     */
10358
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10359
      if (other.isSetSuccess()) {
10360
        List<Long> __this__success = new ArrayList<Long>();
10361
        for (Long other_element : other.success) {
10362
          __this__success.add(other_element);
10363
        }
10364
        this.success = __this__success;
10365
      }
10366
      if (other.isSetEx()) {
10367
        this.ex = new TransactionServiceException(other.ex);
10368
      }
10369
    }
10370
 
10371
    public getReturnableOrdersForCustomer_result deepCopy() {
10372
      return new getReturnableOrdersForCustomer_result(this);
10373
    }
10374
 
10375
    @Deprecated
10376
    public getReturnableOrdersForCustomer_result clone() {
10377
      return new getReturnableOrdersForCustomer_result(this);
10378
    }
10379
 
10380
    public int getSuccessSize() {
10381
      return (this.success == null) ? 0 : this.success.size();
10382
    }
10383
 
10384
    public java.util.Iterator<Long> getSuccessIterator() {
10385
      return (this.success == null) ? null : this.success.iterator();
10386
    }
10387
 
10388
    public void addToSuccess(long elem) {
10389
      if (this.success == null) {
10390
        this.success = new ArrayList<Long>();
10391
      }
10392
      this.success.add(elem);
10393
    }
10394
 
10395
    public List<Long> getSuccess() {
10396
      return this.success;
10397
    }
10398
 
10399
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10400
      this.success = success;
10401
      return this;
10402
    }
10403
 
10404
    public void unsetSuccess() {
10405
      this.success = null;
10406
    }
10407
 
10408
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10409
    public boolean isSetSuccess() {
10410
      return this.success != null;
10411
    }
10412
 
10413
    public void setSuccessIsSet(boolean value) {
10414
      if (!value) {
10415
        this.success = null;
10416
      }
10417
    }
10418
 
10419
    public TransactionServiceException getEx() {
10420
      return this.ex;
10421
    }
10422
 
10423
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10424
      this.ex = ex;
10425
      return this;
10426
    }
10427
 
10428
    public void unsetEx() {
10429
      this.ex = null;
10430
    }
10431
 
10432
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10433
    public boolean isSetEx() {
10434
      return this.ex != null;
10435
    }
10436
 
10437
    public void setExIsSet(boolean value) {
10438
      if (!value) {
10439
        this.ex = null;
10440
      }
10441
    }
10442
 
10443
    public void setFieldValue(_Fields field, Object value) {
10444
      switch (field) {
10445
      case SUCCESS:
10446
        if (value == null) {
10447
          unsetSuccess();
10448
        } else {
10449
          setSuccess((List<Long>)value);
10450
        }
10451
        break;
10452
 
10453
      case EX:
10454
        if (value == null) {
10455
          unsetEx();
10456
        } else {
10457
          setEx((TransactionServiceException)value);
10458
        }
10459
        break;
10460
 
10461
      }
10462
    }
10463
 
10464
    public void setFieldValue(int fieldID, Object value) {
10465
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10466
    }
10467
 
10468
    public Object getFieldValue(_Fields field) {
10469
      switch (field) {
10470
      case SUCCESS:
10471
        return getSuccess();
10472
 
10473
      case EX:
10474
        return getEx();
10475
 
10476
      }
10477
      throw new IllegalStateException();
10478
    }
10479
 
10480
    public Object getFieldValue(int fieldId) {
10481
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10482
    }
10483
 
10484
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10485
    public boolean isSet(_Fields field) {
10486
      switch (field) {
10487
      case SUCCESS:
10488
        return isSetSuccess();
10489
      case EX:
10490
        return isSetEx();
10491
      }
10492
      throw new IllegalStateException();
10493
    }
10494
 
10495
    public boolean isSet(int fieldID) {
10496
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10497
    }
10498
 
10499
    @Override
10500
    public boolean equals(Object that) {
10501
      if (that == null)
10502
        return false;
10503
      if (that instanceof getReturnableOrdersForCustomer_result)
10504
        return this.equals((getReturnableOrdersForCustomer_result)that);
10505
      return false;
10506
    }
10507
 
10508
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10509
      if (that == null)
10510
        return false;
10511
 
10512
      boolean this_present_success = true && this.isSetSuccess();
10513
      boolean that_present_success = true && that.isSetSuccess();
10514
      if (this_present_success || that_present_success) {
10515
        if (!(this_present_success && that_present_success))
10516
          return false;
10517
        if (!this.success.equals(that.success))
10518
          return false;
10519
      }
10520
 
10521
      boolean this_present_ex = true && this.isSetEx();
10522
      boolean that_present_ex = true && that.isSetEx();
10523
      if (this_present_ex || that_present_ex) {
10524
        if (!(this_present_ex && that_present_ex))
10525
          return false;
10526
        if (!this.ex.equals(that.ex))
10527
          return false;
10528
      }
10529
 
10530
      return true;
10531
    }
10532
 
10533
    @Override
10534
    public int hashCode() {
10535
      return 0;
10536
    }
10537
 
10538
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10539
      if (!getClass().equals(other.getClass())) {
10540
        return getClass().getName().compareTo(other.getClass().getName());
10541
      }
10542
 
10543
      int lastComparison = 0;
10544
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10545
 
10546
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10547
      if (lastComparison != 0) {
10548
        return lastComparison;
10549
      }
10550
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10551
      if (lastComparison != 0) {
10552
        return lastComparison;
10553
      }
10554
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10555
      if (lastComparison != 0) {
10556
        return lastComparison;
10557
      }
10558
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10559
      if (lastComparison != 0) {
10560
        return lastComparison;
10561
      }
10562
      return 0;
10563
    }
10564
 
10565
    public void read(TProtocol iprot) throws TException {
10566
      TField field;
10567
      iprot.readStructBegin();
10568
      while (true)
10569
      {
10570
        field = iprot.readFieldBegin();
10571
        if (field.type == TType.STOP) { 
10572
          break;
10573
        }
10574
        _Fields fieldId = _Fields.findByThriftId(field.id);
10575
        if (fieldId == null) {
10576
          TProtocolUtil.skip(iprot, field.type);
10577
        } else {
10578
          switch (fieldId) {
10579
            case SUCCESS:
10580
              if (field.type == TType.LIST) {
10581
                {
10582
                  TList _list24 = iprot.readListBegin();
10583
                  this.success = new ArrayList<Long>(_list24.size);
10584
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10585
                  {
10586
                    long _elem26;
10587
                    _elem26 = iprot.readI64();
10588
                    this.success.add(_elem26);
10589
                  }
10590
                  iprot.readListEnd();
10591
                }
10592
              } else { 
10593
                TProtocolUtil.skip(iprot, field.type);
10594
              }
10595
              break;
10596
            case EX:
10597
              if (field.type == TType.STRUCT) {
10598
                this.ex = new TransactionServiceException();
10599
                this.ex.read(iprot);
10600
              } else { 
10601
                TProtocolUtil.skip(iprot, field.type);
10602
              }
10603
              break;
10604
          }
10605
          iprot.readFieldEnd();
10606
        }
10607
      }
10608
      iprot.readStructEnd();
10609
      validate();
10610
    }
10611
 
10612
    public void write(TProtocol oprot) throws TException {
10613
      oprot.writeStructBegin(STRUCT_DESC);
10614
 
10615
      if (this.isSetSuccess()) {
10616
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10617
        {
10618
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
10619
          for (long _iter27 : this.success)
10620
          {
10621
            oprot.writeI64(_iter27);
10622
          }
10623
          oprot.writeListEnd();
10624
        }
10625
        oprot.writeFieldEnd();
10626
      } else if (this.isSetEx()) {
10627
        oprot.writeFieldBegin(EX_FIELD_DESC);
10628
        this.ex.write(oprot);
10629
        oprot.writeFieldEnd();
10630
      }
10631
      oprot.writeFieldStop();
10632
      oprot.writeStructEnd();
10633
    }
10634
 
10635
    @Override
10636
    public String toString() {
10637
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
10638
      boolean first = true;
10639
 
10640
      sb.append("success:");
10641
      if (this.success == null) {
10642
        sb.append("null");
10643
      } else {
10644
        sb.append(this.success);
10645
      }
10646
      first = false;
10647
      if (!first) sb.append(", ");
10648
      sb.append("ex:");
10649
      if (this.ex == null) {
10650
        sb.append("null");
10651
      } else {
10652
        sb.append(this.ex);
10653
      }
10654
      first = false;
10655
      sb.append(")");
10656
      return sb.toString();
10657
    }
10658
 
10659
    public void validate() throws TException {
10660
      // check for required fields
10661
    }
10662
 
10663
  }
10664
 
10665
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
10666
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
10667
 
10668
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10669
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10670
 
10671
    private long customer_id;
10672
    private long limit;
10673
 
10674
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10675
    public enum _Fields implements TFieldIdEnum {
10676
      CUSTOMER_ID((short)1, "customer_id"),
10677
      LIMIT((short)2, "limit");
10678
 
10679
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10680
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10681
 
10682
      static {
10683
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10684
          byId.put((int)field._thriftId, field);
10685
          byName.put(field.getFieldName(), field);
10686
        }
10687
      }
10688
 
10689
      /**
10690
       * Find the _Fields constant that matches fieldId, or null if its not found.
10691
       */
10692
      public static _Fields findByThriftId(int fieldId) {
10693
        return byId.get(fieldId);
10694
      }
10695
 
10696
      /**
10697
       * Find the _Fields constant that matches fieldId, throwing an exception
10698
       * if it is not found.
10699
       */
10700
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10701
        _Fields fields = findByThriftId(fieldId);
10702
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10703
        return fields;
10704
      }
10705
 
10706
      /**
10707
       * Find the _Fields constant that matches name, or null if its not found.
10708
       */
10709
      public static _Fields findByName(String name) {
10710
        return byName.get(name);
10711
      }
10712
 
10713
      private final short _thriftId;
10714
      private final String _fieldName;
10715
 
10716
      _Fields(short thriftId, String fieldName) {
10717
        _thriftId = thriftId;
10718
        _fieldName = fieldName;
10719
      }
10720
 
10721
      public short getThriftFieldId() {
10722
        return _thriftId;
10723
      }
10724
 
10725
      public String getFieldName() {
10726
        return _fieldName;
10727
      }
10728
    }
10729
 
10730
    // isset id assignments
10731
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10732
    private static final int __LIMIT_ISSET_ID = 1;
10733
    private BitSet __isset_bit_vector = new BitSet(2);
10734
 
10735
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10736
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10737
          new FieldValueMetaData(TType.I64)));
10738
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10739
          new FieldValueMetaData(TType.I64)));
10740
    }});
10741
 
10742
    static {
10743
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
10744
    }
10745
 
10746
    public getCancellableOrdersForCustomer_args() {
10747
    }
10748
 
10749
    public getCancellableOrdersForCustomer_args(
10750
      long customer_id,
10751
      long limit)
10752
    {
10753
      this();
10754
      this.customer_id = customer_id;
10755
      setCustomer_idIsSet(true);
10756
      this.limit = limit;
10757
      setLimitIsSet(true);
10758
    }
10759
 
10760
    /**
10761
     * Performs a deep copy on <i>other</i>.
10762
     */
10763
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
10764
      __isset_bit_vector.clear();
10765
      __isset_bit_vector.or(other.__isset_bit_vector);
10766
      this.customer_id = other.customer_id;
10767
      this.limit = other.limit;
10768
    }
10769
 
10770
    public getCancellableOrdersForCustomer_args deepCopy() {
10771
      return new getCancellableOrdersForCustomer_args(this);
10772
    }
10773
 
10774
    @Deprecated
10775
    public getCancellableOrdersForCustomer_args clone() {
10776
      return new getCancellableOrdersForCustomer_args(this);
10777
    }
10778
 
10779
    public long getCustomer_id() {
10780
      return this.customer_id;
10781
    }
10782
 
10783
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
10784
      this.customer_id = customer_id;
10785
      setCustomer_idIsSet(true);
10786
      return this;
10787
    }
10788
 
10789
    public void unsetCustomer_id() {
10790
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10791
    }
10792
 
10793
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10794
    public boolean isSetCustomer_id() {
10795
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10796
    }
10797
 
10798
    public void setCustomer_idIsSet(boolean value) {
10799
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10800
    }
10801
 
10802
    public long getLimit() {
10803
      return this.limit;
10804
    }
10805
 
10806
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
10807
      this.limit = limit;
10808
      setLimitIsSet(true);
10809
      return this;
10810
    }
10811
 
10812
    public void unsetLimit() {
10813
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10814
    }
10815
 
10816
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10817
    public boolean isSetLimit() {
10818
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10819
    }
10820
 
10821
    public void setLimitIsSet(boolean value) {
10822
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10823
    }
10824
 
10825
    public void setFieldValue(_Fields field, Object value) {
10826
      switch (field) {
10827
      case CUSTOMER_ID:
10828
        if (value == null) {
10829
          unsetCustomer_id();
10830
        } else {
10831
          setCustomer_id((Long)value);
10832
        }
10833
        break;
10834
 
10835
      case LIMIT:
10836
        if (value == null) {
10837
          unsetLimit();
10838
        } else {
10839
          setLimit((Long)value);
10840
        }
10841
        break;
10842
 
10843
      }
10844
    }
10845
 
10846
    public void setFieldValue(int fieldID, Object value) {
10847
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10848
    }
10849
 
10850
    public Object getFieldValue(_Fields field) {
10851
      switch (field) {
10852
      case CUSTOMER_ID:
10853
        return new Long(getCustomer_id());
10854
 
10855
      case LIMIT:
10856
        return new Long(getLimit());
10857
 
10858
      }
10859
      throw new IllegalStateException();
10860
    }
10861
 
10862
    public Object getFieldValue(int fieldId) {
10863
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10864
    }
10865
 
10866
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10867
    public boolean isSet(_Fields field) {
10868
      switch (field) {
10869
      case CUSTOMER_ID:
10870
        return isSetCustomer_id();
10871
      case LIMIT:
10872
        return isSetLimit();
10873
      }
10874
      throw new IllegalStateException();
10875
    }
10876
 
10877
    public boolean isSet(int fieldID) {
10878
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10879
    }
10880
 
10881
    @Override
10882
    public boolean equals(Object that) {
10883
      if (that == null)
10884
        return false;
10885
      if (that instanceof getCancellableOrdersForCustomer_args)
10886
        return this.equals((getCancellableOrdersForCustomer_args)that);
10887
      return false;
10888
    }
10889
 
10890
    public boolean equals(getCancellableOrdersForCustomer_args that) {
10891
      if (that == null)
10892
        return false;
10893
 
10894
      boolean this_present_customer_id = true;
10895
      boolean that_present_customer_id = true;
10896
      if (this_present_customer_id || that_present_customer_id) {
10897
        if (!(this_present_customer_id && that_present_customer_id))
10898
          return false;
10899
        if (this.customer_id != that.customer_id)
10900
          return false;
10901
      }
10902
 
10903
      boolean this_present_limit = true;
10904
      boolean that_present_limit = true;
10905
      if (this_present_limit || that_present_limit) {
10906
        if (!(this_present_limit && that_present_limit))
10907
          return false;
10908
        if (this.limit != that.limit)
10909
          return false;
10910
      }
10911
 
10912
      return true;
10913
    }
10914
 
10915
    @Override
10916
    public int hashCode() {
10917
      return 0;
10918
    }
10919
 
10920
    public int compareTo(getCancellableOrdersForCustomer_args other) {
10921
      if (!getClass().equals(other.getClass())) {
10922
        return getClass().getName().compareTo(other.getClass().getName());
10923
      }
10924
 
10925
      int lastComparison = 0;
10926
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
10927
 
10928
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10929
      if (lastComparison != 0) {
10930
        return lastComparison;
10931
      }
10932
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10933
      if (lastComparison != 0) {
10934
        return lastComparison;
10935
      }
10936
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10937
      if (lastComparison != 0) {
10938
        return lastComparison;
10939
      }
10940
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10941
      if (lastComparison != 0) {
10942
        return lastComparison;
10943
      }
10944
      return 0;
10945
    }
10946
 
10947
    public void read(TProtocol iprot) throws TException {
10948
      TField field;
10949
      iprot.readStructBegin();
10950
      while (true)
10951
      {
10952
        field = iprot.readFieldBegin();
10953
        if (field.type == TType.STOP) { 
10954
          break;
10955
        }
10956
        _Fields fieldId = _Fields.findByThriftId(field.id);
10957
        if (fieldId == null) {
10958
          TProtocolUtil.skip(iprot, field.type);
10959
        } else {
10960
          switch (fieldId) {
10961
            case CUSTOMER_ID:
10962
              if (field.type == TType.I64) {
10963
                this.customer_id = iprot.readI64();
10964
                setCustomer_idIsSet(true);
10965
              } else { 
10966
                TProtocolUtil.skip(iprot, field.type);
10967
              }
10968
              break;
10969
            case LIMIT:
10970
              if (field.type == TType.I64) {
10971
                this.limit = iprot.readI64();
10972
                setLimitIsSet(true);
10973
              } else { 
10974
                TProtocolUtil.skip(iprot, field.type);
10975
              }
10976
              break;
10977
          }
10978
          iprot.readFieldEnd();
10979
        }
10980
      }
10981
      iprot.readStructEnd();
10982
      validate();
10983
    }
10984
 
10985
    public void write(TProtocol oprot) throws TException {
10986
      validate();
10987
 
10988
      oprot.writeStructBegin(STRUCT_DESC);
10989
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10990
      oprot.writeI64(this.customer_id);
10991
      oprot.writeFieldEnd();
10992
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10993
      oprot.writeI64(this.limit);
10994
      oprot.writeFieldEnd();
10995
      oprot.writeFieldStop();
10996
      oprot.writeStructEnd();
10997
    }
10998
 
10999
    @Override
11000
    public String toString() {
11001
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
11002
      boolean first = true;
11003
 
11004
      sb.append("customer_id:");
11005
      sb.append(this.customer_id);
11006
      first = false;
11007
      if (!first) sb.append(", ");
11008
      sb.append("limit:");
11009
      sb.append(this.limit);
11010
      first = false;
11011
      sb.append(")");
11012
      return sb.toString();
11013
    }
11014
 
11015
    public void validate() throws TException {
11016
      // check for required fields
11017
    }
11018
 
11019
  }
11020
 
11021
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
11022
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
11023
 
11024
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11025
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11026
 
11027
    private List<Long> success;
11028
    private TransactionServiceException ex;
11029
 
11030
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11031
    public enum _Fields implements TFieldIdEnum {
11032
      SUCCESS((short)0, "success"),
11033
      EX((short)1, "ex");
11034
 
11035
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11036
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11037
 
11038
      static {
11039
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11040
          byId.put((int)field._thriftId, field);
11041
          byName.put(field.getFieldName(), field);
11042
        }
11043
      }
11044
 
11045
      /**
11046
       * Find the _Fields constant that matches fieldId, or null if its not found.
11047
       */
11048
      public static _Fields findByThriftId(int fieldId) {
11049
        return byId.get(fieldId);
11050
      }
11051
 
11052
      /**
11053
       * Find the _Fields constant that matches fieldId, throwing an exception
11054
       * if it is not found.
11055
       */
11056
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11057
        _Fields fields = findByThriftId(fieldId);
11058
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11059
        return fields;
11060
      }
11061
 
11062
      /**
11063
       * Find the _Fields constant that matches name, or null if its not found.
11064
       */
11065
      public static _Fields findByName(String name) {
11066
        return byName.get(name);
11067
      }
11068
 
11069
      private final short _thriftId;
11070
      private final String _fieldName;
11071
 
11072
      _Fields(short thriftId, String fieldName) {
11073
        _thriftId = thriftId;
11074
        _fieldName = fieldName;
11075
      }
11076
 
11077
      public short getThriftFieldId() {
11078
        return _thriftId;
11079
      }
11080
 
11081
      public String getFieldName() {
11082
        return _fieldName;
11083
      }
11084
    }
11085
 
11086
    // isset id assignments
11087
 
11088
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11089
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11090
          new ListMetaData(TType.LIST, 
11091
              new FieldValueMetaData(TType.I64))));
11092
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11093
          new FieldValueMetaData(TType.STRUCT)));
11094
    }});
11095
 
11096
    static {
11097
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
11098
    }
11099
 
11100
    public getCancellableOrdersForCustomer_result() {
11101
    }
11102
 
11103
    public getCancellableOrdersForCustomer_result(
11104
      List<Long> success,
11105
      TransactionServiceException ex)
11106
    {
11107
      this();
11108
      this.success = success;
11109
      this.ex = ex;
11110
    }
11111
 
11112
    /**
11113
     * Performs a deep copy on <i>other</i>.
11114
     */
11115
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
11116
      if (other.isSetSuccess()) {
11117
        List<Long> __this__success = new ArrayList<Long>();
11118
        for (Long other_element : other.success) {
11119
          __this__success.add(other_element);
11120
        }
11121
        this.success = __this__success;
11122
      }
11123
      if (other.isSetEx()) {
11124
        this.ex = new TransactionServiceException(other.ex);
11125
      }
11126
    }
11127
 
11128
    public getCancellableOrdersForCustomer_result deepCopy() {
11129
      return new getCancellableOrdersForCustomer_result(this);
11130
    }
11131
 
11132
    @Deprecated
11133
    public getCancellableOrdersForCustomer_result clone() {
11134
      return new getCancellableOrdersForCustomer_result(this);
11135
    }
11136
 
11137
    public int getSuccessSize() {
11138
      return (this.success == null) ? 0 : this.success.size();
11139
    }
11140
 
11141
    public java.util.Iterator<Long> getSuccessIterator() {
11142
      return (this.success == null) ? null : this.success.iterator();
11143
    }
11144
 
11145
    public void addToSuccess(long elem) {
11146
      if (this.success == null) {
11147
        this.success = new ArrayList<Long>();
11148
      }
11149
      this.success.add(elem);
11150
    }
11151
 
11152
    public List<Long> getSuccess() {
11153
      return this.success;
11154
    }
11155
 
11156
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
11157
      this.success = success;
11158
      return this;
11159
    }
11160
 
11161
    public void unsetSuccess() {
11162
      this.success = null;
11163
    }
11164
 
11165
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11166
    public boolean isSetSuccess() {
11167
      return this.success != null;
11168
    }
11169
 
11170
    public void setSuccessIsSet(boolean value) {
11171
      if (!value) {
11172
        this.success = null;
11173
      }
11174
    }
11175
 
11176
    public TransactionServiceException getEx() {
11177
      return this.ex;
11178
    }
11179
 
11180
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11181
      this.ex = ex;
11182
      return this;
11183
    }
11184
 
11185
    public void unsetEx() {
11186
      this.ex = null;
11187
    }
11188
 
11189
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11190
    public boolean isSetEx() {
11191
      return this.ex != null;
11192
    }
11193
 
11194
    public void setExIsSet(boolean value) {
11195
      if (!value) {
11196
        this.ex = null;
11197
      }
11198
    }
11199
 
11200
    public void setFieldValue(_Fields field, Object value) {
11201
      switch (field) {
11202
      case SUCCESS:
11203
        if (value == null) {
11204
          unsetSuccess();
11205
        } else {
11206
          setSuccess((List<Long>)value);
11207
        }
11208
        break;
11209
 
11210
      case EX:
11211
        if (value == null) {
11212
          unsetEx();
11213
        } else {
11214
          setEx((TransactionServiceException)value);
11215
        }
11216
        break;
11217
 
11218
      }
11219
    }
11220
 
11221
    public void setFieldValue(int fieldID, Object value) {
11222
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11223
    }
11224
 
11225
    public Object getFieldValue(_Fields field) {
11226
      switch (field) {
11227
      case SUCCESS:
11228
        return getSuccess();
11229
 
11230
      case EX:
11231
        return getEx();
11232
 
11233
      }
11234
      throw new IllegalStateException();
11235
    }
11236
 
11237
    public Object getFieldValue(int fieldId) {
11238
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11239
    }
11240
 
11241
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11242
    public boolean isSet(_Fields field) {
11243
      switch (field) {
11244
      case SUCCESS:
11245
        return isSetSuccess();
11246
      case EX:
11247
        return isSetEx();
11248
      }
11249
      throw new IllegalStateException();
11250
    }
11251
 
11252
    public boolean isSet(int fieldID) {
11253
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11254
    }
11255
 
11256
    @Override
11257
    public boolean equals(Object that) {
11258
      if (that == null)
11259
        return false;
11260
      if (that instanceof getCancellableOrdersForCustomer_result)
11261
        return this.equals((getCancellableOrdersForCustomer_result)that);
11262
      return false;
11263
    }
11264
 
11265
    public boolean equals(getCancellableOrdersForCustomer_result that) {
11266
      if (that == null)
11267
        return false;
11268
 
11269
      boolean this_present_success = true && this.isSetSuccess();
11270
      boolean that_present_success = true && that.isSetSuccess();
11271
      if (this_present_success || that_present_success) {
11272
        if (!(this_present_success && that_present_success))
11273
          return false;
11274
        if (!this.success.equals(that.success))
11275
          return false;
11276
      }
11277
 
11278
      boolean this_present_ex = true && this.isSetEx();
11279
      boolean that_present_ex = true && that.isSetEx();
11280
      if (this_present_ex || that_present_ex) {
11281
        if (!(this_present_ex && that_present_ex))
11282
          return false;
11283
        if (!this.ex.equals(that.ex))
11284
          return false;
11285
      }
11286
 
11287
      return true;
11288
    }
11289
 
11290
    @Override
11291
    public int hashCode() {
11292
      return 0;
11293
    }
11294
 
11295
    public int compareTo(getCancellableOrdersForCustomer_result other) {
11296
      if (!getClass().equals(other.getClass())) {
11297
        return getClass().getName().compareTo(other.getClass().getName());
11298
      }
11299
 
11300
      int lastComparison = 0;
11301
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
11302
 
11303
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11304
      if (lastComparison != 0) {
11305
        return lastComparison;
11306
      }
11307
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11308
      if (lastComparison != 0) {
11309
        return lastComparison;
11310
      }
11311
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11312
      if (lastComparison != 0) {
11313
        return lastComparison;
11314
      }
11315
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11316
      if (lastComparison != 0) {
11317
        return lastComparison;
11318
      }
11319
      return 0;
11320
    }
11321
 
11322
    public void read(TProtocol iprot) throws TException {
11323
      TField field;
11324
      iprot.readStructBegin();
11325
      while (true)
11326
      {
11327
        field = iprot.readFieldBegin();
11328
        if (field.type == TType.STOP) { 
11329
          break;
11330
        }
11331
        _Fields fieldId = _Fields.findByThriftId(field.id);
11332
        if (fieldId == null) {
11333
          TProtocolUtil.skip(iprot, field.type);
11334
        } else {
11335
          switch (fieldId) {
11336
            case SUCCESS:
11337
              if (field.type == TType.LIST) {
11338
                {
11339
                  TList _list28 = iprot.readListBegin();
11340
                  this.success = new ArrayList<Long>(_list28.size);
11341
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11342
                  {
11343
                    long _elem30;
11344
                    _elem30 = iprot.readI64();
11345
                    this.success.add(_elem30);
11346
                  }
11347
                  iprot.readListEnd();
11348
                }
11349
              } else { 
11350
                TProtocolUtil.skip(iprot, field.type);
11351
              }
11352
              break;
11353
            case EX:
11354
              if (field.type == TType.STRUCT) {
11355
                this.ex = new TransactionServiceException();
11356
                this.ex.read(iprot);
11357
              } else { 
11358
                TProtocolUtil.skip(iprot, field.type);
11359
              }
11360
              break;
11361
          }
11362
          iprot.readFieldEnd();
11363
        }
11364
      }
11365
      iprot.readStructEnd();
11366
      validate();
11367
    }
11368
 
11369
    public void write(TProtocol oprot) throws TException {
11370
      oprot.writeStructBegin(STRUCT_DESC);
11371
 
11372
      if (this.isSetSuccess()) {
11373
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11374
        {
11375
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11376
          for (long _iter31 : this.success)
11377
          {
11378
            oprot.writeI64(_iter31);
11379
          }
11380
          oprot.writeListEnd();
11381
        }
11382
        oprot.writeFieldEnd();
11383
      } else if (this.isSetEx()) {
11384
        oprot.writeFieldBegin(EX_FIELD_DESC);
11385
        this.ex.write(oprot);
11386
        oprot.writeFieldEnd();
11387
      }
11388
      oprot.writeFieldStop();
11389
      oprot.writeStructEnd();
11390
    }
11391
 
11392
    @Override
11393
    public String toString() {
11394
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11395
      boolean first = true;
11396
 
11397
      sb.append("success:");
11398
      if (this.success == null) {
11399
        sb.append("null");
11400
      } else {
11401
        sb.append(this.success);
11402
      }
11403
      first = false;
11404
      if (!first) sb.append(", ");
11405
      sb.append("ex:");
11406
      if (this.ex == null) {
11407
        sb.append("null");
11408
      } else {
11409
        sb.append(this.ex);
11410
      }
11411
      first = false;
11412
      sb.append(")");
11413
      return sb.toString();
11414
    }
11415
 
11416
    public void validate() throws TException {
11417
      // check for required fields
11418
    }
11419
 
11420
  }
11421
 
483 rajveer 11422
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11423
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11424
 
483 rajveer 11425
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11426
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11427
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11428
 
483 rajveer 11429
    private long orderId;
11430
    private OrderStatus status;
11431
    private String description;
68 ashish 11432
 
11433
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11434
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11435
      ORDER_ID((short)1, "orderId"),
11436
      /**
11437
       * 
11438
       * @see OrderStatus
11439
       */
11440
      STATUS((short)2, "status"),
11441
      DESCRIPTION((short)3, "description");
68 ashish 11442
 
11443
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11444
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11445
 
11446
      static {
11447
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11448
          byId.put((int)field._thriftId, field);
11449
          byName.put(field.getFieldName(), field);
11450
        }
11451
      }
11452
 
11453
      /**
11454
       * Find the _Fields constant that matches fieldId, or null if its not found.
11455
       */
11456
      public static _Fields findByThriftId(int fieldId) {
11457
        return byId.get(fieldId);
11458
      }
11459
 
11460
      /**
11461
       * Find the _Fields constant that matches fieldId, throwing an exception
11462
       * if it is not found.
11463
       */
11464
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11465
        _Fields fields = findByThriftId(fieldId);
11466
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11467
        return fields;
11468
      }
11469
 
11470
      /**
11471
       * Find the _Fields constant that matches name, or null if its not found.
11472
       */
11473
      public static _Fields findByName(String name) {
11474
        return byName.get(name);
11475
      }
11476
 
11477
      private final short _thriftId;
11478
      private final String _fieldName;
11479
 
11480
      _Fields(short thriftId, String fieldName) {
11481
        _thriftId = thriftId;
11482
        _fieldName = fieldName;
11483
      }
11484
 
11485
      public short getThriftFieldId() {
11486
        return _thriftId;
11487
      }
11488
 
11489
      public String getFieldName() {
11490
        return _fieldName;
11491
      }
11492
    }
11493
 
11494
    // isset id assignments
483 rajveer 11495
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11496
    private BitSet __isset_bit_vector = new BitSet(1);
11497
 
11498
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11499
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11500
          new FieldValueMetaData(TType.I64)));
483 rajveer 11501
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11502
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11503
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11504
          new FieldValueMetaData(TType.STRING)));
68 ashish 11505
    }});
11506
 
11507
    static {
483 rajveer 11508
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11509
    }
11510
 
483 rajveer 11511
    public changeOrderStatus_args() {
68 ashish 11512
    }
11513
 
483 rajveer 11514
    public changeOrderStatus_args(
11515
      long orderId,
11516
      OrderStatus status,
11517
      String description)
68 ashish 11518
    {
11519
      this();
483 rajveer 11520
      this.orderId = orderId;
11521
      setOrderIdIsSet(true);
11522
      this.status = status;
11523
      this.description = description;
68 ashish 11524
    }
11525
 
11526
    /**
11527
     * Performs a deep copy on <i>other</i>.
11528
     */
483 rajveer 11529
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11530
      __isset_bit_vector.clear();
11531
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11532
      this.orderId = other.orderId;
11533
      if (other.isSetStatus()) {
11534
        this.status = other.status;
11535
      }
11536
      if (other.isSetDescription()) {
11537
        this.description = other.description;
11538
      }
68 ashish 11539
    }
11540
 
483 rajveer 11541
    public changeOrderStatus_args deepCopy() {
11542
      return new changeOrderStatus_args(this);
68 ashish 11543
    }
11544
 
11545
    @Deprecated
483 rajveer 11546
    public changeOrderStatus_args clone() {
11547
      return new changeOrderStatus_args(this);
68 ashish 11548
    }
11549
 
483 rajveer 11550
    public long getOrderId() {
11551
      return this.orderId;
68 ashish 11552
    }
11553
 
483 rajveer 11554
    public changeOrderStatus_args setOrderId(long orderId) {
11555
      this.orderId = orderId;
11556
      setOrderIdIsSet(true);
68 ashish 11557
      return this;
11558
    }
11559
 
483 rajveer 11560
    public void unsetOrderId() {
11561
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11562
    }
11563
 
483 rajveer 11564
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11565
    public boolean isSetOrderId() {
11566
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11567
    }
11568
 
483 rajveer 11569
    public void setOrderIdIsSet(boolean value) {
11570
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11571
    }
11572
 
483 rajveer 11573
    /**
11574
     * 
11575
     * @see OrderStatus
11576
     */
11577
    public OrderStatus getStatus() {
11578
      return this.status;
68 ashish 11579
    }
11580
 
11581
    /**
483 rajveer 11582
     * 
11583
     * @see OrderStatus
68 ashish 11584
     */
483 rajveer 11585
    public changeOrderStatus_args setStatus(OrderStatus status) {
11586
      this.status = status;
68 ashish 11587
      return this;
11588
    }
11589
 
483 rajveer 11590
    public void unsetStatus() {
11591
      this.status = null;
68 ashish 11592
    }
11593
 
483 rajveer 11594
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11595
    public boolean isSetStatus() {
11596
      return this.status != null;
68 ashish 11597
    }
11598
 
483 rajveer 11599
    public void setStatusIsSet(boolean value) {
68 ashish 11600
      if (!value) {
483 rajveer 11601
        this.status = null;
68 ashish 11602
      }
11603
    }
11604
 
483 rajveer 11605
    public String getDescription() {
11606
      return this.description;
68 ashish 11607
    }
11608
 
483 rajveer 11609
    public changeOrderStatus_args setDescription(String description) {
11610
      this.description = description;
68 ashish 11611
      return this;
11612
    }
11613
 
483 rajveer 11614
    public void unsetDescription() {
11615
      this.description = null;
68 ashish 11616
    }
11617
 
483 rajveer 11618
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
11619
    public boolean isSetDescription() {
11620
      return this.description != null;
68 ashish 11621
    }
11622
 
483 rajveer 11623
    public void setDescriptionIsSet(boolean value) {
68 ashish 11624
      if (!value) {
483 rajveer 11625
        this.description = null;
68 ashish 11626
      }
11627
    }
11628
 
11629
    public void setFieldValue(_Fields field, Object value) {
11630
      switch (field) {
483 rajveer 11631
      case ORDER_ID:
68 ashish 11632
        if (value == null) {
483 rajveer 11633
          unsetOrderId();
68 ashish 11634
        } else {
483 rajveer 11635
          setOrderId((Long)value);
68 ashish 11636
        }
11637
        break;
11638
 
483 rajveer 11639
      case STATUS:
68 ashish 11640
        if (value == null) {
483 rajveer 11641
          unsetStatus();
68 ashish 11642
        } else {
483 rajveer 11643
          setStatus((OrderStatus)value);
68 ashish 11644
        }
11645
        break;
11646
 
483 rajveer 11647
      case DESCRIPTION:
11648
        if (value == null) {
11649
          unsetDescription();
11650
        } else {
11651
          setDescription((String)value);
11652
        }
11653
        break;
11654
 
68 ashish 11655
      }
11656
    }
11657
 
11658
    public void setFieldValue(int fieldID, Object value) {
11659
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11660
    }
11661
 
11662
    public Object getFieldValue(_Fields field) {
11663
      switch (field) {
483 rajveer 11664
      case ORDER_ID:
11665
        return new Long(getOrderId());
68 ashish 11666
 
483 rajveer 11667
      case STATUS:
11668
        return getStatus();
68 ashish 11669
 
483 rajveer 11670
      case DESCRIPTION:
11671
        return getDescription();
11672
 
68 ashish 11673
      }
11674
      throw new IllegalStateException();
11675
    }
11676
 
11677
    public Object getFieldValue(int fieldId) {
11678
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11679
    }
11680
 
11681
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11682
    public boolean isSet(_Fields field) {
11683
      switch (field) {
483 rajveer 11684
      case ORDER_ID:
11685
        return isSetOrderId();
11686
      case STATUS:
11687
        return isSetStatus();
11688
      case DESCRIPTION:
11689
        return isSetDescription();
68 ashish 11690
      }
11691
      throw new IllegalStateException();
11692
    }
11693
 
11694
    public boolean isSet(int fieldID) {
11695
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11696
    }
11697
 
11698
    @Override
11699
    public boolean equals(Object that) {
11700
      if (that == null)
11701
        return false;
483 rajveer 11702
      if (that instanceof changeOrderStatus_args)
11703
        return this.equals((changeOrderStatus_args)that);
68 ashish 11704
      return false;
11705
    }
11706
 
483 rajveer 11707
    public boolean equals(changeOrderStatus_args that) {
68 ashish 11708
      if (that == null)
11709
        return false;
11710
 
483 rajveer 11711
      boolean this_present_orderId = true;
11712
      boolean that_present_orderId = true;
11713
      if (this_present_orderId || that_present_orderId) {
11714
        if (!(this_present_orderId && that_present_orderId))
68 ashish 11715
          return false;
483 rajveer 11716
        if (this.orderId != that.orderId)
68 ashish 11717
          return false;
11718
      }
11719
 
483 rajveer 11720
      boolean this_present_status = true && this.isSetStatus();
11721
      boolean that_present_status = true && that.isSetStatus();
11722
      if (this_present_status || that_present_status) {
11723
        if (!(this_present_status && that_present_status))
68 ashish 11724
          return false;
483 rajveer 11725
        if (!this.status.equals(that.status))
68 ashish 11726
          return false;
11727
      }
11728
 
483 rajveer 11729
      boolean this_present_description = true && this.isSetDescription();
11730
      boolean that_present_description = true && that.isSetDescription();
11731
      if (this_present_description || that_present_description) {
11732
        if (!(this_present_description && that_present_description))
11733
          return false;
11734
        if (!this.description.equals(that.description))
11735
          return false;
11736
      }
11737
 
68 ashish 11738
      return true;
11739
    }
11740
 
11741
    @Override
11742
    public int hashCode() {
11743
      return 0;
11744
    }
11745
 
483 rajveer 11746
    public int compareTo(changeOrderStatus_args other) {
11747
      if (!getClass().equals(other.getClass())) {
11748
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 11749
      }
11750
 
483 rajveer 11751
      int lastComparison = 0;
11752
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 11753
 
483 rajveer 11754
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11755
      if (lastComparison != 0) {
11756
        return lastComparison;
68 ashish 11757
      }
483 rajveer 11758
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11759
      if (lastComparison != 0) {
11760
        return lastComparison;
68 ashish 11761
      }
483 rajveer 11762
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11763
      if (lastComparison != 0) {
11764
        return lastComparison;
68 ashish 11765
      }
483 rajveer 11766
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11767
      if (lastComparison != 0) {
11768
        return lastComparison;
68 ashish 11769
      }
483 rajveer 11770
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
11771
      if (lastComparison != 0) {
11772
        return lastComparison;
68 ashish 11773
      }
483 rajveer 11774
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
11775
      if (lastComparison != 0) {
11776
        return lastComparison;
68 ashish 11777
      }
11778
      return 0;
11779
    }
11780
 
11781
    public void read(TProtocol iprot) throws TException {
11782
      TField field;
11783
      iprot.readStructBegin();
11784
      while (true)
11785
      {
11786
        field = iprot.readFieldBegin();
11787
        if (field.type == TType.STOP) { 
11788
          break;
11789
        }
11790
        _Fields fieldId = _Fields.findByThriftId(field.id);
11791
        if (fieldId == null) {
11792
          TProtocolUtil.skip(iprot, field.type);
11793
        } else {
11794
          switch (fieldId) {
483 rajveer 11795
            case ORDER_ID:
68 ashish 11796
              if (field.type == TType.I64) {
483 rajveer 11797
                this.orderId = iprot.readI64();
11798
                setOrderIdIsSet(true);
68 ashish 11799
              } else { 
11800
                TProtocolUtil.skip(iprot, field.type);
11801
              }
11802
              break;
483 rajveer 11803
            case STATUS:
11804
              if (field.type == TType.I32) {
11805
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 11806
              } else { 
11807
                TProtocolUtil.skip(iprot, field.type);
11808
              }
11809
              break;
483 rajveer 11810
            case DESCRIPTION:
11811
              if (field.type == TType.STRING) {
11812
                this.description = iprot.readString();
11813
              } else { 
11814
                TProtocolUtil.skip(iprot, field.type);
11815
              }
11816
              break;
68 ashish 11817
          }
11818
          iprot.readFieldEnd();
11819
        }
11820
      }
11821
      iprot.readStructEnd();
11822
      validate();
11823
    }
11824
 
11825
    public void write(TProtocol oprot) throws TException {
11826
      validate();
11827
 
11828
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 11829
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11830
      oprot.writeI64(this.orderId);
68 ashish 11831
      oprot.writeFieldEnd();
483 rajveer 11832
      if (this.status != null) {
11833
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11834
        oprot.writeI32(this.status.getValue());
68 ashish 11835
        oprot.writeFieldEnd();
11836
      }
483 rajveer 11837
      if (this.description != null) {
11838
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11839
        oprot.writeString(this.description);
11840
        oprot.writeFieldEnd();
11841
      }
68 ashish 11842
      oprot.writeFieldStop();
11843
      oprot.writeStructEnd();
11844
    }
11845
 
11846
    @Override
11847
    public String toString() {
483 rajveer 11848
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 11849
      boolean first = true;
11850
 
483 rajveer 11851
      sb.append("orderId:");
11852
      sb.append(this.orderId);
68 ashish 11853
      first = false;
11854
      if (!first) sb.append(", ");
483 rajveer 11855
      sb.append("status:");
11856
      if (this.status == null) {
68 ashish 11857
        sb.append("null");
11858
      } else {
483 rajveer 11859
        String status_name = status.name();
11860
        if (status_name != null) {
11861
          sb.append(status_name);
11862
          sb.append(" (");
11863
        }
11864
        sb.append(this.status);
11865
        if (status_name != null) {
11866
          sb.append(")");
11867
        }
68 ashish 11868
      }
11869
      first = false;
483 rajveer 11870
      if (!first) sb.append(", ");
11871
      sb.append("description:");
11872
      if (this.description == null) {
11873
        sb.append("null");
11874
      } else {
11875
        sb.append(this.description);
11876
      }
11877
      first = false;
68 ashish 11878
      sb.append(")");
11879
      return sb.toString();
11880
    }
11881
 
11882
    public void validate() throws TException {
11883
      // check for required fields
11884
    }
11885
 
11886
  }
11887
 
483 rajveer 11888
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
11889
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 11890
 
11891
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11892
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11893
 
11894
    private boolean success;
11895
    private TransactionServiceException ex;
11896
 
11897
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11898
    public enum _Fields implements TFieldIdEnum {
11899
      SUCCESS((short)0, "success"),
11900
      EX((short)1, "ex");
11901
 
11902
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11903
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11904
 
11905
      static {
11906
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11907
          byId.put((int)field._thriftId, field);
11908
          byName.put(field.getFieldName(), field);
11909
        }
11910
      }
11911
 
11912
      /**
11913
       * Find the _Fields constant that matches fieldId, or null if its not found.
11914
       */
11915
      public static _Fields findByThriftId(int fieldId) {
11916
        return byId.get(fieldId);
11917
      }
11918
 
11919
      /**
11920
       * Find the _Fields constant that matches fieldId, throwing an exception
11921
       * if it is not found.
11922
       */
11923
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11924
        _Fields fields = findByThriftId(fieldId);
11925
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11926
        return fields;
11927
      }
11928
 
11929
      /**
11930
       * Find the _Fields constant that matches name, or null if its not found.
11931
       */
11932
      public static _Fields findByName(String name) {
11933
        return byName.get(name);
11934
      }
11935
 
11936
      private final short _thriftId;
11937
      private final String _fieldName;
11938
 
11939
      _Fields(short thriftId, String fieldName) {
11940
        _thriftId = thriftId;
11941
        _fieldName = fieldName;
11942
      }
11943
 
11944
      public short getThriftFieldId() {
11945
        return _thriftId;
11946
      }
11947
 
11948
      public String getFieldName() {
11949
        return _fieldName;
11950
      }
11951
    }
11952
 
11953
    // isset id assignments
11954
    private static final int __SUCCESS_ISSET_ID = 0;
11955
    private BitSet __isset_bit_vector = new BitSet(1);
11956
 
11957
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11958
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11959
          new FieldValueMetaData(TType.BOOL)));
11960
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11961
          new FieldValueMetaData(TType.STRUCT)));
11962
    }});
11963
 
11964
    static {
483 rajveer 11965
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 11966
    }
11967
 
483 rajveer 11968
    public changeOrderStatus_result() {
68 ashish 11969
    }
11970
 
483 rajveer 11971
    public changeOrderStatus_result(
68 ashish 11972
      boolean success,
11973
      TransactionServiceException ex)
11974
    {
11975
      this();
11976
      this.success = success;
11977
      setSuccessIsSet(true);
11978
      this.ex = ex;
11979
    }
11980
 
11981
    /**
11982
     * Performs a deep copy on <i>other</i>.
11983
     */
483 rajveer 11984
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 11985
      __isset_bit_vector.clear();
11986
      __isset_bit_vector.or(other.__isset_bit_vector);
11987
      this.success = other.success;
11988
      if (other.isSetEx()) {
11989
        this.ex = new TransactionServiceException(other.ex);
11990
      }
11991
    }
11992
 
483 rajveer 11993
    public changeOrderStatus_result deepCopy() {
11994
      return new changeOrderStatus_result(this);
68 ashish 11995
    }
11996
 
11997
    @Deprecated
483 rajveer 11998
    public changeOrderStatus_result clone() {
11999
      return new changeOrderStatus_result(this);
68 ashish 12000
    }
12001
 
12002
    public boolean isSuccess() {
12003
      return this.success;
12004
    }
12005
 
483 rajveer 12006
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 12007
      this.success = success;
12008
      setSuccessIsSet(true);
12009
      return this;
12010
    }
12011
 
12012
    public void unsetSuccess() {
12013
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12014
    }
12015
 
12016
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12017
    public boolean isSetSuccess() {
12018
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12019
    }
12020
 
12021
    public void setSuccessIsSet(boolean value) {
12022
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12023
    }
12024
 
12025
    public TransactionServiceException getEx() {
12026
      return this.ex;
12027
    }
12028
 
483 rajveer 12029
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 12030
      this.ex = ex;
12031
      return this;
12032
    }
12033
 
12034
    public void unsetEx() {
12035
      this.ex = null;
12036
    }
12037
 
12038
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12039
    public boolean isSetEx() {
12040
      return this.ex != null;
12041
    }
12042
 
12043
    public void setExIsSet(boolean value) {
12044
      if (!value) {
12045
        this.ex = null;
12046
      }
12047
    }
12048
 
12049
    public void setFieldValue(_Fields field, Object value) {
12050
      switch (field) {
12051
      case SUCCESS:
12052
        if (value == null) {
12053
          unsetSuccess();
12054
        } else {
12055
          setSuccess((Boolean)value);
12056
        }
12057
        break;
12058
 
12059
      case EX:
12060
        if (value == null) {
12061
          unsetEx();
12062
        } else {
12063
          setEx((TransactionServiceException)value);
12064
        }
12065
        break;
12066
 
12067
      }
12068
    }
12069
 
12070
    public void setFieldValue(int fieldID, Object value) {
12071
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12072
    }
12073
 
12074
    public Object getFieldValue(_Fields field) {
12075
      switch (field) {
12076
      case SUCCESS:
12077
        return new Boolean(isSuccess());
12078
 
12079
      case EX:
12080
        return getEx();
12081
 
12082
      }
12083
      throw new IllegalStateException();
12084
    }
12085
 
12086
    public Object getFieldValue(int fieldId) {
12087
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12088
    }
12089
 
12090
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12091
    public boolean isSet(_Fields field) {
12092
      switch (field) {
12093
      case SUCCESS:
12094
        return isSetSuccess();
12095
      case EX:
12096
        return isSetEx();
12097
      }
12098
      throw new IllegalStateException();
12099
    }
12100
 
12101
    public boolean isSet(int fieldID) {
12102
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12103
    }
12104
 
12105
    @Override
12106
    public boolean equals(Object that) {
12107
      if (that == null)
12108
        return false;
483 rajveer 12109
      if (that instanceof changeOrderStatus_result)
12110
        return this.equals((changeOrderStatus_result)that);
68 ashish 12111
      return false;
12112
    }
12113
 
483 rajveer 12114
    public boolean equals(changeOrderStatus_result that) {
68 ashish 12115
      if (that == null)
12116
        return false;
12117
 
12118
      boolean this_present_success = true;
12119
      boolean that_present_success = true;
12120
      if (this_present_success || that_present_success) {
12121
        if (!(this_present_success && that_present_success))
12122
          return false;
12123
        if (this.success != that.success)
12124
          return false;
12125
      }
12126
 
12127
      boolean this_present_ex = true && this.isSetEx();
12128
      boolean that_present_ex = true && that.isSetEx();
12129
      if (this_present_ex || that_present_ex) {
12130
        if (!(this_present_ex && that_present_ex))
12131
          return false;
12132
        if (!this.ex.equals(that.ex))
12133
          return false;
12134
      }
12135
 
12136
      return true;
12137
    }
12138
 
12139
    @Override
12140
    public int hashCode() {
12141
      return 0;
12142
    }
12143
 
483 rajveer 12144
    public int compareTo(changeOrderStatus_result other) {
68 ashish 12145
      if (!getClass().equals(other.getClass())) {
12146
        return getClass().getName().compareTo(other.getClass().getName());
12147
      }
12148
 
12149
      int lastComparison = 0;
483 rajveer 12150
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 12151
 
12152
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12153
      if (lastComparison != 0) {
12154
        return lastComparison;
12155
      }
12156
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12157
      if (lastComparison != 0) {
12158
        return lastComparison;
12159
      }
12160
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12161
      if (lastComparison != 0) {
12162
        return lastComparison;
12163
      }
12164
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12165
      if (lastComparison != 0) {
12166
        return lastComparison;
12167
      }
12168
      return 0;
12169
    }
12170
 
12171
    public void read(TProtocol iprot) throws TException {
12172
      TField field;
12173
      iprot.readStructBegin();
12174
      while (true)
12175
      {
12176
        field = iprot.readFieldBegin();
12177
        if (field.type == TType.STOP) { 
12178
          break;
12179
        }
12180
        _Fields fieldId = _Fields.findByThriftId(field.id);
12181
        if (fieldId == null) {
12182
          TProtocolUtil.skip(iprot, field.type);
12183
        } else {
12184
          switch (fieldId) {
12185
            case SUCCESS:
12186
              if (field.type == TType.BOOL) {
12187
                this.success = iprot.readBool();
12188
                setSuccessIsSet(true);
12189
              } else { 
12190
                TProtocolUtil.skip(iprot, field.type);
12191
              }
12192
              break;
12193
            case EX:
12194
              if (field.type == TType.STRUCT) {
12195
                this.ex = new TransactionServiceException();
12196
                this.ex.read(iprot);
12197
              } else { 
12198
                TProtocolUtil.skip(iprot, field.type);
12199
              }
12200
              break;
12201
          }
12202
          iprot.readFieldEnd();
12203
        }
12204
      }
12205
      iprot.readStructEnd();
12206
      validate();
12207
    }
12208
 
12209
    public void write(TProtocol oprot) throws TException {
12210
      oprot.writeStructBegin(STRUCT_DESC);
12211
 
12212
      if (this.isSetSuccess()) {
12213
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12214
        oprot.writeBool(this.success);
12215
        oprot.writeFieldEnd();
12216
      } else if (this.isSetEx()) {
12217
        oprot.writeFieldBegin(EX_FIELD_DESC);
12218
        this.ex.write(oprot);
12219
        oprot.writeFieldEnd();
12220
      }
12221
      oprot.writeFieldStop();
12222
      oprot.writeStructEnd();
12223
    }
12224
 
12225
    @Override
12226
    public String toString() {
483 rajveer 12227
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 12228
      boolean first = true;
12229
 
12230
      sb.append("success:");
12231
      sb.append(this.success);
12232
      first = false;
12233
      if (!first) sb.append(", ");
12234
      sb.append("ex:");
12235
      if (this.ex == null) {
12236
        sb.append("null");
12237
      } else {
12238
        sb.append(this.ex);
12239
      }
12240
      first = false;
12241
      sb.append(")");
12242
      return sb.toString();
12243
    }
12244
 
12245
    public void validate() throws TException {
12246
      // check for required fields
12247
    }
12248
 
12249
  }
12250
 
495 rajveer 12251
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
12252
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
12253
 
12254
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12255
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 12256
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 12257
 
12258
    private long orderId;
12259
    private String invoice_number;
12260
    private String billed_by;
12261
 
12262
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12263
    public enum _Fields implements TFieldIdEnum {
12264
      ORDER_ID((short)1, "orderId"),
12265
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 12266
      BILLED_BY((short)3, "billed_by");
495 rajveer 12267
 
12268
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12269
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12270
 
12271
      static {
12272
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12273
          byId.put((int)field._thriftId, field);
12274
          byName.put(field.getFieldName(), field);
12275
        }
12276
      }
12277
 
12278
      /**
12279
       * Find the _Fields constant that matches fieldId, or null if its not found.
12280
       */
12281
      public static _Fields findByThriftId(int fieldId) {
12282
        return byId.get(fieldId);
12283
      }
12284
 
12285
      /**
12286
       * Find the _Fields constant that matches fieldId, throwing an exception
12287
       * if it is not found.
12288
       */
12289
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12290
        _Fields fields = findByThriftId(fieldId);
12291
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12292
        return fields;
12293
      }
12294
 
12295
      /**
12296
       * Find the _Fields constant that matches name, or null if its not found.
12297
       */
12298
      public static _Fields findByName(String name) {
12299
        return byName.get(name);
12300
      }
12301
 
12302
      private final short _thriftId;
12303
      private final String _fieldName;
12304
 
12305
      _Fields(short thriftId, String fieldName) {
12306
        _thriftId = thriftId;
12307
        _fieldName = fieldName;
12308
      }
12309
 
12310
      public short getThriftFieldId() {
12311
        return _thriftId;
12312
      }
12313
 
12314
      public String getFieldName() {
12315
        return _fieldName;
12316
      }
12317
    }
12318
 
12319
    // isset id assignments
12320
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12321
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12322
 
12323
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12324
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12325
          new FieldValueMetaData(TType.I64)));
12326
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12327
          new FieldValueMetaData(TType.STRING)));
12328
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12329
          new FieldValueMetaData(TType.STRING)));
12330
    }});
12331
 
12332
    static {
12333
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12334
    }
12335
 
12336
    public addBillingDetails_args() {
12337
    }
12338
 
12339
    public addBillingDetails_args(
12340
      long orderId,
12341
      String invoice_number,
12342
      String billed_by)
12343
    {
12344
      this();
12345
      this.orderId = orderId;
12346
      setOrderIdIsSet(true);
12347
      this.invoice_number = invoice_number;
12348
      this.billed_by = billed_by;
12349
    }
12350
 
12351
    /**
12352
     * Performs a deep copy on <i>other</i>.
12353
     */
12354
    public addBillingDetails_args(addBillingDetails_args other) {
12355
      __isset_bit_vector.clear();
12356
      __isset_bit_vector.or(other.__isset_bit_vector);
12357
      this.orderId = other.orderId;
12358
      if (other.isSetInvoice_number()) {
12359
        this.invoice_number = other.invoice_number;
12360
      }
12361
      if (other.isSetBilled_by()) {
12362
        this.billed_by = other.billed_by;
12363
      }
12364
    }
12365
 
12366
    public addBillingDetails_args deepCopy() {
12367
      return new addBillingDetails_args(this);
12368
    }
12369
 
12370
    @Deprecated
12371
    public addBillingDetails_args clone() {
12372
      return new addBillingDetails_args(this);
12373
    }
12374
 
12375
    public long getOrderId() {
12376
      return this.orderId;
12377
    }
12378
 
12379
    public addBillingDetails_args setOrderId(long orderId) {
12380
      this.orderId = orderId;
12381
      setOrderIdIsSet(true);
12382
      return this;
12383
    }
12384
 
12385
    public void unsetOrderId() {
12386
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12387
    }
12388
 
12389
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12390
    public boolean isSetOrderId() {
12391
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12392
    }
12393
 
12394
    public void setOrderIdIsSet(boolean value) {
12395
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12396
    }
12397
 
12398
    public String getInvoice_number() {
12399
      return this.invoice_number;
12400
    }
12401
 
12402
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12403
      this.invoice_number = invoice_number;
12404
      return this;
12405
    }
12406
 
12407
    public void unsetInvoice_number() {
12408
      this.invoice_number = null;
12409
    }
12410
 
12411
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12412
    public boolean isSetInvoice_number() {
12413
      return this.invoice_number != null;
12414
    }
12415
 
12416
    public void setInvoice_numberIsSet(boolean value) {
12417
      if (!value) {
12418
        this.invoice_number = null;
12419
      }
12420
    }
12421
 
12422
    public String getBilled_by() {
12423
      return this.billed_by;
12424
    }
12425
 
12426
    public addBillingDetails_args setBilled_by(String billed_by) {
12427
      this.billed_by = billed_by;
12428
      return this;
12429
    }
12430
 
12431
    public void unsetBilled_by() {
12432
      this.billed_by = null;
12433
    }
12434
 
12435
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12436
    public boolean isSetBilled_by() {
12437
      return this.billed_by != null;
12438
    }
12439
 
12440
    public void setBilled_byIsSet(boolean value) {
12441
      if (!value) {
12442
        this.billed_by = null;
12443
      }
12444
    }
12445
 
12446
    public void setFieldValue(_Fields field, Object value) {
12447
      switch (field) {
12448
      case ORDER_ID:
12449
        if (value == null) {
12450
          unsetOrderId();
12451
        } else {
12452
          setOrderId((Long)value);
12453
        }
12454
        break;
12455
 
12456
      case INVOICE_NUMBER:
12457
        if (value == null) {
12458
          unsetInvoice_number();
12459
        } else {
12460
          setInvoice_number((String)value);
12461
        }
12462
        break;
12463
 
12464
      case BILLED_BY:
12465
        if (value == null) {
12466
          unsetBilled_by();
12467
        } else {
12468
          setBilled_by((String)value);
12469
        }
12470
        break;
12471
 
12472
      }
12473
    }
12474
 
12475
    public void setFieldValue(int fieldID, Object value) {
12476
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12477
    }
12478
 
12479
    public Object getFieldValue(_Fields field) {
12480
      switch (field) {
12481
      case ORDER_ID:
12482
        return new Long(getOrderId());
12483
 
12484
      case INVOICE_NUMBER:
12485
        return getInvoice_number();
12486
 
12487
      case BILLED_BY:
12488
        return getBilled_by();
12489
 
12490
      }
12491
      throw new IllegalStateException();
12492
    }
12493
 
12494
    public Object getFieldValue(int fieldId) {
12495
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12496
    }
12497
 
12498
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12499
    public boolean isSet(_Fields field) {
12500
      switch (field) {
12501
      case ORDER_ID:
12502
        return isSetOrderId();
12503
      case INVOICE_NUMBER:
12504
        return isSetInvoice_number();
12505
      case BILLED_BY:
12506
        return isSetBilled_by();
12507
      }
12508
      throw new IllegalStateException();
12509
    }
12510
 
12511
    public boolean isSet(int fieldID) {
12512
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12513
    }
12514
 
12515
    @Override
12516
    public boolean equals(Object that) {
12517
      if (that == null)
12518
        return false;
12519
      if (that instanceof addBillingDetails_args)
12520
        return this.equals((addBillingDetails_args)that);
12521
      return false;
12522
    }
12523
 
12524
    public boolean equals(addBillingDetails_args that) {
12525
      if (that == null)
12526
        return false;
12527
 
12528
      boolean this_present_orderId = true;
12529
      boolean that_present_orderId = true;
12530
      if (this_present_orderId || that_present_orderId) {
12531
        if (!(this_present_orderId && that_present_orderId))
12532
          return false;
12533
        if (this.orderId != that.orderId)
12534
          return false;
12535
      }
12536
 
12537
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12538
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12539
      if (this_present_invoice_number || that_present_invoice_number) {
12540
        if (!(this_present_invoice_number && that_present_invoice_number))
12541
          return false;
12542
        if (!this.invoice_number.equals(that.invoice_number))
12543
          return false;
12544
      }
12545
 
12546
      boolean this_present_billed_by = true && this.isSetBilled_by();
12547
      boolean that_present_billed_by = true && that.isSetBilled_by();
12548
      if (this_present_billed_by || that_present_billed_by) {
12549
        if (!(this_present_billed_by && that_present_billed_by))
12550
          return false;
12551
        if (!this.billed_by.equals(that.billed_by))
12552
          return false;
12553
      }
12554
 
12555
      return true;
12556
    }
12557
 
12558
    @Override
12559
    public int hashCode() {
12560
      return 0;
12561
    }
12562
 
12563
    public int compareTo(addBillingDetails_args other) {
12564
      if (!getClass().equals(other.getClass())) {
12565
        return getClass().getName().compareTo(other.getClass().getName());
12566
      }
12567
 
12568
      int lastComparison = 0;
12569
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12570
 
12571
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12572
      if (lastComparison != 0) {
12573
        return lastComparison;
12574
      }
12575
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12576
      if (lastComparison != 0) {
12577
        return lastComparison;
12578
      }
12579
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12580
      if (lastComparison != 0) {
12581
        return lastComparison;
12582
      }
12583
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12584
      if (lastComparison != 0) {
12585
        return lastComparison;
12586
      }
12587
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12588
      if (lastComparison != 0) {
12589
        return lastComparison;
12590
      }
12591
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12592
      if (lastComparison != 0) {
12593
        return lastComparison;
12594
      }
12595
      return 0;
12596
    }
12597
 
12598
    public void read(TProtocol iprot) throws TException {
12599
      TField field;
12600
      iprot.readStructBegin();
12601
      while (true)
12602
      {
12603
        field = iprot.readFieldBegin();
12604
        if (field.type == TType.STOP) { 
12605
          break;
12606
        }
12607
        _Fields fieldId = _Fields.findByThriftId(field.id);
12608
        if (fieldId == null) {
12609
          TProtocolUtil.skip(iprot, field.type);
12610
        } else {
12611
          switch (fieldId) {
12612
            case ORDER_ID:
12613
              if (field.type == TType.I64) {
12614
                this.orderId = iprot.readI64();
12615
                setOrderIdIsSet(true);
12616
              } else { 
12617
                TProtocolUtil.skip(iprot, field.type);
12618
              }
12619
              break;
12620
            case INVOICE_NUMBER:
12621
              if (field.type == TType.STRING) {
12622
                this.invoice_number = iprot.readString();
12623
              } else { 
12624
                TProtocolUtil.skip(iprot, field.type);
12625
              }
12626
              break;
12627
            case BILLED_BY:
12628
              if (field.type == TType.STRING) {
12629
                this.billed_by = iprot.readString();
12630
              } else { 
12631
                TProtocolUtil.skip(iprot, field.type);
12632
              }
12633
              break;
12634
          }
12635
          iprot.readFieldEnd();
12636
        }
12637
      }
12638
      iprot.readStructEnd();
12639
      validate();
12640
    }
12641
 
12642
    public void write(TProtocol oprot) throws TException {
12643
      validate();
12644
 
12645
      oprot.writeStructBegin(STRUCT_DESC);
12646
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12647
      oprot.writeI64(this.orderId);
12648
      oprot.writeFieldEnd();
12649
      if (this.invoice_number != null) {
12650
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
12651
        oprot.writeString(this.invoice_number);
12652
        oprot.writeFieldEnd();
12653
      }
12654
      if (this.billed_by != null) {
12655
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
12656
        oprot.writeString(this.billed_by);
12657
        oprot.writeFieldEnd();
12658
      }
12659
      oprot.writeFieldStop();
12660
      oprot.writeStructEnd();
12661
    }
12662
 
12663
    @Override
12664
    public String toString() {
12665
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
12666
      boolean first = true;
12667
 
12668
      sb.append("orderId:");
12669
      sb.append(this.orderId);
12670
      first = false;
12671
      if (!first) sb.append(", ");
12672
      sb.append("invoice_number:");
12673
      if (this.invoice_number == null) {
12674
        sb.append("null");
12675
      } else {
12676
        sb.append(this.invoice_number);
12677
      }
12678
      first = false;
12679
      if (!first) sb.append(", ");
12680
      sb.append("billed_by:");
12681
      if (this.billed_by == null) {
12682
        sb.append("null");
12683
      } else {
12684
        sb.append(this.billed_by);
12685
      }
12686
      first = false;
12687
      sb.append(")");
12688
      return sb.toString();
12689
    }
12690
 
12691
    public void validate() throws TException {
12692
      // check for required fields
12693
    }
12694
 
12695
  }
12696
 
12697
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
12698
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
12699
 
12700
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12701
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12702
 
12703
    private boolean success;
12704
    private TransactionServiceException ex;
12705
 
12706
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12707
    public enum _Fields implements TFieldIdEnum {
12708
      SUCCESS((short)0, "success"),
12709
      EX((short)1, "ex");
12710
 
12711
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12712
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12713
 
12714
      static {
12715
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12716
          byId.put((int)field._thriftId, field);
12717
          byName.put(field.getFieldName(), field);
12718
        }
12719
      }
12720
 
12721
      /**
12722
       * Find the _Fields constant that matches fieldId, or null if its not found.
12723
       */
12724
      public static _Fields findByThriftId(int fieldId) {
12725
        return byId.get(fieldId);
12726
      }
12727
 
12728
      /**
12729
       * Find the _Fields constant that matches fieldId, throwing an exception
12730
       * if it is not found.
12731
       */
12732
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12733
        _Fields fields = findByThriftId(fieldId);
12734
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12735
        return fields;
12736
      }
12737
 
12738
      /**
12739
       * Find the _Fields constant that matches name, or null if its not found.
12740
       */
12741
      public static _Fields findByName(String name) {
12742
        return byName.get(name);
12743
      }
12744
 
12745
      private final short _thriftId;
12746
      private final String _fieldName;
12747
 
12748
      _Fields(short thriftId, String fieldName) {
12749
        _thriftId = thriftId;
12750
        _fieldName = fieldName;
12751
      }
12752
 
12753
      public short getThriftFieldId() {
12754
        return _thriftId;
12755
      }
12756
 
12757
      public String getFieldName() {
12758
        return _fieldName;
12759
      }
12760
    }
12761
 
12762
    // isset id assignments
12763
    private static final int __SUCCESS_ISSET_ID = 0;
12764
    private BitSet __isset_bit_vector = new BitSet(1);
12765
 
12766
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12767
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12768
          new FieldValueMetaData(TType.BOOL)));
12769
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12770
          new FieldValueMetaData(TType.STRUCT)));
12771
    }});
12772
 
12773
    static {
12774
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
12775
    }
12776
 
12777
    public addBillingDetails_result() {
12778
    }
12779
 
12780
    public addBillingDetails_result(
12781
      boolean success,
12782
      TransactionServiceException ex)
12783
    {
12784
      this();
12785
      this.success = success;
12786
      setSuccessIsSet(true);
12787
      this.ex = ex;
12788
    }
12789
 
12790
    /**
12791
     * Performs a deep copy on <i>other</i>.
12792
     */
12793
    public addBillingDetails_result(addBillingDetails_result other) {
12794
      __isset_bit_vector.clear();
12795
      __isset_bit_vector.or(other.__isset_bit_vector);
12796
      this.success = other.success;
12797
      if (other.isSetEx()) {
12798
        this.ex = new TransactionServiceException(other.ex);
12799
      }
12800
    }
12801
 
12802
    public addBillingDetails_result deepCopy() {
12803
      return new addBillingDetails_result(this);
12804
    }
12805
 
12806
    @Deprecated
12807
    public addBillingDetails_result clone() {
12808
      return new addBillingDetails_result(this);
12809
    }
12810
 
12811
    public boolean isSuccess() {
12812
      return this.success;
12813
    }
12814
 
12815
    public addBillingDetails_result setSuccess(boolean success) {
12816
      this.success = success;
12817
      setSuccessIsSet(true);
12818
      return this;
12819
    }
12820
 
12821
    public void unsetSuccess() {
12822
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12823
    }
12824
 
12825
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12826
    public boolean isSetSuccess() {
12827
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12828
    }
12829
 
12830
    public void setSuccessIsSet(boolean value) {
12831
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12832
    }
12833
 
12834
    public TransactionServiceException getEx() {
12835
      return this.ex;
12836
    }
12837
 
12838
    public addBillingDetails_result setEx(TransactionServiceException ex) {
12839
      this.ex = ex;
12840
      return this;
12841
    }
12842
 
12843
    public void unsetEx() {
12844
      this.ex = null;
12845
    }
12846
 
12847
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12848
    public boolean isSetEx() {
12849
      return this.ex != null;
12850
    }
12851
 
12852
    public void setExIsSet(boolean value) {
12853
      if (!value) {
12854
        this.ex = null;
12855
      }
12856
    }
12857
 
12858
    public void setFieldValue(_Fields field, Object value) {
12859
      switch (field) {
12860
      case SUCCESS:
12861
        if (value == null) {
12862
          unsetSuccess();
12863
        } else {
12864
          setSuccess((Boolean)value);
12865
        }
12866
        break;
12867
 
12868
      case EX:
12869
        if (value == null) {
12870
          unsetEx();
12871
        } else {
12872
          setEx((TransactionServiceException)value);
12873
        }
12874
        break;
12875
 
12876
      }
12877
    }
12878
 
12879
    public void setFieldValue(int fieldID, Object value) {
12880
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12881
    }
12882
 
12883
    public Object getFieldValue(_Fields field) {
12884
      switch (field) {
12885
      case SUCCESS:
12886
        return new Boolean(isSuccess());
12887
 
12888
      case EX:
12889
        return getEx();
12890
 
12891
      }
12892
      throw new IllegalStateException();
12893
    }
12894
 
12895
    public Object getFieldValue(int fieldId) {
12896
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12897
    }
12898
 
12899
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12900
    public boolean isSet(_Fields field) {
12901
      switch (field) {
12902
      case SUCCESS:
12903
        return isSetSuccess();
12904
      case EX:
12905
        return isSetEx();
12906
      }
12907
      throw new IllegalStateException();
12908
    }
12909
 
12910
    public boolean isSet(int fieldID) {
12911
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12912
    }
12913
 
12914
    @Override
12915
    public boolean equals(Object that) {
12916
      if (that == null)
12917
        return false;
12918
      if (that instanceof addBillingDetails_result)
12919
        return this.equals((addBillingDetails_result)that);
12920
      return false;
12921
    }
12922
 
12923
    public boolean equals(addBillingDetails_result that) {
12924
      if (that == null)
12925
        return false;
12926
 
12927
      boolean this_present_success = true;
12928
      boolean that_present_success = true;
12929
      if (this_present_success || that_present_success) {
12930
        if (!(this_present_success && that_present_success))
12931
          return false;
12932
        if (this.success != that.success)
12933
          return false;
12934
      }
12935
 
12936
      boolean this_present_ex = true && this.isSetEx();
12937
      boolean that_present_ex = true && that.isSetEx();
12938
      if (this_present_ex || that_present_ex) {
12939
        if (!(this_present_ex && that_present_ex))
12940
          return false;
12941
        if (!this.ex.equals(that.ex))
12942
          return false;
12943
      }
12944
 
12945
      return true;
12946
    }
12947
 
12948
    @Override
12949
    public int hashCode() {
12950
      return 0;
12951
    }
12952
 
12953
    public int compareTo(addBillingDetails_result other) {
12954
      if (!getClass().equals(other.getClass())) {
12955
        return getClass().getName().compareTo(other.getClass().getName());
12956
      }
12957
 
12958
      int lastComparison = 0;
12959
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
12960
 
12961
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12962
      if (lastComparison != 0) {
12963
        return lastComparison;
12964
      }
12965
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12966
      if (lastComparison != 0) {
12967
        return lastComparison;
12968
      }
12969
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12970
      if (lastComparison != 0) {
12971
        return lastComparison;
12972
      }
12973
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12974
      if (lastComparison != 0) {
12975
        return lastComparison;
12976
      }
12977
      return 0;
12978
    }
12979
 
12980
    public void read(TProtocol iprot) throws TException {
12981
      TField field;
12982
      iprot.readStructBegin();
12983
      while (true)
12984
      {
12985
        field = iprot.readFieldBegin();
12986
        if (field.type == TType.STOP) { 
12987
          break;
12988
        }
12989
        _Fields fieldId = _Fields.findByThriftId(field.id);
12990
        if (fieldId == null) {
12991
          TProtocolUtil.skip(iprot, field.type);
12992
        } else {
12993
          switch (fieldId) {
12994
            case SUCCESS:
12995
              if (field.type == TType.BOOL) {
12996
                this.success = iprot.readBool();
12997
                setSuccessIsSet(true);
12998
              } else { 
12999
                TProtocolUtil.skip(iprot, field.type);
13000
              }
13001
              break;
13002
            case EX:
13003
              if (field.type == TType.STRUCT) {
13004
                this.ex = new TransactionServiceException();
13005
                this.ex.read(iprot);
13006
              } else { 
13007
                TProtocolUtil.skip(iprot, field.type);
13008
              }
13009
              break;
13010
          }
13011
          iprot.readFieldEnd();
13012
        }
13013
      }
13014
      iprot.readStructEnd();
13015
      validate();
13016
    }
13017
 
13018
    public void write(TProtocol oprot) throws TException {
13019
      oprot.writeStructBegin(STRUCT_DESC);
13020
 
13021
      if (this.isSetSuccess()) {
13022
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13023
        oprot.writeBool(this.success);
13024
        oprot.writeFieldEnd();
13025
      } else if (this.isSetEx()) {
13026
        oprot.writeFieldBegin(EX_FIELD_DESC);
13027
        this.ex.write(oprot);
13028
        oprot.writeFieldEnd();
13029
      }
13030
      oprot.writeFieldStop();
13031
      oprot.writeStructEnd();
13032
    }
13033
 
13034
    @Override
13035
    public String toString() {
13036
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
13037
      boolean first = true;
13038
 
13039
      sb.append("success:");
13040
      sb.append(this.success);
13041
      first = false;
13042
      if (!first) sb.append(", ");
13043
      sb.append("ex:");
13044
      if (this.ex == null) {
13045
        sb.append("null");
13046
      } else {
13047
        sb.append(this.ex);
13048
      }
13049
      first = false;
13050
      sb.append(")");
13051
      return sb.toString();
13052
    }
13053
 
13054
    public void validate() throws TException {
13055
      // check for required fields
13056
    }
13057
 
13058
  }
13059
 
1148 chandransh 13060
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
13061
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
13062
 
13063
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13064
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
2364 chandransh 13065
    private static final TField IMEI_NUMBER_FIELD_DESC = new TField("imeiNumber", TType.I64, (short)3);
13066
    private static final TField BILLED_BY_FIELD_DESC = new TField("billedBy", TType.STRING, (short)4);
1148 chandransh 13067
 
13068
    private long orderId;
13069
    private long jacketNumber;
2364 chandransh 13070
    private long imeiNumber;
13071
    private String billedBy;
1148 chandransh 13072
 
13073
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13074
    public enum _Fields implements TFieldIdEnum {
13075
      ORDER_ID((short)1, "orderId"),
2364 chandransh 13076
      JACKET_NUMBER((short)2, "jacketNumber"),
13077
      IMEI_NUMBER((short)3, "imeiNumber"),
13078
      BILLED_BY((short)4, "billedBy");
1148 chandransh 13079
 
13080
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13081
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13082
 
13083
      static {
13084
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13085
          byId.put((int)field._thriftId, field);
13086
          byName.put(field.getFieldName(), field);
13087
        }
13088
      }
13089
 
13090
      /**
13091
       * Find the _Fields constant that matches fieldId, or null if its not found.
13092
       */
13093
      public static _Fields findByThriftId(int fieldId) {
13094
        return byId.get(fieldId);
13095
      }
13096
 
13097
      /**
13098
       * Find the _Fields constant that matches fieldId, throwing an exception
13099
       * if it is not found.
13100
       */
13101
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13102
        _Fields fields = findByThriftId(fieldId);
13103
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13104
        return fields;
13105
      }
13106
 
13107
      /**
13108
       * Find the _Fields constant that matches name, or null if its not found.
13109
       */
13110
      public static _Fields findByName(String name) {
13111
        return byName.get(name);
13112
      }
13113
 
13114
      private final short _thriftId;
13115
      private final String _fieldName;
13116
 
13117
      _Fields(short thriftId, String fieldName) {
13118
        _thriftId = thriftId;
13119
        _fieldName = fieldName;
13120
      }
13121
 
13122
      public short getThriftFieldId() {
13123
        return _thriftId;
13124
      }
13125
 
13126
      public String getFieldName() {
13127
        return _fieldName;
13128
      }
13129
    }
13130
 
13131
    // isset id assignments
13132
    private static final int __ORDERID_ISSET_ID = 0;
13133
    private static final int __JACKETNUMBER_ISSET_ID = 1;
2364 chandransh 13134
    private static final int __IMEINUMBER_ISSET_ID = 2;
13135
    private BitSet __isset_bit_vector = new BitSet(3);
1148 chandransh 13136
 
13137
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13138
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13139
          new FieldValueMetaData(TType.I64)));
13140
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
13141
          new FieldValueMetaData(TType.I64)));
2364 chandransh 13142
      put(_Fields.IMEI_NUMBER, new FieldMetaData("imeiNumber", TFieldRequirementType.DEFAULT, 
13143
          new FieldValueMetaData(TType.I64)));
13144
      put(_Fields.BILLED_BY, new FieldMetaData("billedBy", TFieldRequirementType.DEFAULT, 
13145
          new FieldValueMetaData(TType.STRING)));
1148 chandransh 13146
    }});
13147
 
13148
    static {
13149
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
13150
    }
13151
 
13152
    public addJacketNumber_args() {
13153
    }
13154
 
13155
    public addJacketNumber_args(
13156
      long orderId,
2364 chandransh 13157
      long jacketNumber,
13158
      long imeiNumber,
13159
      String billedBy)
1148 chandransh 13160
    {
13161
      this();
13162
      this.orderId = orderId;
13163
      setOrderIdIsSet(true);
13164
      this.jacketNumber = jacketNumber;
13165
      setJacketNumberIsSet(true);
2364 chandransh 13166
      this.imeiNumber = imeiNumber;
13167
      setImeiNumberIsSet(true);
13168
      this.billedBy = billedBy;
1148 chandransh 13169
    }
13170
 
13171
    /**
13172
     * Performs a deep copy on <i>other</i>.
13173
     */
13174
    public addJacketNumber_args(addJacketNumber_args other) {
13175
      __isset_bit_vector.clear();
13176
      __isset_bit_vector.or(other.__isset_bit_vector);
13177
      this.orderId = other.orderId;
13178
      this.jacketNumber = other.jacketNumber;
2364 chandransh 13179
      this.imeiNumber = other.imeiNumber;
13180
      if (other.isSetBilledBy()) {
13181
        this.billedBy = other.billedBy;
13182
      }
1148 chandransh 13183
    }
13184
 
13185
    public addJacketNumber_args deepCopy() {
13186
      return new addJacketNumber_args(this);
13187
    }
13188
 
13189
    @Deprecated
13190
    public addJacketNumber_args clone() {
13191
      return new addJacketNumber_args(this);
13192
    }
13193
 
13194
    public long getOrderId() {
13195
      return this.orderId;
13196
    }
13197
 
13198
    public addJacketNumber_args setOrderId(long orderId) {
13199
      this.orderId = orderId;
13200
      setOrderIdIsSet(true);
13201
      return this;
13202
    }
13203
 
13204
    public void unsetOrderId() {
13205
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13206
    }
13207
 
13208
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13209
    public boolean isSetOrderId() {
13210
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13211
    }
13212
 
13213
    public void setOrderIdIsSet(boolean value) {
13214
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13215
    }
13216
 
13217
    public long getJacketNumber() {
13218
      return this.jacketNumber;
13219
    }
13220
 
13221
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
13222
      this.jacketNumber = jacketNumber;
13223
      setJacketNumberIsSet(true);
13224
      return this;
13225
    }
13226
 
13227
    public void unsetJacketNumber() {
13228
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
13229
    }
13230
 
13231
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
13232
    public boolean isSetJacketNumber() {
13233
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
13234
    }
13235
 
13236
    public void setJacketNumberIsSet(boolean value) {
13237
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
13238
    }
13239
 
2364 chandransh 13240
    public long getImeiNumber() {
13241
      return this.imeiNumber;
13242
    }
13243
 
13244
    public addJacketNumber_args setImeiNumber(long imeiNumber) {
13245
      this.imeiNumber = imeiNumber;
13246
      setImeiNumberIsSet(true);
13247
      return this;
13248
    }
13249
 
13250
    public void unsetImeiNumber() {
13251
      __isset_bit_vector.clear(__IMEINUMBER_ISSET_ID);
13252
    }
13253
 
13254
    /** Returns true if field imeiNumber is set (has been asigned a value) and false otherwise */
13255
    public boolean isSetImeiNumber() {
13256
      return __isset_bit_vector.get(__IMEINUMBER_ISSET_ID);
13257
    }
13258
 
13259
    public void setImeiNumberIsSet(boolean value) {
13260
      __isset_bit_vector.set(__IMEINUMBER_ISSET_ID, value);
13261
    }
13262
 
13263
    public String getBilledBy() {
13264
      return this.billedBy;
13265
    }
13266
 
13267
    public addJacketNumber_args setBilledBy(String billedBy) {
13268
      this.billedBy = billedBy;
13269
      return this;
13270
    }
13271
 
13272
    public void unsetBilledBy() {
13273
      this.billedBy = null;
13274
    }
13275
 
13276
    /** Returns true if field billedBy is set (has been asigned a value) and false otherwise */
13277
    public boolean isSetBilledBy() {
13278
      return this.billedBy != null;
13279
    }
13280
 
13281
    public void setBilledByIsSet(boolean value) {
13282
      if (!value) {
13283
        this.billedBy = null;
13284
      }
13285
    }
13286
 
1148 chandransh 13287
    public void setFieldValue(_Fields field, Object value) {
13288
      switch (field) {
13289
      case ORDER_ID:
13290
        if (value == null) {
13291
          unsetOrderId();
13292
        } else {
13293
          setOrderId((Long)value);
13294
        }
13295
        break;
13296
 
13297
      case JACKET_NUMBER:
13298
        if (value == null) {
13299
          unsetJacketNumber();
13300
        } else {
13301
          setJacketNumber((Long)value);
13302
        }
13303
        break;
13304
 
2364 chandransh 13305
      case IMEI_NUMBER:
13306
        if (value == null) {
13307
          unsetImeiNumber();
13308
        } else {
13309
          setImeiNumber((Long)value);
13310
        }
13311
        break;
13312
 
13313
      case BILLED_BY:
13314
        if (value == null) {
13315
          unsetBilledBy();
13316
        } else {
13317
          setBilledBy((String)value);
13318
        }
13319
        break;
13320
 
1148 chandransh 13321
      }
13322
    }
13323
 
13324
    public void setFieldValue(int fieldID, Object value) {
13325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13326
    }
13327
 
13328
    public Object getFieldValue(_Fields field) {
13329
      switch (field) {
13330
      case ORDER_ID:
13331
        return new Long(getOrderId());
13332
 
13333
      case JACKET_NUMBER:
13334
        return new Long(getJacketNumber());
13335
 
2364 chandransh 13336
      case IMEI_NUMBER:
13337
        return new Long(getImeiNumber());
13338
 
13339
      case BILLED_BY:
13340
        return getBilledBy();
13341
 
1148 chandransh 13342
      }
13343
      throw new IllegalStateException();
13344
    }
13345
 
13346
    public Object getFieldValue(int fieldId) {
13347
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13348
    }
13349
 
13350
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13351
    public boolean isSet(_Fields field) {
13352
      switch (field) {
13353
      case ORDER_ID:
13354
        return isSetOrderId();
13355
      case JACKET_NUMBER:
13356
        return isSetJacketNumber();
2364 chandransh 13357
      case IMEI_NUMBER:
13358
        return isSetImeiNumber();
13359
      case BILLED_BY:
13360
        return isSetBilledBy();
1148 chandransh 13361
      }
13362
      throw new IllegalStateException();
13363
    }
13364
 
13365
    public boolean isSet(int fieldID) {
13366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13367
    }
13368
 
13369
    @Override
13370
    public boolean equals(Object that) {
13371
      if (that == null)
13372
        return false;
13373
      if (that instanceof addJacketNumber_args)
13374
        return this.equals((addJacketNumber_args)that);
13375
      return false;
13376
    }
13377
 
13378
    public boolean equals(addJacketNumber_args that) {
13379
      if (that == null)
13380
        return false;
13381
 
13382
      boolean this_present_orderId = true;
13383
      boolean that_present_orderId = true;
13384
      if (this_present_orderId || that_present_orderId) {
13385
        if (!(this_present_orderId && that_present_orderId))
13386
          return false;
13387
        if (this.orderId != that.orderId)
13388
          return false;
13389
      }
13390
 
13391
      boolean this_present_jacketNumber = true;
13392
      boolean that_present_jacketNumber = true;
13393
      if (this_present_jacketNumber || that_present_jacketNumber) {
13394
        if (!(this_present_jacketNumber && that_present_jacketNumber))
13395
          return false;
13396
        if (this.jacketNumber != that.jacketNumber)
13397
          return false;
13398
      }
13399
 
2364 chandransh 13400
      boolean this_present_imeiNumber = true;
13401
      boolean that_present_imeiNumber = true;
13402
      if (this_present_imeiNumber || that_present_imeiNumber) {
13403
        if (!(this_present_imeiNumber && that_present_imeiNumber))
13404
          return false;
13405
        if (this.imeiNumber != that.imeiNumber)
13406
          return false;
13407
      }
13408
 
13409
      boolean this_present_billedBy = true && this.isSetBilledBy();
13410
      boolean that_present_billedBy = true && that.isSetBilledBy();
13411
      if (this_present_billedBy || that_present_billedBy) {
13412
        if (!(this_present_billedBy && that_present_billedBy))
13413
          return false;
13414
        if (!this.billedBy.equals(that.billedBy))
13415
          return false;
13416
      }
13417
 
1148 chandransh 13418
      return true;
13419
    }
13420
 
13421
    @Override
13422
    public int hashCode() {
13423
      return 0;
13424
    }
13425
 
13426
    public int compareTo(addJacketNumber_args other) {
13427
      if (!getClass().equals(other.getClass())) {
13428
        return getClass().getName().compareTo(other.getClass().getName());
13429
      }
13430
 
13431
      int lastComparison = 0;
13432
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13433
 
13434
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13435
      if (lastComparison != 0) {
13436
        return lastComparison;
13437
      }
13438
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13439
      if (lastComparison != 0) {
13440
        return lastComparison;
13441
      }
13442
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13443
      if (lastComparison != 0) {
13444
        return lastComparison;
13445
      }
13446
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13447
      if (lastComparison != 0) {
13448
        return lastComparison;
13449
      }
2364 chandransh 13450
      lastComparison = Boolean.valueOf(isSetImeiNumber()).compareTo(isSetImeiNumber());
13451
      if (lastComparison != 0) {
13452
        return lastComparison;
13453
      }
13454
      lastComparison = TBaseHelper.compareTo(imeiNumber, typedOther.imeiNumber);
13455
      if (lastComparison != 0) {
13456
        return lastComparison;
13457
      }
13458
      lastComparison = Boolean.valueOf(isSetBilledBy()).compareTo(isSetBilledBy());
13459
      if (lastComparison != 0) {
13460
        return lastComparison;
13461
      }
13462
      lastComparison = TBaseHelper.compareTo(billedBy, typedOther.billedBy);
13463
      if (lastComparison != 0) {
13464
        return lastComparison;
13465
      }
1148 chandransh 13466
      return 0;
13467
    }
13468
 
13469
    public void read(TProtocol iprot) throws TException {
13470
      TField field;
13471
      iprot.readStructBegin();
13472
      while (true)
13473
      {
13474
        field = iprot.readFieldBegin();
13475
        if (field.type == TType.STOP) { 
13476
          break;
13477
        }
13478
        _Fields fieldId = _Fields.findByThriftId(field.id);
13479
        if (fieldId == null) {
13480
          TProtocolUtil.skip(iprot, field.type);
13481
        } else {
13482
          switch (fieldId) {
13483
            case ORDER_ID:
13484
              if (field.type == TType.I64) {
13485
                this.orderId = iprot.readI64();
13486
                setOrderIdIsSet(true);
13487
              } else { 
13488
                TProtocolUtil.skip(iprot, field.type);
13489
              }
13490
              break;
13491
            case JACKET_NUMBER:
13492
              if (field.type == TType.I64) {
13493
                this.jacketNumber = iprot.readI64();
13494
                setJacketNumberIsSet(true);
13495
              } else { 
13496
                TProtocolUtil.skip(iprot, field.type);
13497
              }
13498
              break;
2364 chandransh 13499
            case IMEI_NUMBER:
13500
              if (field.type == TType.I64) {
13501
                this.imeiNumber = iprot.readI64();
13502
                setImeiNumberIsSet(true);
13503
              } else { 
13504
                TProtocolUtil.skip(iprot, field.type);
13505
              }
13506
              break;
13507
            case BILLED_BY:
13508
              if (field.type == TType.STRING) {
13509
                this.billedBy = iprot.readString();
13510
              } else { 
13511
                TProtocolUtil.skip(iprot, field.type);
13512
              }
13513
              break;
1148 chandransh 13514
          }
13515
          iprot.readFieldEnd();
13516
        }
13517
      }
13518
      iprot.readStructEnd();
13519
      validate();
13520
    }
13521
 
13522
    public void write(TProtocol oprot) throws TException {
13523
      validate();
13524
 
13525
      oprot.writeStructBegin(STRUCT_DESC);
13526
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13527
      oprot.writeI64(this.orderId);
13528
      oprot.writeFieldEnd();
13529
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13530
      oprot.writeI64(this.jacketNumber);
13531
      oprot.writeFieldEnd();
2364 chandransh 13532
      oprot.writeFieldBegin(IMEI_NUMBER_FIELD_DESC);
13533
      oprot.writeI64(this.imeiNumber);
13534
      oprot.writeFieldEnd();
13535
      if (this.billedBy != null) {
13536
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
13537
        oprot.writeString(this.billedBy);
13538
        oprot.writeFieldEnd();
13539
      }
1148 chandransh 13540
      oprot.writeFieldStop();
13541
      oprot.writeStructEnd();
13542
    }
13543
 
13544
    @Override
13545
    public String toString() {
13546
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13547
      boolean first = true;
13548
 
13549
      sb.append("orderId:");
13550
      sb.append(this.orderId);
13551
      first = false;
13552
      if (!first) sb.append(", ");
13553
      sb.append("jacketNumber:");
13554
      sb.append(this.jacketNumber);
13555
      first = false;
2364 chandransh 13556
      if (!first) sb.append(", ");
13557
      sb.append("imeiNumber:");
13558
      sb.append(this.imeiNumber);
13559
      first = false;
13560
      if (!first) sb.append(", ");
13561
      sb.append("billedBy:");
13562
      if (this.billedBy == null) {
13563
        sb.append("null");
13564
      } else {
13565
        sb.append(this.billedBy);
13566
      }
13567
      first = false;
1148 chandransh 13568
      sb.append(")");
13569
      return sb.toString();
13570
    }
13571
 
13572
    public void validate() throws TException {
13573
      // check for required fields
13574
    }
13575
 
13576
  }
13577
 
13578
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13579
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13580
 
13581
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13582
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13583
 
13584
    private boolean success;
13585
    private TransactionServiceException ex;
13586
 
13587
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13588
    public enum _Fields implements TFieldIdEnum {
13589
      SUCCESS((short)0, "success"),
13590
      EX((short)1, "ex");
13591
 
13592
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13593
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13594
 
13595
      static {
13596
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13597
          byId.put((int)field._thriftId, field);
13598
          byName.put(field.getFieldName(), field);
13599
        }
13600
      }
13601
 
13602
      /**
13603
       * Find the _Fields constant that matches fieldId, or null if its not found.
13604
       */
13605
      public static _Fields findByThriftId(int fieldId) {
13606
        return byId.get(fieldId);
13607
      }
13608
 
13609
      /**
13610
       * Find the _Fields constant that matches fieldId, throwing an exception
13611
       * if it is not found.
13612
       */
13613
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13614
        _Fields fields = findByThriftId(fieldId);
13615
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13616
        return fields;
13617
      }
13618
 
13619
      /**
13620
       * Find the _Fields constant that matches name, or null if its not found.
13621
       */
13622
      public static _Fields findByName(String name) {
13623
        return byName.get(name);
13624
      }
13625
 
13626
      private final short _thriftId;
13627
      private final String _fieldName;
13628
 
13629
      _Fields(short thriftId, String fieldName) {
13630
        _thriftId = thriftId;
13631
        _fieldName = fieldName;
13632
      }
13633
 
13634
      public short getThriftFieldId() {
13635
        return _thriftId;
13636
      }
13637
 
13638
      public String getFieldName() {
13639
        return _fieldName;
13640
      }
13641
    }
13642
 
13643
    // isset id assignments
13644
    private static final int __SUCCESS_ISSET_ID = 0;
13645
    private BitSet __isset_bit_vector = new BitSet(1);
13646
 
13647
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13648
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13649
          new FieldValueMetaData(TType.BOOL)));
13650
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13651
          new FieldValueMetaData(TType.STRUCT)));
13652
    }});
13653
 
13654
    static {
13655
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13656
    }
13657
 
13658
    public addJacketNumber_result() {
13659
    }
13660
 
13661
    public addJacketNumber_result(
13662
      boolean success,
13663
      TransactionServiceException ex)
13664
    {
13665
      this();
13666
      this.success = success;
13667
      setSuccessIsSet(true);
13668
      this.ex = ex;
13669
    }
13670
 
13671
    /**
13672
     * Performs a deep copy on <i>other</i>.
13673
     */
13674
    public addJacketNumber_result(addJacketNumber_result other) {
13675
      __isset_bit_vector.clear();
13676
      __isset_bit_vector.or(other.__isset_bit_vector);
13677
      this.success = other.success;
13678
      if (other.isSetEx()) {
13679
        this.ex = new TransactionServiceException(other.ex);
13680
      }
13681
    }
13682
 
13683
    public addJacketNumber_result deepCopy() {
13684
      return new addJacketNumber_result(this);
13685
    }
13686
 
13687
    @Deprecated
13688
    public addJacketNumber_result clone() {
13689
      return new addJacketNumber_result(this);
13690
    }
13691
 
13692
    public boolean isSuccess() {
13693
      return this.success;
13694
    }
13695
 
13696
    public addJacketNumber_result setSuccess(boolean success) {
13697
      this.success = success;
13698
      setSuccessIsSet(true);
13699
      return this;
13700
    }
13701
 
13702
    public void unsetSuccess() {
13703
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13704
    }
13705
 
13706
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13707
    public boolean isSetSuccess() {
13708
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13709
    }
13710
 
13711
    public void setSuccessIsSet(boolean value) {
13712
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13713
    }
13714
 
13715
    public TransactionServiceException getEx() {
13716
      return this.ex;
13717
    }
13718
 
13719
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13720
      this.ex = ex;
13721
      return this;
13722
    }
13723
 
13724
    public void unsetEx() {
13725
      this.ex = null;
13726
    }
13727
 
13728
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13729
    public boolean isSetEx() {
13730
      return this.ex != null;
13731
    }
13732
 
13733
    public void setExIsSet(boolean value) {
13734
      if (!value) {
13735
        this.ex = null;
13736
      }
13737
    }
13738
 
13739
    public void setFieldValue(_Fields field, Object value) {
13740
      switch (field) {
13741
      case SUCCESS:
13742
        if (value == null) {
13743
          unsetSuccess();
13744
        } else {
13745
          setSuccess((Boolean)value);
13746
        }
13747
        break;
13748
 
13749
      case EX:
13750
        if (value == null) {
13751
          unsetEx();
13752
        } else {
13753
          setEx((TransactionServiceException)value);
13754
        }
13755
        break;
13756
 
13757
      }
13758
    }
13759
 
13760
    public void setFieldValue(int fieldID, Object value) {
13761
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13762
    }
13763
 
13764
    public Object getFieldValue(_Fields field) {
13765
      switch (field) {
13766
      case SUCCESS:
13767
        return new Boolean(isSuccess());
13768
 
13769
      case EX:
13770
        return getEx();
13771
 
13772
      }
13773
      throw new IllegalStateException();
13774
    }
13775
 
13776
    public Object getFieldValue(int fieldId) {
13777
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13778
    }
13779
 
13780
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13781
    public boolean isSet(_Fields field) {
13782
      switch (field) {
13783
      case SUCCESS:
13784
        return isSetSuccess();
13785
      case EX:
13786
        return isSetEx();
13787
      }
13788
      throw new IllegalStateException();
13789
    }
13790
 
13791
    public boolean isSet(int fieldID) {
13792
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13793
    }
13794
 
13795
    @Override
13796
    public boolean equals(Object that) {
13797
      if (that == null)
13798
        return false;
13799
      if (that instanceof addJacketNumber_result)
13800
        return this.equals((addJacketNumber_result)that);
13801
      return false;
13802
    }
13803
 
13804
    public boolean equals(addJacketNumber_result that) {
13805
      if (that == null)
13806
        return false;
13807
 
13808
      boolean this_present_success = true;
13809
      boolean that_present_success = true;
13810
      if (this_present_success || that_present_success) {
13811
        if (!(this_present_success && that_present_success))
13812
          return false;
13813
        if (this.success != that.success)
13814
          return false;
13815
      }
13816
 
13817
      boolean this_present_ex = true && this.isSetEx();
13818
      boolean that_present_ex = true && that.isSetEx();
13819
      if (this_present_ex || that_present_ex) {
13820
        if (!(this_present_ex && that_present_ex))
13821
          return false;
13822
        if (!this.ex.equals(that.ex))
13823
          return false;
13824
      }
13825
 
13826
      return true;
13827
    }
13828
 
13829
    @Override
13830
    public int hashCode() {
13831
      return 0;
13832
    }
13833
 
13834
    public int compareTo(addJacketNumber_result other) {
13835
      if (!getClass().equals(other.getClass())) {
13836
        return getClass().getName().compareTo(other.getClass().getName());
13837
      }
13838
 
13839
      int lastComparison = 0;
13840
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
13841
 
13842
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13843
      if (lastComparison != 0) {
13844
        return lastComparison;
13845
      }
13846
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13847
      if (lastComparison != 0) {
13848
        return lastComparison;
13849
      }
13850
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13851
      if (lastComparison != 0) {
13852
        return lastComparison;
13853
      }
13854
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13855
      if (lastComparison != 0) {
13856
        return lastComparison;
13857
      }
13858
      return 0;
13859
    }
13860
 
13861
    public void read(TProtocol iprot) throws TException {
13862
      TField field;
13863
      iprot.readStructBegin();
13864
      while (true)
13865
      {
13866
        field = iprot.readFieldBegin();
13867
        if (field.type == TType.STOP) { 
13868
          break;
13869
        }
13870
        _Fields fieldId = _Fields.findByThriftId(field.id);
13871
        if (fieldId == null) {
13872
          TProtocolUtil.skip(iprot, field.type);
13873
        } else {
13874
          switch (fieldId) {
13875
            case SUCCESS:
13876
              if (field.type == TType.BOOL) {
13877
                this.success = iprot.readBool();
13878
                setSuccessIsSet(true);
13879
              } else { 
13880
                TProtocolUtil.skip(iprot, field.type);
13881
              }
13882
              break;
13883
            case EX:
13884
              if (field.type == TType.STRUCT) {
13885
                this.ex = new TransactionServiceException();
13886
                this.ex.read(iprot);
13887
              } else { 
13888
                TProtocolUtil.skip(iprot, field.type);
13889
              }
13890
              break;
13891
          }
13892
          iprot.readFieldEnd();
13893
        }
13894
      }
13895
      iprot.readStructEnd();
13896
      validate();
13897
    }
13898
 
13899
    public void write(TProtocol oprot) throws TException {
13900
      oprot.writeStructBegin(STRUCT_DESC);
13901
 
13902
      if (this.isSetSuccess()) {
13903
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13904
        oprot.writeBool(this.success);
13905
        oprot.writeFieldEnd();
13906
      } else if (this.isSetEx()) {
13907
        oprot.writeFieldBegin(EX_FIELD_DESC);
13908
        this.ex.write(oprot);
13909
        oprot.writeFieldEnd();
13910
      }
13911
      oprot.writeFieldStop();
13912
      oprot.writeStructEnd();
13913
    }
13914
 
13915
    @Override
13916
    public String toString() {
13917
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
13918
      boolean first = true;
13919
 
13920
      sb.append("success:");
13921
      sb.append(this.success);
13922
      first = false;
13923
      if (!first) sb.append(", ");
13924
      sb.append("ex:");
13925
      if (this.ex == null) {
13926
        sb.append("null");
13927
      } else {
13928
        sb.append(this.ex);
13929
      }
13930
      first = false;
13931
      sb.append(")");
13932
      return sb.toString();
13933
    }
13934
 
13935
    public void validate() throws TException {
13936
      // check for required fields
13937
    }
13938
 
13939
  }
13940
 
923 rajveer 13941
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
13942
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
13943
 
13944
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13945
 
13946
    private long orderId;
13947
 
13948
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13949
    public enum _Fields implements TFieldIdEnum {
13950
      ORDER_ID((short)1, "orderId");
13951
 
13952
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13953
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13954
 
13955
      static {
13956
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13957
          byId.put((int)field._thriftId, field);
13958
          byName.put(field.getFieldName(), field);
13959
        }
13960
      }
13961
 
13962
      /**
13963
       * Find the _Fields constant that matches fieldId, or null if its not found.
13964
       */
13965
      public static _Fields findByThriftId(int fieldId) {
13966
        return byId.get(fieldId);
13967
      }
13968
 
13969
      /**
13970
       * Find the _Fields constant that matches fieldId, throwing an exception
13971
       * if it is not found.
13972
       */
13973
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13974
        _Fields fields = findByThriftId(fieldId);
13975
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13976
        return fields;
13977
      }
13978
 
13979
      /**
13980
       * Find the _Fields constant that matches name, or null if its not found.
13981
       */
13982
      public static _Fields findByName(String name) {
13983
        return byName.get(name);
13984
      }
13985
 
13986
      private final short _thriftId;
13987
      private final String _fieldName;
13988
 
13989
      _Fields(short thriftId, String fieldName) {
13990
        _thriftId = thriftId;
13991
        _fieldName = fieldName;
13992
      }
13993
 
13994
      public short getThriftFieldId() {
13995
        return _thriftId;
13996
      }
13997
 
13998
      public String getFieldName() {
13999
        return _fieldName;
14000
      }
14001
    }
14002
 
14003
    // isset id assignments
14004
    private static final int __ORDERID_ISSET_ID = 0;
14005
    private BitSet __isset_bit_vector = new BitSet(1);
14006
 
14007
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14008
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14009
          new FieldValueMetaData(TType.I64)));
14010
    }});
14011
 
14012
    static {
14013
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
14014
    }
14015
 
14016
    public acceptOrder_args() {
14017
    }
14018
 
14019
    public acceptOrder_args(
14020
      long orderId)
14021
    {
14022
      this();
14023
      this.orderId = orderId;
14024
      setOrderIdIsSet(true);
14025
    }
14026
 
14027
    /**
14028
     * Performs a deep copy on <i>other</i>.
14029
     */
14030
    public acceptOrder_args(acceptOrder_args other) {
14031
      __isset_bit_vector.clear();
14032
      __isset_bit_vector.or(other.__isset_bit_vector);
14033
      this.orderId = other.orderId;
14034
    }
14035
 
14036
    public acceptOrder_args deepCopy() {
14037
      return new acceptOrder_args(this);
14038
    }
14039
 
14040
    @Deprecated
14041
    public acceptOrder_args clone() {
14042
      return new acceptOrder_args(this);
14043
    }
14044
 
14045
    public long getOrderId() {
14046
      return this.orderId;
14047
    }
14048
 
14049
    public acceptOrder_args setOrderId(long orderId) {
14050
      this.orderId = orderId;
14051
      setOrderIdIsSet(true);
14052
      return this;
14053
    }
14054
 
14055
    public void unsetOrderId() {
14056
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14057
    }
14058
 
14059
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14060
    public boolean isSetOrderId() {
14061
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14062
    }
14063
 
14064
    public void setOrderIdIsSet(boolean value) {
14065
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14066
    }
14067
 
14068
    public void setFieldValue(_Fields field, Object value) {
14069
      switch (field) {
14070
      case ORDER_ID:
14071
        if (value == null) {
14072
          unsetOrderId();
14073
        } else {
14074
          setOrderId((Long)value);
14075
        }
14076
        break;
14077
 
14078
      }
14079
    }
14080
 
14081
    public void setFieldValue(int fieldID, Object value) {
14082
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14083
    }
14084
 
14085
    public Object getFieldValue(_Fields field) {
14086
      switch (field) {
14087
      case ORDER_ID:
14088
        return new Long(getOrderId());
14089
 
14090
      }
14091
      throw new IllegalStateException();
14092
    }
14093
 
14094
    public Object getFieldValue(int fieldId) {
14095
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14096
    }
14097
 
14098
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14099
    public boolean isSet(_Fields field) {
14100
      switch (field) {
14101
      case ORDER_ID:
14102
        return isSetOrderId();
14103
      }
14104
      throw new IllegalStateException();
14105
    }
14106
 
14107
    public boolean isSet(int fieldID) {
14108
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14109
    }
14110
 
14111
    @Override
14112
    public boolean equals(Object that) {
14113
      if (that == null)
14114
        return false;
14115
      if (that instanceof acceptOrder_args)
14116
        return this.equals((acceptOrder_args)that);
14117
      return false;
14118
    }
14119
 
14120
    public boolean equals(acceptOrder_args that) {
14121
      if (that == null)
14122
        return false;
14123
 
14124
      boolean this_present_orderId = true;
14125
      boolean that_present_orderId = true;
14126
      if (this_present_orderId || that_present_orderId) {
14127
        if (!(this_present_orderId && that_present_orderId))
14128
          return false;
14129
        if (this.orderId != that.orderId)
14130
          return false;
14131
      }
14132
 
14133
      return true;
14134
    }
14135
 
14136
    @Override
14137
    public int hashCode() {
14138
      return 0;
14139
    }
14140
 
14141
    public int compareTo(acceptOrder_args other) {
14142
      if (!getClass().equals(other.getClass())) {
14143
        return getClass().getName().compareTo(other.getClass().getName());
14144
      }
14145
 
14146
      int lastComparison = 0;
14147
      acceptOrder_args typedOther = (acceptOrder_args)other;
14148
 
14149
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14150
      if (lastComparison != 0) {
14151
        return lastComparison;
14152
      }
14153
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14154
      if (lastComparison != 0) {
14155
        return lastComparison;
14156
      }
14157
      return 0;
14158
    }
14159
 
14160
    public void read(TProtocol iprot) throws TException {
14161
      TField field;
14162
      iprot.readStructBegin();
14163
      while (true)
14164
      {
14165
        field = iprot.readFieldBegin();
14166
        if (field.type == TType.STOP) { 
14167
          break;
14168
        }
14169
        _Fields fieldId = _Fields.findByThriftId(field.id);
14170
        if (fieldId == null) {
14171
          TProtocolUtil.skip(iprot, field.type);
14172
        } else {
14173
          switch (fieldId) {
14174
            case ORDER_ID:
14175
              if (field.type == TType.I64) {
14176
                this.orderId = iprot.readI64();
14177
                setOrderIdIsSet(true);
14178
              } else { 
14179
                TProtocolUtil.skip(iprot, field.type);
14180
              }
14181
              break;
14182
          }
14183
          iprot.readFieldEnd();
14184
        }
14185
      }
14186
      iprot.readStructEnd();
14187
      validate();
14188
    }
14189
 
14190
    public void write(TProtocol oprot) throws TException {
14191
      validate();
14192
 
14193
      oprot.writeStructBegin(STRUCT_DESC);
14194
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14195
      oprot.writeI64(this.orderId);
14196
      oprot.writeFieldEnd();
14197
      oprot.writeFieldStop();
14198
      oprot.writeStructEnd();
14199
    }
14200
 
14201
    @Override
14202
    public String toString() {
14203
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
14204
      boolean first = true;
14205
 
14206
      sb.append("orderId:");
14207
      sb.append(this.orderId);
14208
      first = false;
14209
      sb.append(")");
14210
      return sb.toString();
14211
    }
14212
 
14213
    public void validate() throws TException {
14214
      // check for required fields
14215
    }
14216
 
14217
  }
14218
 
14219
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
14220
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
14221
 
14222
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14223
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14224
 
14225
    private boolean success;
14226
    private TransactionServiceException ex;
14227
 
14228
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14229
    public enum _Fields implements TFieldIdEnum {
14230
      SUCCESS((short)0, "success"),
14231
      EX((short)1, "ex");
14232
 
14233
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14234
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14235
 
14236
      static {
14237
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14238
          byId.put((int)field._thriftId, field);
14239
          byName.put(field.getFieldName(), field);
14240
        }
14241
      }
14242
 
14243
      /**
14244
       * Find the _Fields constant that matches fieldId, or null if its not found.
14245
       */
14246
      public static _Fields findByThriftId(int fieldId) {
14247
        return byId.get(fieldId);
14248
      }
14249
 
14250
      /**
14251
       * Find the _Fields constant that matches fieldId, throwing an exception
14252
       * if it is not found.
14253
       */
14254
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14255
        _Fields fields = findByThriftId(fieldId);
14256
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14257
        return fields;
14258
      }
14259
 
14260
      /**
14261
       * Find the _Fields constant that matches name, or null if its not found.
14262
       */
14263
      public static _Fields findByName(String name) {
14264
        return byName.get(name);
14265
      }
14266
 
14267
      private final short _thriftId;
14268
      private final String _fieldName;
14269
 
14270
      _Fields(short thriftId, String fieldName) {
14271
        _thriftId = thriftId;
14272
        _fieldName = fieldName;
14273
      }
14274
 
14275
      public short getThriftFieldId() {
14276
        return _thriftId;
14277
      }
14278
 
14279
      public String getFieldName() {
14280
        return _fieldName;
14281
      }
14282
    }
14283
 
14284
    // isset id assignments
14285
    private static final int __SUCCESS_ISSET_ID = 0;
14286
    private BitSet __isset_bit_vector = new BitSet(1);
14287
 
14288
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14289
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14290
          new FieldValueMetaData(TType.BOOL)));
14291
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14292
          new FieldValueMetaData(TType.STRUCT)));
14293
    }});
14294
 
14295
    static {
14296
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
14297
    }
14298
 
14299
    public acceptOrder_result() {
14300
    }
14301
 
14302
    public acceptOrder_result(
14303
      boolean success,
14304
      TransactionServiceException ex)
14305
    {
14306
      this();
14307
      this.success = success;
14308
      setSuccessIsSet(true);
14309
      this.ex = ex;
14310
    }
14311
 
14312
    /**
14313
     * Performs a deep copy on <i>other</i>.
14314
     */
14315
    public acceptOrder_result(acceptOrder_result other) {
14316
      __isset_bit_vector.clear();
14317
      __isset_bit_vector.or(other.__isset_bit_vector);
14318
      this.success = other.success;
14319
      if (other.isSetEx()) {
14320
        this.ex = new TransactionServiceException(other.ex);
14321
      }
14322
    }
14323
 
14324
    public acceptOrder_result deepCopy() {
14325
      return new acceptOrder_result(this);
14326
    }
14327
 
14328
    @Deprecated
14329
    public acceptOrder_result clone() {
14330
      return new acceptOrder_result(this);
14331
    }
14332
 
14333
    public boolean isSuccess() {
14334
      return this.success;
14335
    }
14336
 
14337
    public acceptOrder_result setSuccess(boolean success) {
14338
      this.success = success;
14339
      setSuccessIsSet(true);
14340
      return this;
14341
    }
14342
 
14343
    public void unsetSuccess() {
14344
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14345
    }
14346
 
14347
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14348
    public boolean isSetSuccess() {
14349
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14350
    }
14351
 
14352
    public void setSuccessIsSet(boolean value) {
14353
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14354
    }
14355
 
14356
    public TransactionServiceException getEx() {
14357
      return this.ex;
14358
    }
14359
 
14360
    public acceptOrder_result setEx(TransactionServiceException ex) {
14361
      this.ex = ex;
14362
      return this;
14363
    }
14364
 
14365
    public void unsetEx() {
14366
      this.ex = null;
14367
    }
14368
 
14369
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14370
    public boolean isSetEx() {
14371
      return this.ex != null;
14372
    }
14373
 
14374
    public void setExIsSet(boolean value) {
14375
      if (!value) {
14376
        this.ex = null;
14377
      }
14378
    }
14379
 
14380
    public void setFieldValue(_Fields field, Object value) {
14381
      switch (field) {
14382
      case SUCCESS:
14383
        if (value == null) {
14384
          unsetSuccess();
14385
        } else {
14386
          setSuccess((Boolean)value);
14387
        }
14388
        break;
14389
 
14390
      case EX:
14391
        if (value == null) {
14392
          unsetEx();
14393
        } else {
14394
          setEx((TransactionServiceException)value);
14395
        }
14396
        break;
14397
 
14398
      }
14399
    }
14400
 
14401
    public void setFieldValue(int fieldID, Object value) {
14402
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14403
    }
14404
 
14405
    public Object getFieldValue(_Fields field) {
14406
      switch (field) {
14407
      case SUCCESS:
14408
        return new Boolean(isSuccess());
14409
 
14410
      case EX:
14411
        return getEx();
14412
 
14413
      }
14414
      throw new IllegalStateException();
14415
    }
14416
 
14417
    public Object getFieldValue(int fieldId) {
14418
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14419
    }
14420
 
14421
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14422
    public boolean isSet(_Fields field) {
14423
      switch (field) {
14424
      case SUCCESS:
14425
        return isSetSuccess();
14426
      case EX:
14427
        return isSetEx();
14428
      }
14429
      throw new IllegalStateException();
14430
    }
14431
 
14432
    public boolean isSet(int fieldID) {
14433
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14434
    }
14435
 
14436
    @Override
14437
    public boolean equals(Object that) {
14438
      if (that == null)
14439
        return false;
14440
      if (that instanceof acceptOrder_result)
14441
        return this.equals((acceptOrder_result)that);
14442
      return false;
14443
    }
14444
 
14445
    public boolean equals(acceptOrder_result that) {
14446
      if (that == null)
14447
        return false;
14448
 
14449
      boolean this_present_success = true;
14450
      boolean that_present_success = true;
14451
      if (this_present_success || that_present_success) {
14452
        if (!(this_present_success && that_present_success))
14453
          return false;
14454
        if (this.success != that.success)
14455
          return false;
14456
      }
14457
 
14458
      boolean this_present_ex = true && this.isSetEx();
14459
      boolean that_present_ex = true && that.isSetEx();
14460
      if (this_present_ex || that_present_ex) {
14461
        if (!(this_present_ex && that_present_ex))
14462
          return false;
14463
        if (!this.ex.equals(that.ex))
14464
          return false;
14465
      }
14466
 
14467
      return true;
14468
    }
14469
 
14470
    @Override
14471
    public int hashCode() {
14472
      return 0;
14473
    }
14474
 
14475
    public int compareTo(acceptOrder_result other) {
14476
      if (!getClass().equals(other.getClass())) {
14477
        return getClass().getName().compareTo(other.getClass().getName());
14478
      }
14479
 
14480
      int lastComparison = 0;
14481
      acceptOrder_result typedOther = (acceptOrder_result)other;
14482
 
14483
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14484
      if (lastComparison != 0) {
14485
        return lastComparison;
14486
      }
14487
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14488
      if (lastComparison != 0) {
14489
        return lastComparison;
14490
      }
14491
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14492
      if (lastComparison != 0) {
14493
        return lastComparison;
14494
      }
14495
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14496
      if (lastComparison != 0) {
14497
        return lastComparison;
14498
      }
14499
      return 0;
14500
    }
14501
 
14502
    public void read(TProtocol iprot) throws TException {
14503
      TField field;
14504
      iprot.readStructBegin();
14505
      while (true)
14506
      {
14507
        field = iprot.readFieldBegin();
14508
        if (field.type == TType.STOP) { 
14509
          break;
14510
        }
14511
        _Fields fieldId = _Fields.findByThriftId(field.id);
14512
        if (fieldId == null) {
14513
          TProtocolUtil.skip(iprot, field.type);
14514
        } else {
14515
          switch (fieldId) {
14516
            case SUCCESS:
14517
              if (field.type == TType.BOOL) {
14518
                this.success = iprot.readBool();
14519
                setSuccessIsSet(true);
14520
              } else { 
14521
                TProtocolUtil.skip(iprot, field.type);
14522
              }
14523
              break;
14524
            case EX:
14525
              if (field.type == TType.STRUCT) {
14526
                this.ex = new TransactionServiceException();
14527
                this.ex.read(iprot);
14528
              } else { 
14529
                TProtocolUtil.skip(iprot, field.type);
14530
              }
14531
              break;
14532
          }
14533
          iprot.readFieldEnd();
14534
        }
14535
      }
14536
      iprot.readStructEnd();
14537
      validate();
14538
    }
14539
 
14540
    public void write(TProtocol oprot) throws TException {
14541
      oprot.writeStructBegin(STRUCT_DESC);
14542
 
14543
      if (this.isSetSuccess()) {
14544
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14545
        oprot.writeBool(this.success);
14546
        oprot.writeFieldEnd();
14547
      } else if (this.isSetEx()) {
14548
        oprot.writeFieldBegin(EX_FIELD_DESC);
14549
        this.ex.write(oprot);
14550
        oprot.writeFieldEnd();
14551
      }
14552
      oprot.writeFieldStop();
14553
      oprot.writeStructEnd();
14554
    }
14555
 
14556
    @Override
14557
    public String toString() {
14558
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14559
      boolean first = true;
14560
 
14561
      sb.append("success:");
14562
      sb.append(this.success);
14563
      first = false;
14564
      if (!first) sb.append(", ");
14565
      sb.append("ex:");
14566
      if (this.ex == null) {
14567
        sb.append("null");
14568
      } else {
14569
        sb.append(this.ex);
14570
      }
14571
      first = false;
14572
      sb.append(")");
14573
      return sb.toString();
14574
    }
14575
 
14576
    public void validate() throws TException {
14577
      // check for required fields
14578
    }
14579
 
14580
  }
14581
 
14582
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14583
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14584
 
14585
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14586
 
14587
    private long orderId;
14588
 
14589
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14590
    public enum _Fields implements TFieldIdEnum {
14591
      ORDER_ID((short)1, "orderId");
14592
 
14593
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14594
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14595
 
14596
      static {
14597
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14598
          byId.put((int)field._thriftId, field);
14599
          byName.put(field.getFieldName(), field);
14600
        }
14601
      }
14602
 
14603
      /**
14604
       * Find the _Fields constant that matches fieldId, or null if its not found.
14605
       */
14606
      public static _Fields findByThriftId(int fieldId) {
14607
        return byId.get(fieldId);
14608
      }
14609
 
14610
      /**
14611
       * Find the _Fields constant that matches fieldId, throwing an exception
14612
       * if it is not found.
14613
       */
14614
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14615
        _Fields fields = findByThriftId(fieldId);
14616
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14617
        return fields;
14618
      }
14619
 
14620
      /**
14621
       * Find the _Fields constant that matches name, or null if its not found.
14622
       */
14623
      public static _Fields findByName(String name) {
14624
        return byName.get(name);
14625
      }
14626
 
14627
      private final short _thriftId;
14628
      private final String _fieldName;
14629
 
14630
      _Fields(short thriftId, String fieldName) {
14631
        _thriftId = thriftId;
14632
        _fieldName = fieldName;
14633
      }
14634
 
14635
      public short getThriftFieldId() {
14636
        return _thriftId;
14637
      }
14638
 
14639
      public String getFieldName() {
14640
        return _fieldName;
14641
      }
14642
    }
14643
 
14644
    // isset id assignments
14645
    private static final int __ORDERID_ISSET_ID = 0;
14646
    private BitSet __isset_bit_vector = new BitSet(1);
14647
 
14648
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14649
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14650
          new FieldValueMetaData(TType.I64)));
14651
    }});
14652
 
14653
    static {
14654
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14655
    }
14656
 
14657
    public billOrder_args() {
14658
    }
14659
 
14660
    public billOrder_args(
14661
      long orderId)
14662
    {
14663
      this();
14664
      this.orderId = orderId;
14665
      setOrderIdIsSet(true);
14666
    }
14667
 
14668
    /**
14669
     * Performs a deep copy on <i>other</i>.
14670
     */
14671
    public billOrder_args(billOrder_args other) {
14672
      __isset_bit_vector.clear();
14673
      __isset_bit_vector.or(other.__isset_bit_vector);
14674
      this.orderId = other.orderId;
14675
    }
14676
 
14677
    public billOrder_args deepCopy() {
14678
      return new billOrder_args(this);
14679
    }
14680
 
14681
    @Deprecated
14682
    public billOrder_args clone() {
14683
      return new billOrder_args(this);
14684
    }
14685
 
14686
    public long getOrderId() {
14687
      return this.orderId;
14688
    }
14689
 
14690
    public billOrder_args setOrderId(long orderId) {
14691
      this.orderId = orderId;
14692
      setOrderIdIsSet(true);
14693
      return this;
14694
    }
14695
 
14696
    public void unsetOrderId() {
14697
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14698
    }
14699
 
14700
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14701
    public boolean isSetOrderId() {
14702
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14703
    }
14704
 
14705
    public void setOrderIdIsSet(boolean value) {
14706
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14707
    }
14708
 
14709
    public void setFieldValue(_Fields field, Object value) {
14710
      switch (field) {
14711
      case ORDER_ID:
14712
        if (value == null) {
14713
          unsetOrderId();
14714
        } else {
14715
          setOrderId((Long)value);
14716
        }
14717
        break;
14718
 
14719
      }
14720
    }
14721
 
14722
    public void setFieldValue(int fieldID, Object value) {
14723
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14724
    }
14725
 
14726
    public Object getFieldValue(_Fields field) {
14727
      switch (field) {
14728
      case ORDER_ID:
14729
        return new Long(getOrderId());
14730
 
14731
      }
14732
      throw new IllegalStateException();
14733
    }
14734
 
14735
    public Object getFieldValue(int fieldId) {
14736
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14737
    }
14738
 
14739
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14740
    public boolean isSet(_Fields field) {
14741
      switch (field) {
14742
      case ORDER_ID:
14743
        return isSetOrderId();
14744
      }
14745
      throw new IllegalStateException();
14746
    }
14747
 
14748
    public boolean isSet(int fieldID) {
14749
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14750
    }
14751
 
14752
    @Override
14753
    public boolean equals(Object that) {
14754
      if (that == null)
14755
        return false;
14756
      if (that instanceof billOrder_args)
14757
        return this.equals((billOrder_args)that);
14758
      return false;
14759
    }
14760
 
14761
    public boolean equals(billOrder_args that) {
14762
      if (that == null)
14763
        return false;
14764
 
14765
      boolean this_present_orderId = true;
14766
      boolean that_present_orderId = true;
14767
      if (this_present_orderId || that_present_orderId) {
14768
        if (!(this_present_orderId && that_present_orderId))
14769
          return false;
14770
        if (this.orderId != that.orderId)
14771
          return false;
14772
      }
14773
 
14774
      return true;
14775
    }
14776
 
14777
    @Override
14778
    public int hashCode() {
14779
      return 0;
14780
    }
14781
 
14782
    public int compareTo(billOrder_args other) {
14783
      if (!getClass().equals(other.getClass())) {
14784
        return getClass().getName().compareTo(other.getClass().getName());
14785
      }
14786
 
14787
      int lastComparison = 0;
14788
      billOrder_args typedOther = (billOrder_args)other;
14789
 
14790
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14791
      if (lastComparison != 0) {
14792
        return lastComparison;
14793
      }
14794
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14795
      if (lastComparison != 0) {
14796
        return lastComparison;
14797
      }
14798
      return 0;
14799
    }
14800
 
14801
    public void read(TProtocol iprot) throws TException {
14802
      TField field;
14803
      iprot.readStructBegin();
14804
      while (true)
14805
      {
14806
        field = iprot.readFieldBegin();
14807
        if (field.type == TType.STOP) { 
14808
          break;
14809
        }
14810
        _Fields fieldId = _Fields.findByThriftId(field.id);
14811
        if (fieldId == null) {
14812
          TProtocolUtil.skip(iprot, field.type);
14813
        } else {
14814
          switch (fieldId) {
14815
            case ORDER_ID:
14816
              if (field.type == TType.I64) {
14817
                this.orderId = iprot.readI64();
14818
                setOrderIdIsSet(true);
14819
              } else { 
14820
                TProtocolUtil.skip(iprot, field.type);
14821
              }
14822
              break;
14823
          }
14824
          iprot.readFieldEnd();
14825
        }
14826
      }
14827
      iprot.readStructEnd();
14828
      validate();
14829
    }
14830
 
14831
    public void write(TProtocol oprot) throws TException {
14832
      validate();
14833
 
14834
      oprot.writeStructBegin(STRUCT_DESC);
14835
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14836
      oprot.writeI64(this.orderId);
14837
      oprot.writeFieldEnd();
14838
      oprot.writeFieldStop();
14839
      oprot.writeStructEnd();
14840
    }
14841
 
14842
    @Override
14843
    public String toString() {
14844
      StringBuilder sb = new StringBuilder("billOrder_args(");
14845
      boolean first = true;
14846
 
14847
      sb.append("orderId:");
14848
      sb.append(this.orderId);
14849
      first = false;
14850
      sb.append(")");
14851
      return sb.toString();
14852
    }
14853
 
14854
    public void validate() throws TException {
14855
      // check for required fields
14856
    }
14857
 
14858
  }
14859
 
14860
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
14861
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
14862
 
14863
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14864
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14865
 
14866
    private boolean success;
14867
    private TransactionServiceException ex;
14868
 
14869
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14870
    public enum _Fields implements TFieldIdEnum {
14871
      SUCCESS((short)0, "success"),
14872
      EX((short)1, "ex");
14873
 
14874
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14875
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14876
 
14877
      static {
14878
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14879
          byId.put((int)field._thriftId, field);
14880
          byName.put(field.getFieldName(), field);
14881
        }
14882
      }
14883
 
14884
      /**
14885
       * Find the _Fields constant that matches fieldId, or null if its not found.
14886
       */
14887
      public static _Fields findByThriftId(int fieldId) {
14888
        return byId.get(fieldId);
14889
      }
14890
 
14891
      /**
14892
       * Find the _Fields constant that matches fieldId, throwing an exception
14893
       * if it is not found.
14894
       */
14895
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14896
        _Fields fields = findByThriftId(fieldId);
14897
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14898
        return fields;
14899
      }
14900
 
14901
      /**
14902
       * Find the _Fields constant that matches name, or null if its not found.
14903
       */
14904
      public static _Fields findByName(String name) {
14905
        return byName.get(name);
14906
      }
14907
 
14908
      private final short _thriftId;
14909
      private final String _fieldName;
14910
 
14911
      _Fields(short thriftId, String fieldName) {
14912
        _thriftId = thriftId;
14913
        _fieldName = fieldName;
14914
      }
14915
 
14916
      public short getThriftFieldId() {
14917
        return _thriftId;
14918
      }
14919
 
14920
      public String getFieldName() {
14921
        return _fieldName;
14922
      }
14923
    }
14924
 
14925
    // isset id assignments
14926
    private static final int __SUCCESS_ISSET_ID = 0;
14927
    private BitSet __isset_bit_vector = new BitSet(1);
14928
 
14929
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14930
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14931
          new FieldValueMetaData(TType.BOOL)));
14932
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14933
          new FieldValueMetaData(TType.STRUCT)));
14934
    }});
14935
 
14936
    static {
14937
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
14938
    }
14939
 
14940
    public billOrder_result() {
14941
    }
14942
 
14943
    public billOrder_result(
14944
      boolean success,
14945
      TransactionServiceException ex)
14946
    {
14947
      this();
14948
      this.success = success;
14949
      setSuccessIsSet(true);
14950
      this.ex = ex;
14951
    }
14952
 
14953
    /**
14954
     * Performs a deep copy on <i>other</i>.
14955
     */
14956
    public billOrder_result(billOrder_result other) {
14957
      __isset_bit_vector.clear();
14958
      __isset_bit_vector.or(other.__isset_bit_vector);
14959
      this.success = other.success;
14960
      if (other.isSetEx()) {
14961
        this.ex = new TransactionServiceException(other.ex);
14962
      }
14963
    }
14964
 
14965
    public billOrder_result deepCopy() {
14966
      return new billOrder_result(this);
14967
    }
14968
 
14969
    @Deprecated
14970
    public billOrder_result clone() {
14971
      return new billOrder_result(this);
14972
    }
14973
 
14974
    public boolean isSuccess() {
14975
      return this.success;
14976
    }
14977
 
14978
    public billOrder_result setSuccess(boolean success) {
14979
      this.success = success;
14980
      setSuccessIsSet(true);
14981
      return this;
14982
    }
14983
 
14984
    public void unsetSuccess() {
14985
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14986
    }
14987
 
14988
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14989
    public boolean isSetSuccess() {
14990
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14991
    }
14992
 
14993
    public void setSuccessIsSet(boolean value) {
14994
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14995
    }
14996
 
14997
    public TransactionServiceException getEx() {
14998
      return this.ex;
14999
    }
15000
 
15001
    public billOrder_result setEx(TransactionServiceException ex) {
15002
      this.ex = ex;
15003
      return this;
15004
    }
15005
 
15006
    public void unsetEx() {
15007
      this.ex = null;
15008
    }
15009
 
15010
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15011
    public boolean isSetEx() {
15012
      return this.ex != null;
15013
    }
15014
 
15015
    public void setExIsSet(boolean value) {
15016
      if (!value) {
15017
        this.ex = null;
15018
      }
15019
    }
15020
 
15021
    public void setFieldValue(_Fields field, Object value) {
15022
      switch (field) {
15023
      case SUCCESS:
15024
        if (value == null) {
15025
          unsetSuccess();
15026
        } else {
15027
          setSuccess((Boolean)value);
15028
        }
15029
        break;
15030
 
15031
      case EX:
15032
        if (value == null) {
15033
          unsetEx();
15034
        } else {
15035
          setEx((TransactionServiceException)value);
15036
        }
15037
        break;
15038
 
15039
      }
15040
    }
15041
 
15042
    public void setFieldValue(int fieldID, Object value) {
15043
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15044
    }
15045
 
15046
    public Object getFieldValue(_Fields field) {
15047
      switch (field) {
15048
      case SUCCESS:
15049
        return new Boolean(isSuccess());
15050
 
15051
      case EX:
15052
        return getEx();
15053
 
15054
      }
15055
      throw new IllegalStateException();
15056
    }
15057
 
15058
    public Object getFieldValue(int fieldId) {
15059
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15060
    }
15061
 
15062
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15063
    public boolean isSet(_Fields field) {
15064
      switch (field) {
15065
      case SUCCESS:
15066
        return isSetSuccess();
15067
      case EX:
15068
        return isSetEx();
15069
      }
15070
      throw new IllegalStateException();
15071
    }
15072
 
15073
    public boolean isSet(int fieldID) {
15074
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15075
    }
15076
 
15077
    @Override
15078
    public boolean equals(Object that) {
15079
      if (that == null)
15080
        return false;
15081
      if (that instanceof billOrder_result)
15082
        return this.equals((billOrder_result)that);
15083
      return false;
15084
    }
15085
 
15086
    public boolean equals(billOrder_result that) {
15087
      if (that == null)
15088
        return false;
15089
 
15090
      boolean this_present_success = true;
15091
      boolean that_present_success = true;
15092
      if (this_present_success || that_present_success) {
15093
        if (!(this_present_success && that_present_success))
15094
          return false;
15095
        if (this.success != that.success)
15096
          return false;
15097
      }
15098
 
15099
      boolean this_present_ex = true && this.isSetEx();
15100
      boolean that_present_ex = true && that.isSetEx();
15101
      if (this_present_ex || that_present_ex) {
15102
        if (!(this_present_ex && that_present_ex))
15103
          return false;
15104
        if (!this.ex.equals(that.ex))
15105
          return false;
15106
      }
15107
 
15108
      return true;
15109
    }
15110
 
15111
    @Override
15112
    public int hashCode() {
15113
      return 0;
15114
    }
15115
 
15116
    public int compareTo(billOrder_result other) {
15117
      if (!getClass().equals(other.getClass())) {
15118
        return getClass().getName().compareTo(other.getClass().getName());
15119
      }
15120
 
15121
      int lastComparison = 0;
15122
      billOrder_result typedOther = (billOrder_result)other;
15123
 
15124
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15125
      if (lastComparison != 0) {
15126
        return lastComparison;
15127
      }
15128
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15129
      if (lastComparison != 0) {
15130
        return lastComparison;
15131
      }
15132
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15133
      if (lastComparison != 0) {
15134
        return lastComparison;
15135
      }
15136
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15137
      if (lastComparison != 0) {
15138
        return lastComparison;
15139
      }
15140
      return 0;
15141
    }
15142
 
15143
    public void read(TProtocol iprot) throws TException {
15144
      TField field;
15145
      iprot.readStructBegin();
15146
      while (true)
15147
      {
15148
        field = iprot.readFieldBegin();
15149
        if (field.type == TType.STOP) { 
15150
          break;
15151
        }
15152
        _Fields fieldId = _Fields.findByThriftId(field.id);
15153
        if (fieldId == null) {
15154
          TProtocolUtil.skip(iprot, field.type);
15155
        } else {
15156
          switch (fieldId) {
15157
            case SUCCESS:
15158
              if (field.type == TType.BOOL) {
15159
                this.success = iprot.readBool();
15160
                setSuccessIsSet(true);
15161
              } else { 
15162
                TProtocolUtil.skip(iprot, field.type);
15163
              }
15164
              break;
15165
            case EX:
15166
              if (field.type == TType.STRUCT) {
15167
                this.ex = new TransactionServiceException();
15168
                this.ex.read(iprot);
15169
              } else { 
15170
                TProtocolUtil.skip(iprot, field.type);
15171
              }
15172
              break;
15173
          }
15174
          iprot.readFieldEnd();
15175
        }
15176
      }
15177
      iprot.readStructEnd();
15178
      validate();
15179
    }
15180
 
15181
    public void write(TProtocol oprot) throws TException {
15182
      oprot.writeStructBegin(STRUCT_DESC);
15183
 
15184
      if (this.isSetSuccess()) {
15185
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15186
        oprot.writeBool(this.success);
15187
        oprot.writeFieldEnd();
15188
      } else if (this.isSetEx()) {
15189
        oprot.writeFieldBegin(EX_FIELD_DESC);
15190
        this.ex.write(oprot);
15191
        oprot.writeFieldEnd();
15192
      }
15193
      oprot.writeFieldStop();
15194
      oprot.writeStructEnd();
15195
    }
15196
 
15197
    @Override
15198
    public String toString() {
15199
      StringBuilder sb = new StringBuilder("billOrder_result(");
15200
      boolean first = true;
15201
 
15202
      sb.append("success:");
15203
      sb.append(this.success);
15204
      first = false;
15205
      if (!first) sb.append(", ");
15206
      sb.append("ex:");
15207
      if (this.ex == null) {
15208
        sb.append("null");
15209
      } else {
15210
        sb.append(this.ex);
15211
      }
15212
      first = false;
15213
      sb.append(")");
15214
      return sb.toString();
15215
    }
15216
 
15217
    public void validate() throws TException {
15218
      // check for required fields
15219
    }
15220
 
15221
  }
15222
 
483 rajveer 15223
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
15224
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 15225
 
15226
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 15227
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 15228
 
15229
    private long transactionId;
1529 ankur.sing 15230
    private long customerId;
68 ashish 15231
 
15232
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15233
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 15234
      TRANSACTION_ID((short)1, "transactionId"),
15235
      CUSTOMER_ID((short)2, "customerId");
68 ashish 15236
 
15237
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15238
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15239
 
15240
      static {
15241
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15242
          byId.put((int)field._thriftId, field);
15243
          byName.put(field.getFieldName(), field);
15244
        }
15245
      }
15246
 
15247
      /**
15248
       * Find the _Fields constant that matches fieldId, or null if its not found.
15249
       */
15250
      public static _Fields findByThriftId(int fieldId) {
15251
        return byId.get(fieldId);
15252
      }
15253
 
15254
      /**
15255
       * Find the _Fields constant that matches fieldId, throwing an exception
15256
       * if it is not found.
15257
       */
15258
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15259
        _Fields fields = findByThriftId(fieldId);
15260
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15261
        return fields;
15262
      }
15263
 
15264
      /**
15265
       * Find the _Fields constant that matches name, or null if its not found.
15266
       */
15267
      public static _Fields findByName(String name) {
15268
        return byName.get(name);
15269
      }
15270
 
15271
      private final short _thriftId;
15272
      private final String _fieldName;
15273
 
15274
      _Fields(short thriftId, String fieldName) {
15275
        _thriftId = thriftId;
15276
        _fieldName = fieldName;
15277
      }
15278
 
15279
      public short getThriftFieldId() {
15280
        return _thriftId;
15281
      }
15282
 
15283
      public String getFieldName() {
15284
        return _fieldName;
15285
      }
15286
    }
15287
 
15288
    // isset id assignments
15289
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 15290
    private static final int __CUSTOMERID_ISSET_ID = 1;
15291
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 15292
 
15293
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15294
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15295
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 15296
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
15297
          new FieldValueMetaData(TType.I64)));
68 ashish 15298
    }});
15299
 
15300
    static {
483 rajveer 15301
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 15302
    }
15303
 
483 rajveer 15304
    public getOrdersForTransaction_args() {
68 ashish 15305
    }
15306
 
483 rajveer 15307
    public getOrdersForTransaction_args(
1529 ankur.sing 15308
      long transactionId,
15309
      long customerId)
68 ashish 15310
    {
15311
      this();
15312
      this.transactionId = transactionId;
15313
      setTransactionIdIsSet(true);
1529 ankur.sing 15314
      this.customerId = customerId;
15315
      setCustomerIdIsSet(true);
68 ashish 15316
    }
15317
 
15318
    /**
15319
     * Performs a deep copy on <i>other</i>.
15320
     */
483 rajveer 15321
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 15322
      __isset_bit_vector.clear();
15323
      __isset_bit_vector.or(other.__isset_bit_vector);
15324
      this.transactionId = other.transactionId;
1529 ankur.sing 15325
      this.customerId = other.customerId;
68 ashish 15326
    }
15327
 
483 rajveer 15328
    public getOrdersForTransaction_args deepCopy() {
15329
      return new getOrdersForTransaction_args(this);
68 ashish 15330
    }
15331
 
15332
    @Deprecated
483 rajveer 15333
    public getOrdersForTransaction_args clone() {
15334
      return new getOrdersForTransaction_args(this);
68 ashish 15335
    }
15336
 
15337
    public long getTransactionId() {
15338
      return this.transactionId;
15339
    }
15340
 
483 rajveer 15341
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 15342
      this.transactionId = transactionId;
15343
      setTransactionIdIsSet(true);
15344
      return this;
15345
    }
15346
 
15347
    public void unsetTransactionId() {
15348
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15349
    }
15350
 
15351
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15352
    public boolean isSetTransactionId() {
15353
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15354
    }
15355
 
15356
    public void setTransactionIdIsSet(boolean value) {
15357
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15358
    }
15359
 
1529 ankur.sing 15360
    public long getCustomerId() {
15361
      return this.customerId;
15362
    }
15363
 
15364
    public getOrdersForTransaction_args setCustomerId(long customerId) {
15365
      this.customerId = customerId;
15366
      setCustomerIdIsSet(true);
15367
      return this;
15368
    }
15369
 
15370
    public void unsetCustomerId() {
15371
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
15372
    }
15373
 
15374
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15375
    public boolean isSetCustomerId() {
15376
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
15377
    }
15378
 
15379
    public void setCustomerIdIsSet(boolean value) {
15380
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
15381
    }
15382
 
68 ashish 15383
    public void setFieldValue(_Fields field, Object value) {
15384
      switch (field) {
15385
      case TRANSACTION_ID:
15386
        if (value == null) {
15387
          unsetTransactionId();
15388
        } else {
15389
          setTransactionId((Long)value);
15390
        }
15391
        break;
15392
 
1529 ankur.sing 15393
      case CUSTOMER_ID:
15394
        if (value == null) {
15395
          unsetCustomerId();
15396
        } else {
15397
          setCustomerId((Long)value);
15398
        }
15399
        break;
15400
 
68 ashish 15401
      }
15402
    }
15403
 
15404
    public void setFieldValue(int fieldID, Object value) {
15405
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15406
    }
15407
 
15408
    public Object getFieldValue(_Fields field) {
15409
      switch (field) {
15410
      case TRANSACTION_ID:
15411
        return new Long(getTransactionId());
15412
 
1529 ankur.sing 15413
      case CUSTOMER_ID:
15414
        return new Long(getCustomerId());
15415
 
68 ashish 15416
      }
15417
      throw new IllegalStateException();
15418
    }
15419
 
15420
    public Object getFieldValue(int fieldId) {
15421
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15422
    }
15423
 
15424
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15425
    public boolean isSet(_Fields field) {
15426
      switch (field) {
15427
      case TRANSACTION_ID:
15428
        return isSetTransactionId();
1529 ankur.sing 15429
      case CUSTOMER_ID:
15430
        return isSetCustomerId();
68 ashish 15431
      }
15432
      throw new IllegalStateException();
15433
    }
15434
 
15435
    public boolean isSet(int fieldID) {
15436
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15437
    }
15438
 
15439
    @Override
15440
    public boolean equals(Object that) {
15441
      if (that == null)
15442
        return false;
483 rajveer 15443
      if (that instanceof getOrdersForTransaction_args)
15444
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 15445
      return false;
15446
    }
15447
 
483 rajveer 15448
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 15449
      if (that == null)
15450
        return false;
15451
 
15452
      boolean this_present_transactionId = true;
15453
      boolean that_present_transactionId = true;
15454
      if (this_present_transactionId || that_present_transactionId) {
15455
        if (!(this_present_transactionId && that_present_transactionId))
15456
          return false;
15457
        if (this.transactionId != that.transactionId)
15458
          return false;
15459
      }
15460
 
1529 ankur.sing 15461
      boolean this_present_customerId = true;
15462
      boolean that_present_customerId = true;
15463
      if (this_present_customerId || that_present_customerId) {
15464
        if (!(this_present_customerId && that_present_customerId))
15465
          return false;
15466
        if (this.customerId != that.customerId)
15467
          return false;
15468
      }
15469
 
68 ashish 15470
      return true;
15471
    }
15472
 
15473
    @Override
15474
    public int hashCode() {
15475
      return 0;
15476
    }
15477
 
483 rajveer 15478
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 15479
      if (!getClass().equals(other.getClass())) {
15480
        return getClass().getName().compareTo(other.getClass().getName());
15481
      }
15482
 
15483
      int lastComparison = 0;
483 rajveer 15484
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 15485
 
15486
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15487
      if (lastComparison != 0) {
15488
        return lastComparison;
15489
      }
15490
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15491
      if (lastComparison != 0) {
15492
        return lastComparison;
15493
      }
1529 ankur.sing 15494
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
15495
      if (lastComparison != 0) {
15496
        return lastComparison;
15497
      }
15498
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
15499
      if (lastComparison != 0) {
15500
        return lastComparison;
15501
      }
68 ashish 15502
      return 0;
15503
    }
15504
 
15505
    public void read(TProtocol iprot) throws TException {
15506
      TField field;
15507
      iprot.readStructBegin();
15508
      while (true)
15509
      {
15510
        field = iprot.readFieldBegin();
15511
        if (field.type == TType.STOP) { 
15512
          break;
15513
        }
15514
        _Fields fieldId = _Fields.findByThriftId(field.id);
15515
        if (fieldId == null) {
15516
          TProtocolUtil.skip(iprot, field.type);
15517
        } else {
15518
          switch (fieldId) {
15519
            case TRANSACTION_ID:
15520
              if (field.type == TType.I64) {
15521
                this.transactionId = iprot.readI64();
15522
                setTransactionIdIsSet(true);
15523
              } else { 
15524
                TProtocolUtil.skip(iprot, field.type);
15525
              }
15526
              break;
1529 ankur.sing 15527
            case CUSTOMER_ID:
15528
              if (field.type == TType.I64) {
15529
                this.customerId = iprot.readI64();
15530
                setCustomerIdIsSet(true);
15531
              } else { 
15532
                TProtocolUtil.skip(iprot, field.type);
15533
              }
15534
              break;
68 ashish 15535
          }
15536
          iprot.readFieldEnd();
15537
        }
15538
      }
15539
      iprot.readStructEnd();
15540
      validate();
15541
    }
15542
 
15543
    public void write(TProtocol oprot) throws TException {
15544
      validate();
15545
 
15546
      oprot.writeStructBegin(STRUCT_DESC);
15547
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15548
      oprot.writeI64(this.transactionId);
15549
      oprot.writeFieldEnd();
1529 ankur.sing 15550
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15551
      oprot.writeI64(this.customerId);
15552
      oprot.writeFieldEnd();
68 ashish 15553
      oprot.writeFieldStop();
15554
      oprot.writeStructEnd();
15555
    }
15556
 
15557
    @Override
15558
    public String toString() {
483 rajveer 15559
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15560
      boolean first = true;
15561
 
15562
      sb.append("transactionId:");
15563
      sb.append(this.transactionId);
15564
      first = false;
1529 ankur.sing 15565
      if (!first) sb.append(", ");
15566
      sb.append("customerId:");
15567
      sb.append(this.customerId);
15568
      first = false;
68 ashish 15569
      sb.append(")");
15570
      return sb.toString();
15571
    }
15572
 
15573
    public void validate() throws TException {
15574
      // check for required fields
15575
    }
15576
 
15577
  }
15578
 
483 rajveer 15579
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15580
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15581
 
483 rajveer 15582
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15583
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15584
 
483 rajveer 15585
    private List<Order> success;
68 ashish 15586
    private TransactionServiceException ex;
15587
 
15588
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15589
    public enum _Fields implements TFieldIdEnum {
15590
      SUCCESS((short)0, "success"),
15591
      EX((short)1, "ex");
15592
 
15593
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15594
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15595
 
15596
      static {
15597
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15598
          byId.put((int)field._thriftId, field);
15599
          byName.put(field.getFieldName(), field);
15600
        }
15601
      }
15602
 
15603
      /**
15604
       * Find the _Fields constant that matches fieldId, or null if its not found.
15605
       */
15606
      public static _Fields findByThriftId(int fieldId) {
15607
        return byId.get(fieldId);
15608
      }
15609
 
15610
      /**
15611
       * Find the _Fields constant that matches fieldId, throwing an exception
15612
       * if it is not found.
15613
       */
15614
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15615
        _Fields fields = findByThriftId(fieldId);
15616
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15617
        return fields;
15618
      }
15619
 
15620
      /**
15621
       * Find the _Fields constant that matches name, or null if its not found.
15622
       */
15623
      public static _Fields findByName(String name) {
15624
        return byName.get(name);
15625
      }
15626
 
15627
      private final short _thriftId;
15628
      private final String _fieldName;
15629
 
15630
      _Fields(short thriftId, String fieldName) {
15631
        _thriftId = thriftId;
15632
        _fieldName = fieldName;
15633
      }
15634
 
15635
      public short getThriftFieldId() {
15636
        return _thriftId;
15637
      }
15638
 
15639
      public String getFieldName() {
15640
        return _fieldName;
15641
      }
15642
    }
15643
 
15644
    // isset id assignments
15645
 
15646
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15647
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15648
          new ListMetaData(TType.LIST, 
15649
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15650
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15651
          new FieldValueMetaData(TType.STRUCT)));
15652
    }});
15653
 
15654
    static {
483 rajveer 15655
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15656
    }
15657
 
483 rajveer 15658
    public getOrdersForTransaction_result() {
68 ashish 15659
    }
15660
 
483 rajveer 15661
    public getOrdersForTransaction_result(
15662
      List<Order> success,
68 ashish 15663
      TransactionServiceException ex)
15664
    {
15665
      this();
15666
      this.success = success;
15667
      this.ex = ex;
15668
    }
15669
 
15670
    /**
15671
     * Performs a deep copy on <i>other</i>.
15672
     */
483 rajveer 15673
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15674
      if (other.isSetSuccess()) {
15675
        List<Order> __this__success = new ArrayList<Order>();
15676
        for (Order other_element : other.success) {
15677
          __this__success.add(new Order(other_element));
15678
        }
15679
        this.success = __this__success;
15680
      }
68 ashish 15681
      if (other.isSetEx()) {
15682
        this.ex = new TransactionServiceException(other.ex);
15683
      }
15684
    }
15685
 
483 rajveer 15686
    public getOrdersForTransaction_result deepCopy() {
15687
      return new getOrdersForTransaction_result(this);
68 ashish 15688
    }
15689
 
15690
    @Deprecated
483 rajveer 15691
    public getOrdersForTransaction_result clone() {
15692
      return new getOrdersForTransaction_result(this);
68 ashish 15693
    }
15694
 
483 rajveer 15695
    public int getSuccessSize() {
15696
      return (this.success == null) ? 0 : this.success.size();
15697
    }
15698
 
15699
    public java.util.Iterator<Order> getSuccessIterator() {
15700
      return (this.success == null) ? null : this.success.iterator();
15701
    }
15702
 
15703
    public void addToSuccess(Order elem) {
15704
      if (this.success == null) {
15705
        this.success = new ArrayList<Order>();
15706
      }
15707
      this.success.add(elem);
15708
    }
15709
 
15710
    public List<Order> getSuccess() {
68 ashish 15711
      return this.success;
15712
    }
15713
 
483 rajveer 15714
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15715
      this.success = success;
15716
      return this;
15717
    }
15718
 
15719
    public void unsetSuccess() {
483 rajveer 15720
      this.success = null;
68 ashish 15721
    }
15722
 
15723
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15724
    public boolean isSetSuccess() {
483 rajveer 15725
      return this.success != null;
68 ashish 15726
    }
15727
 
15728
    public void setSuccessIsSet(boolean value) {
483 rajveer 15729
      if (!value) {
15730
        this.success = null;
15731
      }
68 ashish 15732
    }
15733
 
15734
    public TransactionServiceException getEx() {
15735
      return this.ex;
15736
    }
15737
 
483 rajveer 15738
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15739
      this.ex = ex;
15740
      return this;
15741
    }
15742
 
15743
    public void unsetEx() {
15744
      this.ex = null;
15745
    }
15746
 
15747
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15748
    public boolean isSetEx() {
15749
      return this.ex != null;
15750
    }
15751
 
15752
    public void setExIsSet(boolean value) {
15753
      if (!value) {
15754
        this.ex = null;
15755
      }
15756
    }
15757
 
15758
    public void setFieldValue(_Fields field, Object value) {
15759
      switch (field) {
15760
      case SUCCESS:
15761
        if (value == null) {
15762
          unsetSuccess();
15763
        } else {
483 rajveer 15764
          setSuccess((List<Order>)value);
68 ashish 15765
        }
15766
        break;
15767
 
15768
      case EX:
15769
        if (value == null) {
15770
          unsetEx();
15771
        } else {
15772
          setEx((TransactionServiceException)value);
15773
        }
15774
        break;
15775
 
15776
      }
15777
    }
15778
 
15779
    public void setFieldValue(int fieldID, Object value) {
15780
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15781
    }
15782
 
15783
    public Object getFieldValue(_Fields field) {
15784
      switch (field) {
15785
      case SUCCESS:
483 rajveer 15786
        return getSuccess();
68 ashish 15787
 
15788
      case EX:
15789
        return getEx();
15790
 
15791
      }
15792
      throw new IllegalStateException();
15793
    }
15794
 
15795
    public Object getFieldValue(int fieldId) {
15796
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15797
    }
15798
 
15799
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15800
    public boolean isSet(_Fields field) {
15801
      switch (field) {
15802
      case SUCCESS:
15803
        return isSetSuccess();
15804
      case EX:
15805
        return isSetEx();
15806
      }
15807
      throw new IllegalStateException();
15808
    }
15809
 
15810
    public boolean isSet(int fieldID) {
15811
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15812
    }
15813
 
15814
    @Override
15815
    public boolean equals(Object that) {
15816
      if (that == null)
15817
        return false;
483 rajveer 15818
      if (that instanceof getOrdersForTransaction_result)
15819
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 15820
      return false;
15821
    }
15822
 
483 rajveer 15823
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 15824
      if (that == null)
15825
        return false;
15826
 
483 rajveer 15827
      boolean this_present_success = true && this.isSetSuccess();
15828
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15829
      if (this_present_success || that_present_success) {
15830
        if (!(this_present_success && that_present_success))
15831
          return false;
483 rajveer 15832
        if (!this.success.equals(that.success))
68 ashish 15833
          return false;
15834
      }
15835
 
15836
      boolean this_present_ex = true && this.isSetEx();
15837
      boolean that_present_ex = true && that.isSetEx();
15838
      if (this_present_ex || that_present_ex) {
15839
        if (!(this_present_ex && that_present_ex))
15840
          return false;
15841
        if (!this.ex.equals(that.ex))
15842
          return false;
15843
      }
15844
 
15845
      return true;
15846
    }
15847
 
15848
    @Override
15849
    public int hashCode() {
15850
      return 0;
15851
    }
15852
 
483 rajveer 15853
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 15854
      if (!getClass().equals(other.getClass())) {
15855
        return getClass().getName().compareTo(other.getClass().getName());
15856
      }
15857
 
15858
      int lastComparison = 0;
483 rajveer 15859
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 15860
 
15861
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15862
      if (lastComparison != 0) {
15863
        return lastComparison;
15864
      }
15865
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15866
      if (lastComparison != 0) {
15867
        return lastComparison;
15868
      }
15869
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15870
      if (lastComparison != 0) {
15871
        return lastComparison;
15872
      }
15873
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15874
      if (lastComparison != 0) {
15875
        return lastComparison;
15876
      }
15877
      return 0;
15878
    }
15879
 
15880
    public void read(TProtocol iprot) throws TException {
15881
      TField field;
15882
      iprot.readStructBegin();
15883
      while (true)
15884
      {
15885
        field = iprot.readFieldBegin();
15886
        if (field.type == TType.STOP) { 
15887
          break;
15888
        }
15889
        _Fields fieldId = _Fields.findByThriftId(field.id);
15890
        if (fieldId == null) {
15891
          TProtocolUtil.skip(iprot, field.type);
15892
        } else {
15893
          switch (fieldId) {
15894
            case SUCCESS:
483 rajveer 15895
              if (field.type == TType.LIST) {
15896
                {
1382 varun.gupt 15897
                  TList _list32 = iprot.readListBegin();
15898
                  this.success = new ArrayList<Order>(_list32.size);
15899
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15900
                  {
1382 varun.gupt 15901
                    Order _elem34;
15902
                    _elem34 = new Order();
15903
                    _elem34.read(iprot);
15904
                    this.success.add(_elem34);
483 rajveer 15905
                  }
15906
                  iprot.readListEnd();
15907
                }
68 ashish 15908
              } else { 
15909
                TProtocolUtil.skip(iprot, field.type);
15910
              }
15911
              break;
15912
            case EX:
15913
              if (field.type == TType.STRUCT) {
15914
                this.ex = new TransactionServiceException();
15915
                this.ex.read(iprot);
15916
              } else { 
15917
                TProtocolUtil.skip(iprot, field.type);
15918
              }
15919
              break;
15920
          }
15921
          iprot.readFieldEnd();
15922
        }
15923
      }
15924
      iprot.readStructEnd();
15925
      validate();
15926
    }
15927
 
15928
    public void write(TProtocol oprot) throws TException {
15929
      oprot.writeStructBegin(STRUCT_DESC);
15930
 
15931
      if (this.isSetSuccess()) {
15932
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15933
        {
15934
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 15935
          for (Order _iter35 : this.success)
483 rajveer 15936
          {
1382 varun.gupt 15937
            _iter35.write(oprot);
483 rajveer 15938
          }
15939
          oprot.writeListEnd();
15940
        }
68 ashish 15941
        oprot.writeFieldEnd();
15942
      } else if (this.isSetEx()) {
15943
        oprot.writeFieldBegin(EX_FIELD_DESC);
15944
        this.ex.write(oprot);
15945
        oprot.writeFieldEnd();
15946
      }
15947
      oprot.writeFieldStop();
15948
      oprot.writeStructEnd();
15949
    }
15950
 
15951
    @Override
15952
    public String toString() {
483 rajveer 15953
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 15954
      boolean first = true;
15955
 
15956
      sb.append("success:");
483 rajveer 15957
      if (this.success == null) {
15958
        sb.append("null");
15959
      } else {
15960
        sb.append(this.success);
15961
      }
68 ashish 15962
      first = false;
15963
      if (!first) sb.append(", ");
15964
      sb.append("ex:");
15965
      if (this.ex == null) {
15966
        sb.append("null");
15967
      } else {
15968
        sb.append(this.ex);
15969
      }
15970
      first = false;
15971
      sb.append(")");
15972
      return sb.toString();
15973
    }
15974
 
15975
    public void validate() throws TException {
15976
      // check for required fields
15977
    }
15978
 
15979
  }
15980
 
483 rajveer 15981
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
15982
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 15983
 
483 rajveer 15984
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
15985
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
15986
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
15987
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 15988
 
483 rajveer 15989
    private long customerId;
15990
    private long from_date;
15991
    private long to_date;
15992
    private OrderStatus status;
68 ashish 15993
 
15994
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15995
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15996
      CUSTOMER_ID((short)1, "customerId"),
15997
      FROM_DATE((short)2, "from_date"),
15998
      TO_DATE((short)3, "to_date"),
15999
      /**
16000
       * 
16001
       * @see OrderStatus
16002
       */
16003
      STATUS((short)4, "status");
68 ashish 16004
 
16005
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16006
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16007
 
16008
      static {
16009
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16010
          byId.put((int)field._thriftId, field);
16011
          byName.put(field.getFieldName(), field);
16012
        }
16013
      }
16014
 
16015
      /**
16016
       * Find the _Fields constant that matches fieldId, or null if its not found.
16017
       */
16018
      public static _Fields findByThriftId(int fieldId) {
16019
        return byId.get(fieldId);
16020
      }
16021
 
16022
      /**
16023
       * Find the _Fields constant that matches fieldId, throwing an exception
16024
       * if it is not found.
16025
       */
16026
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16027
        _Fields fields = findByThriftId(fieldId);
16028
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16029
        return fields;
16030
      }
16031
 
16032
      /**
16033
       * Find the _Fields constant that matches name, or null if its not found.
16034
       */
16035
      public static _Fields findByName(String name) {
16036
        return byName.get(name);
16037
      }
16038
 
16039
      private final short _thriftId;
16040
      private final String _fieldName;
16041
 
16042
      _Fields(short thriftId, String fieldName) {
16043
        _thriftId = thriftId;
16044
        _fieldName = fieldName;
16045
      }
16046
 
16047
      public short getThriftFieldId() {
16048
        return _thriftId;
16049
      }
16050
 
16051
      public String getFieldName() {
16052
        return _fieldName;
16053
      }
16054
    }
16055
 
16056
    // isset id assignments
483 rajveer 16057
    private static final int __CUSTOMERID_ISSET_ID = 0;
16058
    private static final int __FROM_DATE_ISSET_ID = 1;
16059
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 16060
    private BitSet __isset_bit_vector = new BitSet(3);
16061
 
16062
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16063
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 16064
          new FieldValueMetaData(TType.I64)));
483 rajveer 16065
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 16066
          new FieldValueMetaData(TType.I64)));
483 rajveer 16067
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 16068
          new FieldValueMetaData(TType.I64)));
483 rajveer 16069
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16070
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 16071
    }});
16072
 
16073
    static {
483 rajveer 16074
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 16075
    }
16076
 
483 rajveer 16077
    public getOrdersForCustomer_args() {
68 ashish 16078
    }
16079
 
483 rajveer 16080
    public getOrdersForCustomer_args(
16081
      long customerId,
16082
      long from_date,
16083
      long to_date,
16084
      OrderStatus status)
68 ashish 16085
    {
16086
      this();
483 rajveer 16087
      this.customerId = customerId;
16088
      setCustomerIdIsSet(true);
16089
      this.from_date = from_date;
16090
      setFrom_dateIsSet(true);
16091
      this.to_date = to_date;
16092
      setTo_dateIsSet(true);
16093
      this.status = status;
68 ashish 16094
    }
16095
 
16096
    /**
16097
     * Performs a deep copy on <i>other</i>.
16098
     */
483 rajveer 16099
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 16100
      __isset_bit_vector.clear();
16101
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 16102
      this.customerId = other.customerId;
16103
      this.from_date = other.from_date;
16104
      this.to_date = other.to_date;
16105
      if (other.isSetStatus()) {
16106
        this.status = other.status;
16107
      }
68 ashish 16108
    }
16109
 
483 rajveer 16110
    public getOrdersForCustomer_args deepCopy() {
16111
      return new getOrdersForCustomer_args(this);
68 ashish 16112
    }
16113
 
16114
    @Deprecated
483 rajveer 16115
    public getOrdersForCustomer_args clone() {
16116
      return new getOrdersForCustomer_args(this);
68 ashish 16117
    }
16118
 
483 rajveer 16119
    public long getCustomerId() {
16120
      return this.customerId;
68 ashish 16121
    }
16122
 
483 rajveer 16123
    public getOrdersForCustomer_args setCustomerId(long customerId) {
16124
      this.customerId = customerId;
16125
      setCustomerIdIsSet(true);
68 ashish 16126
      return this;
16127
    }
16128
 
483 rajveer 16129
    public void unsetCustomerId() {
16130
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 16131
    }
16132
 
483 rajveer 16133
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
16134
    public boolean isSetCustomerId() {
16135
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 16136
    }
16137
 
483 rajveer 16138
    public void setCustomerIdIsSet(boolean value) {
16139
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 16140
    }
16141
 
483 rajveer 16142
    public long getFrom_date() {
16143
      return this.from_date;
68 ashish 16144
    }
16145
 
483 rajveer 16146
    public getOrdersForCustomer_args setFrom_date(long from_date) {
16147
      this.from_date = from_date;
16148
      setFrom_dateIsSet(true);
68 ashish 16149
      return this;
16150
    }
16151
 
483 rajveer 16152
    public void unsetFrom_date() {
16153
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 16154
    }
16155
 
483 rajveer 16156
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
16157
    public boolean isSetFrom_date() {
16158
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 16159
    }
16160
 
483 rajveer 16161
    public void setFrom_dateIsSet(boolean value) {
16162
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 16163
    }
16164
 
483 rajveer 16165
    public long getTo_date() {
16166
      return this.to_date;
68 ashish 16167
    }
16168
 
483 rajveer 16169
    public getOrdersForCustomer_args setTo_date(long to_date) {
16170
      this.to_date = to_date;
16171
      setTo_dateIsSet(true);
68 ashish 16172
      return this;
16173
    }
16174
 
483 rajveer 16175
    public void unsetTo_date() {
16176
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 16177
    }
16178
 
483 rajveer 16179
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
16180
    public boolean isSetTo_date() {
16181
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 16182
    }
16183
 
483 rajveer 16184
    public void setTo_dateIsSet(boolean value) {
16185
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 16186
    }
16187
 
483 rajveer 16188
    /**
16189
     * 
16190
     * @see OrderStatus
16191
     */
16192
    public OrderStatus getStatus() {
16193
      return this.status;
16194
    }
16195
 
16196
    /**
16197
     * 
16198
     * @see OrderStatus
16199
     */
16200
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
16201
      this.status = status;
16202
      return this;
16203
    }
16204
 
16205
    public void unsetStatus() {
16206
      this.status = null;
16207
    }
16208
 
16209
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16210
    public boolean isSetStatus() {
16211
      return this.status != null;
16212
    }
16213
 
16214
    public void setStatusIsSet(boolean value) {
16215
      if (!value) {
16216
        this.status = null;
16217
      }
16218
    }
16219
 
68 ashish 16220
    public void setFieldValue(_Fields field, Object value) {
16221
      switch (field) {
483 rajveer 16222
      case CUSTOMER_ID:
68 ashish 16223
        if (value == null) {
483 rajveer 16224
          unsetCustomerId();
68 ashish 16225
        } else {
483 rajveer 16226
          setCustomerId((Long)value);
68 ashish 16227
        }
16228
        break;
16229
 
483 rajveer 16230
      case FROM_DATE:
68 ashish 16231
        if (value == null) {
483 rajveer 16232
          unsetFrom_date();
68 ashish 16233
        } else {
483 rajveer 16234
          setFrom_date((Long)value);
68 ashish 16235
        }
16236
        break;
16237
 
483 rajveer 16238
      case TO_DATE:
68 ashish 16239
        if (value == null) {
483 rajveer 16240
          unsetTo_date();
68 ashish 16241
        } else {
483 rajveer 16242
          setTo_date((Long)value);
68 ashish 16243
        }
16244
        break;
16245
 
483 rajveer 16246
      case STATUS:
16247
        if (value == null) {
16248
          unsetStatus();
16249
        } else {
16250
          setStatus((OrderStatus)value);
16251
        }
16252
        break;
16253
 
68 ashish 16254
      }
16255
    }
16256
 
16257
    public void setFieldValue(int fieldID, Object value) {
16258
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16259
    }
16260
 
16261
    public Object getFieldValue(_Fields field) {
16262
      switch (field) {
483 rajveer 16263
      case CUSTOMER_ID:
16264
        return new Long(getCustomerId());
68 ashish 16265
 
483 rajveer 16266
      case FROM_DATE:
16267
        return new Long(getFrom_date());
68 ashish 16268
 
483 rajveer 16269
      case TO_DATE:
16270
        return new Long(getTo_date());
68 ashish 16271
 
483 rajveer 16272
      case STATUS:
16273
        return getStatus();
16274
 
68 ashish 16275
      }
16276
      throw new IllegalStateException();
16277
    }
16278
 
16279
    public Object getFieldValue(int fieldId) {
16280
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16281
    }
16282
 
16283
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16284
    public boolean isSet(_Fields field) {
16285
      switch (field) {
483 rajveer 16286
      case CUSTOMER_ID:
16287
        return isSetCustomerId();
16288
      case FROM_DATE:
16289
        return isSetFrom_date();
16290
      case TO_DATE:
16291
        return isSetTo_date();
16292
      case STATUS:
16293
        return isSetStatus();
68 ashish 16294
      }
16295
      throw new IllegalStateException();
16296
    }
16297
 
16298
    public boolean isSet(int fieldID) {
16299
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16300
    }
16301
 
16302
    @Override
16303
    public boolean equals(Object that) {
16304
      if (that == null)
16305
        return false;
483 rajveer 16306
      if (that instanceof getOrdersForCustomer_args)
16307
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 16308
      return false;
16309
    }
16310
 
483 rajveer 16311
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 16312
      if (that == null)
16313
        return false;
16314
 
483 rajveer 16315
      boolean this_present_customerId = true;
16316
      boolean that_present_customerId = true;
16317
      if (this_present_customerId || that_present_customerId) {
16318
        if (!(this_present_customerId && that_present_customerId))
68 ashish 16319
          return false;
483 rajveer 16320
        if (this.customerId != that.customerId)
68 ashish 16321
          return false;
16322
      }
16323
 
483 rajveer 16324
      boolean this_present_from_date = true;
16325
      boolean that_present_from_date = true;
16326
      if (this_present_from_date || that_present_from_date) {
16327
        if (!(this_present_from_date && that_present_from_date))
68 ashish 16328
          return false;
483 rajveer 16329
        if (this.from_date != that.from_date)
68 ashish 16330
          return false;
16331
      }
16332
 
483 rajveer 16333
      boolean this_present_to_date = true;
16334
      boolean that_present_to_date = true;
16335
      if (this_present_to_date || that_present_to_date) {
16336
        if (!(this_present_to_date && that_present_to_date))
68 ashish 16337
          return false;
483 rajveer 16338
        if (this.to_date != that.to_date)
68 ashish 16339
          return false;
16340
      }
16341
 
483 rajveer 16342
      boolean this_present_status = true && this.isSetStatus();
16343
      boolean that_present_status = true && that.isSetStatus();
16344
      if (this_present_status || that_present_status) {
16345
        if (!(this_present_status && that_present_status))
16346
          return false;
16347
        if (!this.status.equals(that.status))
16348
          return false;
16349
      }
16350
 
68 ashish 16351
      return true;
16352
    }
16353
 
16354
    @Override
16355
    public int hashCode() {
16356
      return 0;
16357
    }
16358
 
483 rajveer 16359
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 16360
      if (!getClass().equals(other.getClass())) {
16361
        return getClass().getName().compareTo(other.getClass().getName());
16362
      }
16363
 
16364
      int lastComparison = 0;
483 rajveer 16365
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 16366
 
483 rajveer 16367
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 16368
      if (lastComparison != 0) {
16369
        return lastComparison;
16370
      }
483 rajveer 16371
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 16372
      if (lastComparison != 0) {
16373
        return lastComparison;
16374
      }
483 rajveer 16375
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 16376
      if (lastComparison != 0) {
16377
        return lastComparison;
16378
      }
483 rajveer 16379
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 16380
      if (lastComparison != 0) {
16381
        return lastComparison;
16382
      }
483 rajveer 16383
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 16384
      if (lastComparison != 0) {
16385
        return lastComparison;
16386
      }
483 rajveer 16387
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 16388
      if (lastComparison != 0) {
16389
        return lastComparison;
16390
      }
483 rajveer 16391
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16392
      if (lastComparison != 0) {
16393
        return lastComparison;
16394
      }
16395
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16396
      if (lastComparison != 0) {
16397
        return lastComparison;
16398
      }
68 ashish 16399
      return 0;
16400
    }
16401
 
16402
    public void read(TProtocol iprot) throws TException {
16403
      TField field;
16404
      iprot.readStructBegin();
16405
      while (true)
16406
      {
16407
        field = iprot.readFieldBegin();
16408
        if (field.type == TType.STOP) { 
16409
          break;
16410
        }
16411
        _Fields fieldId = _Fields.findByThriftId(field.id);
16412
        if (fieldId == null) {
16413
          TProtocolUtil.skip(iprot, field.type);
16414
        } else {
16415
          switch (fieldId) {
483 rajveer 16416
            case CUSTOMER_ID:
68 ashish 16417
              if (field.type == TType.I64) {
483 rajveer 16418
                this.customerId = iprot.readI64();
16419
                setCustomerIdIsSet(true);
68 ashish 16420
              } else { 
16421
                TProtocolUtil.skip(iprot, field.type);
16422
              }
16423
              break;
483 rajveer 16424
            case FROM_DATE:
68 ashish 16425
              if (field.type == TType.I64) {
483 rajveer 16426
                this.from_date = iprot.readI64();
16427
                setFrom_dateIsSet(true);
68 ashish 16428
              } else { 
16429
                TProtocolUtil.skip(iprot, field.type);
16430
              }
16431
              break;
483 rajveer 16432
            case TO_DATE:
68 ashish 16433
              if (field.type == TType.I64) {
483 rajveer 16434
                this.to_date = iprot.readI64();
16435
                setTo_dateIsSet(true);
68 ashish 16436
              } else { 
16437
                TProtocolUtil.skip(iprot, field.type);
16438
              }
16439
              break;
483 rajveer 16440
            case STATUS:
16441
              if (field.type == TType.I32) {
16442
                this.status = OrderStatus.findByValue(iprot.readI32());
16443
              } else { 
16444
                TProtocolUtil.skip(iprot, field.type);
16445
              }
16446
              break;
68 ashish 16447
          }
16448
          iprot.readFieldEnd();
16449
        }
16450
      }
16451
      iprot.readStructEnd();
16452
      validate();
16453
    }
16454
 
16455
    public void write(TProtocol oprot) throws TException {
16456
      validate();
16457
 
16458
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16459
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16460
      oprot.writeI64(this.customerId);
68 ashish 16461
      oprot.writeFieldEnd();
483 rajveer 16462
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
16463
      oprot.writeI64(this.from_date);
68 ashish 16464
      oprot.writeFieldEnd();
483 rajveer 16465
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
16466
      oprot.writeI64(this.to_date);
68 ashish 16467
      oprot.writeFieldEnd();
483 rajveer 16468
      if (this.status != null) {
16469
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16470
        oprot.writeI32(this.status.getValue());
16471
        oprot.writeFieldEnd();
16472
      }
68 ashish 16473
      oprot.writeFieldStop();
16474
      oprot.writeStructEnd();
16475
    }
16476
 
16477
    @Override
16478
    public String toString() {
483 rajveer 16479
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 16480
      boolean first = true;
16481
 
483 rajveer 16482
      sb.append("customerId:");
16483
      sb.append(this.customerId);
68 ashish 16484
      first = false;
16485
      if (!first) sb.append(", ");
483 rajveer 16486
      sb.append("from_date:");
16487
      sb.append(this.from_date);
68 ashish 16488
      first = false;
16489
      if (!first) sb.append(", ");
483 rajveer 16490
      sb.append("to_date:");
16491
      sb.append(this.to_date);
68 ashish 16492
      first = false;
483 rajveer 16493
      if (!first) sb.append(", ");
16494
      sb.append("status:");
16495
      if (this.status == null) {
16496
        sb.append("null");
16497
      } else {
16498
        String status_name = status.name();
16499
        if (status_name != null) {
16500
          sb.append(status_name);
16501
          sb.append(" (");
16502
        }
16503
        sb.append(this.status);
16504
        if (status_name != null) {
16505
          sb.append(")");
16506
        }
16507
      }
16508
      first = false;
68 ashish 16509
      sb.append(")");
16510
      return sb.toString();
16511
    }
16512
 
16513
    public void validate() throws TException {
16514
      // check for required fields
16515
    }
16516
 
16517
  }
16518
 
483 rajveer 16519
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
16520
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 16521
 
483 rajveer 16522
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16523
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16524
 
483 rajveer 16525
    private List<Order> success;
68 ashish 16526
    private TransactionServiceException ex;
16527
 
16528
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16529
    public enum _Fields implements TFieldIdEnum {
16530
      SUCCESS((short)0, "success"),
16531
      EX((short)1, "ex");
16532
 
16533
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16534
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16535
 
16536
      static {
16537
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16538
          byId.put((int)field._thriftId, field);
16539
          byName.put(field.getFieldName(), field);
16540
        }
16541
      }
16542
 
16543
      /**
16544
       * Find the _Fields constant that matches fieldId, or null if its not found.
16545
       */
16546
      public static _Fields findByThriftId(int fieldId) {
16547
        return byId.get(fieldId);
16548
      }
16549
 
16550
      /**
16551
       * Find the _Fields constant that matches fieldId, throwing an exception
16552
       * if it is not found.
16553
       */
16554
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16555
        _Fields fields = findByThriftId(fieldId);
16556
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16557
        return fields;
16558
      }
16559
 
16560
      /**
16561
       * Find the _Fields constant that matches name, or null if its not found.
16562
       */
16563
      public static _Fields findByName(String name) {
16564
        return byName.get(name);
16565
      }
16566
 
16567
      private final short _thriftId;
16568
      private final String _fieldName;
16569
 
16570
      _Fields(short thriftId, String fieldName) {
16571
        _thriftId = thriftId;
16572
        _fieldName = fieldName;
16573
      }
16574
 
16575
      public short getThriftFieldId() {
16576
        return _thriftId;
16577
      }
16578
 
16579
      public String getFieldName() {
16580
        return _fieldName;
16581
      }
16582
    }
16583
 
16584
    // isset id assignments
16585
 
16586
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16587
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16588
          new ListMetaData(TType.LIST, 
16589
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16590
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16591
          new FieldValueMetaData(TType.STRUCT)));
16592
    }});
16593
 
16594
    static {
483 rajveer 16595
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16596
    }
16597
 
483 rajveer 16598
    public getOrdersForCustomer_result() {
68 ashish 16599
    }
16600
 
483 rajveer 16601
    public getOrdersForCustomer_result(
16602
      List<Order> success,
68 ashish 16603
      TransactionServiceException ex)
16604
    {
16605
      this();
16606
      this.success = success;
16607
      this.ex = ex;
16608
    }
16609
 
16610
    /**
16611
     * Performs a deep copy on <i>other</i>.
16612
     */
483 rajveer 16613
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16614
      if (other.isSetSuccess()) {
16615
        List<Order> __this__success = new ArrayList<Order>();
16616
        for (Order other_element : other.success) {
16617
          __this__success.add(new Order(other_element));
16618
        }
16619
        this.success = __this__success;
16620
      }
68 ashish 16621
      if (other.isSetEx()) {
16622
        this.ex = new TransactionServiceException(other.ex);
16623
      }
16624
    }
16625
 
483 rajveer 16626
    public getOrdersForCustomer_result deepCopy() {
16627
      return new getOrdersForCustomer_result(this);
68 ashish 16628
    }
16629
 
16630
    @Deprecated
483 rajveer 16631
    public getOrdersForCustomer_result clone() {
16632
      return new getOrdersForCustomer_result(this);
68 ashish 16633
    }
16634
 
483 rajveer 16635
    public int getSuccessSize() {
16636
      return (this.success == null) ? 0 : this.success.size();
16637
    }
16638
 
16639
    public java.util.Iterator<Order> getSuccessIterator() {
16640
      return (this.success == null) ? null : this.success.iterator();
16641
    }
16642
 
16643
    public void addToSuccess(Order elem) {
16644
      if (this.success == null) {
16645
        this.success = new ArrayList<Order>();
16646
      }
16647
      this.success.add(elem);
16648
    }
16649
 
16650
    public List<Order> getSuccess() {
68 ashish 16651
      return this.success;
16652
    }
16653
 
483 rajveer 16654
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16655
      this.success = success;
16656
      return this;
16657
    }
16658
 
16659
    public void unsetSuccess() {
483 rajveer 16660
      this.success = null;
68 ashish 16661
    }
16662
 
16663
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16664
    public boolean isSetSuccess() {
483 rajveer 16665
      return this.success != null;
68 ashish 16666
    }
16667
 
16668
    public void setSuccessIsSet(boolean value) {
483 rajveer 16669
      if (!value) {
16670
        this.success = null;
16671
      }
68 ashish 16672
    }
16673
 
16674
    public TransactionServiceException getEx() {
16675
      return this.ex;
16676
    }
16677
 
483 rajveer 16678
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16679
      this.ex = ex;
16680
      return this;
16681
    }
16682
 
16683
    public void unsetEx() {
16684
      this.ex = null;
16685
    }
16686
 
16687
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16688
    public boolean isSetEx() {
16689
      return this.ex != null;
16690
    }
16691
 
16692
    public void setExIsSet(boolean value) {
16693
      if (!value) {
16694
        this.ex = null;
16695
      }
16696
    }
16697
 
16698
    public void setFieldValue(_Fields field, Object value) {
16699
      switch (field) {
16700
      case SUCCESS:
16701
        if (value == null) {
16702
          unsetSuccess();
16703
        } else {
483 rajveer 16704
          setSuccess((List<Order>)value);
68 ashish 16705
        }
16706
        break;
16707
 
16708
      case EX:
16709
        if (value == null) {
16710
          unsetEx();
16711
        } else {
16712
          setEx((TransactionServiceException)value);
16713
        }
16714
        break;
16715
 
16716
      }
16717
    }
16718
 
16719
    public void setFieldValue(int fieldID, Object value) {
16720
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16721
    }
16722
 
16723
    public Object getFieldValue(_Fields field) {
16724
      switch (field) {
16725
      case SUCCESS:
483 rajveer 16726
        return getSuccess();
68 ashish 16727
 
16728
      case EX:
16729
        return getEx();
16730
 
16731
      }
16732
      throw new IllegalStateException();
16733
    }
16734
 
16735
    public Object getFieldValue(int fieldId) {
16736
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16737
    }
16738
 
16739
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16740
    public boolean isSet(_Fields field) {
16741
      switch (field) {
16742
      case SUCCESS:
16743
        return isSetSuccess();
16744
      case EX:
16745
        return isSetEx();
16746
      }
16747
      throw new IllegalStateException();
16748
    }
16749
 
16750
    public boolean isSet(int fieldID) {
16751
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16752
    }
16753
 
16754
    @Override
16755
    public boolean equals(Object that) {
16756
      if (that == null)
16757
        return false;
483 rajveer 16758
      if (that instanceof getOrdersForCustomer_result)
16759
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16760
      return false;
16761
    }
16762
 
483 rajveer 16763
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16764
      if (that == null)
16765
        return false;
16766
 
483 rajveer 16767
      boolean this_present_success = true && this.isSetSuccess();
16768
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16769
      if (this_present_success || that_present_success) {
16770
        if (!(this_present_success && that_present_success))
16771
          return false;
483 rajveer 16772
        if (!this.success.equals(that.success))
68 ashish 16773
          return false;
16774
      }
16775
 
16776
      boolean this_present_ex = true && this.isSetEx();
16777
      boolean that_present_ex = true && that.isSetEx();
16778
      if (this_present_ex || that_present_ex) {
16779
        if (!(this_present_ex && that_present_ex))
16780
          return false;
16781
        if (!this.ex.equals(that.ex))
16782
          return false;
16783
      }
16784
 
16785
      return true;
16786
    }
16787
 
16788
    @Override
16789
    public int hashCode() {
16790
      return 0;
16791
    }
16792
 
483 rajveer 16793
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 16794
      if (!getClass().equals(other.getClass())) {
16795
        return getClass().getName().compareTo(other.getClass().getName());
16796
      }
16797
 
16798
      int lastComparison = 0;
483 rajveer 16799
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 16800
 
16801
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16802
      if (lastComparison != 0) {
16803
        return lastComparison;
16804
      }
16805
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16806
      if (lastComparison != 0) {
16807
        return lastComparison;
16808
      }
16809
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16810
      if (lastComparison != 0) {
16811
        return lastComparison;
16812
      }
16813
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16814
      if (lastComparison != 0) {
16815
        return lastComparison;
16816
      }
16817
      return 0;
16818
    }
16819
 
16820
    public void read(TProtocol iprot) throws TException {
16821
      TField field;
16822
      iprot.readStructBegin();
16823
      while (true)
16824
      {
16825
        field = iprot.readFieldBegin();
16826
        if (field.type == TType.STOP) { 
16827
          break;
16828
        }
16829
        _Fields fieldId = _Fields.findByThriftId(field.id);
16830
        if (fieldId == null) {
16831
          TProtocolUtil.skip(iprot, field.type);
16832
        } else {
16833
          switch (fieldId) {
16834
            case SUCCESS:
483 rajveer 16835
              if (field.type == TType.LIST) {
16836
                {
1382 varun.gupt 16837
                  TList _list36 = iprot.readListBegin();
16838
                  this.success = new ArrayList<Order>(_list36.size);
16839
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 16840
                  {
1382 varun.gupt 16841
                    Order _elem38;
16842
                    _elem38 = new Order();
16843
                    _elem38.read(iprot);
16844
                    this.success.add(_elem38);
483 rajveer 16845
                  }
16846
                  iprot.readListEnd();
16847
                }
68 ashish 16848
              } else { 
16849
                TProtocolUtil.skip(iprot, field.type);
16850
              }
16851
              break;
16852
            case EX:
16853
              if (field.type == TType.STRUCT) {
16854
                this.ex = new TransactionServiceException();
16855
                this.ex.read(iprot);
16856
              } else { 
16857
                TProtocolUtil.skip(iprot, field.type);
16858
              }
16859
              break;
16860
          }
16861
          iprot.readFieldEnd();
16862
        }
16863
      }
16864
      iprot.readStructEnd();
16865
      validate();
16866
    }
16867
 
16868
    public void write(TProtocol oprot) throws TException {
16869
      oprot.writeStructBegin(STRUCT_DESC);
16870
 
16871
      if (this.isSetSuccess()) {
16872
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16873
        {
16874
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16875
          for (Order _iter39 : this.success)
483 rajveer 16876
          {
1382 varun.gupt 16877
            _iter39.write(oprot);
483 rajveer 16878
          }
16879
          oprot.writeListEnd();
16880
        }
68 ashish 16881
        oprot.writeFieldEnd();
16882
      } else if (this.isSetEx()) {
16883
        oprot.writeFieldBegin(EX_FIELD_DESC);
16884
        this.ex.write(oprot);
16885
        oprot.writeFieldEnd();
16886
      }
16887
      oprot.writeFieldStop();
16888
      oprot.writeStructEnd();
16889
    }
16890
 
16891
    @Override
16892
    public String toString() {
483 rajveer 16893
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 16894
      boolean first = true;
16895
 
16896
      sb.append("success:");
483 rajveer 16897
      if (this.success == null) {
16898
        sb.append("null");
16899
      } else {
16900
        sb.append(this.success);
16901
      }
68 ashish 16902
      first = false;
16903
      if (!first) sb.append(", ");
16904
      sb.append("ex:");
16905
      if (this.ex == null) {
16906
        sb.append("null");
16907
      } else {
16908
        sb.append(this.ex);
16909
      }
16910
      first = false;
16911
      sb.append(")");
16912
      return sb.toString();
16913
    }
16914
 
16915
    public void validate() throws TException {
16916
      // check for required fields
16917
    }
16918
 
16919
  }
16920
 
483 rajveer 16921
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
16922
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 16923
 
483 rajveer 16924
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 16925
 
483 rajveer 16926
    private Order order;
68 ashish 16927
 
16928
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16929
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16930
      ORDER((short)1, "order");
68 ashish 16931
 
16932
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16933
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16934
 
16935
      static {
16936
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16937
          byId.put((int)field._thriftId, field);
16938
          byName.put(field.getFieldName(), field);
16939
        }
16940
      }
16941
 
16942
      /**
16943
       * Find the _Fields constant that matches fieldId, or null if its not found.
16944
       */
16945
      public static _Fields findByThriftId(int fieldId) {
16946
        return byId.get(fieldId);
16947
      }
16948
 
16949
      /**
16950
       * Find the _Fields constant that matches fieldId, throwing an exception
16951
       * if it is not found.
16952
       */
16953
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16954
        _Fields fields = findByThriftId(fieldId);
16955
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16956
        return fields;
16957
      }
16958
 
16959
      /**
16960
       * Find the _Fields constant that matches name, or null if its not found.
16961
       */
16962
      public static _Fields findByName(String name) {
16963
        return byName.get(name);
16964
      }
16965
 
16966
      private final short _thriftId;
16967
      private final String _fieldName;
16968
 
16969
      _Fields(short thriftId, String fieldName) {
16970
        _thriftId = thriftId;
16971
        _fieldName = fieldName;
16972
      }
16973
 
16974
      public short getThriftFieldId() {
16975
        return _thriftId;
16976
      }
16977
 
16978
      public String getFieldName() {
16979
        return _fieldName;
16980
      }
16981
    }
16982
 
16983
    // isset id assignments
16984
 
16985
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16986
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
16987
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 16988
    }});
16989
 
16990
    static {
483 rajveer 16991
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 16992
    }
16993
 
483 rajveer 16994
    public createOrder_args() {
68 ashish 16995
    }
16996
 
483 rajveer 16997
    public createOrder_args(
16998
      Order order)
68 ashish 16999
    {
17000
      this();
483 rajveer 17001
      this.order = order;
68 ashish 17002
    }
17003
 
17004
    /**
17005
     * Performs a deep copy on <i>other</i>.
17006
     */
483 rajveer 17007
    public createOrder_args(createOrder_args other) {
17008
      if (other.isSetOrder()) {
17009
        this.order = new Order(other.order);
17010
      }
68 ashish 17011
    }
17012
 
483 rajveer 17013
    public createOrder_args deepCopy() {
17014
      return new createOrder_args(this);
68 ashish 17015
    }
17016
 
17017
    @Deprecated
483 rajveer 17018
    public createOrder_args clone() {
17019
      return new createOrder_args(this);
68 ashish 17020
    }
17021
 
483 rajveer 17022
    public Order getOrder() {
17023
      return this.order;
68 ashish 17024
    }
17025
 
483 rajveer 17026
    public createOrder_args setOrder(Order order) {
17027
      this.order = order;
68 ashish 17028
      return this;
17029
    }
17030
 
483 rajveer 17031
    public void unsetOrder() {
17032
      this.order = null;
68 ashish 17033
    }
17034
 
483 rajveer 17035
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
17036
    public boolean isSetOrder() {
17037
      return this.order != null;
68 ashish 17038
    }
17039
 
483 rajveer 17040
    public void setOrderIsSet(boolean value) {
17041
      if (!value) {
17042
        this.order = null;
17043
      }
68 ashish 17044
    }
17045
 
17046
    public void setFieldValue(_Fields field, Object value) {
17047
      switch (field) {
483 rajveer 17048
      case ORDER:
68 ashish 17049
        if (value == null) {
483 rajveer 17050
          unsetOrder();
68 ashish 17051
        } else {
483 rajveer 17052
          setOrder((Order)value);
68 ashish 17053
        }
17054
        break;
17055
 
17056
      }
17057
    }
17058
 
17059
    public void setFieldValue(int fieldID, Object value) {
17060
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17061
    }
17062
 
17063
    public Object getFieldValue(_Fields field) {
17064
      switch (field) {
483 rajveer 17065
      case ORDER:
17066
        return getOrder();
68 ashish 17067
 
17068
      }
17069
      throw new IllegalStateException();
17070
    }
17071
 
17072
    public Object getFieldValue(int fieldId) {
17073
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17074
    }
17075
 
17076
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17077
    public boolean isSet(_Fields field) {
17078
      switch (field) {
483 rajveer 17079
      case ORDER:
17080
        return isSetOrder();
68 ashish 17081
      }
17082
      throw new IllegalStateException();
17083
    }
17084
 
17085
    public boolean isSet(int fieldID) {
17086
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17087
    }
17088
 
17089
    @Override
17090
    public boolean equals(Object that) {
17091
      if (that == null)
17092
        return false;
483 rajveer 17093
      if (that instanceof createOrder_args)
17094
        return this.equals((createOrder_args)that);
68 ashish 17095
      return false;
17096
    }
17097
 
483 rajveer 17098
    public boolean equals(createOrder_args that) {
68 ashish 17099
      if (that == null)
17100
        return false;
17101
 
483 rajveer 17102
      boolean this_present_order = true && this.isSetOrder();
17103
      boolean that_present_order = true && that.isSetOrder();
17104
      if (this_present_order || that_present_order) {
17105
        if (!(this_present_order && that_present_order))
68 ashish 17106
          return false;
483 rajveer 17107
        if (!this.order.equals(that.order))
68 ashish 17108
          return false;
17109
      }
17110
 
17111
      return true;
17112
    }
17113
 
17114
    @Override
17115
    public int hashCode() {
17116
      return 0;
17117
    }
17118
 
483 rajveer 17119
    public int compareTo(createOrder_args other) {
68 ashish 17120
      if (!getClass().equals(other.getClass())) {
17121
        return getClass().getName().compareTo(other.getClass().getName());
17122
      }
17123
 
17124
      int lastComparison = 0;
483 rajveer 17125
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 17126
 
483 rajveer 17127
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 17128
      if (lastComparison != 0) {
17129
        return lastComparison;
17130
      }
483 rajveer 17131
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 17132
      if (lastComparison != 0) {
17133
        return lastComparison;
17134
      }
17135
      return 0;
17136
    }
17137
 
17138
    public void read(TProtocol iprot) throws TException {
17139
      TField field;
17140
      iprot.readStructBegin();
17141
      while (true)
17142
      {
17143
        field = iprot.readFieldBegin();
17144
        if (field.type == TType.STOP) { 
17145
          break;
17146
        }
17147
        _Fields fieldId = _Fields.findByThriftId(field.id);
17148
        if (fieldId == null) {
17149
          TProtocolUtil.skip(iprot, field.type);
17150
        } else {
17151
          switch (fieldId) {
483 rajveer 17152
            case ORDER:
17153
              if (field.type == TType.STRUCT) {
17154
                this.order = new Order();
17155
                this.order.read(iprot);
68 ashish 17156
              } else { 
17157
                TProtocolUtil.skip(iprot, field.type);
17158
              }
17159
              break;
17160
          }
17161
          iprot.readFieldEnd();
17162
        }
17163
      }
17164
      iprot.readStructEnd();
17165
      validate();
17166
    }
17167
 
17168
    public void write(TProtocol oprot) throws TException {
17169
      validate();
17170
 
17171
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17172
      if (this.order != null) {
17173
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
17174
        this.order.write(oprot);
17175
        oprot.writeFieldEnd();
17176
      }
68 ashish 17177
      oprot.writeFieldStop();
17178
      oprot.writeStructEnd();
17179
    }
17180
 
17181
    @Override
17182
    public String toString() {
483 rajveer 17183
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 17184
      boolean first = true;
17185
 
483 rajveer 17186
      sb.append("order:");
17187
      if (this.order == null) {
17188
        sb.append("null");
17189
      } else {
17190
        sb.append(this.order);
17191
      }
68 ashish 17192
      first = false;
17193
      sb.append(")");
17194
      return sb.toString();
17195
    }
17196
 
17197
    public void validate() throws TException {
17198
      // check for required fields
17199
    }
17200
 
17201
  }
17202
 
483 rajveer 17203
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
17204
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 17205
 
483 rajveer 17206
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 17207
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17208
 
483 rajveer 17209
    private long success;
68 ashish 17210
    private TransactionServiceException ex;
17211
 
17212
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17213
    public enum _Fields implements TFieldIdEnum {
17214
      SUCCESS((short)0, "success"),
17215
      EX((short)1, "ex");
17216
 
17217
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17218
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17219
 
17220
      static {
17221
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17222
          byId.put((int)field._thriftId, field);
17223
          byName.put(field.getFieldName(), field);
17224
        }
17225
      }
17226
 
17227
      /**
17228
       * Find the _Fields constant that matches fieldId, or null if its not found.
17229
       */
17230
      public static _Fields findByThriftId(int fieldId) {
17231
        return byId.get(fieldId);
17232
      }
17233
 
17234
      /**
17235
       * Find the _Fields constant that matches fieldId, throwing an exception
17236
       * if it is not found.
17237
       */
17238
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17239
        _Fields fields = findByThriftId(fieldId);
17240
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17241
        return fields;
17242
      }
17243
 
17244
      /**
17245
       * Find the _Fields constant that matches name, or null if its not found.
17246
       */
17247
      public static _Fields findByName(String name) {
17248
        return byName.get(name);
17249
      }
17250
 
17251
      private final short _thriftId;
17252
      private final String _fieldName;
17253
 
17254
      _Fields(short thriftId, String fieldName) {
17255
        _thriftId = thriftId;
17256
        _fieldName = fieldName;
17257
      }
17258
 
17259
      public short getThriftFieldId() {
17260
        return _thriftId;
17261
      }
17262
 
17263
      public String getFieldName() {
17264
        return _fieldName;
17265
      }
17266
    }
17267
 
17268
    // isset id assignments
17269
    private static final int __SUCCESS_ISSET_ID = 0;
17270
    private BitSet __isset_bit_vector = new BitSet(1);
17271
 
17272
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17273
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17274
          new FieldValueMetaData(TType.I64)));
68 ashish 17275
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17276
          new FieldValueMetaData(TType.STRUCT)));
17277
    }});
17278
 
17279
    static {
483 rajveer 17280
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 17281
    }
17282
 
483 rajveer 17283
    public createOrder_result() {
68 ashish 17284
    }
17285
 
483 rajveer 17286
    public createOrder_result(
17287
      long success,
68 ashish 17288
      TransactionServiceException ex)
17289
    {
17290
      this();
17291
      this.success = success;
17292
      setSuccessIsSet(true);
17293
      this.ex = ex;
17294
    }
17295
 
17296
    /**
17297
     * Performs a deep copy on <i>other</i>.
17298
     */
483 rajveer 17299
    public createOrder_result(createOrder_result other) {
68 ashish 17300
      __isset_bit_vector.clear();
17301
      __isset_bit_vector.or(other.__isset_bit_vector);
17302
      this.success = other.success;
17303
      if (other.isSetEx()) {
17304
        this.ex = new TransactionServiceException(other.ex);
17305
      }
17306
    }
17307
 
483 rajveer 17308
    public createOrder_result deepCopy() {
17309
      return new createOrder_result(this);
68 ashish 17310
    }
17311
 
17312
    @Deprecated
483 rajveer 17313
    public createOrder_result clone() {
17314
      return new createOrder_result(this);
68 ashish 17315
    }
17316
 
483 rajveer 17317
    public long getSuccess() {
68 ashish 17318
      return this.success;
17319
    }
17320
 
483 rajveer 17321
    public createOrder_result setSuccess(long success) {
68 ashish 17322
      this.success = success;
17323
      setSuccessIsSet(true);
17324
      return this;
17325
    }
17326
 
17327
    public void unsetSuccess() {
17328
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17329
    }
17330
 
17331
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17332
    public boolean isSetSuccess() {
17333
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17334
    }
17335
 
17336
    public void setSuccessIsSet(boolean value) {
17337
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17338
    }
17339
 
17340
    public TransactionServiceException getEx() {
17341
      return this.ex;
17342
    }
17343
 
483 rajveer 17344
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 17345
      this.ex = ex;
17346
      return this;
17347
    }
17348
 
17349
    public void unsetEx() {
17350
      this.ex = null;
17351
    }
17352
 
17353
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17354
    public boolean isSetEx() {
17355
      return this.ex != null;
17356
    }
17357
 
17358
    public void setExIsSet(boolean value) {
17359
      if (!value) {
17360
        this.ex = null;
17361
      }
17362
    }
17363
 
17364
    public void setFieldValue(_Fields field, Object value) {
17365
      switch (field) {
17366
      case SUCCESS:
17367
        if (value == null) {
17368
          unsetSuccess();
17369
        } else {
483 rajveer 17370
          setSuccess((Long)value);
68 ashish 17371
        }
17372
        break;
17373
 
17374
      case EX:
17375
        if (value == null) {
17376
          unsetEx();
17377
        } else {
17378
          setEx((TransactionServiceException)value);
17379
        }
17380
        break;
17381
 
17382
      }
17383
    }
17384
 
17385
    public void setFieldValue(int fieldID, Object value) {
17386
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17387
    }
17388
 
17389
    public Object getFieldValue(_Fields field) {
17390
      switch (field) {
17391
      case SUCCESS:
483 rajveer 17392
        return new Long(getSuccess());
68 ashish 17393
 
17394
      case EX:
17395
        return getEx();
17396
 
17397
      }
17398
      throw new IllegalStateException();
17399
    }
17400
 
17401
    public Object getFieldValue(int fieldId) {
17402
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17403
    }
17404
 
17405
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17406
    public boolean isSet(_Fields field) {
17407
      switch (field) {
17408
      case SUCCESS:
17409
        return isSetSuccess();
17410
      case EX:
17411
        return isSetEx();
17412
      }
17413
      throw new IllegalStateException();
17414
    }
17415
 
17416
    public boolean isSet(int fieldID) {
17417
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17418
    }
17419
 
17420
    @Override
17421
    public boolean equals(Object that) {
17422
      if (that == null)
17423
        return false;
483 rajveer 17424
      if (that instanceof createOrder_result)
17425
        return this.equals((createOrder_result)that);
68 ashish 17426
      return false;
17427
    }
17428
 
483 rajveer 17429
    public boolean equals(createOrder_result that) {
68 ashish 17430
      if (that == null)
17431
        return false;
17432
 
17433
      boolean this_present_success = true;
17434
      boolean that_present_success = true;
17435
      if (this_present_success || that_present_success) {
17436
        if (!(this_present_success && that_present_success))
17437
          return false;
17438
        if (this.success != that.success)
17439
          return false;
17440
      }
17441
 
17442
      boolean this_present_ex = true && this.isSetEx();
17443
      boolean that_present_ex = true && that.isSetEx();
17444
      if (this_present_ex || that_present_ex) {
17445
        if (!(this_present_ex && that_present_ex))
17446
          return false;
17447
        if (!this.ex.equals(that.ex))
17448
          return false;
17449
      }
17450
 
17451
      return true;
17452
    }
17453
 
17454
    @Override
17455
    public int hashCode() {
17456
      return 0;
17457
    }
17458
 
483 rajveer 17459
    public int compareTo(createOrder_result other) {
68 ashish 17460
      if (!getClass().equals(other.getClass())) {
17461
        return getClass().getName().compareTo(other.getClass().getName());
17462
      }
17463
 
17464
      int lastComparison = 0;
483 rajveer 17465
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 17466
 
17467
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17468
      if (lastComparison != 0) {
17469
        return lastComparison;
17470
      }
17471
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17472
      if (lastComparison != 0) {
17473
        return lastComparison;
17474
      }
17475
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17476
      if (lastComparison != 0) {
17477
        return lastComparison;
17478
      }
17479
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17480
      if (lastComparison != 0) {
17481
        return lastComparison;
17482
      }
17483
      return 0;
17484
    }
17485
 
17486
    public void read(TProtocol iprot) throws TException {
17487
      TField field;
17488
      iprot.readStructBegin();
17489
      while (true)
17490
      {
17491
        field = iprot.readFieldBegin();
17492
        if (field.type == TType.STOP) { 
17493
          break;
17494
        }
17495
        _Fields fieldId = _Fields.findByThriftId(field.id);
17496
        if (fieldId == null) {
17497
          TProtocolUtil.skip(iprot, field.type);
17498
        } else {
17499
          switch (fieldId) {
17500
            case SUCCESS:
483 rajveer 17501
              if (field.type == TType.I64) {
17502
                this.success = iprot.readI64();
68 ashish 17503
                setSuccessIsSet(true);
17504
              } else { 
17505
                TProtocolUtil.skip(iprot, field.type);
17506
              }
17507
              break;
17508
            case EX:
17509
              if (field.type == TType.STRUCT) {
17510
                this.ex = new TransactionServiceException();
17511
                this.ex.read(iprot);
17512
              } else { 
17513
                TProtocolUtil.skip(iprot, field.type);
17514
              }
17515
              break;
17516
          }
17517
          iprot.readFieldEnd();
17518
        }
17519
      }
17520
      iprot.readStructEnd();
17521
      validate();
17522
    }
17523
 
17524
    public void write(TProtocol oprot) throws TException {
17525
      oprot.writeStructBegin(STRUCT_DESC);
17526
 
17527
      if (this.isSetSuccess()) {
17528
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17529
        oprot.writeI64(this.success);
68 ashish 17530
        oprot.writeFieldEnd();
17531
      } else if (this.isSetEx()) {
17532
        oprot.writeFieldBegin(EX_FIELD_DESC);
17533
        this.ex.write(oprot);
17534
        oprot.writeFieldEnd();
17535
      }
17536
      oprot.writeFieldStop();
17537
      oprot.writeStructEnd();
17538
    }
17539
 
17540
    @Override
17541
    public String toString() {
483 rajveer 17542
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 17543
      boolean first = true;
17544
 
17545
      sb.append("success:");
17546
      sb.append(this.success);
17547
      first = false;
17548
      if (!first) sb.append(", ");
17549
      sb.append("ex:");
17550
      if (this.ex == null) {
17551
        sb.append("null");
17552
      } else {
17553
        sb.append(this.ex);
17554
      }
17555
      first = false;
17556
      sb.append(")");
17557
      return sb.toString();
17558
    }
17559
 
17560
    public void validate() throws TException {
17561
      // check for required fields
17562
    }
17563
 
17564
  }
17565
 
483 rajveer 17566
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17567
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17568
 
483 rajveer 17569
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17570
 
483 rajveer 17571
    private long id;
68 ashish 17572
 
17573
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17574
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17575
      ID((short)1, "id");
68 ashish 17576
 
17577
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17578
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17579
 
17580
      static {
17581
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17582
          byId.put((int)field._thriftId, field);
17583
          byName.put(field.getFieldName(), field);
17584
        }
17585
      }
17586
 
17587
      /**
17588
       * Find the _Fields constant that matches fieldId, or null if its not found.
17589
       */
17590
      public static _Fields findByThriftId(int fieldId) {
17591
        return byId.get(fieldId);
17592
      }
17593
 
17594
      /**
17595
       * Find the _Fields constant that matches fieldId, throwing an exception
17596
       * if it is not found.
17597
       */
17598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17599
        _Fields fields = findByThriftId(fieldId);
17600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17601
        return fields;
17602
      }
17603
 
17604
      /**
17605
       * Find the _Fields constant that matches name, or null if its not found.
17606
       */
17607
      public static _Fields findByName(String name) {
17608
        return byName.get(name);
17609
      }
17610
 
17611
      private final short _thriftId;
17612
      private final String _fieldName;
17613
 
17614
      _Fields(short thriftId, String fieldName) {
17615
        _thriftId = thriftId;
17616
        _fieldName = fieldName;
17617
      }
17618
 
17619
      public short getThriftFieldId() {
17620
        return _thriftId;
17621
      }
17622
 
17623
      public String getFieldName() {
17624
        return _fieldName;
17625
      }
17626
    }
17627
 
17628
    // isset id assignments
483 rajveer 17629
    private static final int __ID_ISSET_ID = 0;
17630
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17631
 
17632
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17633
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17634
          new FieldValueMetaData(TType.I64)));
17635
    }});
17636
 
17637
    static {
483 rajveer 17638
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17639
    }
17640
 
483 rajveer 17641
    public getOrder_args() {
68 ashish 17642
    }
17643
 
483 rajveer 17644
    public getOrder_args(
17645
      long id)
68 ashish 17646
    {
17647
      this();
483 rajveer 17648
      this.id = id;
17649
      setIdIsSet(true);
68 ashish 17650
    }
17651
 
17652
    /**
17653
     * Performs a deep copy on <i>other</i>.
17654
     */
483 rajveer 17655
    public getOrder_args(getOrder_args other) {
68 ashish 17656
      __isset_bit_vector.clear();
17657
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17658
      this.id = other.id;
68 ashish 17659
    }
17660
 
483 rajveer 17661
    public getOrder_args deepCopy() {
17662
      return new getOrder_args(this);
68 ashish 17663
    }
17664
 
17665
    @Deprecated
483 rajveer 17666
    public getOrder_args clone() {
17667
      return new getOrder_args(this);
68 ashish 17668
    }
17669
 
483 rajveer 17670
    public long getId() {
17671
      return this.id;
68 ashish 17672
    }
17673
 
483 rajveer 17674
    public getOrder_args setId(long id) {
17675
      this.id = id;
17676
      setIdIsSet(true);
68 ashish 17677
      return this;
17678
    }
17679
 
483 rajveer 17680
    public void unsetId() {
17681
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17682
    }
17683
 
483 rajveer 17684
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17685
    public boolean isSetId() {
17686
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17687
    }
17688
 
483 rajveer 17689
    public void setIdIsSet(boolean value) {
17690
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17691
    }
17692
 
17693
    public void setFieldValue(_Fields field, Object value) {
17694
      switch (field) {
483 rajveer 17695
      case ID:
68 ashish 17696
        if (value == null) {
483 rajveer 17697
          unsetId();
68 ashish 17698
        } else {
483 rajveer 17699
          setId((Long)value);
68 ashish 17700
        }
17701
        break;
17702
 
17703
      }
17704
    }
17705
 
17706
    public void setFieldValue(int fieldID, Object value) {
17707
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17708
    }
17709
 
17710
    public Object getFieldValue(_Fields field) {
17711
      switch (field) {
483 rajveer 17712
      case ID:
17713
        return new Long(getId());
68 ashish 17714
 
17715
      }
17716
      throw new IllegalStateException();
17717
    }
17718
 
17719
    public Object getFieldValue(int fieldId) {
17720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17721
    }
17722
 
17723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17724
    public boolean isSet(_Fields field) {
17725
      switch (field) {
483 rajveer 17726
      case ID:
17727
        return isSetId();
68 ashish 17728
      }
17729
      throw new IllegalStateException();
17730
    }
17731
 
17732
    public boolean isSet(int fieldID) {
17733
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17734
    }
17735
 
17736
    @Override
17737
    public boolean equals(Object that) {
17738
      if (that == null)
17739
        return false;
483 rajveer 17740
      if (that instanceof getOrder_args)
17741
        return this.equals((getOrder_args)that);
68 ashish 17742
      return false;
17743
    }
17744
 
483 rajveer 17745
    public boolean equals(getOrder_args that) {
68 ashish 17746
      if (that == null)
17747
        return false;
17748
 
483 rajveer 17749
      boolean this_present_id = true;
17750
      boolean that_present_id = true;
17751
      if (this_present_id || that_present_id) {
17752
        if (!(this_present_id && that_present_id))
68 ashish 17753
          return false;
483 rajveer 17754
        if (this.id != that.id)
68 ashish 17755
          return false;
17756
      }
17757
 
17758
      return true;
17759
    }
17760
 
17761
    @Override
17762
    public int hashCode() {
17763
      return 0;
17764
    }
17765
 
483 rajveer 17766
    public int compareTo(getOrder_args other) {
68 ashish 17767
      if (!getClass().equals(other.getClass())) {
17768
        return getClass().getName().compareTo(other.getClass().getName());
17769
      }
17770
 
17771
      int lastComparison = 0;
483 rajveer 17772
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17773
 
483 rajveer 17774
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17775
      if (lastComparison != 0) {
17776
        return lastComparison;
17777
      }
483 rajveer 17778
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 17779
      if (lastComparison != 0) {
17780
        return lastComparison;
17781
      }
17782
      return 0;
17783
    }
17784
 
17785
    public void read(TProtocol iprot) throws TException {
17786
      TField field;
17787
      iprot.readStructBegin();
17788
      while (true)
17789
      {
17790
        field = iprot.readFieldBegin();
17791
        if (field.type == TType.STOP) { 
17792
          break;
17793
        }
17794
        _Fields fieldId = _Fields.findByThriftId(field.id);
17795
        if (fieldId == null) {
17796
          TProtocolUtil.skip(iprot, field.type);
17797
        } else {
17798
          switch (fieldId) {
483 rajveer 17799
            case ID:
68 ashish 17800
              if (field.type == TType.I64) {
483 rajveer 17801
                this.id = iprot.readI64();
17802
                setIdIsSet(true);
68 ashish 17803
              } else { 
17804
                TProtocolUtil.skip(iprot, field.type);
17805
              }
17806
              break;
17807
          }
17808
          iprot.readFieldEnd();
17809
        }
17810
      }
17811
      iprot.readStructEnd();
17812
      validate();
17813
    }
17814
 
17815
    public void write(TProtocol oprot) throws TException {
17816
      validate();
17817
 
17818
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17819
      oprot.writeFieldBegin(ID_FIELD_DESC);
17820
      oprot.writeI64(this.id);
68 ashish 17821
      oprot.writeFieldEnd();
17822
      oprot.writeFieldStop();
17823
      oprot.writeStructEnd();
17824
    }
17825
 
17826
    @Override
17827
    public String toString() {
483 rajveer 17828
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 17829
      boolean first = true;
17830
 
483 rajveer 17831
      sb.append("id:");
17832
      sb.append(this.id);
68 ashish 17833
      first = false;
17834
      sb.append(")");
17835
      return sb.toString();
17836
    }
17837
 
17838
    public void validate() throws TException {
17839
      // check for required fields
17840
    }
17841
 
17842
  }
17843
 
483 rajveer 17844
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
17845
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 17846
 
483 rajveer 17847
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 17848
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17849
 
483 rajveer 17850
    private Order success;
68 ashish 17851
    private TransactionServiceException ex;
17852
 
17853
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17854
    public enum _Fields implements TFieldIdEnum {
17855
      SUCCESS((short)0, "success"),
17856
      EX((short)1, "ex");
17857
 
17858
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17859
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17860
 
17861
      static {
17862
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17863
          byId.put((int)field._thriftId, field);
17864
          byName.put(field.getFieldName(), field);
17865
        }
17866
      }
17867
 
17868
      /**
17869
       * Find the _Fields constant that matches fieldId, or null if its not found.
17870
       */
17871
      public static _Fields findByThriftId(int fieldId) {
17872
        return byId.get(fieldId);
17873
      }
17874
 
17875
      /**
17876
       * Find the _Fields constant that matches fieldId, throwing an exception
17877
       * if it is not found.
17878
       */
17879
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17880
        _Fields fields = findByThriftId(fieldId);
17881
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17882
        return fields;
17883
      }
17884
 
17885
      /**
17886
       * Find the _Fields constant that matches name, or null if its not found.
17887
       */
17888
      public static _Fields findByName(String name) {
17889
        return byName.get(name);
17890
      }
17891
 
17892
      private final short _thriftId;
17893
      private final String _fieldName;
17894
 
17895
      _Fields(short thriftId, String fieldName) {
17896
        _thriftId = thriftId;
17897
        _fieldName = fieldName;
17898
      }
17899
 
17900
      public short getThriftFieldId() {
17901
        return _thriftId;
17902
      }
17903
 
17904
      public String getFieldName() {
17905
        return _fieldName;
17906
      }
17907
    }
17908
 
17909
    // isset id assignments
17910
 
17911
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17912
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17913
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17914
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17915
          new FieldValueMetaData(TType.STRUCT)));
17916
    }});
17917
 
17918
    static {
483 rajveer 17919
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 17920
    }
17921
 
483 rajveer 17922
    public getOrder_result() {
68 ashish 17923
    }
17924
 
483 rajveer 17925
    public getOrder_result(
17926
      Order success,
68 ashish 17927
      TransactionServiceException ex)
17928
    {
17929
      this();
17930
      this.success = success;
17931
      this.ex = ex;
17932
    }
17933
 
17934
    /**
17935
     * Performs a deep copy on <i>other</i>.
17936
     */
483 rajveer 17937
    public getOrder_result(getOrder_result other) {
17938
      if (other.isSetSuccess()) {
17939
        this.success = new Order(other.success);
17940
      }
68 ashish 17941
      if (other.isSetEx()) {
17942
        this.ex = new TransactionServiceException(other.ex);
17943
      }
17944
    }
17945
 
483 rajveer 17946
    public getOrder_result deepCopy() {
17947
      return new getOrder_result(this);
68 ashish 17948
    }
17949
 
17950
    @Deprecated
483 rajveer 17951
    public getOrder_result clone() {
17952
      return new getOrder_result(this);
68 ashish 17953
    }
17954
 
483 rajveer 17955
    public Order getSuccess() {
68 ashish 17956
      return this.success;
17957
    }
17958
 
483 rajveer 17959
    public getOrder_result setSuccess(Order success) {
68 ashish 17960
      this.success = success;
17961
      return this;
17962
    }
17963
 
17964
    public void unsetSuccess() {
483 rajveer 17965
      this.success = null;
68 ashish 17966
    }
17967
 
17968
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17969
    public boolean isSetSuccess() {
483 rajveer 17970
      return this.success != null;
68 ashish 17971
    }
17972
 
17973
    public void setSuccessIsSet(boolean value) {
483 rajveer 17974
      if (!value) {
17975
        this.success = null;
17976
      }
68 ashish 17977
    }
17978
 
17979
    public TransactionServiceException getEx() {
17980
      return this.ex;
17981
    }
17982
 
483 rajveer 17983
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 17984
      this.ex = ex;
17985
      return this;
17986
    }
17987
 
17988
    public void unsetEx() {
17989
      this.ex = null;
17990
    }
17991
 
17992
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17993
    public boolean isSetEx() {
17994
      return this.ex != null;
17995
    }
17996
 
17997
    public void setExIsSet(boolean value) {
17998
      if (!value) {
17999
        this.ex = null;
18000
      }
18001
    }
18002
 
18003
    public void setFieldValue(_Fields field, Object value) {
18004
      switch (field) {
18005
      case SUCCESS:
18006
        if (value == null) {
18007
          unsetSuccess();
18008
        } else {
483 rajveer 18009
          setSuccess((Order)value);
68 ashish 18010
        }
18011
        break;
18012
 
18013
      case EX:
18014
        if (value == null) {
18015
          unsetEx();
18016
        } else {
18017
          setEx((TransactionServiceException)value);
18018
        }
18019
        break;
18020
 
18021
      }
18022
    }
18023
 
18024
    public void setFieldValue(int fieldID, Object value) {
18025
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18026
    }
18027
 
18028
    public Object getFieldValue(_Fields field) {
18029
      switch (field) {
18030
      case SUCCESS:
483 rajveer 18031
        return getSuccess();
68 ashish 18032
 
18033
      case EX:
18034
        return getEx();
18035
 
18036
      }
18037
      throw new IllegalStateException();
18038
    }
18039
 
18040
    public Object getFieldValue(int fieldId) {
18041
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18042
    }
18043
 
18044
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18045
    public boolean isSet(_Fields field) {
18046
      switch (field) {
18047
      case SUCCESS:
18048
        return isSetSuccess();
18049
      case EX:
18050
        return isSetEx();
18051
      }
18052
      throw new IllegalStateException();
18053
    }
18054
 
18055
    public boolean isSet(int fieldID) {
18056
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18057
    }
18058
 
18059
    @Override
18060
    public boolean equals(Object that) {
18061
      if (that == null)
18062
        return false;
483 rajveer 18063
      if (that instanceof getOrder_result)
18064
        return this.equals((getOrder_result)that);
68 ashish 18065
      return false;
18066
    }
18067
 
483 rajveer 18068
    public boolean equals(getOrder_result that) {
68 ashish 18069
      if (that == null)
18070
        return false;
18071
 
483 rajveer 18072
      boolean this_present_success = true && this.isSetSuccess();
18073
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18074
      if (this_present_success || that_present_success) {
18075
        if (!(this_present_success && that_present_success))
18076
          return false;
483 rajveer 18077
        if (!this.success.equals(that.success))
68 ashish 18078
          return false;
18079
      }
18080
 
18081
      boolean this_present_ex = true && this.isSetEx();
18082
      boolean that_present_ex = true && that.isSetEx();
18083
      if (this_present_ex || that_present_ex) {
18084
        if (!(this_present_ex && that_present_ex))
18085
          return false;
18086
        if (!this.ex.equals(that.ex))
18087
          return false;
18088
      }
18089
 
18090
      return true;
18091
    }
18092
 
18093
    @Override
18094
    public int hashCode() {
18095
      return 0;
18096
    }
18097
 
483 rajveer 18098
    public int compareTo(getOrder_result other) {
68 ashish 18099
      if (!getClass().equals(other.getClass())) {
18100
        return getClass().getName().compareTo(other.getClass().getName());
18101
      }
18102
 
18103
      int lastComparison = 0;
483 rajveer 18104
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 18105
 
18106
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18107
      if (lastComparison != 0) {
18108
        return lastComparison;
18109
      }
18110
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18111
      if (lastComparison != 0) {
18112
        return lastComparison;
18113
      }
18114
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18115
      if (lastComparison != 0) {
18116
        return lastComparison;
18117
      }
18118
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18119
      if (lastComparison != 0) {
18120
        return lastComparison;
18121
      }
18122
      return 0;
18123
    }
18124
 
18125
    public void read(TProtocol iprot) throws TException {
18126
      TField field;
18127
      iprot.readStructBegin();
18128
      while (true)
18129
      {
18130
        field = iprot.readFieldBegin();
18131
        if (field.type == TType.STOP) { 
18132
          break;
18133
        }
18134
        _Fields fieldId = _Fields.findByThriftId(field.id);
18135
        if (fieldId == null) {
18136
          TProtocolUtil.skip(iprot, field.type);
18137
        } else {
18138
          switch (fieldId) {
18139
            case SUCCESS:
483 rajveer 18140
              if (field.type == TType.STRUCT) {
18141
                this.success = new Order();
18142
                this.success.read(iprot);
68 ashish 18143
              } else { 
18144
                TProtocolUtil.skip(iprot, field.type);
18145
              }
18146
              break;
18147
            case EX:
18148
              if (field.type == TType.STRUCT) {
18149
                this.ex = new TransactionServiceException();
18150
                this.ex.read(iprot);
18151
              } else { 
18152
                TProtocolUtil.skip(iprot, field.type);
18153
              }
18154
              break;
18155
          }
18156
          iprot.readFieldEnd();
18157
        }
18158
      }
18159
      iprot.readStructEnd();
18160
      validate();
18161
    }
18162
 
18163
    public void write(TProtocol oprot) throws TException {
18164
      oprot.writeStructBegin(STRUCT_DESC);
18165
 
18166
      if (this.isSetSuccess()) {
18167
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18168
        this.success.write(oprot);
68 ashish 18169
        oprot.writeFieldEnd();
18170
      } else if (this.isSetEx()) {
18171
        oprot.writeFieldBegin(EX_FIELD_DESC);
18172
        this.ex.write(oprot);
18173
        oprot.writeFieldEnd();
18174
      }
18175
      oprot.writeFieldStop();
18176
      oprot.writeStructEnd();
18177
    }
18178
 
18179
    @Override
18180
    public String toString() {
483 rajveer 18181
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 18182
      boolean first = true;
18183
 
18184
      sb.append("success:");
483 rajveer 18185
      if (this.success == null) {
18186
        sb.append("null");
18187
      } else {
18188
        sb.append(this.success);
18189
      }
68 ashish 18190
      first = false;
18191
      if (!first) sb.append(", ");
18192
      sb.append("ex:");
18193
      if (this.ex == null) {
18194
        sb.append("null");
18195
      } else {
18196
        sb.append(this.ex);
18197
      }
18198
      first = false;
18199
      sb.append(")");
18200
      return sb.toString();
18201
    }
18202
 
18203
    public void validate() throws TException {
18204
      // check for required fields
18205
    }
18206
 
18207
  }
18208
 
483 rajveer 18209
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
18210
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 18211
 
483 rajveer 18212
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 18213
 
483 rajveer 18214
    private long orderId;
68 ashish 18215
 
18216
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18217
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18218
      ORDER_ID((short)1, "orderId");
68 ashish 18219
 
18220
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18221
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18222
 
18223
      static {
18224
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18225
          byId.put((int)field._thriftId, field);
18226
          byName.put(field.getFieldName(), field);
18227
        }
18228
      }
18229
 
18230
      /**
18231
       * Find the _Fields constant that matches fieldId, or null if its not found.
18232
       */
18233
      public static _Fields findByThriftId(int fieldId) {
18234
        return byId.get(fieldId);
18235
      }
18236
 
18237
      /**
18238
       * Find the _Fields constant that matches fieldId, throwing an exception
18239
       * if it is not found.
18240
       */
18241
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18242
        _Fields fields = findByThriftId(fieldId);
18243
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18244
        return fields;
18245
      }
18246
 
18247
      /**
18248
       * Find the _Fields constant that matches name, or null if its not found.
18249
       */
18250
      public static _Fields findByName(String name) {
18251
        return byName.get(name);
18252
      }
18253
 
18254
      private final short _thriftId;
18255
      private final String _fieldName;
18256
 
18257
      _Fields(short thriftId, String fieldName) {
18258
        _thriftId = thriftId;
18259
        _fieldName = fieldName;
18260
      }
18261
 
18262
      public short getThriftFieldId() {
18263
        return _thriftId;
18264
      }
18265
 
18266
      public String getFieldName() {
18267
        return _fieldName;
18268
      }
18269
    }
18270
 
18271
    // isset id assignments
483 rajveer 18272
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 18273
    private BitSet __isset_bit_vector = new BitSet(1);
18274
 
18275
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18276
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 18277
          new FieldValueMetaData(TType.I64)));
18278
    }});
18279
 
18280
    static {
483 rajveer 18281
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 18282
    }
18283
 
483 rajveer 18284
    public getLineItemsForOrder_args() {
68 ashish 18285
    }
18286
 
483 rajveer 18287
    public getLineItemsForOrder_args(
18288
      long orderId)
68 ashish 18289
    {
18290
      this();
483 rajveer 18291
      this.orderId = orderId;
18292
      setOrderIdIsSet(true);
68 ashish 18293
    }
18294
 
18295
    /**
18296
     * Performs a deep copy on <i>other</i>.
18297
     */
483 rajveer 18298
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 18299
      __isset_bit_vector.clear();
18300
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18301
      this.orderId = other.orderId;
68 ashish 18302
    }
18303
 
483 rajveer 18304
    public getLineItemsForOrder_args deepCopy() {
18305
      return new getLineItemsForOrder_args(this);
68 ashish 18306
    }
18307
 
18308
    @Deprecated
483 rajveer 18309
    public getLineItemsForOrder_args clone() {
18310
      return new getLineItemsForOrder_args(this);
68 ashish 18311
    }
18312
 
483 rajveer 18313
    public long getOrderId() {
18314
      return this.orderId;
68 ashish 18315
    }
18316
 
483 rajveer 18317
    public getLineItemsForOrder_args setOrderId(long orderId) {
18318
      this.orderId = orderId;
18319
      setOrderIdIsSet(true);
68 ashish 18320
      return this;
18321
    }
18322
 
483 rajveer 18323
    public void unsetOrderId() {
18324
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 18325
    }
18326
 
483 rajveer 18327
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18328
    public boolean isSetOrderId() {
18329
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 18330
    }
18331
 
483 rajveer 18332
    public void setOrderIdIsSet(boolean value) {
18333
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 18334
    }
18335
 
18336
    public void setFieldValue(_Fields field, Object value) {
18337
      switch (field) {
483 rajveer 18338
      case ORDER_ID:
68 ashish 18339
        if (value == null) {
483 rajveer 18340
          unsetOrderId();
68 ashish 18341
        } else {
483 rajveer 18342
          setOrderId((Long)value);
68 ashish 18343
        }
18344
        break;
18345
 
18346
      }
18347
    }
18348
 
18349
    public void setFieldValue(int fieldID, Object value) {
18350
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18351
    }
18352
 
18353
    public Object getFieldValue(_Fields field) {
18354
      switch (field) {
483 rajveer 18355
      case ORDER_ID:
18356
        return new Long(getOrderId());
68 ashish 18357
 
18358
      }
18359
      throw new IllegalStateException();
18360
    }
18361
 
18362
    public Object getFieldValue(int fieldId) {
18363
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18364
    }
18365
 
18366
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18367
    public boolean isSet(_Fields field) {
18368
      switch (field) {
483 rajveer 18369
      case ORDER_ID:
18370
        return isSetOrderId();
68 ashish 18371
      }
18372
      throw new IllegalStateException();
18373
    }
18374
 
18375
    public boolean isSet(int fieldID) {
18376
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18377
    }
18378
 
18379
    @Override
18380
    public boolean equals(Object that) {
18381
      if (that == null)
18382
        return false;
483 rajveer 18383
      if (that instanceof getLineItemsForOrder_args)
18384
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 18385
      return false;
18386
    }
18387
 
483 rajveer 18388
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 18389
      if (that == null)
18390
        return false;
18391
 
483 rajveer 18392
      boolean this_present_orderId = true;
18393
      boolean that_present_orderId = true;
18394
      if (this_present_orderId || that_present_orderId) {
18395
        if (!(this_present_orderId && that_present_orderId))
68 ashish 18396
          return false;
483 rajveer 18397
        if (this.orderId != that.orderId)
68 ashish 18398
          return false;
18399
      }
18400
 
18401
      return true;
18402
    }
18403
 
18404
    @Override
18405
    public int hashCode() {
18406
      return 0;
18407
    }
18408
 
483 rajveer 18409
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 18410
      if (!getClass().equals(other.getClass())) {
18411
        return getClass().getName().compareTo(other.getClass().getName());
18412
      }
18413
 
18414
      int lastComparison = 0;
483 rajveer 18415
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 18416
 
483 rajveer 18417
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 18418
      if (lastComparison != 0) {
18419
        return lastComparison;
18420
      }
483 rajveer 18421
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 18422
      if (lastComparison != 0) {
18423
        return lastComparison;
18424
      }
18425
      return 0;
18426
    }
18427
 
18428
    public void read(TProtocol iprot) throws TException {
18429
      TField field;
18430
      iprot.readStructBegin();
18431
      while (true)
18432
      {
18433
        field = iprot.readFieldBegin();
18434
        if (field.type == TType.STOP) { 
18435
          break;
18436
        }
18437
        _Fields fieldId = _Fields.findByThriftId(field.id);
18438
        if (fieldId == null) {
18439
          TProtocolUtil.skip(iprot, field.type);
18440
        } else {
18441
          switch (fieldId) {
483 rajveer 18442
            case ORDER_ID:
68 ashish 18443
              if (field.type == TType.I64) {
483 rajveer 18444
                this.orderId = iprot.readI64();
18445
                setOrderIdIsSet(true);
68 ashish 18446
              } else { 
18447
                TProtocolUtil.skip(iprot, field.type);
18448
              }
18449
              break;
18450
          }
18451
          iprot.readFieldEnd();
18452
        }
18453
      }
18454
      iprot.readStructEnd();
18455
      validate();
18456
    }
18457
 
18458
    public void write(TProtocol oprot) throws TException {
18459
      validate();
18460
 
18461
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18462
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18463
      oprot.writeI64(this.orderId);
68 ashish 18464
      oprot.writeFieldEnd();
18465
      oprot.writeFieldStop();
18466
      oprot.writeStructEnd();
18467
    }
18468
 
18469
    @Override
18470
    public String toString() {
483 rajveer 18471
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 18472
      boolean first = true;
18473
 
483 rajveer 18474
      sb.append("orderId:");
18475
      sb.append(this.orderId);
68 ashish 18476
      first = false;
18477
      sb.append(")");
18478
      return sb.toString();
18479
    }
18480
 
18481
    public void validate() throws TException {
18482
      // check for required fields
18483
    }
18484
 
18485
  }
18486
 
483 rajveer 18487
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
18488
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 18489
 
483 rajveer 18490
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 18491
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18492
 
483 rajveer 18493
    private List<LineItem> success;
68 ashish 18494
    private TransactionServiceException ex;
18495
 
18496
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18497
    public enum _Fields implements TFieldIdEnum {
18498
      SUCCESS((short)0, "success"),
18499
      EX((short)1, "ex");
18500
 
18501
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18502
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18503
 
18504
      static {
18505
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18506
          byId.put((int)field._thriftId, field);
18507
          byName.put(field.getFieldName(), field);
18508
        }
18509
      }
18510
 
18511
      /**
18512
       * Find the _Fields constant that matches fieldId, or null if its not found.
18513
       */
18514
      public static _Fields findByThriftId(int fieldId) {
18515
        return byId.get(fieldId);
18516
      }
18517
 
18518
      /**
18519
       * Find the _Fields constant that matches fieldId, throwing an exception
18520
       * if it is not found.
18521
       */
18522
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18523
        _Fields fields = findByThriftId(fieldId);
18524
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18525
        return fields;
18526
      }
18527
 
18528
      /**
18529
       * Find the _Fields constant that matches name, or null if its not found.
18530
       */
18531
      public static _Fields findByName(String name) {
18532
        return byName.get(name);
18533
      }
18534
 
18535
      private final short _thriftId;
18536
      private final String _fieldName;
18537
 
18538
      _Fields(short thriftId, String fieldName) {
18539
        _thriftId = thriftId;
18540
        _fieldName = fieldName;
18541
      }
18542
 
18543
      public short getThriftFieldId() {
18544
        return _thriftId;
18545
      }
18546
 
18547
      public String getFieldName() {
18548
        return _fieldName;
18549
      }
18550
    }
18551
 
18552
    // isset id assignments
18553
 
18554
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18555
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18556
          new ListMetaData(TType.LIST, 
18557
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18558
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18559
          new FieldValueMetaData(TType.STRUCT)));
18560
    }});
18561
 
18562
    static {
483 rajveer 18563
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18564
    }
18565
 
483 rajveer 18566
    public getLineItemsForOrder_result() {
68 ashish 18567
    }
18568
 
483 rajveer 18569
    public getLineItemsForOrder_result(
18570
      List<LineItem> success,
68 ashish 18571
      TransactionServiceException ex)
18572
    {
18573
      this();
18574
      this.success = success;
18575
      this.ex = ex;
18576
    }
18577
 
18578
    /**
18579
     * Performs a deep copy on <i>other</i>.
18580
     */
483 rajveer 18581
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18582
      if (other.isSetSuccess()) {
18583
        List<LineItem> __this__success = new ArrayList<LineItem>();
18584
        for (LineItem other_element : other.success) {
18585
          __this__success.add(new LineItem(other_element));
18586
        }
18587
        this.success = __this__success;
18588
      }
68 ashish 18589
      if (other.isSetEx()) {
18590
        this.ex = new TransactionServiceException(other.ex);
18591
      }
18592
    }
18593
 
483 rajveer 18594
    public getLineItemsForOrder_result deepCopy() {
18595
      return new getLineItemsForOrder_result(this);
68 ashish 18596
    }
18597
 
18598
    @Deprecated
483 rajveer 18599
    public getLineItemsForOrder_result clone() {
18600
      return new getLineItemsForOrder_result(this);
68 ashish 18601
    }
18602
 
483 rajveer 18603
    public int getSuccessSize() {
18604
      return (this.success == null) ? 0 : this.success.size();
18605
    }
18606
 
18607
    public java.util.Iterator<LineItem> getSuccessIterator() {
18608
      return (this.success == null) ? null : this.success.iterator();
18609
    }
18610
 
18611
    public void addToSuccess(LineItem elem) {
18612
      if (this.success == null) {
18613
        this.success = new ArrayList<LineItem>();
18614
      }
18615
      this.success.add(elem);
18616
    }
18617
 
18618
    public List<LineItem> getSuccess() {
68 ashish 18619
      return this.success;
18620
    }
18621
 
483 rajveer 18622
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18623
      this.success = success;
18624
      return this;
18625
    }
18626
 
18627
    public void unsetSuccess() {
483 rajveer 18628
      this.success = null;
68 ashish 18629
    }
18630
 
18631
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18632
    public boolean isSetSuccess() {
483 rajveer 18633
      return this.success != null;
68 ashish 18634
    }
18635
 
18636
    public void setSuccessIsSet(boolean value) {
483 rajveer 18637
      if (!value) {
18638
        this.success = null;
18639
      }
68 ashish 18640
    }
18641
 
18642
    public TransactionServiceException getEx() {
18643
      return this.ex;
18644
    }
18645
 
483 rajveer 18646
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18647
      this.ex = ex;
18648
      return this;
18649
    }
18650
 
18651
    public void unsetEx() {
18652
      this.ex = null;
18653
    }
18654
 
18655
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18656
    public boolean isSetEx() {
18657
      return this.ex != null;
18658
    }
18659
 
18660
    public void setExIsSet(boolean value) {
18661
      if (!value) {
18662
        this.ex = null;
18663
      }
18664
    }
18665
 
18666
    public void setFieldValue(_Fields field, Object value) {
18667
      switch (field) {
18668
      case SUCCESS:
18669
        if (value == null) {
18670
          unsetSuccess();
18671
        } else {
483 rajveer 18672
          setSuccess((List<LineItem>)value);
68 ashish 18673
        }
18674
        break;
18675
 
18676
      case EX:
18677
        if (value == null) {
18678
          unsetEx();
18679
        } else {
18680
          setEx((TransactionServiceException)value);
18681
        }
18682
        break;
18683
 
18684
      }
18685
    }
18686
 
18687
    public void setFieldValue(int fieldID, Object value) {
18688
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18689
    }
18690
 
18691
    public Object getFieldValue(_Fields field) {
18692
      switch (field) {
18693
      case SUCCESS:
483 rajveer 18694
        return getSuccess();
68 ashish 18695
 
18696
      case EX:
18697
        return getEx();
18698
 
18699
      }
18700
      throw new IllegalStateException();
18701
    }
18702
 
18703
    public Object getFieldValue(int fieldId) {
18704
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18705
    }
18706
 
18707
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18708
    public boolean isSet(_Fields field) {
18709
      switch (field) {
18710
      case SUCCESS:
18711
        return isSetSuccess();
18712
      case EX:
18713
        return isSetEx();
18714
      }
18715
      throw new IllegalStateException();
18716
    }
18717
 
18718
    public boolean isSet(int fieldID) {
18719
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18720
    }
18721
 
18722
    @Override
18723
    public boolean equals(Object that) {
18724
      if (that == null)
18725
        return false;
483 rajveer 18726
      if (that instanceof getLineItemsForOrder_result)
18727
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18728
      return false;
18729
    }
18730
 
483 rajveer 18731
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18732
      if (that == null)
18733
        return false;
18734
 
483 rajveer 18735
      boolean this_present_success = true && this.isSetSuccess();
18736
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18737
      if (this_present_success || that_present_success) {
18738
        if (!(this_present_success && that_present_success))
18739
          return false;
483 rajveer 18740
        if (!this.success.equals(that.success))
68 ashish 18741
          return false;
18742
      }
18743
 
18744
      boolean this_present_ex = true && this.isSetEx();
18745
      boolean that_present_ex = true && that.isSetEx();
18746
      if (this_present_ex || that_present_ex) {
18747
        if (!(this_present_ex && that_present_ex))
18748
          return false;
18749
        if (!this.ex.equals(that.ex))
18750
          return false;
18751
      }
18752
 
18753
      return true;
18754
    }
18755
 
18756
    @Override
18757
    public int hashCode() {
18758
      return 0;
18759
    }
18760
 
483 rajveer 18761
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18762
      if (!getClass().equals(other.getClass())) {
18763
        return getClass().getName().compareTo(other.getClass().getName());
18764
      }
18765
 
18766
      int lastComparison = 0;
483 rajveer 18767
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18768
 
18769
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18770
      if (lastComparison != 0) {
18771
        return lastComparison;
18772
      }
18773
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18774
      if (lastComparison != 0) {
18775
        return lastComparison;
18776
      }
18777
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18778
      if (lastComparison != 0) {
18779
        return lastComparison;
18780
      }
18781
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18782
      if (lastComparison != 0) {
18783
        return lastComparison;
18784
      }
18785
      return 0;
18786
    }
18787
 
18788
    public void read(TProtocol iprot) throws TException {
18789
      TField field;
18790
      iprot.readStructBegin();
18791
      while (true)
18792
      {
18793
        field = iprot.readFieldBegin();
18794
        if (field.type == TType.STOP) { 
18795
          break;
18796
        }
18797
        _Fields fieldId = _Fields.findByThriftId(field.id);
18798
        if (fieldId == null) {
18799
          TProtocolUtil.skip(iprot, field.type);
18800
        } else {
18801
          switch (fieldId) {
18802
            case SUCCESS:
483 rajveer 18803
              if (field.type == TType.LIST) {
18804
                {
1382 varun.gupt 18805
                  TList _list40 = iprot.readListBegin();
18806
                  this.success = new ArrayList<LineItem>(_list40.size);
18807
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 18808
                  {
1382 varun.gupt 18809
                    LineItem _elem42;
18810
                    _elem42 = new LineItem();
18811
                    _elem42.read(iprot);
18812
                    this.success.add(_elem42);
483 rajveer 18813
                  }
18814
                  iprot.readListEnd();
18815
                }
68 ashish 18816
              } else { 
18817
                TProtocolUtil.skip(iprot, field.type);
18818
              }
18819
              break;
18820
            case EX:
18821
              if (field.type == TType.STRUCT) {
18822
                this.ex = new TransactionServiceException();
18823
                this.ex.read(iprot);
18824
              } else { 
18825
                TProtocolUtil.skip(iprot, field.type);
18826
              }
18827
              break;
18828
          }
18829
          iprot.readFieldEnd();
18830
        }
18831
      }
18832
      iprot.readStructEnd();
18833
      validate();
18834
    }
18835
 
18836
    public void write(TProtocol oprot) throws TException {
18837
      oprot.writeStructBegin(STRUCT_DESC);
18838
 
18839
      if (this.isSetSuccess()) {
18840
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18841
        {
18842
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18843
          for (LineItem _iter43 : this.success)
483 rajveer 18844
          {
1382 varun.gupt 18845
            _iter43.write(oprot);
483 rajveer 18846
          }
18847
          oprot.writeListEnd();
18848
        }
68 ashish 18849
        oprot.writeFieldEnd();
18850
      } else if (this.isSetEx()) {
18851
        oprot.writeFieldBegin(EX_FIELD_DESC);
18852
        this.ex.write(oprot);
18853
        oprot.writeFieldEnd();
18854
      }
18855
      oprot.writeFieldStop();
18856
      oprot.writeStructEnd();
18857
    }
18858
 
18859
    @Override
18860
    public String toString() {
483 rajveer 18861
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 18862
      boolean first = true;
18863
 
18864
      sb.append("success:");
483 rajveer 18865
      if (this.success == null) {
18866
        sb.append("null");
18867
      } else {
18868
        sb.append(this.success);
18869
      }
68 ashish 18870
      first = false;
18871
      if (!first) sb.append(", ");
18872
      sb.append("ex:");
18873
      if (this.ex == null) {
18874
        sb.append("null");
18875
      } else {
18876
        sb.append(this.ex);
18877
      }
18878
      first = false;
18879
      sb.append(")");
18880
      return sb.toString();
18881
    }
18882
 
18883
    public void validate() throws TException {
18884
      // check for required fields
18885
    }
18886
 
18887
  }
18888
 
1529 ankur.sing 18889
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
18890
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
18891
 
18892
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
18893
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
18894
 
18895
    private long orderId;
18896
    private long customerId;
18897
 
18898
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18899
    public enum _Fields implements TFieldIdEnum {
18900
      ORDER_ID((short)1, "orderId"),
18901
      CUSTOMER_ID((short)2, "customerId");
18902
 
18903
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18904
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18905
 
18906
      static {
18907
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18908
          byId.put((int)field._thriftId, field);
18909
          byName.put(field.getFieldName(), field);
18910
        }
18911
      }
18912
 
18913
      /**
18914
       * Find the _Fields constant that matches fieldId, or null if its not found.
18915
       */
18916
      public static _Fields findByThriftId(int fieldId) {
18917
        return byId.get(fieldId);
18918
      }
18919
 
18920
      /**
18921
       * Find the _Fields constant that matches fieldId, throwing an exception
18922
       * if it is not found.
18923
       */
18924
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18925
        _Fields fields = findByThriftId(fieldId);
18926
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18927
        return fields;
18928
      }
18929
 
18930
      /**
18931
       * Find the _Fields constant that matches name, or null if its not found.
18932
       */
18933
      public static _Fields findByName(String name) {
18934
        return byName.get(name);
18935
      }
18936
 
18937
      private final short _thriftId;
18938
      private final String _fieldName;
18939
 
18940
      _Fields(short thriftId, String fieldName) {
18941
        _thriftId = thriftId;
18942
        _fieldName = fieldName;
18943
      }
18944
 
18945
      public short getThriftFieldId() {
18946
        return _thriftId;
18947
      }
18948
 
18949
      public String getFieldName() {
18950
        return _fieldName;
18951
      }
18952
    }
18953
 
18954
    // isset id assignments
18955
    private static final int __ORDERID_ISSET_ID = 0;
18956
    private static final int __CUSTOMERID_ISSET_ID = 1;
18957
    private BitSet __isset_bit_vector = new BitSet(2);
18958
 
18959
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18960
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
18961
          new FieldValueMetaData(TType.I64)));
18962
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
18963
          new FieldValueMetaData(TType.I64)));
18964
    }});
18965
 
18966
    static {
18967
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
18968
    }
18969
 
18970
    public getOrderForCustomer_args() {
18971
    }
18972
 
18973
    public getOrderForCustomer_args(
18974
      long orderId,
18975
      long customerId)
18976
    {
18977
      this();
18978
      this.orderId = orderId;
18979
      setOrderIdIsSet(true);
18980
      this.customerId = customerId;
18981
      setCustomerIdIsSet(true);
18982
    }
18983
 
18984
    /**
18985
     * Performs a deep copy on <i>other</i>.
18986
     */
18987
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
18988
      __isset_bit_vector.clear();
18989
      __isset_bit_vector.or(other.__isset_bit_vector);
18990
      this.orderId = other.orderId;
18991
      this.customerId = other.customerId;
18992
    }
18993
 
18994
    public getOrderForCustomer_args deepCopy() {
18995
      return new getOrderForCustomer_args(this);
18996
    }
18997
 
18998
    @Deprecated
18999
    public getOrderForCustomer_args clone() {
19000
      return new getOrderForCustomer_args(this);
19001
    }
19002
 
19003
    public long getOrderId() {
19004
      return this.orderId;
19005
    }
19006
 
19007
    public getOrderForCustomer_args setOrderId(long orderId) {
19008
      this.orderId = orderId;
19009
      setOrderIdIsSet(true);
19010
      return this;
19011
    }
19012
 
19013
    public void unsetOrderId() {
19014
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19015
    }
19016
 
19017
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19018
    public boolean isSetOrderId() {
19019
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19020
    }
19021
 
19022
    public void setOrderIdIsSet(boolean value) {
19023
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19024
    }
19025
 
19026
    public long getCustomerId() {
19027
      return this.customerId;
19028
    }
19029
 
19030
    public getOrderForCustomer_args setCustomerId(long customerId) {
19031
      this.customerId = customerId;
19032
      setCustomerIdIsSet(true);
19033
      return this;
19034
    }
19035
 
19036
    public void unsetCustomerId() {
19037
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
19038
    }
19039
 
19040
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
19041
    public boolean isSetCustomerId() {
19042
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
19043
    }
19044
 
19045
    public void setCustomerIdIsSet(boolean value) {
19046
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
19047
    }
19048
 
19049
    public void setFieldValue(_Fields field, Object value) {
19050
      switch (field) {
19051
      case ORDER_ID:
19052
        if (value == null) {
19053
          unsetOrderId();
19054
        } else {
19055
          setOrderId((Long)value);
19056
        }
19057
        break;
19058
 
19059
      case CUSTOMER_ID:
19060
        if (value == null) {
19061
          unsetCustomerId();
19062
        } else {
19063
          setCustomerId((Long)value);
19064
        }
19065
        break;
19066
 
19067
      }
19068
    }
19069
 
19070
    public void setFieldValue(int fieldID, Object value) {
19071
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19072
    }
19073
 
19074
    public Object getFieldValue(_Fields field) {
19075
      switch (field) {
19076
      case ORDER_ID:
19077
        return new Long(getOrderId());
19078
 
19079
      case CUSTOMER_ID:
19080
        return new Long(getCustomerId());
19081
 
19082
      }
19083
      throw new IllegalStateException();
19084
    }
19085
 
19086
    public Object getFieldValue(int fieldId) {
19087
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19088
    }
19089
 
19090
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19091
    public boolean isSet(_Fields field) {
19092
      switch (field) {
19093
      case ORDER_ID:
19094
        return isSetOrderId();
19095
      case CUSTOMER_ID:
19096
        return isSetCustomerId();
19097
      }
19098
      throw new IllegalStateException();
19099
    }
19100
 
19101
    public boolean isSet(int fieldID) {
19102
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19103
    }
19104
 
19105
    @Override
19106
    public boolean equals(Object that) {
19107
      if (that == null)
19108
        return false;
19109
      if (that instanceof getOrderForCustomer_args)
19110
        return this.equals((getOrderForCustomer_args)that);
19111
      return false;
19112
    }
19113
 
19114
    public boolean equals(getOrderForCustomer_args that) {
19115
      if (that == null)
19116
        return false;
19117
 
19118
      boolean this_present_orderId = true;
19119
      boolean that_present_orderId = true;
19120
      if (this_present_orderId || that_present_orderId) {
19121
        if (!(this_present_orderId && that_present_orderId))
19122
          return false;
19123
        if (this.orderId != that.orderId)
19124
          return false;
19125
      }
19126
 
19127
      boolean this_present_customerId = true;
19128
      boolean that_present_customerId = true;
19129
      if (this_present_customerId || that_present_customerId) {
19130
        if (!(this_present_customerId && that_present_customerId))
19131
          return false;
19132
        if (this.customerId != that.customerId)
19133
          return false;
19134
      }
19135
 
19136
      return true;
19137
    }
19138
 
19139
    @Override
19140
    public int hashCode() {
19141
      return 0;
19142
    }
19143
 
19144
    public int compareTo(getOrderForCustomer_args other) {
19145
      if (!getClass().equals(other.getClass())) {
19146
        return getClass().getName().compareTo(other.getClass().getName());
19147
      }
19148
 
19149
      int lastComparison = 0;
19150
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
19151
 
19152
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
19153
      if (lastComparison != 0) {
19154
        return lastComparison;
19155
      }
19156
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
19157
      if (lastComparison != 0) {
19158
        return lastComparison;
19159
      }
19160
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
19161
      if (lastComparison != 0) {
19162
        return lastComparison;
19163
      }
19164
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
19165
      if (lastComparison != 0) {
19166
        return lastComparison;
19167
      }
19168
      return 0;
19169
    }
19170
 
19171
    public void read(TProtocol iprot) throws TException {
19172
      TField field;
19173
      iprot.readStructBegin();
19174
      while (true)
19175
      {
19176
        field = iprot.readFieldBegin();
19177
        if (field.type == TType.STOP) { 
19178
          break;
19179
        }
19180
        _Fields fieldId = _Fields.findByThriftId(field.id);
19181
        if (fieldId == null) {
19182
          TProtocolUtil.skip(iprot, field.type);
19183
        } else {
19184
          switch (fieldId) {
19185
            case ORDER_ID:
19186
              if (field.type == TType.I64) {
19187
                this.orderId = iprot.readI64();
19188
                setOrderIdIsSet(true);
19189
              } else { 
19190
                TProtocolUtil.skip(iprot, field.type);
19191
              }
19192
              break;
19193
            case CUSTOMER_ID:
19194
              if (field.type == TType.I64) {
19195
                this.customerId = iprot.readI64();
19196
                setCustomerIdIsSet(true);
19197
              } else { 
19198
                TProtocolUtil.skip(iprot, field.type);
19199
              }
19200
              break;
19201
          }
19202
          iprot.readFieldEnd();
19203
        }
19204
      }
19205
      iprot.readStructEnd();
19206
      validate();
19207
    }
19208
 
19209
    public void write(TProtocol oprot) throws TException {
19210
      validate();
19211
 
19212
      oprot.writeStructBegin(STRUCT_DESC);
19213
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19214
      oprot.writeI64(this.orderId);
19215
      oprot.writeFieldEnd();
19216
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
19217
      oprot.writeI64(this.customerId);
19218
      oprot.writeFieldEnd();
19219
      oprot.writeFieldStop();
19220
      oprot.writeStructEnd();
19221
    }
19222
 
19223
    @Override
19224
    public String toString() {
19225
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
19226
      boolean first = true;
19227
 
19228
      sb.append("orderId:");
19229
      sb.append(this.orderId);
19230
      first = false;
19231
      if (!first) sb.append(", ");
19232
      sb.append("customerId:");
19233
      sb.append(this.customerId);
19234
      first = false;
19235
      sb.append(")");
19236
      return sb.toString();
19237
    }
19238
 
19239
    public void validate() throws TException {
19240
      // check for required fields
19241
    }
19242
 
19243
  }
19244
 
19245
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
19246
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
19247
 
19248
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
19249
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19250
 
19251
    private Order success;
19252
    private TransactionServiceException ex;
19253
 
19254
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19255
    public enum _Fields implements TFieldIdEnum {
19256
      SUCCESS((short)0, "success"),
19257
      EX((short)1, "ex");
19258
 
19259
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19260
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19261
 
19262
      static {
19263
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19264
          byId.put((int)field._thriftId, field);
19265
          byName.put(field.getFieldName(), field);
19266
        }
19267
      }
19268
 
19269
      /**
19270
       * Find the _Fields constant that matches fieldId, or null if its not found.
19271
       */
19272
      public static _Fields findByThriftId(int fieldId) {
19273
        return byId.get(fieldId);
19274
      }
19275
 
19276
      /**
19277
       * Find the _Fields constant that matches fieldId, throwing an exception
19278
       * if it is not found.
19279
       */
19280
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19281
        _Fields fields = findByThriftId(fieldId);
19282
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19283
        return fields;
19284
      }
19285
 
19286
      /**
19287
       * Find the _Fields constant that matches name, or null if its not found.
19288
       */
19289
      public static _Fields findByName(String name) {
19290
        return byName.get(name);
19291
      }
19292
 
19293
      private final short _thriftId;
19294
      private final String _fieldName;
19295
 
19296
      _Fields(short thriftId, String fieldName) {
19297
        _thriftId = thriftId;
19298
        _fieldName = fieldName;
19299
      }
19300
 
19301
      public short getThriftFieldId() {
19302
        return _thriftId;
19303
      }
19304
 
19305
      public String getFieldName() {
19306
        return _fieldName;
19307
      }
19308
    }
19309
 
19310
    // isset id assignments
19311
 
19312
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19313
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19314
          new StructMetaData(TType.STRUCT, Order.class)));
19315
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19316
          new FieldValueMetaData(TType.STRUCT)));
19317
    }});
19318
 
19319
    static {
19320
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
19321
    }
19322
 
19323
    public getOrderForCustomer_result() {
19324
    }
19325
 
19326
    public getOrderForCustomer_result(
19327
      Order success,
19328
      TransactionServiceException ex)
19329
    {
19330
      this();
19331
      this.success = success;
19332
      this.ex = ex;
19333
    }
19334
 
19335
    /**
19336
     * Performs a deep copy on <i>other</i>.
19337
     */
19338
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
19339
      if (other.isSetSuccess()) {
19340
        this.success = new Order(other.success);
19341
      }
19342
      if (other.isSetEx()) {
19343
        this.ex = new TransactionServiceException(other.ex);
19344
      }
19345
    }
19346
 
19347
    public getOrderForCustomer_result deepCopy() {
19348
      return new getOrderForCustomer_result(this);
19349
    }
19350
 
19351
    @Deprecated
19352
    public getOrderForCustomer_result clone() {
19353
      return new getOrderForCustomer_result(this);
19354
    }
19355
 
19356
    public Order getSuccess() {
19357
      return this.success;
19358
    }
19359
 
19360
    public getOrderForCustomer_result setSuccess(Order success) {
19361
      this.success = success;
19362
      return this;
19363
    }
19364
 
19365
    public void unsetSuccess() {
19366
      this.success = null;
19367
    }
19368
 
19369
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19370
    public boolean isSetSuccess() {
19371
      return this.success != null;
19372
    }
19373
 
19374
    public void setSuccessIsSet(boolean value) {
19375
      if (!value) {
19376
        this.success = null;
19377
      }
19378
    }
19379
 
19380
    public TransactionServiceException getEx() {
19381
      return this.ex;
19382
    }
19383
 
19384
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
19385
      this.ex = ex;
19386
      return this;
19387
    }
19388
 
19389
    public void unsetEx() {
19390
      this.ex = null;
19391
    }
19392
 
19393
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19394
    public boolean isSetEx() {
19395
      return this.ex != null;
19396
    }
19397
 
19398
    public void setExIsSet(boolean value) {
19399
      if (!value) {
19400
        this.ex = null;
19401
      }
19402
    }
19403
 
19404
    public void setFieldValue(_Fields field, Object value) {
19405
      switch (field) {
19406
      case SUCCESS:
19407
        if (value == null) {
19408
          unsetSuccess();
19409
        } else {
19410
          setSuccess((Order)value);
19411
        }
19412
        break;
19413
 
19414
      case EX:
19415
        if (value == null) {
19416
          unsetEx();
19417
        } else {
19418
          setEx((TransactionServiceException)value);
19419
        }
19420
        break;
19421
 
19422
      }
19423
    }
19424
 
19425
    public void setFieldValue(int fieldID, Object value) {
19426
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19427
    }
19428
 
19429
    public Object getFieldValue(_Fields field) {
19430
      switch (field) {
19431
      case SUCCESS:
19432
        return getSuccess();
19433
 
19434
      case EX:
19435
        return getEx();
19436
 
19437
      }
19438
      throw new IllegalStateException();
19439
    }
19440
 
19441
    public Object getFieldValue(int fieldId) {
19442
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19443
    }
19444
 
19445
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19446
    public boolean isSet(_Fields field) {
19447
      switch (field) {
19448
      case SUCCESS:
19449
        return isSetSuccess();
19450
      case EX:
19451
        return isSetEx();
19452
      }
19453
      throw new IllegalStateException();
19454
    }
19455
 
19456
    public boolean isSet(int fieldID) {
19457
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19458
    }
19459
 
19460
    @Override
19461
    public boolean equals(Object that) {
19462
      if (that == null)
19463
        return false;
19464
      if (that instanceof getOrderForCustomer_result)
19465
        return this.equals((getOrderForCustomer_result)that);
19466
      return false;
19467
    }
19468
 
19469
    public boolean equals(getOrderForCustomer_result that) {
19470
      if (that == null)
19471
        return false;
19472
 
19473
      boolean this_present_success = true && this.isSetSuccess();
19474
      boolean that_present_success = true && that.isSetSuccess();
19475
      if (this_present_success || that_present_success) {
19476
        if (!(this_present_success && that_present_success))
19477
          return false;
19478
        if (!this.success.equals(that.success))
19479
          return false;
19480
      }
19481
 
19482
      boolean this_present_ex = true && this.isSetEx();
19483
      boolean that_present_ex = true && that.isSetEx();
19484
      if (this_present_ex || that_present_ex) {
19485
        if (!(this_present_ex && that_present_ex))
19486
          return false;
19487
        if (!this.ex.equals(that.ex))
19488
          return false;
19489
      }
19490
 
19491
      return true;
19492
    }
19493
 
19494
    @Override
19495
    public int hashCode() {
19496
      return 0;
19497
    }
19498
 
19499
    public int compareTo(getOrderForCustomer_result other) {
19500
      if (!getClass().equals(other.getClass())) {
19501
        return getClass().getName().compareTo(other.getClass().getName());
19502
      }
19503
 
19504
      int lastComparison = 0;
19505
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
19506
 
19507
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19508
      if (lastComparison != 0) {
19509
        return lastComparison;
19510
      }
19511
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19512
      if (lastComparison != 0) {
19513
        return lastComparison;
19514
      }
19515
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19516
      if (lastComparison != 0) {
19517
        return lastComparison;
19518
      }
19519
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19520
      if (lastComparison != 0) {
19521
        return lastComparison;
19522
      }
19523
      return 0;
19524
    }
19525
 
19526
    public void read(TProtocol iprot) throws TException {
19527
      TField field;
19528
      iprot.readStructBegin();
19529
      while (true)
19530
      {
19531
        field = iprot.readFieldBegin();
19532
        if (field.type == TType.STOP) { 
19533
          break;
19534
        }
19535
        _Fields fieldId = _Fields.findByThriftId(field.id);
19536
        if (fieldId == null) {
19537
          TProtocolUtil.skip(iprot, field.type);
19538
        } else {
19539
          switch (fieldId) {
19540
            case SUCCESS:
19541
              if (field.type == TType.STRUCT) {
19542
                this.success = new Order();
19543
                this.success.read(iprot);
19544
              } else { 
19545
                TProtocolUtil.skip(iprot, field.type);
19546
              }
19547
              break;
19548
            case EX:
19549
              if (field.type == TType.STRUCT) {
19550
                this.ex = new TransactionServiceException();
19551
                this.ex.read(iprot);
19552
              } else { 
19553
                TProtocolUtil.skip(iprot, field.type);
19554
              }
19555
              break;
19556
          }
19557
          iprot.readFieldEnd();
19558
        }
19559
      }
19560
      iprot.readStructEnd();
19561
      validate();
19562
    }
19563
 
19564
    public void write(TProtocol oprot) throws TException {
19565
      oprot.writeStructBegin(STRUCT_DESC);
19566
 
19567
      if (this.isSetSuccess()) {
19568
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19569
        this.success.write(oprot);
19570
        oprot.writeFieldEnd();
19571
      } else if (this.isSetEx()) {
19572
        oprot.writeFieldBegin(EX_FIELD_DESC);
19573
        this.ex.write(oprot);
19574
        oprot.writeFieldEnd();
19575
      }
19576
      oprot.writeFieldStop();
19577
      oprot.writeStructEnd();
19578
    }
19579
 
19580
    @Override
19581
    public String toString() {
19582
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
19583
      boolean first = true;
19584
 
19585
      sb.append("success:");
19586
      if (this.success == null) {
19587
        sb.append("null");
19588
      } else {
19589
        sb.append(this.success);
19590
      }
19591
      first = false;
19592
      if (!first) sb.append(", ");
19593
      sb.append("ex:");
19594
      if (this.ex == null) {
19595
        sb.append("null");
19596
      } else {
19597
        sb.append(this.ex);
19598
      }
19599
      first = false;
19600
      sb.append(")");
19601
      return sb.toString();
19602
    }
19603
 
19604
    public void validate() throws TException {
19605
      // check for required fields
19606
    }
19607
 
19608
  }
19609
 
1221 chandransh 19610
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
19611
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
19612
 
19613
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19614
 
19615
    private long warehouseId;
19616
 
19617
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19618
    public enum _Fields implements TFieldIdEnum {
19619
      WAREHOUSE_ID((short)1, "warehouseId");
19620
 
19621
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19622
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19623
 
19624
      static {
19625
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19626
          byId.put((int)field._thriftId, field);
19627
          byName.put(field.getFieldName(), field);
19628
        }
19629
      }
19630
 
19631
      /**
19632
       * Find the _Fields constant that matches fieldId, or null if its not found.
19633
       */
19634
      public static _Fields findByThriftId(int fieldId) {
19635
        return byId.get(fieldId);
19636
      }
19637
 
19638
      /**
19639
       * Find the _Fields constant that matches fieldId, throwing an exception
19640
       * if it is not found.
19641
       */
19642
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19643
        _Fields fields = findByThriftId(fieldId);
19644
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19645
        return fields;
19646
      }
19647
 
19648
      /**
19649
       * Find the _Fields constant that matches name, or null if its not found.
19650
       */
19651
      public static _Fields findByName(String name) {
19652
        return byName.get(name);
19653
      }
19654
 
19655
      private final short _thriftId;
19656
      private final String _fieldName;
19657
 
19658
      _Fields(short thriftId, String fieldName) {
19659
        _thriftId = thriftId;
19660
        _fieldName = fieldName;
19661
      }
19662
 
19663
      public short getThriftFieldId() {
19664
        return _thriftId;
19665
      }
19666
 
19667
      public String getFieldName() {
19668
        return _fieldName;
19669
      }
19670
    }
19671
 
19672
    // isset id assignments
19673
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19674
    private BitSet __isset_bit_vector = new BitSet(1);
19675
 
19676
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19677
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19678
          new FieldValueMetaData(TType.I64)));
19679
    }});
19680
 
19681
    static {
19682
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
19683
    }
19684
 
19685
    public batchOrders_args() {
19686
    }
19687
 
19688
    public batchOrders_args(
19689
      long warehouseId)
19690
    {
19691
      this();
19692
      this.warehouseId = warehouseId;
19693
      setWarehouseIdIsSet(true);
19694
    }
19695
 
19696
    /**
19697
     * Performs a deep copy on <i>other</i>.
19698
     */
19699
    public batchOrders_args(batchOrders_args other) {
19700
      __isset_bit_vector.clear();
19701
      __isset_bit_vector.or(other.__isset_bit_vector);
19702
      this.warehouseId = other.warehouseId;
19703
    }
19704
 
19705
    public batchOrders_args deepCopy() {
19706
      return new batchOrders_args(this);
19707
    }
19708
 
19709
    @Deprecated
19710
    public batchOrders_args clone() {
19711
      return new batchOrders_args(this);
19712
    }
19713
 
19714
    public long getWarehouseId() {
19715
      return this.warehouseId;
19716
    }
19717
 
19718
    public batchOrders_args setWarehouseId(long warehouseId) {
19719
      this.warehouseId = warehouseId;
19720
      setWarehouseIdIsSet(true);
19721
      return this;
19722
    }
19723
 
19724
    public void unsetWarehouseId() {
19725
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19726
    }
19727
 
19728
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19729
    public boolean isSetWarehouseId() {
19730
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19731
    }
19732
 
19733
    public void setWarehouseIdIsSet(boolean value) {
19734
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19735
    }
19736
 
19737
    public void setFieldValue(_Fields field, Object value) {
19738
      switch (field) {
19739
      case WAREHOUSE_ID:
19740
        if (value == null) {
19741
          unsetWarehouseId();
19742
        } else {
19743
          setWarehouseId((Long)value);
19744
        }
19745
        break;
19746
 
19747
      }
19748
    }
19749
 
19750
    public void setFieldValue(int fieldID, Object value) {
19751
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19752
    }
19753
 
19754
    public Object getFieldValue(_Fields field) {
19755
      switch (field) {
19756
      case WAREHOUSE_ID:
19757
        return new Long(getWarehouseId());
19758
 
19759
      }
19760
      throw new IllegalStateException();
19761
    }
19762
 
19763
    public Object getFieldValue(int fieldId) {
19764
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19765
    }
19766
 
19767
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19768
    public boolean isSet(_Fields field) {
19769
      switch (field) {
19770
      case WAREHOUSE_ID:
19771
        return isSetWarehouseId();
19772
      }
19773
      throw new IllegalStateException();
19774
    }
19775
 
19776
    public boolean isSet(int fieldID) {
19777
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19778
    }
19779
 
19780
    @Override
19781
    public boolean equals(Object that) {
19782
      if (that == null)
19783
        return false;
19784
      if (that instanceof batchOrders_args)
19785
        return this.equals((batchOrders_args)that);
19786
      return false;
19787
    }
19788
 
19789
    public boolean equals(batchOrders_args that) {
19790
      if (that == null)
19791
        return false;
19792
 
19793
      boolean this_present_warehouseId = true;
19794
      boolean that_present_warehouseId = true;
19795
      if (this_present_warehouseId || that_present_warehouseId) {
19796
        if (!(this_present_warehouseId && that_present_warehouseId))
19797
          return false;
19798
        if (this.warehouseId != that.warehouseId)
19799
          return false;
19800
      }
19801
 
19802
      return true;
19803
    }
19804
 
19805
    @Override
19806
    public int hashCode() {
19807
      return 0;
19808
    }
19809
 
19810
    public int compareTo(batchOrders_args other) {
19811
      if (!getClass().equals(other.getClass())) {
19812
        return getClass().getName().compareTo(other.getClass().getName());
19813
      }
19814
 
19815
      int lastComparison = 0;
19816
      batchOrders_args typedOther = (batchOrders_args)other;
19817
 
19818
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
19819
      if (lastComparison != 0) {
19820
        return lastComparison;
19821
      }
19822
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
19823
      if (lastComparison != 0) {
19824
        return lastComparison;
19825
      }
19826
      return 0;
19827
    }
19828
 
19829
    public void read(TProtocol iprot) throws TException {
19830
      TField field;
19831
      iprot.readStructBegin();
19832
      while (true)
19833
      {
19834
        field = iprot.readFieldBegin();
19835
        if (field.type == TType.STOP) { 
19836
          break;
19837
        }
19838
        _Fields fieldId = _Fields.findByThriftId(field.id);
19839
        if (fieldId == null) {
19840
          TProtocolUtil.skip(iprot, field.type);
19841
        } else {
19842
          switch (fieldId) {
19843
            case WAREHOUSE_ID:
19844
              if (field.type == TType.I64) {
19845
                this.warehouseId = iprot.readI64();
19846
                setWarehouseIdIsSet(true);
19847
              } else { 
19848
                TProtocolUtil.skip(iprot, field.type);
19849
              }
19850
              break;
19851
          }
19852
          iprot.readFieldEnd();
19853
        }
19854
      }
19855
      iprot.readStructEnd();
19856
      validate();
19857
    }
19858
 
19859
    public void write(TProtocol oprot) throws TException {
19860
      validate();
19861
 
19862
      oprot.writeStructBegin(STRUCT_DESC);
19863
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19864
      oprot.writeI64(this.warehouseId);
19865
      oprot.writeFieldEnd();
19866
      oprot.writeFieldStop();
19867
      oprot.writeStructEnd();
19868
    }
19869
 
19870
    @Override
19871
    public String toString() {
19872
      StringBuilder sb = new StringBuilder("batchOrders_args(");
19873
      boolean first = true;
19874
 
19875
      sb.append("warehouseId:");
19876
      sb.append(this.warehouseId);
19877
      first = false;
19878
      sb.append(")");
19879
      return sb.toString();
19880
    }
19881
 
19882
    public void validate() throws TException {
19883
      // check for required fields
19884
    }
19885
 
19886
  }
19887
 
19888
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
19889
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
19890
 
19891
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19892
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19893
 
19894
    private List<Order> success;
19895
    private TransactionServiceException ex;
19896
 
19897
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19898
    public enum _Fields implements TFieldIdEnum {
19899
      SUCCESS((short)0, "success"),
19900
      EX((short)1, "ex");
19901
 
19902
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19903
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19904
 
19905
      static {
19906
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19907
          byId.put((int)field._thriftId, field);
19908
          byName.put(field.getFieldName(), field);
19909
        }
19910
      }
19911
 
19912
      /**
19913
       * Find the _Fields constant that matches fieldId, or null if its not found.
19914
       */
19915
      public static _Fields findByThriftId(int fieldId) {
19916
        return byId.get(fieldId);
19917
      }
19918
 
19919
      /**
19920
       * Find the _Fields constant that matches fieldId, throwing an exception
19921
       * if it is not found.
19922
       */
19923
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19924
        _Fields fields = findByThriftId(fieldId);
19925
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19926
        return fields;
19927
      }
19928
 
19929
      /**
19930
       * Find the _Fields constant that matches name, or null if its not found.
19931
       */
19932
      public static _Fields findByName(String name) {
19933
        return byName.get(name);
19934
      }
19935
 
19936
      private final short _thriftId;
19937
      private final String _fieldName;
19938
 
19939
      _Fields(short thriftId, String fieldName) {
19940
        _thriftId = thriftId;
19941
        _fieldName = fieldName;
19942
      }
19943
 
19944
      public short getThriftFieldId() {
19945
        return _thriftId;
19946
      }
19947
 
19948
      public String getFieldName() {
19949
        return _fieldName;
19950
      }
19951
    }
19952
 
19953
    // isset id assignments
19954
 
19955
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19956
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19957
          new ListMetaData(TType.LIST, 
19958
              new StructMetaData(TType.STRUCT, Order.class))));
19959
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19960
          new FieldValueMetaData(TType.STRUCT)));
19961
    }});
19962
 
19963
    static {
19964
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
19965
    }
19966
 
19967
    public batchOrders_result() {
19968
    }
19969
 
19970
    public batchOrders_result(
19971
      List<Order> success,
19972
      TransactionServiceException ex)
19973
    {
19974
      this();
19975
      this.success = success;
19976
      this.ex = ex;
19977
    }
19978
 
19979
    /**
19980
     * Performs a deep copy on <i>other</i>.
19981
     */
19982
    public batchOrders_result(batchOrders_result other) {
19983
      if (other.isSetSuccess()) {
19984
        List<Order> __this__success = new ArrayList<Order>();
19985
        for (Order other_element : other.success) {
19986
          __this__success.add(new Order(other_element));
19987
        }
19988
        this.success = __this__success;
19989
      }
19990
      if (other.isSetEx()) {
19991
        this.ex = new TransactionServiceException(other.ex);
19992
      }
19993
    }
19994
 
19995
    public batchOrders_result deepCopy() {
19996
      return new batchOrders_result(this);
19997
    }
19998
 
19999
    @Deprecated
20000
    public batchOrders_result clone() {
20001
      return new batchOrders_result(this);
20002
    }
20003
 
20004
    public int getSuccessSize() {
20005
      return (this.success == null) ? 0 : this.success.size();
20006
    }
20007
 
20008
    public java.util.Iterator<Order> getSuccessIterator() {
20009
      return (this.success == null) ? null : this.success.iterator();
20010
    }
20011
 
20012
    public void addToSuccess(Order elem) {
20013
      if (this.success == null) {
20014
        this.success = new ArrayList<Order>();
20015
      }
20016
      this.success.add(elem);
20017
    }
20018
 
20019
    public List<Order> getSuccess() {
20020
      return this.success;
20021
    }
20022
 
20023
    public batchOrders_result setSuccess(List<Order> success) {
20024
      this.success = success;
20025
      return this;
20026
    }
20027
 
20028
    public void unsetSuccess() {
20029
      this.success = null;
20030
    }
20031
 
20032
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20033
    public boolean isSetSuccess() {
20034
      return this.success != null;
20035
    }
20036
 
20037
    public void setSuccessIsSet(boolean value) {
20038
      if (!value) {
20039
        this.success = null;
20040
      }
20041
    }
20042
 
20043
    public TransactionServiceException getEx() {
20044
      return this.ex;
20045
    }
20046
 
20047
    public batchOrders_result setEx(TransactionServiceException ex) {
20048
      this.ex = ex;
20049
      return this;
20050
    }
20051
 
20052
    public void unsetEx() {
20053
      this.ex = null;
20054
    }
20055
 
20056
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20057
    public boolean isSetEx() {
20058
      return this.ex != null;
20059
    }
20060
 
20061
    public void setExIsSet(boolean value) {
20062
      if (!value) {
20063
        this.ex = null;
20064
      }
20065
    }
20066
 
20067
    public void setFieldValue(_Fields field, Object value) {
20068
      switch (field) {
20069
      case SUCCESS:
20070
        if (value == null) {
20071
          unsetSuccess();
20072
        } else {
20073
          setSuccess((List<Order>)value);
20074
        }
20075
        break;
20076
 
20077
      case EX:
20078
        if (value == null) {
20079
          unsetEx();
20080
        } else {
20081
          setEx((TransactionServiceException)value);
20082
        }
20083
        break;
20084
 
20085
      }
20086
    }
20087
 
20088
    public void setFieldValue(int fieldID, Object value) {
20089
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20090
    }
20091
 
20092
    public Object getFieldValue(_Fields field) {
20093
      switch (field) {
20094
      case SUCCESS:
20095
        return getSuccess();
20096
 
20097
      case EX:
20098
        return getEx();
20099
 
20100
      }
20101
      throw new IllegalStateException();
20102
    }
20103
 
20104
    public Object getFieldValue(int fieldId) {
20105
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20106
    }
20107
 
20108
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20109
    public boolean isSet(_Fields field) {
20110
      switch (field) {
20111
      case SUCCESS:
20112
        return isSetSuccess();
20113
      case EX:
20114
        return isSetEx();
20115
      }
20116
      throw new IllegalStateException();
20117
    }
20118
 
20119
    public boolean isSet(int fieldID) {
20120
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20121
    }
20122
 
20123
    @Override
20124
    public boolean equals(Object that) {
20125
      if (that == null)
20126
        return false;
20127
      if (that instanceof batchOrders_result)
20128
        return this.equals((batchOrders_result)that);
20129
      return false;
20130
    }
20131
 
20132
    public boolean equals(batchOrders_result that) {
20133
      if (that == null)
20134
        return false;
20135
 
20136
      boolean this_present_success = true && this.isSetSuccess();
20137
      boolean that_present_success = true && that.isSetSuccess();
20138
      if (this_present_success || that_present_success) {
20139
        if (!(this_present_success && that_present_success))
20140
          return false;
20141
        if (!this.success.equals(that.success))
20142
          return false;
20143
      }
20144
 
20145
      boolean this_present_ex = true && this.isSetEx();
20146
      boolean that_present_ex = true && that.isSetEx();
20147
      if (this_present_ex || that_present_ex) {
20148
        if (!(this_present_ex && that_present_ex))
20149
          return false;
20150
        if (!this.ex.equals(that.ex))
20151
          return false;
20152
      }
20153
 
20154
      return true;
20155
    }
20156
 
20157
    @Override
20158
    public int hashCode() {
20159
      return 0;
20160
    }
20161
 
20162
    public int compareTo(batchOrders_result other) {
20163
      if (!getClass().equals(other.getClass())) {
20164
        return getClass().getName().compareTo(other.getClass().getName());
20165
      }
20166
 
20167
      int lastComparison = 0;
20168
      batchOrders_result typedOther = (batchOrders_result)other;
20169
 
20170
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20171
      if (lastComparison != 0) {
20172
        return lastComparison;
20173
      }
20174
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20175
      if (lastComparison != 0) {
20176
        return lastComparison;
20177
      }
20178
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20179
      if (lastComparison != 0) {
20180
        return lastComparison;
20181
      }
20182
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20183
      if (lastComparison != 0) {
20184
        return lastComparison;
20185
      }
20186
      return 0;
20187
    }
20188
 
20189
    public void read(TProtocol iprot) throws TException {
20190
      TField field;
20191
      iprot.readStructBegin();
20192
      while (true)
20193
      {
20194
        field = iprot.readFieldBegin();
20195
        if (field.type == TType.STOP) { 
20196
          break;
20197
        }
20198
        _Fields fieldId = _Fields.findByThriftId(field.id);
20199
        if (fieldId == null) {
20200
          TProtocolUtil.skip(iprot, field.type);
20201
        } else {
20202
          switch (fieldId) {
20203
            case SUCCESS:
20204
              if (field.type == TType.LIST) {
20205
                {
1382 varun.gupt 20206
                  TList _list44 = iprot.readListBegin();
20207
                  this.success = new ArrayList<Order>(_list44.size);
20208
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 20209
                  {
1382 varun.gupt 20210
                    Order _elem46;
20211
                    _elem46 = new Order();
20212
                    _elem46.read(iprot);
20213
                    this.success.add(_elem46);
1221 chandransh 20214
                  }
20215
                  iprot.readListEnd();
20216
                }
20217
              } else { 
20218
                TProtocolUtil.skip(iprot, field.type);
20219
              }
20220
              break;
20221
            case EX:
20222
              if (field.type == TType.STRUCT) {
20223
                this.ex = new TransactionServiceException();
20224
                this.ex.read(iprot);
20225
              } else { 
20226
                TProtocolUtil.skip(iprot, field.type);
20227
              }
20228
              break;
20229
          }
20230
          iprot.readFieldEnd();
20231
        }
20232
      }
20233
      iprot.readStructEnd();
20234
      validate();
20235
    }
20236
 
20237
    public void write(TProtocol oprot) throws TException {
20238
      oprot.writeStructBegin(STRUCT_DESC);
20239
 
20240
      if (this.isSetSuccess()) {
20241
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20242
        {
20243
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 20244
          for (Order _iter47 : this.success)
1221 chandransh 20245
          {
1382 varun.gupt 20246
            _iter47.write(oprot);
1221 chandransh 20247
          }
20248
          oprot.writeListEnd();
20249
        }
20250
        oprot.writeFieldEnd();
20251
      } else if (this.isSetEx()) {
20252
        oprot.writeFieldBegin(EX_FIELD_DESC);
20253
        this.ex.write(oprot);
20254
        oprot.writeFieldEnd();
20255
      }
20256
      oprot.writeFieldStop();
20257
      oprot.writeStructEnd();
20258
    }
20259
 
20260
    @Override
20261
    public String toString() {
20262
      StringBuilder sb = new StringBuilder("batchOrders_result(");
20263
      boolean first = true;
20264
 
20265
      sb.append("success:");
20266
      if (this.success == null) {
20267
        sb.append("null");
20268
      } else {
20269
        sb.append(this.success);
20270
      }
20271
      first = false;
20272
      if (!first) sb.append(", ");
20273
      sb.append("ex:");
20274
      if (this.ex == null) {
20275
        sb.append("null");
20276
      } else {
20277
        sb.append(this.ex);
20278
      }
20279
      first = false;
20280
      sb.append(")");
20281
      return sb.toString();
20282
    }
20283
 
20284
    public void validate() throws TException {
20285
      // check for required fields
20286
    }
20287
 
20288
  }
20289
 
1209 chandransh 20290
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
20291
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
20292
 
20293
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
20294
 
20295
    private long orderId;
20296
 
20297
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20298
    public enum _Fields implements TFieldIdEnum {
20299
      ORDER_ID((short)1, "orderId");
20300
 
20301
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20302
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20303
 
20304
      static {
20305
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20306
          byId.put((int)field._thriftId, field);
20307
          byName.put(field.getFieldName(), field);
20308
        }
20309
      }
20310
 
20311
      /**
20312
       * Find the _Fields constant that matches fieldId, or null if its not found.
20313
       */
20314
      public static _Fields findByThriftId(int fieldId) {
20315
        return byId.get(fieldId);
20316
      }
20317
 
20318
      /**
20319
       * Find the _Fields constant that matches fieldId, throwing an exception
20320
       * if it is not found.
20321
       */
20322
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20323
        _Fields fields = findByThriftId(fieldId);
20324
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20325
        return fields;
20326
      }
20327
 
20328
      /**
20329
       * Find the _Fields constant that matches name, or null if its not found.
20330
       */
20331
      public static _Fields findByName(String name) {
20332
        return byName.get(name);
20333
      }
20334
 
20335
      private final short _thriftId;
20336
      private final String _fieldName;
20337
 
20338
      _Fields(short thriftId, String fieldName) {
20339
        _thriftId = thriftId;
20340
        _fieldName = fieldName;
20341
      }
20342
 
20343
      public short getThriftFieldId() {
20344
        return _thriftId;
20345
      }
20346
 
20347
      public String getFieldName() {
20348
        return _fieldName;
20349
      }
20350
    }
20351
 
20352
    // isset id assignments
20353
    private static final int __ORDERID_ISSET_ID = 0;
20354
    private BitSet __isset_bit_vector = new BitSet(1);
20355
 
20356
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20357
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
20358
          new FieldValueMetaData(TType.I64)));
20359
    }});
20360
 
20361
    static {
20362
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
20363
    }
20364
 
20365
    public markOrderAsOutOfStock_args() {
20366
    }
20367
 
20368
    public markOrderAsOutOfStock_args(
20369
      long orderId)
20370
    {
20371
      this();
20372
      this.orderId = orderId;
20373
      setOrderIdIsSet(true);
20374
    }
20375
 
20376
    /**
20377
     * Performs a deep copy on <i>other</i>.
20378
     */
20379
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
20380
      __isset_bit_vector.clear();
20381
      __isset_bit_vector.or(other.__isset_bit_vector);
20382
      this.orderId = other.orderId;
20383
    }
20384
 
20385
    public markOrderAsOutOfStock_args deepCopy() {
20386
      return new markOrderAsOutOfStock_args(this);
20387
    }
20388
 
20389
    @Deprecated
20390
    public markOrderAsOutOfStock_args clone() {
20391
      return new markOrderAsOutOfStock_args(this);
20392
    }
20393
 
20394
    public long getOrderId() {
20395
      return this.orderId;
20396
    }
20397
 
20398
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
20399
      this.orderId = orderId;
20400
      setOrderIdIsSet(true);
20401
      return this;
20402
    }
20403
 
20404
    public void unsetOrderId() {
20405
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20406
    }
20407
 
20408
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20409
    public boolean isSetOrderId() {
20410
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20411
    }
20412
 
20413
    public void setOrderIdIsSet(boolean value) {
20414
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20415
    }
20416
 
20417
    public void setFieldValue(_Fields field, Object value) {
20418
      switch (field) {
20419
      case ORDER_ID:
20420
        if (value == null) {
20421
          unsetOrderId();
20422
        } else {
20423
          setOrderId((Long)value);
20424
        }
20425
        break;
20426
 
20427
      }
20428
    }
20429
 
20430
    public void setFieldValue(int fieldID, Object value) {
20431
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20432
    }
20433
 
20434
    public Object getFieldValue(_Fields field) {
20435
      switch (field) {
20436
      case ORDER_ID:
20437
        return new Long(getOrderId());
20438
 
20439
      }
20440
      throw new IllegalStateException();
20441
    }
20442
 
20443
    public Object getFieldValue(int fieldId) {
20444
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20445
    }
20446
 
20447
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20448
    public boolean isSet(_Fields field) {
20449
      switch (field) {
20450
      case ORDER_ID:
20451
        return isSetOrderId();
20452
      }
20453
      throw new IllegalStateException();
20454
    }
20455
 
20456
    public boolean isSet(int fieldID) {
20457
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20458
    }
20459
 
20460
    @Override
20461
    public boolean equals(Object that) {
20462
      if (that == null)
20463
        return false;
20464
      if (that instanceof markOrderAsOutOfStock_args)
20465
        return this.equals((markOrderAsOutOfStock_args)that);
20466
      return false;
20467
    }
20468
 
20469
    public boolean equals(markOrderAsOutOfStock_args that) {
20470
      if (that == null)
20471
        return false;
20472
 
20473
      boolean this_present_orderId = true;
20474
      boolean that_present_orderId = true;
20475
      if (this_present_orderId || that_present_orderId) {
20476
        if (!(this_present_orderId && that_present_orderId))
20477
          return false;
20478
        if (this.orderId != that.orderId)
20479
          return false;
20480
      }
20481
 
20482
      return true;
20483
    }
20484
 
20485
    @Override
20486
    public int hashCode() {
20487
      return 0;
20488
    }
20489
 
20490
    public int compareTo(markOrderAsOutOfStock_args other) {
20491
      if (!getClass().equals(other.getClass())) {
20492
        return getClass().getName().compareTo(other.getClass().getName());
20493
      }
20494
 
20495
      int lastComparison = 0;
20496
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
20497
 
20498
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20499
      if (lastComparison != 0) {
20500
        return lastComparison;
20501
      }
20502
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20503
      if (lastComparison != 0) {
20504
        return lastComparison;
20505
      }
20506
      return 0;
20507
    }
20508
 
20509
    public void read(TProtocol iprot) throws TException {
20510
      TField field;
20511
      iprot.readStructBegin();
20512
      while (true)
20513
      {
20514
        field = iprot.readFieldBegin();
20515
        if (field.type == TType.STOP) { 
20516
          break;
20517
        }
20518
        _Fields fieldId = _Fields.findByThriftId(field.id);
20519
        if (fieldId == null) {
20520
          TProtocolUtil.skip(iprot, field.type);
20521
        } else {
20522
          switch (fieldId) {
20523
            case ORDER_ID:
20524
              if (field.type == TType.I64) {
20525
                this.orderId = iprot.readI64();
20526
                setOrderIdIsSet(true);
20527
              } else { 
20528
                TProtocolUtil.skip(iprot, field.type);
20529
              }
20530
              break;
20531
          }
20532
          iprot.readFieldEnd();
20533
        }
20534
      }
20535
      iprot.readStructEnd();
20536
      validate();
20537
    }
20538
 
20539
    public void write(TProtocol oprot) throws TException {
20540
      validate();
20541
 
20542
      oprot.writeStructBegin(STRUCT_DESC);
20543
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20544
      oprot.writeI64(this.orderId);
20545
      oprot.writeFieldEnd();
20546
      oprot.writeFieldStop();
20547
      oprot.writeStructEnd();
20548
    }
20549
 
20550
    @Override
20551
    public String toString() {
20552
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
20553
      boolean first = true;
20554
 
20555
      sb.append("orderId:");
20556
      sb.append(this.orderId);
20557
      first = false;
20558
      sb.append(")");
20559
      return sb.toString();
20560
    }
20561
 
20562
    public void validate() throws TException {
20563
      // check for required fields
20564
    }
20565
 
20566
  }
20567
 
20568
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
20569
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
20570
 
20571
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20572
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20573
 
20574
    private boolean success;
20575
    private TransactionServiceException ex;
20576
 
20577
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20578
    public enum _Fields implements TFieldIdEnum {
20579
      SUCCESS((short)0, "success"),
20580
      EX((short)1, "ex");
20581
 
20582
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20583
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20584
 
20585
      static {
20586
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20587
          byId.put((int)field._thriftId, field);
20588
          byName.put(field.getFieldName(), field);
20589
        }
20590
      }
20591
 
20592
      /**
20593
       * Find the _Fields constant that matches fieldId, or null if its not found.
20594
       */
20595
      public static _Fields findByThriftId(int fieldId) {
20596
        return byId.get(fieldId);
20597
      }
20598
 
20599
      /**
20600
       * Find the _Fields constant that matches fieldId, throwing an exception
20601
       * if it is not found.
20602
       */
20603
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20604
        _Fields fields = findByThriftId(fieldId);
20605
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20606
        return fields;
20607
      }
20608
 
20609
      /**
20610
       * Find the _Fields constant that matches name, or null if its not found.
20611
       */
20612
      public static _Fields findByName(String name) {
20613
        return byName.get(name);
20614
      }
20615
 
20616
      private final short _thriftId;
20617
      private final String _fieldName;
20618
 
20619
      _Fields(short thriftId, String fieldName) {
20620
        _thriftId = thriftId;
20621
        _fieldName = fieldName;
20622
      }
20623
 
20624
      public short getThriftFieldId() {
20625
        return _thriftId;
20626
      }
20627
 
20628
      public String getFieldName() {
20629
        return _fieldName;
20630
      }
20631
    }
20632
 
20633
    // isset id assignments
20634
    private static final int __SUCCESS_ISSET_ID = 0;
20635
    private BitSet __isset_bit_vector = new BitSet(1);
20636
 
20637
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20638
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20639
          new FieldValueMetaData(TType.BOOL)));
20640
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20641
          new FieldValueMetaData(TType.STRUCT)));
20642
    }});
20643
 
20644
    static {
20645
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
20646
    }
20647
 
20648
    public markOrderAsOutOfStock_result() {
20649
    }
20650
 
20651
    public markOrderAsOutOfStock_result(
20652
      boolean success,
20653
      TransactionServiceException ex)
20654
    {
20655
      this();
20656
      this.success = success;
20657
      setSuccessIsSet(true);
20658
      this.ex = ex;
20659
    }
20660
 
20661
    /**
20662
     * Performs a deep copy on <i>other</i>.
20663
     */
20664
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
20665
      __isset_bit_vector.clear();
20666
      __isset_bit_vector.or(other.__isset_bit_vector);
20667
      this.success = other.success;
20668
      if (other.isSetEx()) {
20669
        this.ex = new TransactionServiceException(other.ex);
20670
      }
20671
    }
20672
 
20673
    public markOrderAsOutOfStock_result deepCopy() {
20674
      return new markOrderAsOutOfStock_result(this);
20675
    }
20676
 
20677
    @Deprecated
20678
    public markOrderAsOutOfStock_result clone() {
20679
      return new markOrderAsOutOfStock_result(this);
20680
    }
20681
 
20682
    public boolean isSuccess() {
20683
      return this.success;
20684
    }
20685
 
20686
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
20687
      this.success = success;
20688
      setSuccessIsSet(true);
20689
      return this;
20690
    }
20691
 
20692
    public void unsetSuccess() {
20693
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20694
    }
20695
 
20696
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20697
    public boolean isSetSuccess() {
20698
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20699
    }
20700
 
20701
    public void setSuccessIsSet(boolean value) {
20702
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20703
    }
20704
 
20705
    public TransactionServiceException getEx() {
20706
      return this.ex;
20707
    }
20708
 
20709
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
20710
      this.ex = ex;
20711
      return this;
20712
    }
20713
 
20714
    public void unsetEx() {
20715
      this.ex = null;
20716
    }
20717
 
20718
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20719
    public boolean isSetEx() {
20720
      return this.ex != null;
20721
    }
20722
 
20723
    public void setExIsSet(boolean value) {
20724
      if (!value) {
20725
        this.ex = null;
20726
      }
20727
    }
20728
 
20729
    public void setFieldValue(_Fields field, Object value) {
20730
      switch (field) {
20731
      case SUCCESS:
20732
        if (value == null) {
20733
          unsetSuccess();
20734
        } else {
20735
          setSuccess((Boolean)value);
20736
        }
20737
        break;
20738
 
20739
      case EX:
20740
        if (value == null) {
20741
          unsetEx();
20742
        } else {
20743
          setEx((TransactionServiceException)value);
20744
        }
20745
        break;
20746
 
20747
      }
20748
    }
20749
 
20750
    public void setFieldValue(int fieldID, Object value) {
20751
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20752
    }
20753
 
20754
    public Object getFieldValue(_Fields field) {
20755
      switch (field) {
20756
      case SUCCESS:
20757
        return new Boolean(isSuccess());
20758
 
20759
      case EX:
20760
        return getEx();
20761
 
20762
      }
20763
      throw new IllegalStateException();
20764
    }
20765
 
20766
    public Object getFieldValue(int fieldId) {
20767
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20768
    }
20769
 
20770
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20771
    public boolean isSet(_Fields field) {
20772
      switch (field) {
20773
      case SUCCESS:
20774
        return isSetSuccess();
20775
      case EX:
20776
        return isSetEx();
20777
      }
20778
      throw new IllegalStateException();
20779
    }
20780
 
20781
    public boolean isSet(int fieldID) {
20782
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20783
    }
20784
 
20785
    @Override
20786
    public boolean equals(Object that) {
20787
      if (that == null)
20788
        return false;
20789
      if (that instanceof markOrderAsOutOfStock_result)
20790
        return this.equals((markOrderAsOutOfStock_result)that);
20791
      return false;
20792
    }
20793
 
20794
    public boolean equals(markOrderAsOutOfStock_result that) {
20795
      if (that == null)
20796
        return false;
20797
 
20798
      boolean this_present_success = true;
20799
      boolean that_present_success = true;
20800
      if (this_present_success || that_present_success) {
20801
        if (!(this_present_success && that_present_success))
20802
          return false;
20803
        if (this.success != that.success)
20804
          return false;
20805
      }
20806
 
20807
      boolean this_present_ex = true && this.isSetEx();
20808
      boolean that_present_ex = true && that.isSetEx();
20809
      if (this_present_ex || that_present_ex) {
20810
        if (!(this_present_ex && that_present_ex))
20811
          return false;
20812
        if (!this.ex.equals(that.ex))
20813
          return false;
20814
      }
20815
 
20816
      return true;
20817
    }
20818
 
20819
    @Override
20820
    public int hashCode() {
20821
      return 0;
20822
    }
20823
 
20824
    public int compareTo(markOrderAsOutOfStock_result other) {
20825
      if (!getClass().equals(other.getClass())) {
20826
        return getClass().getName().compareTo(other.getClass().getName());
20827
      }
20828
 
20829
      int lastComparison = 0;
20830
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
20831
 
20832
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20833
      if (lastComparison != 0) {
20834
        return lastComparison;
20835
      }
20836
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20837
      if (lastComparison != 0) {
20838
        return lastComparison;
20839
      }
20840
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20841
      if (lastComparison != 0) {
20842
        return lastComparison;
20843
      }
20844
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20845
      if (lastComparison != 0) {
20846
        return lastComparison;
20847
      }
20848
      return 0;
20849
    }
20850
 
20851
    public void read(TProtocol iprot) throws TException {
20852
      TField field;
20853
      iprot.readStructBegin();
20854
      while (true)
20855
      {
20856
        field = iprot.readFieldBegin();
20857
        if (field.type == TType.STOP) { 
20858
          break;
20859
        }
20860
        _Fields fieldId = _Fields.findByThriftId(field.id);
20861
        if (fieldId == null) {
20862
          TProtocolUtil.skip(iprot, field.type);
20863
        } else {
20864
          switch (fieldId) {
20865
            case SUCCESS:
20866
              if (field.type == TType.BOOL) {
20867
                this.success = iprot.readBool();
20868
                setSuccessIsSet(true);
20869
              } else { 
20870
                TProtocolUtil.skip(iprot, field.type);
20871
              }
20872
              break;
20873
            case EX:
20874
              if (field.type == TType.STRUCT) {
20875
                this.ex = new TransactionServiceException();
20876
                this.ex.read(iprot);
20877
              } else { 
20878
                TProtocolUtil.skip(iprot, field.type);
20879
              }
20880
              break;
20881
          }
20882
          iprot.readFieldEnd();
20883
        }
20884
      }
20885
      iprot.readStructEnd();
20886
      validate();
20887
    }
20888
 
20889
    public void write(TProtocol oprot) throws TException {
20890
      oprot.writeStructBegin(STRUCT_DESC);
20891
 
20892
      if (this.isSetSuccess()) {
20893
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20894
        oprot.writeBool(this.success);
20895
        oprot.writeFieldEnd();
20896
      } else if (this.isSetEx()) {
20897
        oprot.writeFieldBegin(EX_FIELD_DESC);
20898
        this.ex.write(oprot);
20899
        oprot.writeFieldEnd();
20900
      }
20901
      oprot.writeFieldStop();
20902
      oprot.writeStructEnd();
20903
    }
20904
 
20905
    @Override
20906
    public String toString() {
20907
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
20908
      boolean first = true;
20909
 
20910
      sb.append("success:");
20911
      sb.append(this.success);
20912
      first = false;
20913
      if (!first) sb.append(", ");
20914
      sb.append("ex:");
20915
      if (this.ex == null) {
20916
        sb.append("null");
20917
      } else {
20918
        sb.append(this.ex);
20919
      }
20920
      first = false;
20921
      sb.append(")");
20922
      return sb.toString();
20923
    }
20924
 
20925
    public void validate() throws TException {
20926
      // check for required fields
20927
    }
20928
 
20929
  }
20930
 
758 chandransh 20931
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
20932
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
20933
 
20934
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
20935
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
20936
 
20937
    private long warehouseId;
20938
    private long providerId;
20939
 
20940
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20941
    public enum _Fields implements TFieldIdEnum {
20942
      WAREHOUSE_ID((short)1, "warehouseId"),
20943
      PROVIDER_ID((short)2, "providerId");
20944
 
20945
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20946
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20947
 
20948
      static {
20949
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20950
          byId.put((int)field._thriftId, field);
20951
          byName.put(field.getFieldName(), field);
20952
        }
20953
      }
20954
 
20955
      /**
20956
       * Find the _Fields constant that matches fieldId, or null if its not found.
20957
       */
20958
      public static _Fields findByThriftId(int fieldId) {
20959
        return byId.get(fieldId);
20960
      }
20961
 
20962
      /**
20963
       * Find the _Fields constant that matches fieldId, throwing an exception
20964
       * if it is not found.
20965
       */
20966
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20967
        _Fields fields = findByThriftId(fieldId);
20968
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20969
        return fields;
20970
      }
20971
 
20972
      /**
20973
       * Find the _Fields constant that matches name, or null if its not found.
20974
       */
20975
      public static _Fields findByName(String name) {
20976
        return byName.get(name);
20977
      }
20978
 
20979
      private final short _thriftId;
20980
      private final String _fieldName;
20981
 
20982
      _Fields(short thriftId, String fieldName) {
20983
        _thriftId = thriftId;
20984
        _fieldName = fieldName;
20985
      }
20986
 
20987
      public short getThriftFieldId() {
20988
        return _thriftId;
20989
      }
20990
 
20991
      public String getFieldName() {
20992
        return _fieldName;
20993
      }
20994
    }
20995
 
20996
    // isset id assignments
20997
    private static final int __WAREHOUSEID_ISSET_ID = 0;
20998
    private static final int __PROVIDERID_ISSET_ID = 1;
20999
    private BitSet __isset_bit_vector = new BitSet(2);
21000
 
21001
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21002
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
21003
          new FieldValueMetaData(TType.I64)));
21004
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21005
          new FieldValueMetaData(TType.I64)));
21006
    }});
21007
 
21008
    static {
21009
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
21010
    }
21011
 
21012
    public markOrdersAsManifested_args() {
21013
    }
21014
 
21015
    public markOrdersAsManifested_args(
21016
      long warehouseId,
21017
      long providerId)
21018
    {
21019
      this();
21020
      this.warehouseId = warehouseId;
21021
      setWarehouseIdIsSet(true);
21022
      this.providerId = providerId;
21023
      setProviderIdIsSet(true);
21024
    }
21025
 
21026
    /**
21027
     * Performs a deep copy on <i>other</i>.
21028
     */
21029
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
21030
      __isset_bit_vector.clear();
21031
      __isset_bit_vector.or(other.__isset_bit_vector);
21032
      this.warehouseId = other.warehouseId;
21033
      this.providerId = other.providerId;
21034
    }
21035
 
21036
    public markOrdersAsManifested_args deepCopy() {
21037
      return new markOrdersAsManifested_args(this);
21038
    }
21039
 
21040
    @Deprecated
21041
    public markOrdersAsManifested_args clone() {
21042
      return new markOrdersAsManifested_args(this);
21043
    }
21044
 
21045
    public long getWarehouseId() {
21046
      return this.warehouseId;
21047
    }
21048
 
21049
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
21050
      this.warehouseId = warehouseId;
21051
      setWarehouseIdIsSet(true);
21052
      return this;
21053
    }
21054
 
21055
    public void unsetWarehouseId() {
21056
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
21057
    }
21058
 
21059
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
21060
    public boolean isSetWarehouseId() {
21061
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
21062
    }
21063
 
21064
    public void setWarehouseIdIsSet(boolean value) {
21065
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
21066
    }
21067
 
21068
    public long getProviderId() {
21069
      return this.providerId;
21070
    }
21071
 
21072
    public markOrdersAsManifested_args setProviderId(long providerId) {
21073
      this.providerId = providerId;
21074
      setProviderIdIsSet(true);
21075
      return this;
21076
    }
21077
 
21078
    public void unsetProviderId() {
21079
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21080
    }
21081
 
21082
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21083
    public boolean isSetProviderId() {
21084
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21085
    }
21086
 
21087
    public void setProviderIdIsSet(boolean value) {
21088
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21089
    }
21090
 
21091
    public void setFieldValue(_Fields field, Object value) {
21092
      switch (field) {
21093
      case WAREHOUSE_ID:
21094
        if (value == null) {
21095
          unsetWarehouseId();
21096
        } else {
21097
          setWarehouseId((Long)value);
21098
        }
21099
        break;
21100
 
21101
      case PROVIDER_ID:
21102
        if (value == null) {
21103
          unsetProviderId();
21104
        } else {
21105
          setProviderId((Long)value);
21106
        }
21107
        break;
21108
 
21109
      }
21110
    }
21111
 
21112
    public void setFieldValue(int fieldID, Object value) {
21113
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21114
    }
21115
 
21116
    public Object getFieldValue(_Fields field) {
21117
      switch (field) {
21118
      case WAREHOUSE_ID:
21119
        return new Long(getWarehouseId());
21120
 
21121
      case PROVIDER_ID:
21122
        return new Long(getProviderId());
21123
 
21124
      }
21125
      throw new IllegalStateException();
21126
    }
21127
 
21128
    public Object getFieldValue(int fieldId) {
21129
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21130
    }
21131
 
21132
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21133
    public boolean isSet(_Fields field) {
21134
      switch (field) {
21135
      case WAREHOUSE_ID:
21136
        return isSetWarehouseId();
21137
      case PROVIDER_ID:
21138
        return isSetProviderId();
21139
      }
21140
      throw new IllegalStateException();
21141
    }
21142
 
21143
    public boolean isSet(int fieldID) {
21144
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21145
    }
21146
 
21147
    @Override
21148
    public boolean equals(Object that) {
21149
      if (that == null)
21150
        return false;
21151
      if (that instanceof markOrdersAsManifested_args)
21152
        return this.equals((markOrdersAsManifested_args)that);
21153
      return false;
21154
    }
21155
 
21156
    public boolean equals(markOrdersAsManifested_args that) {
21157
      if (that == null)
21158
        return false;
21159
 
21160
      boolean this_present_warehouseId = true;
21161
      boolean that_present_warehouseId = true;
21162
      if (this_present_warehouseId || that_present_warehouseId) {
21163
        if (!(this_present_warehouseId && that_present_warehouseId))
21164
          return false;
21165
        if (this.warehouseId != that.warehouseId)
21166
          return false;
21167
      }
21168
 
21169
      boolean this_present_providerId = true;
21170
      boolean that_present_providerId = true;
21171
      if (this_present_providerId || that_present_providerId) {
21172
        if (!(this_present_providerId && that_present_providerId))
21173
          return false;
21174
        if (this.providerId != that.providerId)
21175
          return false;
21176
      }
21177
 
21178
      return true;
21179
    }
21180
 
21181
    @Override
21182
    public int hashCode() {
21183
      return 0;
21184
    }
21185
 
21186
    public int compareTo(markOrdersAsManifested_args other) {
21187
      if (!getClass().equals(other.getClass())) {
21188
        return getClass().getName().compareTo(other.getClass().getName());
21189
      }
21190
 
21191
      int lastComparison = 0;
21192
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
21193
 
21194
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
21195
      if (lastComparison != 0) {
21196
        return lastComparison;
21197
      }
21198
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
21199
      if (lastComparison != 0) {
21200
        return lastComparison;
21201
      }
21202
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
21203
      if (lastComparison != 0) {
21204
        return lastComparison;
21205
      }
21206
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
21207
      if (lastComparison != 0) {
21208
        return lastComparison;
21209
      }
21210
      return 0;
21211
    }
21212
 
21213
    public void read(TProtocol iprot) throws TException {
21214
      TField field;
21215
      iprot.readStructBegin();
21216
      while (true)
21217
      {
21218
        field = iprot.readFieldBegin();
21219
        if (field.type == TType.STOP) { 
21220
          break;
21221
        }
21222
        _Fields fieldId = _Fields.findByThriftId(field.id);
21223
        if (fieldId == null) {
21224
          TProtocolUtil.skip(iprot, field.type);
21225
        } else {
21226
          switch (fieldId) {
21227
            case WAREHOUSE_ID:
21228
              if (field.type == TType.I64) {
21229
                this.warehouseId = iprot.readI64();
21230
                setWarehouseIdIsSet(true);
21231
              } else { 
21232
                TProtocolUtil.skip(iprot, field.type);
21233
              }
21234
              break;
21235
            case PROVIDER_ID:
21236
              if (field.type == TType.I64) {
21237
                this.providerId = iprot.readI64();
21238
                setProviderIdIsSet(true);
21239
              } else { 
21240
                TProtocolUtil.skip(iprot, field.type);
21241
              }
21242
              break;
21243
          }
21244
          iprot.readFieldEnd();
21245
        }
21246
      }
21247
      iprot.readStructEnd();
21248
      validate();
21249
    }
21250
 
21251
    public void write(TProtocol oprot) throws TException {
21252
      validate();
21253
 
21254
      oprot.writeStructBegin(STRUCT_DESC);
21255
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21256
      oprot.writeI64(this.warehouseId);
21257
      oprot.writeFieldEnd();
21258
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21259
      oprot.writeI64(this.providerId);
21260
      oprot.writeFieldEnd();
21261
      oprot.writeFieldStop();
21262
      oprot.writeStructEnd();
21263
    }
21264
 
21265
    @Override
21266
    public String toString() {
21267
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
21268
      boolean first = true;
21269
 
21270
      sb.append("warehouseId:");
21271
      sb.append(this.warehouseId);
21272
      first = false;
21273
      if (!first) sb.append(", ");
21274
      sb.append("providerId:");
21275
      sb.append(this.providerId);
21276
      first = false;
21277
      sb.append(")");
21278
      return sb.toString();
21279
    }
21280
 
21281
    public void validate() throws TException {
21282
      // check for required fields
21283
    }
21284
 
21285
  }
21286
 
21287
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
21288
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
21289
 
21290
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21291
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21292
 
21293
    private boolean success;
21294
    private TransactionServiceException ex;
21295
 
21296
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21297
    public enum _Fields implements TFieldIdEnum {
21298
      SUCCESS((short)0, "success"),
21299
      EX((short)1, "ex");
21300
 
21301
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21302
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21303
 
21304
      static {
21305
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21306
          byId.put((int)field._thriftId, field);
21307
          byName.put(field.getFieldName(), field);
21308
        }
21309
      }
21310
 
21311
      /**
21312
       * Find the _Fields constant that matches fieldId, or null if its not found.
21313
       */
21314
      public static _Fields findByThriftId(int fieldId) {
21315
        return byId.get(fieldId);
21316
      }
21317
 
21318
      /**
21319
       * Find the _Fields constant that matches fieldId, throwing an exception
21320
       * if it is not found.
21321
       */
21322
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21323
        _Fields fields = findByThriftId(fieldId);
21324
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21325
        return fields;
21326
      }
21327
 
21328
      /**
21329
       * Find the _Fields constant that matches name, or null if its not found.
21330
       */
21331
      public static _Fields findByName(String name) {
21332
        return byName.get(name);
21333
      }
21334
 
21335
      private final short _thriftId;
21336
      private final String _fieldName;
21337
 
21338
      _Fields(short thriftId, String fieldName) {
21339
        _thriftId = thriftId;
21340
        _fieldName = fieldName;
21341
      }
21342
 
21343
      public short getThriftFieldId() {
21344
        return _thriftId;
21345
      }
21346
 
21347
      public String getFieldName() {
21348
        return _fieldName;
21349
      }
21350
    }
21351
 
21352
    // isset id assignments
21353
    private static final int __SUCCESS_ISSET_ID = 0;
21354
    private BitSet __isset_bit_vector = new BitSet(1);
21355
 
21356
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21357
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21358
          new FieldValueMetaData(TType.BOOL)));
21359
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21360
          new FieldValueMetaData(TType.STRUCT)));
21361
    }});
21362
 
21363
    static {
21364
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
21365
    }
21366
 
21367
    public markOrdersAsManifested_result() {
21368
    }
21369
 
21370
    public markOrdersAsManifested_result(
21371
      boolean success,
21372
      TransactionServiceException ex)
21373
    {
21374
      this();
21375
      this.success = success;
21376
      setSuccessIsSet(true);
21377
      this.ex = ex;
21378
    }
21379
 
21380
    /**
21381
     * Performs a deep copy on <i>other</i>.
21382
     */
21383
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
21384
      __isset_bit_vector.clear();
21385
      __isset_bit_vector.or(other.__isset_bit_vector);
21386
      this.success = other.success;
21387
      if (other.isSetEx()) {
21388
        this.ex = new TransactionServiceException(other.ex);
21389
      }
21390
    }
21391
 
21392
    public markOrdersAsManifested_result deepCopy() {
21393
      return new markOrdersAsManifested_result(this);
21394
    }
21395
 
21396
    @Deprecated
21397
    public markOrdersAsManifested_result clone() {
21398
      return new markOrdersAsManifested_result(this);
21399
    }
21400
 
21401
    public boolean isSuccess() {
21402
      return this.success;
21403
    }
21404
 
21405
    public markOrdersAsManifested_result setSuccess(boolean success) {
21406
      this.success = success;
21407
      setSuccessIsSet(true);
21408
      return this;
21409
    }
21410
 
21411
    public void unsetSuccess() {
21412
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21413
    }
21414
 
21415
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21416
    public boolean isSetSuccess() {
21417
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21418
    }
21419
 
21420
    public void setSuccessIsSet(boolean value) {
21421
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21422
    }
21423
 
21424
    public TransactionServiceException getEx() {
21425
      return this.ex;
21426
    }
21427
 
21428
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
21429
      this.ex = ex;
21430
      return this;
21431
    }
21432
 
21433
    public void unsetEx() {
21434
      this.ex = null;
21435
    }
21436
 
21437
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21438
    public boolean isSetEx() {
21439
      return this.ex != null;
21440
    }
21441
 
21442
    public void setExIsSet(boolean value) {
21443
      if (!value) {
21444
        this.ex = null;
21445
      }
21446
    }
21447
 
21448
    public void setFieldValue(_Fields field, Object value) {
21449
      switch (field) {
21450
      case SUCCESS:
21451
        if (value == null) {
21452
          unsetSuccess();
21453
        } else {
21454
          setSuccess((Boolean)value);
21455
        }
21456
        break;
21457
 
21458
      case EX:
21459
        if (value == null) {
21460
          unsetEx();
21461
        } else {
21462
          setEx((TransactionServiceException)value);
21463
        }
21464
        break;
21465
 
21466
      }
21467
    }
21468
 
21469
    public void setFieldValue(int fieldID, Object value) {
21470
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21471
    }
21472
 
21473
    public Object getFieldValue(_Fields field) {
21474
      switch (field) {
21475
      case SUCCESS:
21476
        return new Boolean(isSuccess());
21477
 
21478
      case EX:
21479
        return getEx();
21480
 
21481
      }
21482
      throw new IllegalStateException();
21483
    }
21484
 
21485
    public Object getFieldValue(int fieldId) {
21486
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21487
    }
21488
 
21489
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21490
    public boolean isSet(_Fields field) {
21491
      switch (field) {
21492
      case SUCCESS:
21493
        return isSetSuccess();
21494
      case EX:
21495
        return isSetEx();
21496
      }
21497
      throw new IllegalStateException();
21498
    }
21499
 
21500
    public boolean isSet(int fieldID) {
21501
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21502
    }
21503
 
21504
    @Override
21505
    public boolean equals(Object that) {
21506
      if (that == null)
21507
        return false;
21508
      if (that instanceof markOrdersAsManifested_result)
21509
        return this.equals((markOrdersAsManifested_result)that);
21510
      return false;
21511
    }
21512
 
21513
    public boolean equals(markOrdersAsManifested_result that) {
21514
      if (that == null)
21515
        return false;
21516
 
21517
      boolean this_present_success = true;
21518
      boolean that_present_success = true;
21519
      if (this_present_success || that_present_success) {
21520
        if (!(this_present_success && that_present_success))
21521
          return false;
21522
        if (this.success != that.success)
21523
          return false;
21524
      }
21525
 
21526
      boolean this_present_ex = true && this.isSetEx();
21527
      boolean that_present_ex = true && that.isSetEx();
21528
      if (this_present_ex || that_present_ex) {
21529
        if (!(this_present_ex && that_present_ex))
21530
          return false;
21531
        if (!this.ex.equals(that.ex))
21532
          return false;
21533
      }
21534
 
21535
      return true;
21536
    }
21537
 
21538
    @Override
21539
    public int hashCode() {
21540
      return 0;
21541
    }
21542
 
21543
    public int compareTo(markOrdersAsManifested_result other) {
21544
      if (!getClass().equals(other.getClass())) {
21545
        return getClass().getName().compareTo(other.getClass().getName());
21546
      }
21547
 
21548
      int lastComparison = 0;
21549
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
21550
 
21551
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21552
      if (lastComparison != 0) {
21553
        return lastComparison;
21554
      }
21555
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21556
      if (lastComparison != 0) {
21557
        return lastComparison;
21558
      }
21559
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21560
      if (lastComparison != 0) {
21561
        return lastComparison;
21562
      }
21563
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21564
      if (lastComparison != 0) {
21565
        return lastComparison;
21566
      }
21567
      return 0;
21568
    }
21569
 
21570
    public void read(TProtocol iprot) throws TException {
21571
      TField field;
21572
      iprot.readStructBegin();
21573
      while (true)
21574
      {
21575
        field = iprot.readFieldBegin();
21576
        if (field.type == TType.STOP) { 
21577
          break;
21578
        }
21579
        _Fields fieldId = _Fields.findByThriftId(field.id);
21580
        if (fieldId == null) {
21581
          TProtocolUtil.skip(iprot, field.type);
21582
        } else {
21583
          switch (fieldId) {
21584
            case SUCCESS:
21585
              if (field.type == TType.BOOL) {
21586
                this.success = iprot.readBool();
21587
                setSuccessIsSet(true);
21588
              } else { 
21589
                TProtocolUtil.skip(iprot, field.type);
21590
              }
21591
              break;
21592
            case EX:
21593
              if (field.type == TType.STRUCT) {
21594
                this.ex = new TransactionServiceException();
21595
                this.ex.read(iprot);
21596
              } else { 
21597
                TProtocolUtil.skip(iprot, field.type);
21598
              }
21599
              break;
21600
          }
21601
          iprot.readFieldEnd();
21602
        }
21603
      }
21604
      iprot.readStructEnd();
21605
      validate();
21606
    }
21607
 
21608
    public void write(TProtocol oprot) throws TException {
21609
      oprot.writeStructBegin(STRUCT_DESC);
21610
 
21611
      if (this.isSetSuccess()) {
21612
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21613
        oprot.writeBool(this.success);
21614
        oprot.writeFieldEnd();
21615
      } else if (this.isSetEx()) {
21616
        oprot.writeFieldBegin(EX_FIELD_DESC);
21617
        this.ex.write(oprot);
21618
        oprot.writeFieldEnd();
21619
      }
21620
      oprot.writeFieldStop();
21621
      oprot.writeStructEnd();
21622
    }
21623
 
21624
    @Override
21625
    public String toString() {
21626
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
21627
      boolean first = true;
21628
 
21629
      sb.append("success:");
21630
      sb.append(this.success);
21631
      first = false;
21632
      if (!first) sb.append(", ");
21633
      sb.append("ex:");
21634
      if (this.ex == null) {
21635
        sb.append("null");
21636
      } else {
21637
        sb.append(this.ex);
21638
      }
21639
      first = false;
21640
      sb.append(")");
21641
      return sb.toString();
21642
    }
21643
 
21644
    public void validate() throws TException {
21645
      // check for required fields
21646
    }
21647
 
21648
  }
21649
 
1114 chandransh 21650
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
21651
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
21652
 
21653
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21654
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
21655
 
21656
    private long providerId;
1245 chandransh 21657
    private Map<String,String> pickupDetails;
1114 chandransh 21658
 
21659
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21660
    public enum _Fields implements TFieldIdEnum {
21661
      PROVIDER_ID((short)1, "providerId"),
21662
      PICKUP_DETAILS((short)2, "pickupDetails");
21663
 
21664
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21665
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21666
 
21667
      static {
21668
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21669
          byId.put((int)field._thriftId, field);
21670
          byName.put(field.getFieldName(), field);
21671
        }
21672
      }
21673
 
21674
      /**
21675
       * Find the _Fields constant that matches fieldId, or null if its not found.
21676
       */
21677
      public static _Fields findByThriftId(int fieldId) {
21678
        return byId.get(fieldId);
21679
      }
21680
 
21681
      /**
21682
       * Find the _Fields constant that matches fieldId, throwing an exception
21683
       * if it is not found.
21684
       */
21685
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21686
        _Fields fields = findByThriftId(fieldId);
21687
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21688
        return fields;
21689
      }
21690
 
21691
      /**
21692
       * Find the _Fields constant that matches name, or null if its not found.
21693
       */
21694
      public static _Fields findByName(String name) {
21695
        return byName.get(name);
21696
      }
21697
 
21698
      private final short _thriftId;
21699
      private final String _fieldName;
21700
 
21701
      _Fields(short thriftId, String fieldName) {
21702
        _thriftId = thriftId;
21703
        _fieldName = fieldName;
21704
      }
21705
 
21706
      public short getThriftFieldId() {
21707
        return _thriftId;
21708
      }
21709
 
21710
      public String getFieldName() {
21711
        return _fieldName;
21712
      }
21713
    }
21714
 
21715
    // isset id assignments
21716
    private static final int __PROVIDERID_ISSET_ID = 0;
21717
    private BitSet __isset_bit_vector = new BitSet(1);
21718
 
21719
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21720
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21721
          new FieldValueMetaData(TType.I64)));
21722
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
21723
          new MapMetaData(TType.MAP, 
21724
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 21725
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 21726
    }});
21727
 
21728
    static {
21729
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
21730
    }
21731
 
21732
    public markOrdersAsPickedUp_args() {
21733
    }
21734
 
21735
    public markOrdersAsPickedUp_args(
21736
      long providerId,
1245 chandransh 21737
      Map<String,String> pickupDetails)
1114 chandransh 21738
    {
21739
      this();
21740
      this.providerId = providerId;
21741
      setProviderIdIsSet(true);
21742
      this.pickupDetails = pickupDetails;
21743
    }
21744
 
21745
    /**
21746
     * Performs a deep copy on <i>other</i>.
21747
     */
21748
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
21749
      __isset_bit_vector.clear();
21750
      __isset_bit_vector.or(other.__isset_bit_vector);
21751
      this.providerId = other.providerId;
21752
      if (other.isSetPickupDetails()) {
1245 chandransh 21753
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
21754
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 21755
 
21756
          String other_element_key = other_element.getKey();
1245 chandransh 21757
          String other_element_value = other_element.getValue();
1114 chandransh 21758
 
21759
          String __this__pickupDetails_copy_key = other_element_key;
21760
 
1245 chandransh 21761
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 21762
 
21763
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
21764
        }
21765
        this.pickupDetails = __this__pickupDetails;
21766
      }
21767
    }
21768
 
21769
    public markOrdersAsPickedUp_args deepCopy() {
21770
      return new markOrdersAsPickedUp_args(this);
21771
    }
21772
 
21773
    @Deprecated
21774
    public markOrdersAsPickedUp_args clone() {
21775
      return new markOrdersAsPickedUp_args(this);
21776
    }
21777
 
21778
    public long getProviderId() {
21779
      return this.providerId;
21780
    }
21781
 
21782
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
21783
      this.providerId = providerId;
21784
      setProviderIdIsSet(true);
21785
      return this;
21786
    }
21787
 
21788
    public void unsetProviderId() {
21789
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21790
    }
21791
 
21792
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21793
    public boolean isSetProviderId() {
21794
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21795
    }
21796
 
21797
    public void setProviderIdIsSet(boolean value) {
21798
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21799
    }
21800
 
21801
    public int getPickupDetailsSize() {
21802
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
21803
    }
21804
 
1245 chandransh 21805
    public void putToPickupDetails(String key, String val) {
1114 chandransh 21806
      if (this.pickupDetails == null) {
1245 chandransh 21807
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 21808
      }
21809
      this.pickupDetails.put(key, val);
21810
    }
21811
 
1245 chandransh 21812
    public Map<String,String> getPickupDetails() {
1114 chandransh 21813
      return this.pickupDetails;
21814
    }
21815
 
1245 chandransh 21816
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 21817
      this.pickupDetails = pickupDetails;
21818
      return this;
21819
    }
21820
 
21821
    public void unsetPickupDetails() {
21822
      this.pickupDetails = null;
21823
    }
21824
 
21825
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
21826
    public boolean isSetPickupDetails() {
21827
      return this.pickupDetails != null;
21828
    }
21829
 
21830
    public void setPickupDetailsIsSet(boolean value) {
21831
      if (!value) {
21832
        this.pickupDetails = null;
21833
      }
21834
    }
21835
 
21836
    public void setFieldValue(_Fields field, Object value) {
21837
      switch (field) {
21838
      case PROVIDER_ID:
21839
        if (value == null) {
21840
          unsetProviderId();
21841
        } else {
21842
          setProviderId((Long)value);
21843
        }
21844
        break;
21845
 
21846
      case PICKUP_DETAILS:
21847
        if (value == null) {
21848
          unsetPickupDetails();
21849
        } else {
1245 chandransh 21850
          setPickupDetails((Map<String,String>)value);
1114 chandransh 21851
        }
21852
        break;
21853
 
21854
      }
21855
    }
21856
 
21857
    public void setFieldValue(int fieldID, Object value) {
21858
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21859
    }
21860
 
21861
    public Object getFieldValue(_Fields field) {
21862
      switch (field) {
21863
      case PROVIDER_ID:
21864
        return new Long(getProviderId());
21865
 
21866
      case PICKUP_DETAILS:
21867
        return getPickupDetails();
21868
 
21869
      }
21870
      throw new IllegalStateException();
21871
    }
21872
 
21873
    public Object getFieldValue(int fieldId) {
21874
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21875
    }
21876
 
21877
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21878
    public boolean isSet(_Fields field) {
21879
      switch (field) {
21880
      case PROVIDER_ID:
21881
        return isSetProviderId();
21882
      case PICKUP_DETAILS:
21883
        return isSetPickupDetails();
21884
      }
21885
      throw new IllegalStateException();
21886
    }
21887
 
21888
    public boolean isSet(int fieldID) {
21889
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21890
    }
21891
 
21892
    @Override
21893
    public boolean equals(Object that) {
21894
      if (that == null)
21895
        return false;
21896
      if (that instanceof markOrdersAsPickedUp_args)
21897
        return this.equals((markOrdersAsPickedUp_args)that);
21898
      return false;
21899
    }
21900
 
21901
    public boolean equals(markOrdersAsPickedUp_args that) {
21902
      if (that == null)
21903
        return false;
21904
 
21905
      boolean this_present_providerId = true;
21906
      boolean that_present_providerId = true;
21907
      if (this_present_providerId || that_present_providerId) {
21908
        if (!(this_present_providerId && that_present_providerId))
21909
          return false;
21910
        if (this.providerId != that.providerId)
21911
          return false;
21912
      }
21913
 
21914
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
21915
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
21916
      if (this_present_pickupDetails || that_present_pickupDetails) {
21917
        if (!(this_present_pickupDetails && that_present_pickupDetails))
21918
          return false;
21919
        if (!this.pickupDetails.equals(that.pickupDetails))
21920
          return false;
21921
      }
21922
 
21923
      return true;
21924
    }
21925
 
21926
    @Override
21927
    public int hashCode() {
21928
      return 0;
21929
    }
21930
 
21931
    public void read(TProtocol iprot) throws TException {
21932
      TField field;
21933
      iprot.readStructBegin();
21934
      while (true)
21935
      {
21936
        field = iprot.readFieldBegin();
21937
        if (field.type == TType.STOP) { 
21938
          break;
21939
        }
21940
        _Fields fieldId = _Fields.findByThriftId(field.id);
21941
        if (fieldId == null) {
21942
          TProtocolUtil.skip(iprot, field.type);
21943
        } else {
21944
          switch (fieldId) {
21945
            case PROVIDER_ID:
21946
              if (field.type == TType.I64) {
21947
                this.providerId = iprot.readI64();
21948
                setProviderIdIsSet(true);
21949
              } else { 
21950
                TProtocolUtil.skip(iprot, field.type);
21951
              }
21952
              break;
21953
            case PICKUP_DETAILS:
21954
              if (field.type == TType.MAP) {
21955
                {
1382 varun.gupt 21956
                  TMap _map48 = iprot.readMapBegin();
21957
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
21958
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 21959
                  {
1382 varun.gupt 21960
                    String _key50;
21961
                    String _val51;
21962
                    _key50 = iprot.readString();
21963
                    _val51 = iprot.readString();
21964
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 21965
                  }
21966
                  iprot.readMapEnd();
21967
                }
21968
              } else { 
21969
                TProtocolUtil.skip(iprot, field.type);
21970
              }
21971
              break;
21972
          }
21973
          iprot.readFieldEnd();
21974
        }
21975
      }
21976
      iprot.readStructEnd();
21977
      validate();
21978
    }
21979
 
21980
    public void write(TProtocol oprot) throws TException {
21981
      validate();
21982
 
21983
      oprot.writeStructBegin(STRUCT_DESC);
21984
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21985
      oprot.writeI64(this.providerId);
21986
      oprot.writeFieldEnd();
21987
      if (this.pickupDetails != null) {
21988
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
21989
        {
1245 chandransh 21990
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 21991
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 21992
          {
1382 varun.gupt 21993
            oprot.writeString(_iter52.getKey());
21994
            oprot.writeString(_iter52.getValue());
1114 chandransh 21995
          }
21996
          oprot.writeMapEnd();
21997
        }
21998
        oprot.writeFieldEnd();
21999
      }
22000
      oprot.writeFieldStop();
22001
      oprot.writeStructEnd();
22002
    }
22003
 
22004
    @Override
22005
    public String toString() {
22006
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
22007
      boolean first = true;
22008
 
22009
      sb.append("providerId:");
22010
      sb.append(this.providerId);
22011
      first = false;
22012
      if (!first) sb.append(", ");
22013
      sb.append("pickupDetails:");
22014
      if (this.pickupDetails == null) {
22015
        sb.append("null");
22016
      } else {
22017
        sb.append(this.pickupDetails);
22018
      }
22019
      first = false;
22020
      sb.append(")");
22021
      return sb.toString();
22022
    }
22023
 
22024
    public void validate() throws TException {
22025
      // check for required fields
22026
    }
22027
 
22028
  }
22029
 
22030
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
22031
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
22032
 
22033
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
22034
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22035
 
22036
    private List<Order> success;
22037
    private TransactionServiceException ex;
22038
 
22039
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22040
    public enum _Fields implements TFieldIdEnum {
22041
      SUCCESS((short)0, "success"),
22042
      EX((short)1, "ex");
22043
 
22044
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22045
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22046
 
22047
      static {
22048
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22049
          byId.put((int)field._thriftId, field);
22050
          byName.put(field.getFieldName(), field);
22051
        }
22052
      }
22053
 
22054
      /**
22055
       * Find the _Fields constant that matches fieldId, or null if its not found.
22056
       */
22057
      public static _Fields findByThriftId(int fieldId) {
22058
        return byId.get(fieldId);
22059
      }
22060
 
22061
      /**
22062
       * Find the _Fields constant that matches fieldId, throwing an exception
22063
       * if it is not found.
22064
       */
22065
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22066
        _Fields fields = findByThriftId(fieldId);
22067
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22068
        return fields;
22069
      }
22070
 
22071
      /**
22072
       * Find the _Fields constant that matches name, or null if its not found.
22073
       */
22074
      public static _Fields findByName(String name) {
22075
        return byName.get(name);
22076
      }
22077
 
22078
      private final short _thriftId;
22079
      private final String _fieldName;
22080
 
22081
      _Fields(short thriftId, String fieldName) {
22082
        _thriftId = thriftId;
22083
        _fieldName = fieldName;
22084
      }
22085
 
22086
      public short getThriftFieldId() {
22087
        return _thriftId;
22088
      }
22089
 
22090
      public String getFieldName() {
22091
        return _fieldName;
22092
      }
22093
    }
22094
 
22095
    // isset id assignments
22096
 
22097
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22098
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
22099
          new ListMetaData(TType.LIST, 
22100
              new StructMetaData(TType.STRUCT, Order.class))));
22101
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22102
          new FieldValueMetaData(TType.STRUCT)));
22103
    }});
22104
 
22105
    static {
22106
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
22107
    }
22108
 
22109
    public markOrdersAsPickedUp_result() {
22110
    }
22111
 
22112
    public markOrdersAsPickedUp_result(
22113
      List<Order> success,
22114
      TransactionServiceException ex)
22115
    {
22116
      this();
22117
      this.success = success;
22118
      this.ex = ex;
22119
    }
22120
 
22121
    /**
22122
     * Performs a deep copy on <i>other</i>.
22123
     */
22124
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
22125
      if (other.isSetSuccess()) {
22126
        List<Order> __this__success = new ArrayList<Order>();
22127
        for (Order other_element : other.success) {
22128
          __this__success.add(new Order(other_element));
22129
        }
22130
        this.success = __this__success;
22131
      }
22132
      if (other.isSetEx()) {
22133
        this.ex = new TransactionServiceException(other.ex);
22134
      }
22135
    }
22136
 
22137
    public markOrdersAsPickedUp_result deepCopy() {
22138
      return new markOrdersAsPickedUp_result(this);
22139
    }
22140
 
22141
    @Deprecated
22142
    public markOrdersAsPickedUp_result clone() {
22143
      return new markOrdersAsPickedUp_result(this);
22144
    }
22145
 
22146
    public int getSuccessSize() {
22147
      return (this.success == null) ? 0 : this.success.size();
22148
    }
22149
 
22150
    public java.util.Iterator<Order> getSuccessIterator() {
22151
      return (this.success == null) ? null : this.success.iterator();
22152
    }
22153
 
22154
    public void addToSuccess(Order elem) {
22155
      if (this.success == null) {
22156
        this.success = new ArrayList<Order>();
22157
      }
22158
      this.success.add(elem);
22159
    }
22160
 
22161
    public List<Order> getSuccess() {
22162
      return this.success;
22163
    }
22164
 
22165
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
22166
      this.success = success;
22167
      return this;
22168
    }
22169
 
22170
    public void unsetSuccess() {
22171
      this.success = null;
22172
    }
22173
 
22174
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22175
    public boolean isSetSuccess() {
22176
      return this.success != null;
22177
    }
22178
 
22179
    public void setSuccessIsSet(boolean value) {
22180
      if (!value) {
22181
        this.success = null;
22182
      }
22183
    }
22184
 
22185
    public TransactionServiceException getEx() {
22186
      return this.ex;
22187
    }
22188
 
22189
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
22190
      this.ex = ex;
22191
      return this;
22192
    }
22193
 
22194
    public void unsetEx() {
22195
      this.ex = null;
22196
    }
22197
 
22198
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22199
    public boolean isSetEx() {
22200
      return this.ex != null;
22201
    }
22202
 
22203
    public void setExIsSet(boolean value) {
22204
      if (!value) {
22205
        this.ex = null;
22206
      }
22207
    }
22208
 
22209
    public void setFieldValue(_Fields field, Object value) {
22210
      switch (field) {
22211
      case SUCCESS:
22212
        if (value == null) {
22213
          unsetSuccess();
22214
        } else {
22215
          setSuccess((List<Order>)value);
22216
        }
22217
        break;
22218
 
22219
      case EX:
22220
        if (value == null) {
22221
          unsetEx();
22222
        } else {
22223
          setEx((TransactionServiceException)value);
22224
        }
22225
        break;
22226
 
22227
      }
22228
    }
22229
 
22230
    public void setFieldValue(int fieldID, Object value) {
22231
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22232
    }
22233
 
22234
    public Object getFieldValue(_Fields field) {
22235
      switch (field) {
22236
      case SUCCESS:
22237
        return getSuccess();
22238
 
22239
      case EX:
22240
        return getEx();
22241
 
22242
      }
22243
      throw new IllegalStateException();
22244
    }
22245
 
22246
    public Object getFieldValue(int fieldId) {
22247
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22248
    }
22249
 
22250
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22251
    public boolean isSet(_Fields field) {
22252
      switch (field) {
22253
      case SUCCESS:
22254
        return isSetSuccess();
22255
      case EX:
22256
        return isSetEx();
22257
      }
22258
      throw new IllegalStateException();
22259
    }
22260
 
22261
    public boolean isSet(int fieldID) {
22262
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22263
    }
22264
 
22265
    @Override
22266
    public boolean equals(Object that) {
22267
      if (that == null)
22268
        return false;
22269
      if (that instanceof markOrdersAsPickedUp_result)
22270
        return this.equals((markOrdersAsPickedUp_result)that);
22271
      return false;
22272
    }
22273
 
22274
    public boolean equals(markOrdersAsPickedUp_result that) {
22275
      if (that == null)
22276
        return false;
22277
 
22278
      boolean this_present_success = true && this.isSetSuccess();
22279
      boolean that_present_success = true && that.isSetSuccess();
22280
      if (this_present_success || that_present_success) {
22281
        if (!(this_present_success && that_present_success))
22282
          return false;
22283
        if (!this.success.equals(that.success))
22284
          return false;
22285
      }
22286
 
22287
      boolean this_present_ex = true && this.isSetEx();
22288
      boolean that_present_ex = true && that.isSetEx();
22289
      if (this_present_ex || that_present_ex) {
22290
        if (!(this_present_ex && that_present_ex))
22291
          return false;
22292
        if (!this.ex.equals(that.ex))
22293
          return false;
22294
      }
22295
 
22296
      return true;
22297
    }
22298
 
22299
    @Override
22300
    public int hashCode() {
22301
      return 0;
22302
    }
22303
 
22304
    public int compareTo(markOrdersAsPickedUp_result other) {
22305
      if (!getClass().equals(other.getClass())) {
22306
        return getClass().getName().compareTo(other.getClass().getName());
22307
      }
22308
 
22309
      int lastComparison = 0;
22310
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
22311
 
22312
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22313
      if (lastComparison != 0) {
22314
        return lastComparison;
22315
      }
22316
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22317
      if (lastComparison != 0) {
22318
        return lastComparison;
22319
      }
22320
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22321
      if (lastComparison != 0) {
22322
        return lastComparison;
22323
      }
22324
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22325
      if (lastComparison != 0) {
22326
        return lastComparison;
22327
      }
22328
      return 0;
22329
    }
22330
 
22331
    public void read(TProtocol iprot) throws TException {
22332
      TField field;
22333
      iprot.readStructBegin();
22334
      while (true)
22335
      {
22336
        field = iprot.readFieldBegin();
22337
        if (field.type == TType.STOP) { 
22338
          break;
22339
        }
22340
        _Fields fieldId = _Fields.findByThriftId(field.id);
22341
        if (fieldId == null) {
22342
          TProtocolUtil.skip(iprot, field.type);
22343
        } else {
22344
          switch (fieldId) {
22345
            case SUCCESS:
22346
              if (field.type == TType.LIST) {
22347
                {
1382 varun.gupt 22348
                  TList _list53 = iprot.readListBegin();
22349
                  this.success = new ArrayList<Order>(_list53.size);
22350
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 22351
                  {
1382 varun.gupt 22352
                    Order _elem55;
22353
                    _elem55 = new Order();
22354
                    _elem55.read(iprot);
22355
                    this.success.add(_elem55);
1114 chandransh 22356
                  }
22357
                  iprot.readListEnd();
22358
                }
22359
              } else { 
22360
                TProtocolUtil.skip(iprot, field.type);
22361
              }
22362
              break;
22363
            case EX:
22364
              if (field.type == TType.STRUCT) {
22365
                this.ex = new TransactionServiceException();
22366
                this.ex.read(iprot);
22367
              } else { 
22368
                TProtocolUtil.skip(iprot, field.type);
22369
              }
22370
              break;
22371
          }
22372
          iprot.readFieldEnd();
22373
        }
22374
      }
22375
      iprot.readStructEnd();
22376
      validate();
22377
    }
22378
 
22379
    public void write(TProtocol oprot) throws TException {
22380
      oprot.writeStructBegin(STRUCT_DESC);
22381
 
22382
      if (this.isSetSuccess()) {
22383
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22384
        {
22385
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 22386
          for (Order _iter56 : this.success)
1114 chandransh 22387
          {
1382 varun.gupt 22388
            _iter56.write(oprot);
1114 chandransh 22389
          }
22390
          oprot.writeListEnd();
22391
        }
22392
        oprot.writeFieldEnd();
22393
      } else if (this.isSetEx()) {
22394
        oprot.writeFieldBegin(EX_FIELD_DESC);
22395
        this.ex.write(oprot);
22396
        oprot.writeFieldEnd();
22397
      }
22398
      oprot.writeFieldStop();
22399
      oprot.writeStructEnd();
22400
    }
22401
 
22402
    @Override
22403
    public String toString() {
22404
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
22405
      boolean first = true;
22406
 
22407
      sb.append("success:");
22408
      if (this.success == null) {
22409
        sb.append("null");
22410
      } else {
22411
        sb.append(this.success);
22412
      }
22413
      first = false;
22414
      if (!first) sb.append(", ");
22415
      sb.append("ex:");
22416
      if (this.ex == null) {
22417
        sb.append("null");
22418
      } else {
22419
        sb.append(this.ex);
22420
      }
22421
      first = false;
22422
      sb.append(")");
22423
      return sb.toString();
22424
    }
22425
 
22426
    public void validate() throws TException {
22427
      // check for required fields
22428
    }
22429
 
22430
  }
22431
 
1133 chandransh 22432
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
22433
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
22434
 
22435
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22436
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
22437
 
22438
    private long providerId;
22439
    private Map<String,String> deliveredOrders;
22440
 
22441
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22442
    public enum _Fields implements TFieldIdEnum {
22443
      PROVIDER_ID((short)1, "providerId"),
22444
      DELIVERED_ORDERS((short)2, "deliveredOrders");
22445
 
22446
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22447
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22448
 
22449
      static {
22450
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22451
          byId.put((int)field._thriftId, field);
22452
          byName.put(field.getFieldName(), field);
22453
        }
22454
      }
22455
 
22456
      /**
22457
       * Find the _Fields constant that matches fieldId, or null if its not found.
22458
       */
22459
      public static _Fields findByThriftId(int fieldId) {
22460
        return byId.get(fieldId);
22461
      }
22462
 
22463
      /**
22464
       * Find the _Fields constant that matches fieldId, throwing an exception
22465
       * if it is not found.
22466
       */
22467
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22468
        _Fields fields = findByThriftId(fieldId);
22469
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22470
        return fields;
22471
      }
22472
 
22473
      /**
22474
       * Find the _Fields constant that matches name, or null if its not found.
22475
       */
22476
      public static _Fields findByName(String name) {
22477
        return byName.get(name);
22478
      }
22479
 
22480
      private final short _thriftId;
22481
      private final String _fieldName;
22482
 
22483
      _Fields(short thriftId, String fieldName) {
22484
        _thriftId = thriftId;
22485
        _fieldName = fieldName;
22486
      }
22487
 
22488
      public short getThriftFieldId() {
22489
        return _thriftId;
22490
      }
22491
 
22492
      public String getFieldName() {
22493
        return _fieldName;
22494
      }
22495
    }
22496
 
22497
    // isset id assignments
22498
    private static final int __PROVIDERID_ISSET_ID = 0;
22499
    private BitSet __isset_bit_vector = new BitSet(1);
22500
 
22501
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22502
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22503
          new FieldValueMetaData(TType.I64)));
22504
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
22505
          new MapMetaData(TType.MAP, 
22506
              new FieldValueMetaData(TType.STRING), 
22507
              new FieldValueMetaData(TType.STRING))));
22508
    }});
22509
 
22510
    static {
22511
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
22512
    }
22513
 
22514
    public markOrdersAsDelivered_args() {
22515
    }
22516
 
22517
    public markOrdersAsDelivered_args(
22518
      long providerId,
22519
      Map<String,String> deliveredOrders)
22520
    {
22521
      this();
22522
      this.providerId = providerId;
22523
      setProviderIdIsSet(true);
22524
      this.deliveredOrders = deliveredOrders;
22525
    }
22526
 
22527
    /**
22528
     * Performs a deep copy on <i>other</i>.
22529
     */
22530
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
22531
      __isset_bit_vector.clear();
22532
      __isset_bit_vector.or(other.__isset_bit_vector);
22533
      this.providerId = other.providerId;
22534
      if (other.isSetDeliveredOrders()) {
22535
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
22536
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
22537
 
22538
          String other_element_key = other_element.getKey();
22539
          String other_element_value = other_element.getValue();
22540
 
22541
          String __this__deliveredOrders_copy_key = other_element_key;
22542
 
22543
          String __this__deliveredOrders_copy_value = other_element_value;
22544
 
22545
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
22546
        }
22547
        this.deliveredOrders = __this__deliveredOrders;
22548
      }
22549
    }
22550
 
22551
    public markOrdersAsDelivered_args deepCopy() {
22552
      return new markOrdersAsDelivered_args(this);
22553
    }
22554
 
22555
    @Deprecated
22556
    public markOrdersAsDelivered_args clone() {
22557
      return new markOrdersAsDelivered_args(this);
22558
    }
22559
 
22560
    public long getProviderId() {
22561
      return this.providerId;
22562
    }
22563
 
22564
    public markOrdersAsDelivered_args setProviderId(long providerId) {
22565
      this.providerId = providerId;
22566
      setProviderIdIsSet(true);
22567
      return this;
22568
    }
22569
 
22570
    public void unsetProviderId() {
22571
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22572
    }
22573
 
22574
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22575
    public boolean isSetProviderId() {
22576
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22577
    }
22578
 
22579
    public void setProviderIdIsSet(boolean value) {
22580
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22581
    }
22582
 
22583
    public int getDeliveredOrdersSize() {
22584
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
22585
    }
22586
 
22587
    public void putToDeliveredOrders(String key, String val) {
22588
      if (this.deliveredOrders == null) {
22589
        this.deliveredOrders = new HashMap<String,String>();
22590
      }
22591
      this.deliveredOrders.put(key, val);
22592
    }
22593
 
22594
    public Map<String,String> getDeliveredOrders() {
22595
      return this.deliveredOrders;
22596
    }
22597
 
22598
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
22599
      this.deliveredOrders = deliveredOrders;
22600
      return this;
22601
    }
22602
 
22603
    public void unsetDeliveredOrders() {
22604
      this.deliveredOrders = null;
22605
    }
22606
 
22607
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
22608
    public boolean isSetDeliveredOrders() {
22609
      return this.deliveredOrders != null;
22610
    }
22611
 
22612
    public void setDeliveredOrdersIsSet(boolean value) {
22613
      if (!value) {
22614
        this.deliveredOrders = null;
22615
      }
22616
    }
22617
 
22618
    public void setFieldValue(_Fields field, Object value) {
22619
      switch (field) {
22620
      case PROVIDER_ID:
22621
        if (value == null) {
22622
          unsetProviderId();
22623
        } else {
22624
          setProviderId((Long)value);
22625
        }
22626
        break;
22627
 
22628
      case DELIVERED_ORDERS:
22629
        if (value == null) {
22630
          unsetDeliveredOrders();
22631
        } else {
22632
          setDeliveredOrders((Map<String,String>)value);
22633
        }
22634
        break;
22635
 
22636
      }
22637
    }
22638
 
22639
    public void setFieldValue(int fieldID, Object value) {
22640
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22641
    }
22642
 
22643
    public Object getFieldValue(_Fields field) {
22644
      switch (field) {
22645
      case PROVIDER_ID:
22646
        return new Long(getProviderId());
22647
 
22648
      case DELIVERED_ORDERS:
22649
        return getDeliveredOrders();
22650
 
22651
      }
22652
      throw new IllegalStateException();
22653
    }
22654
 
22655
    public Object getFieldValue(int fieldId) {
22656
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22657
    }
22658
 
22659
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22660
    public boolean isSet(_Fields field) {
22661
      switch (field) {
22662
      case PROVIDER_ID:
22663
        return isSetProviderId();
22664
      case DELIVERED_ORDERS:
22665
        return isSetDeliveredOrders();
22666
      }
22667
      throw new IllegalStateException();
22668
    }
22669
 
22670
    public boolean isSet(int fieldID) {
22671
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22672
    }
22673
 
22674
    @Override
22675
    public boolean equals(Object that) {
22676
      if (that == null)
22677
        return false;
22678
      if (that instanceof markOrdersAsDelivered_args)
22679
        return this.equals((markOrdersAsDelivered_args)that);
22680
      return false;
22681
    }
22682
 
22683
    public boolean equals(markOrdersAsDelivered_args that) {
22684
      if (that == null)
22685
        return false;
22686
 
22687
      boolean this_present_providerId = true;
22688
      boolean that_present_providerId = true;
22689
      if (this_present_providerId || that_present_providerId) {
22690
        if (!(this_present_providerId && that_present_providerId))
22691
          return false;
22692
        if (this.providerId != that.providerId)
22693
          return false;
22694
      }
22695
 
22696
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
22697
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
22698
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
22699
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
22700
          return false;
22701
        if (!this.deliveredOrders.equals(that.deliveredOrders))
22702
          return false;
22703
      }
22704
 
22705
      return true;
22706
    }
22707
 
22708
    @Override
22709
    public int hashCode() {
22710
      return 0;
22711
    }
22712
 
22713
    public void read(TProtocol iprot) throws TException {
22714
      TField field;
22715
      iprot.readStructBegin();
22716
      while (true)
22717
      {
22718
        field = iprot.readFieldBegin();
22719
        if (field.type == TType.STOP) { 
22720
          break;
22721
        }
22722
        _Fields fieldId = _Fields.findByThriftId(field.id);
22723
        if (fieldId == null) {
22724
          TProtocolUtil.skip(iprot, field.type);
22725
        } else {
22726
          switch (fieldId) {
22727
            case PROVIDER_ID:
22728
              if (field.type == TType.I64) {
22729
                this.providerId = iprot.readI64();
22730
                setProviderIdIsSet(true);
22731
              } else { 
22732
                TProtocolUtil.skip(iprot, field.type);
22733
              }
22734
              break;
22735
            case DELIVERED_ORDERS:
22736
              if (field.type == TType.MAP) {
22737
                {
1382 varun.gupt 22738
                  TMap _map57 = iprot.readMapBegin();
22739
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
22740
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 22741
                  {
1382 varun.gupt 22742
                    String _key59;
22743
                    String _val60;
22744
                    _key59 = iprot.readString();
22745
                    _val60 = iprot.readString();
22746
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 22747
                  }
22748
                  iprot.readMapEnd();
22749
                }
22750
              } else { 
22751
                TProtocolUtil.skip(iprot, field.type);
22752
              }
22753
              break;
22754
          }
22755
          iprot.readFieldEnd();
22756
        }
22757
      }
22758
      iprot.readStructEnd();
22759
      validate();
22760
    }
22761
 
22762
    public void write(TProtocol oprot) throws TException {
22763
      validate();
22764
 
22765
      oprot.writeStructBegin(STRUCT_DESC);
22766
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22767
      oprot.writeI64(this.providerId);
22768
      oprot.writeFieldEnd();
22769
      if (this.deliveredOrders != null) {
22770
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
22771
        {
22772
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 22773
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 22774
          {
1382 varun.gupt 22775
            oprot.writeString(_iter61.getKey());
22776
            oprot.writeString(_iter61.getValue());
1133 chandransh 22777
          }
22778
          oprot.writeMapEnd();
22779
        }
22780
        oprot.writeFieldEnd();
22781
      }
22782
      oprot.writeFieldStop();
22783
      oprot.writeStructEnd();
22784
    }
22785
 
22786
    @Override
22787
    public String toString() {
22788
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
22789
      boolean first = true;
22790
 
22791
      sb.append("providerId:");
22792
      sb.append(this.providerId);
22793
      first = false;
22794
      if (!first) sb.append(", ");
22795
      sb.append("deliveredOrders:");
22796
      if (this.deliveredOrders == null) {
22797
        sb.append("null");
22798
      } else {
22799
        sb.append(this.deliveredOrders);
22800
      }
22801
      first = false;
22802
      sb.append(")");
22803
      return sb.toString();
22804
    }
22805
 
22806
    public void validate() throws TException {
22807
      // check for required fields
22808
    }
22809
 
22810
  }
22811
 
22812
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
22813
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
22814
 
22815
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22816
 
22817
    private TransactionServiceException ex;
22818
 
22819
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22820
    public enum _Fields implements TFieldIdEnum {
22821
      EX((short)1, "ex");
22822
 
22823
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22824
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22825
 
22826
      static {
22827
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22828
          byId.put((int)field._thriftId, field);
22829
          byName.put(field.getFieldName(), field);
22830
        }
22831
      }
22832
 
22833
      /**
22834
       * Find the _Fields constant that matches fieldId, or null if its not found.
22835
       */
22836
      public static _Fields findByThriftId(int fieldId) {
22837
        return byId.get(fieldId);
22838
      }
22839
 
22840
      /**
22841
       * Find the _Fields constant that matches fieldId, throwing an exception
22842
       * if it is not found.
22843
       */
22844
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22845
        _Fields fields = findByThriftId(fieldId);
22846
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22847
        return fields;
22848
      }
22849
 
22850
      /**
22851
       * Find the _Fields constant that matches name, or null if its not found.
22852
       */
22853
      public static _Fields findByName(String name) {
22854
        return byName.get(name);
22855
      }
22856
 
22857
      private final short _thriftId;
22858
      private final String _fieldName;
22859
 
22860
      _Fields(short thriftId, String fieldName) {
22861
        _thriftId = thriftId;
22862
        _fieldName = fieldName;
22863
      }
22864
 
22865
      public short getThriftFieldId() {
22866
        return _thriftId;
22867
      }
22868
 
22869
      public String getFieldName() {
22870
        return _fieldName;
22871
      }
22872
    }
22873
 
22874
    // isset id assignments
22875
 
22876
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22877
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22878
          new FieldValueMetaData(TType.STRUCT)));
22879
    }});
22880
 
22881
    static {
22882
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
22883
    }
22884
 
22885
    public markOrdersAsDelivered_result() {
22886
    }
22887
 
22888
    public markOrdersAsDelivered_result(
22889
      TransactionServiceException ex)
22890
    {
22891
      this();
22892
      this.ex = ex;
22893
    }
22894
 
22895
    /**
22896
     * Performs a deep copy on <i>other</i>.
22897
     */
22898
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
22899
      if (other.isSetEx()) {
22900
        this.ex = new TransactionServiceException(other.ex);
22901
      }
22902
    }
22903
 
22904
    public markOrdersAsDelivered_result deepCopy() {
22905
      return new markOrdersAsDelivered_result(this);
22906
    }
22907
 
22908
    @Deprecated
22909
    public markOrdersAsDelivered_result clone() {
22910
      return new markOrdersAsDelivered_result(this);
22911
    }
22912
 
22913
    public TransactionServiceException getEx() {
22914
      return this.ex;
22915
    }
22916
 
22917
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
22918
      this.ex = ex;
22919
      return this;
22920
    }
22921
 
22922
    public void unsetEx() {
22923
      this.ex = null;
22924
    }
22925
 
22926
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22927
    public boolean isSetEx() {
22928
      return this.ex != null;
22929
    }
22930
 
22931
    public void setExIsSet(boolean value) {
22932
      if (!value) {
22933
        this.ex = null;
22934
      }
22935
    }
22936
 
22937
    public void setFieldValue(_Fields field, Object value) {
22938
      switch (field) {
22939
      case EX:
22940
        if (value == null) {
22941
          unsetEx();
22942
        } else {
22943
          setEx((TransactionServiceException)value);
22944
        }
22945
        break;
22946
 
22947
      }
22948
    }
22949
 
22950
    public void setFieldValue(int fieldID, Object value) {
22951
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22952
    }
22953
 
22954
    public Object getFieldValue(_Fields field) {
22955
      switch (field) {
22956
      case EX:
22957
        return getEx();
22958
 
22959
      }
22960
      throw new IllegalStateException();
22961
    }
22962
 
22963
    public Object getFieldValue(int fieldId) {
22964
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22965
    }
22966
 
22967
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22968
    public boolean isSet(_Fields field) {
22969
      switch (field) {
22970
      case EX:
22971
        return isSetEx();
22972
      }
22973
      throw new IllegalStateException();
22974
    }
22975
 
22976
    public boolean isSet(int fieldID) {
22977
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22978
    }
22979
 
22980
    @Override
22981
    public boolean equals(Object that) {
22982
      if (that == null)
22983
        return false;
22984
      if (that instanceof markOrdersAsDelivered_result)
22985
        return this.equals((markOrdersAsDelivered_result)that);
22986
      return false;
22987
    }
22988
 
22989
    public boolean equals(markOrdersAsDelivered_result that) {
22990
      if (that == null)
22991
        return false;
22992
 
22993
      boolean this_present_ex = true && this.isSetEx();
22994
      boolean that_present_ex = true && that.isSetEx();
22995
      if (this_present_ex || that_present_ex) {
22996
        if (!(this_present_ex && that_present_ex))
22997
          return false;
22998
        if (!this.ex.equals(that.ex))
22999
          return false;
23000
      }
23001
 
23002
      return true;
23003
    }
23004
 
23005
    @Override
23006
    public int hashCode() {
23007
      return 0;
23008
    }
23009
 
23010
    public int compareTo(markOrdersAsDelivered_result other) {
23011
      if (!getClass().equals(other.getClass())) {
23012
        return getClass().getName().compareTo(other.getClass().getName());
23013
      }
23014
 
23015
      int lastComparison = 0;
23016
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
23017
 
23018
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23019
      if (lastComparison != 0) {
23020
        return lastComparison;
23021
      }
23022
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23023
      if (lastComparison != 0) {
23024
        return lastComparison;
23025
      }
23026
      return 0;
23027
    }
23028
 
23029
    public void read(TProtocol iprot) throws TException {
23030
      TField field;
23031
      iprot.readStructBegin();
23032
      while (true)
23033
      {
23034
        field = iprot.readFieldBegin();
23035
        if (field.type == TType.STOP) { 
23036
          break;
23037
        }
23038
        _Fields fieldId = _Fields.findByThriftId(field.id);
23039
        if (fieldId == null) {
23040
          TProtocolUtil.skip(iprot, field.type);
23041
        } else {
23042
          switch (fieldId) {
23043
            case EX:
23044
              if (field.type == TType.STRUCT) {
23045
                this.ex = new TransactionServiceException();
23046
                this.ex.read(iprot);
23047
              } else { 
23048
                TProtocolUtil.skip(iprot, field.type);
23049
              }
23050
              break;
23051
          }
23052
          iprot.readFieldEnd();
23053
        }
23054
      }
23055
      iprot.readStructEnd();
23056
      validate();
23057
    }
23058
 
23059
    public void write(TProtocol oprot) throws TException {
23060
      oprot.writeStructBegin(STRUCT_DESC);
23061
 
23062
      if (this.isSetEx()) {
23063
        oprot.writeFieldBegin(EX_FIELD_DESC);
23064
        this.ex.write(oprot);
23065
        oprot.writeFieldEnd();
23066
      }
23067
      oprot.writeFieldStop();
23068
      oprot.writeStructEnd();
23069
    }
23070
 
23071
    @Override
23072
    public String toString() {
23073
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
23074
      boolean first = true;
23075
 
23076
      sb.append("ex:");
23077
      if (this.ex == null) {
23078
        sb.append("null");
23079
      } else {
23080
        sb.append(this.ex);
23081
      }
23082
      first = false;
23083
      sb.append(")");
23084
      return sb.toString();
23085
    }
23086
 
23087
    public void validate() throws TException {
23088
      // check for required fields
23089
    }
23090
 
23091
  }
23092
 
23093
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
23094
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
23095
 
23096
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23097
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
23098
 
23099
    private long providerId;
23100
    private Map<String,String> returnedOrders;
23101
 
23102
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23103
    public enum _Fields implements TFieldIdEnum {
23104
      PROVIDER_ID((short)1, "providerId"),
23105
      RETURNED_ORDERS((short)2, "returnedOrders");
23106
 
23107
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23108
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23109
 
23110
      static {
23111
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23112
          byId.put((int)field._thriftId, field);
23113
          byName.put(field.getFieldName(), field);
23114
        }
23115
      }
23116
 
23117
      /**
23118
       * Find the _Fields constant that matches fieldId, or null if its not found.
23119
       */
23120
      public static _Fields findByThriftId(int fieldId) {
23121
        return byId.get(fieldId);
23122
      }
23123
 
23124
      /**
23125
       * Find the _Fields constant that matches fieldId, throwing an exception
23126
       * if it is not found.
23127
       */
23128
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23129
        _Fields fields = findByThriftId(fieldId);
23130
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23131
        return fields;
23132
      }
23133
 
23134
      /**
23135
       * Find the _Fields constant that matches name, or null if its not found.
23136
       */
23137
      public static _Fields findByName(String name) {
23138
        return byName.get(name);
23139
      }
23140
 
23141
      private final short _thriftId;
23142
      private final String _fieldName;
23143
 
23144
      _Fields(short thriftId, String fieldName) {
23145
        _thriftId = thriftId;
23146
        _fieldName = fieldName;
23147
      }
23148
 
23149
      public short getThriftFieldId() {
23150
        return _thriftId;
23151
      }
23152
 
23153
      public String getFieldName() {
23154
        return _fieldName;
23155
      }
23156
    }
23157
 
23158
    // isset id assignments
23159
    private static final int __PROVIDERID_ISSET_ID = 0;
23160
    private BitSet __isset_bit_vector = new BitSet(1);
23161
 
23162
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23163
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23164
          new FieldValueMetaData(TType.I64)));
23165
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
23166
          new MapMetaData(TType.MAP, 
23167
              new FieldValueMetaData(TType.STRING), 
23168
              new FieldValueMetaData(TType.STRING))));
23169
    }});
23170
 
23171
    static {
23172
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
23173
    }
23174
 
23175
    public markOrdersAsFailed_args() {
23176
    }
23177
 
23178
    public markOrdersAsFailed_args(
23179
      long providerId,
23180
      Map<String,String> returnedOrders)
23181
    {
23182
      this();
23183
      this.providerId = providerId;
23184
      setProviderIdIsSet(true);
23185
      this.returnedOrders = returnedOrders;
23186
    }
23187
 
23188
    /**
23189
     * Performs a deep copy on <i>other</i>.
23190
     */
23191
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
23192
      __isset_bit_vector.clear();
23193
      __isset_bit_vector.or(other.__isset_bit_vector);
23194
      this.providerId = other.providerId;
23195
      if (other.isSetReturnedOrders()) {
23196
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
23197
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
23198
 
23199
          String other_element_key = other_element.getKey();
23200
          String other_element_value = other_element.getValue();
23201
 
23202
          String __this__returnedOrders_copy_key = other_element_key;
23203
 
23204
          String __this__returnedOrders_copy_value = other_element_value;
23205
 
23206
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
23207
        }
23208
        this.returnedOrders = __this__returnedOrders;
23209
      }
23210
    }
23211
 
23212
    public markOrdersAsFailed_args deepCopy() {
23213
      return new markOrdersAsFailed_args(this);
23214
    }
23215
 
23216
    @Deprecated
23217
    public markOrdersAsFailed_args clone() {
23218
      return new markOrdersAsFailed_args(this);
23219
    }
23220
 
23221
    public long getProviderId() {
23222
      return this.providerId;
23223
    }
23224
 
23225
    public markOrdersAsFailed_args setProviderId(long providerId) {
23226
      this.providerId = providerId;
23227
      setProviderIdIsSet(true);
23228
      return this;
23229
    }
23230
 
23231
    public void unsetProviderId() {
23232
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23233
    }
23234
 
23235
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23236
    public boolean isSetProviderId() {
23237
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23238
    }
23239
 
23240
    public void setProviderIdIsSet(boolean value) {
23241
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23242
    }
23243
 
23244
    public int getReturnedOrdersSize() {
23245
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
23246
    }
23247
 
23248
    public void putToReturnedOrders(String key, String val) {
23249
      if (this.returnedOrders == null) {
23250
        this.returnedOrders = new HashMap<String,String>();
23251
      }
23252
      this.returnedOrders.put(key, val);
23253
    }
23254
 
23255
    public Map<String,String> getReturnedOrders() {
23256
      return this.returnedOrders;
23257
    }
23258
 
23259
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
23260
      this.returnedOrders = returnedOrders;
23261
      return this;
23262
    }
23263
 
23264
    public void unsetReturnedOrders() {
23265
      this.returnedOrders = null;
23266
    }
23267
 
23268
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
23269
    public boolean isSetReturnedOrders() {
23270
      return this.returnedOrders != null;
23271
    }
23272
 
23273
    public void setReturnedOrdersIsSet(boolean value) {
23274
      if (!value) {
23275
        this.returnedOrders = null;
23276
      }
23277
    }
23278
 
23279
    public void setFieldValue(_Fields field, Object value) {
23280
      switch (field) {
23281
      case PROVIDER_ID:
23282
        if (value == null) {
23283
          unsetProviderId();
23284
        } else {
23285
          setProviderId((Long)value);
23286
        }
23287
        break;
23288
 
23289
      case RETURNED_ORDERS:
23290
        if (value == null) {
23291
          unsetReturnedOrders();
23292
        } else {
23293
          setReturnedOrders((Map<String,String>)value);
23294
        }
23295
        break;
23296
 
23297
      }
23298
    }
23299
 
23300
    public void setFieldValue(int fieldID, Object value) {
23301
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23302
    }
23303
 
23304
    public Object getFieldValue(_Fields field) {
23305
      switch (field) {
23306
      case PROVIDER_ID:
23307
        return new Long(getProviderId());
23308
 
23309
      case RETURNED_ORDERS:
23310
        return getReturnedOrders();
23311
 
23312
      }
23313
      throw new IllegalStateException();
23314
    }
23315
 
23316
    public Object getFieldValue(int fieldId) {
23317
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23318
    }
23319
 
23320
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23321
    public boolean isSet(_Fields field) {
23322
      switch (field) {
23323
      case PROVIDER_ID:
23324
        return isSetProviderId();
23325
      case RETURNED_ORDERS:
23326
        return isSetReturnedOrders();
23327
      }
23328
      throw new IllegalStateException();
23329
    }
23330
 
23331
    public boolean isSet(int fieldID) {
23332
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23333
    }
23334
 
23335
    @Override
23336
    public boolean equals(Object that) {
23337
      if (that == null)
23338
        return false;
23339
      if (that instanceof markOrdersAsFailed_args)
23340
        return this.equals((markOrdersAsFailed_args)that);
23341
      return false;
23342
    }
23343
 
23344
    public boolean equals(markOrdersAsFailed_args that) {
23345
      if (that == null)
23346
        return false;
23347
 
23348
      boolean this_present_providerId = true;
23349
      boolean that_present_providerId = true;
23350
      if (this_present_providerId || that_present_providerId) {
23351
        if (!(this_present_providerId && that_present_providerId))
23352
          return false;
23353
        if (this.providerId != that.providerId)
23354
          return false;
23355
      }
23356
 
23357
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
23358
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
23359
      if (this_present_returnedOrders || that_present_returnedOrders) {
23360
        if (!(this_present_returnedOrders && that_present_returnedOrders))
23361
          return false;
23362
        if (!this.returnedOrders.equals(that.returnedOrders))
23363
          return false;
23364
      }
23365
 
23366
      return true;
23367
    }
23368
 
23369
    @Override
23370
    public int hashCode() {
23371
      return 0;
23372
    }
23373
 
23374
    public void read(TProtocol iprot) throws TException {
23375
      TField field;
23376
      iprot.readStructBegin();
23377
      while (true)
23378
      {
23379
        field = iprot.readFieldBegin();
23380
        if (field.type == TType.STOP) { 
23381
          break;
23382
        }
23383
        _Fields fieldId = _Fields.findByThriftId(field.id);
23384
        if (fieldId == null) {
23385
          TProtocolUtil.skip(iprot, field.type);
23386
        } else {
23387
          switch (fieldId) {
23388
            case PROVIDER_ID:
23389
              if (field.type == TType.I64) {
23390
                this.providerId = iprot.readI64();
23391
                setProviderIdIsSet(true);
23392
              } else { 
23393
                TProtocolUtil.skip(iprot, field.type);
23394
              }
23395
              break;
23396
            case RETURNED_ORDERS:
23397
              if (field.type == TType.MAP) {
23398
                {
1382 varun.gupt 23399
                  TMap _map62 = iprot.readMapBegin();
23400
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
23401
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 23402
                  {
1382 varun.gupt 23403
                    String _key64;
23404
                    String _val65;
23405
                    _key64 = iprot.readString();
23406
                    _val65 = iprot.readString();
23407
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 23408
                  }
23409
                  iprot.readMapEnd();
23410
                }
23411
              } else { 
23412
                TProtocolUtil.skip(iprot, field.type);
23413
              }
23414
              break;
23415
          }
23416
          iprot.readFieldEnd();
23417
        }
23418
      }
23419
      iprot.readStructEnd();
23420
      validate();
23421
    }
23422
 
23423
    public void write(TProtocol oprot) throws TException {
23424
      validate();
23425
 
23426
      oprot.writeStructBegin(STRUCT_DESC);
23427
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23428
      oprot.writeI64(this.providerId);
23429
      oprot.writeFieldEnd();
23430
      if (this.returnedOrders != null) {
23431
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
23432
        {
23433
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 23434
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 23435
          {
1382 varun.gupt 23436
            oprot.writeString(_iter66.getKey());
23437
            oprot.writeString(_iter66.getValue());
1133 chandransh 23438
          }
23439
          oprot.writeMapEnd();
23440
        }
23441
        oprot.writeFieldEnd();
23442
      }
23443
      oprot.writeFieldStop();
23444
      oprot.writeStructEnd();
23445
    }
23446
 
23447
    @Override
23448
    public String toString() {
23449
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
23450
      boolean first = true;
23451
 
23452
      sb.append("providerId:");
23453
      sb.append(this.providerId);
23454
      first = false;
23455
      if (!first) sb.append(", ");
23456
      sb.append("returnedOrders:");
23457
      if (this.returnedOrders == null) {
23458
        sb.append("null");
23459
      } else {
23460
        sb.append(this.returnedOrders);
23461
      }
23462
      first = false;
23463
      sb.append(")");
23464
      return sb.toString();
23465
    }
23466
 
23467
    public void validate() throws TException {
23468
      // check for required fields
23469
    }
23470
 
23471
  }
23472
 
23473
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
23474
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
23475
 
23476
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23477
 
23478
    private TransactionServiceException ex;
23479
 
23480
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23481
    public enum _Fields implements TFieldIdEnum {
23482
      EX((short)1, "ex");
23483
 
23484
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23485
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23486
 
23487
      static {
23488
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23489
          byId.put((int)field._thriftId, field);
23490
          byName.put(field.getFieldName(), field);
23491
        }
23492
      }
23493
 
23494
      /**
23495
       * Find the _Fields constant that matches fieldId, or null if its not found.
23496
       */
23497
      public static _Fields findByThriftId(int fieldId) {
23498
        return byId.get(fieldId);
23499
      }
23500
 
23501
      /**
23502
       * Find the _Fields constant that matches fieldId, throwing an exception
23503
       * if it is not found.
23504
       */
23505
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23506
        _Fields fields = findByThriftId(fieldId);
23507
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23508
        return fields;
23509
      }
23510
 
23511
      /**
23512
       * Find the _Fields constant that matches name, or null if its not found.
23513
       */
23514
      public static _Fields findByName(String name) {
23515
        return byName.get(name);
23516
      }
23517
 
23518
      private final short _thriftId;
23519
      private final String _fieldName;
23520
 
23521
      _Fields(short thriftId, String fieldName) {
23522
        _thriftId = thriftId;
23523
        _fieldName = fieldName;
23524
      }
23525
 
23526
      public short getThriftFieldId() {
23527
        return _thriftId;
23528
      }
23529
 
23530
      public String getFieldName() {
23531
        return _fieldName;
23532
      }
23533
    }
23534
 
23535
    // isset id assignments
23536
 
23537
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23538
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23539
          new FieldValueMetaData(TType.STRUCT)));
23540
    }});
23541
 
23542
    static {
23543
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
23544
    }
23545
 
23546
    public markOrdersAsFailed_result() {
23547
    }
23548
 
23549
    public markOrdersAsFailed_result(
23550
      TransactionServiceException ex)
23551
    {
23552
      this();
23553
      this.ex = ex;
23554
    }
23555
 
23556
    /**
23557
     * Performs a deep copy on <i>other</i>.
23558
     */
23559
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
23560
      if (other.isSetEx()) {
23561
        this.ex = new TransactionServiceException(other.ex);
23562
      }
23563
    }
23564
 
23565
    public markOrdersAsFailed_result deepCopy() {
23566
      return new markOrdersAsFailed_result(this);
23567
    }
23568
 
23569
    @Deprecated
23570
    public markOrdersAsFailed_result clone() {
23571
      return new markOrdersAsFailed_result(this);
23572
    }
23573
 
23574
    public TransactionServiceException getEx() {
23575
      return this.ex;
23576
    }
23577
 
23578
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
23579
      this.ex = ex;
23580
      return this;
23581
    }
23582
 
23583
    public void unsetEx() {
23584
      this.ex = null;
23585
    }
23586
 
23587
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23588
    public boolean isSetEx() {
23589
      return this.ex != null;
23590
    }
23591
 
23592
    public void setExIsSet(boolean value) {
23593
      if (!value) {
23594
        this.ex = null;
23595
      }
23596
    }
23597
 
23598
    public void setFieldValue(_Fields field, Object value) {
23599
      switch (field) {
23600
      case EX:
23601
        if (value == null) {
23602
          unsetEx();
23603
        } else {
23604
          setEx((TransactionServiceException)value);
23605
        }
23606
        break;
23607
 
23608
      }
23609
    }
23610
 
23611
    public void setFieldValue(int fieldID, Object value) {
23612
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23613
    }
23614
 
23615
    public Object getFieldValue(_Fields field) {
23616
      switch (field) {
23617
      case EX:
23618
        return getEx();
23619
 
23620
      }
23621
      throw new IllegalStateException();
23622
    }
23623
 
23624
    public Object getFieldValue(int fieldId) {
23625
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23626
    }
23627
 
23628
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23629
    public boolean isSet(_Fields field) {
23630
      switch (field) {
23631
      case EX:
23632
        return isSetEx();
23633
      }
23634
      throw new IllegalStateException();
23635
    }
23636
 
23637
    public boolean isSet(int fieldID) {
23638
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23639
    }
23640
 
23641
    @Override
23642
    public boolean equals(Object that) {
23643
      if (that == null)
23644
        return false;
23645
      if (that instanceof markOrdersAsFailed_result)
23646
        return this.equals((markOrdersAsFailed_result)that);
23647
      return false;
23648
    }
23649
 
23650
    public boolean equals(markOrdersAsFailed_result that) {
23651
      if (that == null)
23652
        return false;
23653
 
23654
      boolean this_present_ex = true && this.isSetEx();
23655
      boolean that_present_ex = true && that.isSetEx();
23656
      if (this_present_ex || that_present_ex) {
23657
        if (!(this_present_ex && that_present_ex))
23658
          return false;
23659
        if (!this.ex.equals(that.ex))
23660
          return false;
23661
      }
23662
 
23663
      return true;
23664
    }
23665
 
23666
    @Override
23667
    public int hashCode() {
23668
      return 0;
23669
    }
23670
 
23671
    public int compareTo(markOrdersAsFailed_result other) {
23672
      if (!getClass().equals(other.getClass())) {
23673
        return getClass().getName().compareTo(other.getClass().getName());
23674
      }
23675
 
23676
      int lastComparison = 0;
23677
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
23678
 
23679
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23680
      if (lastComparison != 0) {
23681
        return lastComparison;
23682
      }
23683
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23684
      if (lastComparison != 0) {
23685
        return lastComparison;
23686
      }
23687
      return 0;
23688
    }
23689
 
23690
    public void read(TProtocol iprot) throws TException {
23691
      TField field;
23692
      iprot.readStructBegin();
23693
      while (true)
23694
      {
23695
        field = iprot.readFieldBegin();
23696
        if (field.type == TType.STOP) { 
23697
          break;
23698
        }
23699
        _Fields fieldId = _Fields.findByThriftId(field.id);
23700
        if (fieldId == null) {
23701
          TProtocolUtil.skip(iprot, field.type);
23702
        } else {
23703
          switch (fieldId) {
23704
            case EX:
23705
              if (field.type == TType.STRUCT) {
23706
                this.ex = new TransactionServiceException();
23707
                this.ex.read(iprot);
23708
              } else { 
23709
                TProtocolUtil.skip(iprot, field.type);
23710
              }
23711
              break;
23712
          }
23713
          iprot.readFieldEnd();
23714
        }
23715
      }
23716
      iprot.readStructEnd();
23717
      validate();
23718
    }
23719
 
23720
    public void write(TProtocol oprot) throws TException {
23721
      oprot.writeStructBegin(STRUCT_DESC);
23722
 
23723
      if (this.isSetEx()) {
23724
        oprot.writeFieldBegin(EX_FIELD_DESC);
23725
        this.ex.write(oprot);
23726
        oprot.writeFieldEnd();
23727
      }
23728
      oprot.writeFieldStop();
23729
      oprot.writeStructEnd();
23730
    }
23731
 
23732
    @Override
23733
    public String toString() {
23734
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
23735
      boolean first = true;
23736
 
23737
      sb.append("ex:");
23738
      if (this.ex == null) {
23739
        sb.append("null");
23740
      } else {
23741
        sb.append(this.ex);
23742
      }
23743
      first = false;
23744
      sb.append(")");
23745
      return sb.toString();
23746
    }
23747
 
23748
    public void validate() throws TException {
23749
      // check for required fields
23750
    }
23751
 
23752
  }
23753
 
1245 chandransh 23754
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
23755
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
23756
 
23757
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23758
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
23759
 
23760
    private long providerId;
23761
    private Map<String,String> undeliveredOrders;
23762
 
23763
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23764
    public enum _Fields implements TFieldIdEnum {
23765
      PROVIDER_ID((short)1, "providerId"),
23766
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
23767
 
23768
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23769
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23770
 
23771
      static {
23772
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23773
          byId.put((int)field._thriftId, field);
23774
          byName.put(field.getFieldName(), field);
23775
        }
23776
      }
23777
 
23778
      /**
23779
       * Find the _Fields constant that matches fieldId, or null if its not found.
23780
       */
23781
      public static _Fields findByThriftId(int fieldId) {
23782
        return byId.get(fieldId);
23783
      }
23784
 
23785
      /**
23786
       * Find the _Fields constant that matches fieldId, throwing an exception
23787
       * if it is not found.
23788
       */
23789
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23790
        _Fields fields = findByThriftId(fieldId);
23791
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23792
        return fields;
23793
      }
23794
 
23795
      /**
23796
       * Find the _Fields constant that matches name, or null if its not found.
23797
       */
23798
      public static _Fields findByName(String name) {
23799
        return byName.get(name);
23800
      }
23801
 
23802
      private final short _thriftId;
23803
      private final String _fieldName;
23804
 
23805
      _Fields(short thriftId, String fieldName) {
23806
        _thriftId = thriftId;
23807
        _fieldName = fieldName;
23808
      }
23809
 
23810
      public short getThriftFieldId() {
23811
        return _thriftId;
23812
      }
23813
 
23814
      public String getFieldName() {
23815
        return _fieldName;
23816
      }
23817
    }
23818
 
23819
    // isset id assignments
23820
    private static final int __PROVIDERID_ISSET_ID = 0;
23821
    private BitSet __isset_bit_vector = new BitSet(1);
23822
 
23823
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23824
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23825
          new FieldValueMetaData(TType.I64)));
23826
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
23827
          new MapMetaData(TType.MAP, 
23828
              new FieldValueMetaData(TType.STRING), 
23829
              new FieldValueMetaData(TType.STRING))));
23830
    }});
23831
 
23832
    static {
23833
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
23834
    }
23835
 
23836
    public updateNonDeliveryReason_args() {
23837
    }
23838
 
23839
    public updateNonDeliveryReason_args(
23840
      long providerId,
23841
      Map<String,String> undeliveredOrders)
23842
    {
23843
      this();
23844
      this.providerId = providerId;
23845
      setProviderIdIsSet(true);
23846
      this.undeliveredOrders = undeliveredOrders;
23847
    }
23848
 
23849
    /**
23850
     * Performs a deep copy on <i>other</i>.
23851
     */
23852
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
23853
      __isset_bit_vector.clear();
23854
      __isset_bit_vector.or(other.__isset_bit_vector);
23855
      this.providerId = other.providerId;
23856
      if (other.isSetUndeliveredOrders()) {
23857
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
23858
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
23859
 
23860
          String other_element_key = other_element.getKey();
23861
          String other_element_value = other_element.getValue();
23862
 
23863
          String __this__undeliveredOrders_copy_key = other_element_key;
23864
 
23865
          String __this__undeliveredOrders_copy_value = other_element_value;
23866
 
23867
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
23868
        }
23869
        this.undeliveredOrders = __this__undeliveredOrders;
23870
      }
23871
    }
23872
 
23873
    public updateNonDeliveryReason_args deepCopy() {
23874
      return new updateNonDeliveryReason_args(this);
23875
    }
23876
 
23877
    @Deprecated
23878
    public updateNonDeliveryReason_args clone() {
23879
      return new updateNonDeliveryReason_args(this);
23880
    }
23881
 
23882
    public long getProviderId() {
23883
      return this.providerId;
23884
    }
23885
 
23886
    public updateNonDeliveryReason_args setProviderId(long providerId) {
23887
      this.providerId = providerId;
23888
      setProviderIdIsSet(true);
23889
      return this;
23890
    }
23891
 
23892
    public void unsetProviderId() {
23893
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23894
    }
23895
 
23896
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23897
    public boolean isSetProviderId() {
23898
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23899
    }
23900
 
23901
    public void setProviderIdIsSet(boolean value) {
23902
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23903
    }
23904
 
23905
    public int getUndeliveredOrdersSize() {
23906
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
23907
    }
23908
 
23909
    public void putToUndeliveredOrders(String key, String val) {
23910
      if (this.undeliveredOrders == null) {
23911
        this.undeliveredOrders = new HashMap<String,String>();
23912
      }
23913
      this.undeliveredOrders.put(key, val);
23914
    }
23915
 
23916
    public Map<String,String> getUndeliveredOrders() {
23917
      return this.undeliveredOrders;
23918
    }
23919
 
23920
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
23921
      this.undeliveredOrders = undeliveredOrders;
23922
      return this;
23923
    }
23924
 
23925
    public void unsetUndeliveredOrders() {
23926
      this.undeliveredOrders = null;
23927
    }
23928
 
23929
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
23930
    public boolean isSetUndeliveredOrders() {
23931
      return this.undeliveredOrders != null;
23932
    }
23933
 
23934
    public void setUndeliveredOrdersIsSet(boolean value) {
23935
      if (!value) {
23936
        this.undeliveredOrders = null;
23937
      }
23938
    }
23939
 
23940
    public void setFieldValue(_Fields field, Object value) {
23941
      switch (field) {
23942
      case PROVIDER_ID:
23943
        if (value == null) {
23944
          unsetProviderId();
23945
        } else {
23946
          setProviderId((Long)value);
23947
        }
23948
        break;
23949
 
23950
      case UNDELIVERED_ORDERS:
23951
        if (value == null) {
23952
          unsetUndeliveredOrders();
23953
        } else {
23954
          setUndeliveredOrders((Map<String,String>)value);
23955
        }
23956
        break;
23957
 
23958
      }
23959
    }
23960
 
23961
    public void setFieldValue(int fieldID, Object value) {
23962
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23963
    }
23964
 
23965
    public Object getFieldValue(_Fields field) {
23966
      switch (field) {
23967
      case PROVIDER_ID:
23968
        return new Long(getProviderId());
23969
 
23970
      case UNDELIVERED_ORDERS:
23971
        return getUndeliveredOrders();
23972
 
23973
      }
23974
      throw new IllegalStateException();
23975
    }
23976
 
23977
    public Object getFieldValue(int fieldId) {
23978
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23979
    }
23980
 
23981
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23982
    public boolean isSet(_Fields field) {
23983
      switch (field) {
23984
      case PROVIDER_ID:
23985
        return isSetProviderId();
23986
      case UNDELIVERED_ORDERS:
23987
        return isSetUndeliveredOrders();
23988
      }
23989
      throw new IllegalStateException();
23990
    }
23991
 
23992
    public boolean isSet(int fieldID) {
23993
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23994
    }
23995
 
23996
    @Override
23997
    public boolean equals(Object that) {
23998
      if (that == null)
23999
        return false;
24000
      if (that instanceof updateNonDeliveryReason_args)
24001
        return this.equals((updateNonDeliveryReason_args)that);
24002
      return false;
24003
    }
24004
 
24005
    public boolean equals(updateNonDeliveryReason_args that) {
24006
      if (that == null)
24007
        return false;
24008
 
24009
      boolean this_present_providerId = true;
24010
      boolean that_present_providerId = true;
24011
      if (this_present_providerId || that_present_providerId) {
24012
        if (!(this_present_providerId && that_present_providerId))
24013
          return false;
24014
        if (this.providerId != that.providerId)
24015
          return false;
24016
      }
24017
 
24018
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
24019
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
24020
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
24021
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
24022
          return false;
24023
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
24024
          return false;
24025
      }
24026
 
24027
      return true;
24028
    }
24029
 
24030
    @Override
24031
    public int hashCode() {
24032
      return 0;
24033
    }
24034
 
24035
    public void read(TProtocol iprot) throws TException {
24036
      TField field;
24037
      iprot.readStructBegin();
24038
      while (true)
24039
      {
24040
        field = iprot.readFieldBegin();
24041
        if (field.type == TType.STOP) { 
24042
          break;
24043
        }
24044
        _Fields fieldId = _Fields.findByThriftId(field.id);
24045
        if (fieldId == null) {
24046
          TProtocolUtil.skip(iprot, field.type);
24047
        } else {
24048
          switch (fieldId) {
24049
            case PROVIDER_ID:
24050
              if (field.type == TType.I64) {
24051
                this.providerId = iprot.readI64();
24052
                setProviderIdIsSet(true);
24053
              } else { 
24054
                TProtocolUtil.skip(iprot, field.type);
24055
              }
24056
              break;
24057
            case UNDELIVERED_ORDERS:
24058
              if (field.type == TType.MAP) {
24059
                {
1382 varun.gupt 24060
                  TMap _map67 = iprot.readMapBegin();
24061
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
24062
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 24063
                  {
1382 varun.gupt 24064
                    String _key69;
24065
                    String _val70;
24066
                    _key69 = iprot.readString();
24067
                    _val70 = iprot.readString();
24068
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 24069
                  }
24070
                  iprot.readMapEnd();
24071
                }
24072
              } else { 
24073
                TProtocolUtil.skip(iprot, field.type);
24074
              }
24075
              break;
24076
          }
24077
          iprot.readFieldEnd();
24078
        }
24079
      }
24080
      iprot.readStructEnd();
24081
      validate();
24082
    }
24083
 
24084
    public void write(TProtocol oprot) throws TException {
24085
      validate();
24086
 
24087
      oprot.writeStructBegin(STRUCT_DESC);
24088
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24089
      oprot.writeI64(this.providerId);
24090
      oprot.writeFieldEnd();
24091
      if (this.undeliveredOrders != null) {
24092
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
24093
        {
24094
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 24095
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 24096
          {
1382 varun.gupt 24097
            oprot.writeString(_iter71.getKey());
24098
            oprot.writeString(_iter71.getValue());
1245 chandransh 24099
          }
24100
          oprot.writeMapEnd();
24101
        }
24102
        oprot.writeFieldEnd();
24103
      }
24104
      oprot.writeFieldStop();
24105
      oprot.writeStructEnd();
24106
    }
24107
 
24108
    @Override
24109
    public String toString() {
24110
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
24111
      boolean first = true;
24112
 
24113
      sb.append("providerId:");
24114
      sb.append(this.providerId);
24115
      first = false;
24116
      if (!first) sb.append(", ");
24117
      sb.append("undeliveredOrders:");
24118
      if (this.undeliveredOrders == null) {
24119
        sb.append("null");
24120
      } else {
24121
        sb.append(this.undeliveredOrders);
24122
      }
24123
      first = false;
24124
      sb.append(")");
24125
      return sb.toString();
24126
    }
24127
 
24128
    public void validate() throws TException {
24129
      // check for required fields
24130
    }
24131
 
24132
  }
24133
 
24134
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
24135
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
24136
 
24137
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
24138
 
24139
    private TransactionServiceException ex;
24140
 
24141
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24142
    public enum _Fields implements TFieldIdEnum {
24143
      EX((short)1, "ex");
24144
 
24145
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24146
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24147
 
24148
      static {
24149
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24150
          byId.put((int)field._thriftId, field);
24151
          byName.put(field.getFieldName(), field);
24152
        }
24153
      }
24154
 
24155
      /**
24156
       * Find the _Fields constant that matches fieldId, or null if its not found.
24157
       */
24158
      public static _Fields findByThriftId(int fieldId) {
24159
        return byId.get(fieldId);
24160
      }
24161
 
24162
      /**
24163
       * Find the _Fields constant that matches fieldId, throwing an exception
24164
       * if it is not found.
24165
       */
24166
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24167
        _Fields fields = findByThriftId(fieldId);
24168
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24169
        return fields;
24170
      }
24171
 
24172
      /**
24173
       * Find the _Fields constant that matches name, or null if its not found.
24174
       */
24175
      public static _Fields findByName(String name) {
24176
        return byName.get(name);
24177
      }
24178
 
24179
      private final short _thriftId;
24180
      private final String _fieldName;
24181
 
24182
      _Fields(short thriftId, String fieldName) {
24183
        _thriftId = thriftId;
24184
        _fieldName = fieldName;
24185
      }
24186
 
24187
      public short getThriftFieldId() {
24188
        return _thriftId;
24189
      }
24190
 
24191
      public String getFieldName() {
24192
        return _fieldName;
24193
      }
24194
    }
24195
 
24196
    // isset id assignments
24197
 
24198
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24199
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
24200
          new FieldValueMetaData(TType.STRUCT)));
24201
    }});
24202
 
24203
    static {
24204
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
24205
    }
24206
 
24207
    public updateNonDeliveryReason_result() {
24208
    }
24209
 
24210
    public updateNonDeliveryReason_result(
24211
      TransactionServiceException ex)
24212
    {
24213
      this();
24214
      this.ex = ex;
24215
    }
24216
 
24217
    /**
24218
     * Performs a deep copy on <i>other</i>.
24219
     */
24220
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
24221
      if (other.isSetEx()) {
24222
        this.ex = new TransactionServiceException(other.ex);
24223
      }
24224
    }
24225
 
24226
    public updateNonDeliveryReason_result deepCopy() {
24227
      return new updateNonDeliveryReason_result(this);
24228
    }
24229
 
24230
    @Deprecated
24231
    public updateNonDeliveryReason_result clone() {
24232
      return new updateNonDeliveryReason_result(this);
24233
    }
24234
 
24235
    public TransactionServiceException getEx() {
24236
      return this.ex;
24237
    }
24238
 
24239
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
24240
      this.ex = ex;
24241
      return this;
24242
    }
24243
 
24244
    public void unsetEx() {
24245
      this.ex = null;
24246
    }
24247
 
24248
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
24249
    public boolean isSetEx() {
24250
      return this.ex != null;
24251
    }
24252
 
24253
    public void setExIsSet(boolean value) {
24254
      if (!value) {
24255
        this.ex = null;
24256
      }
24257
    }
24258
 
24259
    public void setFieldValue(_Fields field, Object value) {
24260
      switch (field) {
24261
      case EX:
24262
        if (value == null) {
24263
          unsetEx();
24264
        } else {
24265
          setEx((TransactionServiceException)value);
24266
        }
24267
        break;
24268
 
24269
      }
24270
    }
24271
 
24272
    public void setFieldValue(int fieldID, Object value) {
24273
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24274
    }
24275
 
24276
    public Object getFieldValue(_Fields field) {
24277
      switch (field) {
24278
      case EX:
24279
        return getEx();
24280
 
24281
      }
24282
      throw new IllegalStateException();
24283
    }
24284
 
24285
    public Object getFieldValue(int fieldId) {
24286
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24287
    }
24288
 
24289
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24290
    public boolean isSet(_Fields field) {
24291
      switch (field) {
24292
      case EX:
24293
        return isSetEx();
24294
      }
24295
      throw new IllegalStateException();
24296
    }
24297
 
24298
    public boolean isSet(int fieldID) {
24299
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24300
    }
24301
 
24302
    @Override
24303
    public boolean equals(Object that) {
24304
      if (that == null)
24305
        return false;
24306
      if (that instanceof updateNonDeliveryReason_result)
24307
        return this.equals((updateNonDeliveryReason_result)that);
24308
      return false;
24309
    }
24310
 
24311
    public boolean equals(updateNonDeliveryReason_result that) {
24312
      if (that == null)
24313
        return false;
24314
 
24315
      boolean this_present_ex = true && this.isSetEx();
24316
      boolean that_present_ex = true && that.isSetEx();
24317
      if (this_present_ex || that_present_ex) {
24318
        if (!(this_present_ex && that_present_ex))
24319
          return false;
24320
        if (!this.ex.equals(that.ex))
24321
          return false;
24322
      }
24323
 
24324
      return true;
24325
    }
24326
 
24327
    @Override
24328
    public int hashCode() {
24329
      return 0;
24330
    }
24331
 
24332
    public int compareTo(updateNonDeliveryReason_result other) {
24333
      if (!getClass().equals(other.getClass())) {
24334
        return getClass().getName().compareTo(other.getClass().getName());
24335
      }
24336
 
24337
      int lastComparison = 0;
24338
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
24339
 
24340
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24341
      if (lastComparison != 0) {
24342
        return lastComparison;
24343
      }
24344
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24345
      if (lastComparison != 0) {
24346
        return lastComparison;
24347
      }
24348
      return 0;
24349
    }
24350
 
24351
    public void read(TProtocol iprot) throws TException {
24352
      TField field;
24353
      iprot.readStructBegin();
24354
      while (true)
24355
      {
24356
        field = iprot.readFieldBegin();
24357
        if (field.type == TType.STOP) { 
24358
          break;
24359
        }
24360
        _Fields fieldId = _Fields.findByThriftId(field.id);
24361
        if (fieldId == null) {
24362
          TProtocolUtil.skip(iprot, field.type);
24363
        } else {
24364
          switch (fieldId) {
24365
            case EX:
24366
              if (field.type == TType.STRUCT) {
24367
                this.ex = new TransactionServiceException();
24368
                this.ex.read(iprot);
24369
              } else { 
24370
                TProtocolUtil.skip(iprot, field.type);
24371
              }
24372
              break;
24373
          }
24374
          iprot.readFieldEnd();
24375
        }
24376
      }
24377
      iprot.readStructEnd();
24378
      validate();
24379
    }
24380
 
24381
    public void write(TProtocol oprot) throws TException {
24382
      oprot.writeStructBegin(STRUCT_DESC);
24383
 
24384
      if (this.isSetEx()) {
24385
        oprot.writeFieldBegin(EX_FIELD_DESC);
24386
        this.ex.write(oprot);
24387
        oprot.writeFieldEnd();
24388
      }
24389
      oprot.writeFieldStop();
24390
      oprot.writeStructEnd();
24391
    }
24392
 
24393
    @Override
24394
    public String toString() {
24395
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
24396
      boolean first = true;
24397
 
24398
      sb.append("ex:");
24399
      if (this.ex == null) {
24400
        sb.append("null");
24401
      } else {
24402
        sb.append(this.ex);
24403
      }
24404
      first = false;
24405
      sb.append(")");
24406
      return sb.toString();
24407
    }
24408
 
24409
    public void validate() throws TException {
24410
      // check for required fields
24411
    }
24412
 
24413
  }
24414
 
1406 ankur.sing 24415
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
24416
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
24417
 
24418
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24419
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
24420
 
24421
    private long providerId;
24422
    private long warehouseId;
24423
 
24424
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24425
    public enum _Fields implements TFieldIdEnum {
24426
      PROVIDER_ID((short)1, "providerId"),
24427
      WAREHOUSE_ID((short)2, "warehouseId");
24428
 
24429
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24430
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24431
 
24432
      static {
24433
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24434
          byId.put((int)field._thriftId, field);
24435
          byName.put(field.getFieldName(), field);
24436
        }
24437
      }
24438
 
24439
      /**
24440
       * Find the _Fields constant that matches fieldId, or null if its not found.
24441
       */
24442
      public static _Fields findByThriftId(int fieldId) {
24443
        return byId.get(fieldId);
24444
      }
24445
 
24446
      /**
24447
       * Find the _Fields constant that matches fieldId, throwing an exception
24448
       * if it is not found.
24449
       */
24450
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24451
        _Fields fields = findByThriftId(fieldId);
24452
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24453
        return fields;
24454
      }
24455
 
24456
      /**
24457
       * Find the _Fields constant that matches name, or null if its not found.
24458
       */
24459
      public static _Fields findByName(String name) {
24460
        return byName.get(name);
24461
      }
24462
 
24463
      private final short _thriftId;
24464
      private final String _fieldName;
24465
 
24466
      _Fields(short thriftId, String fieldName) {
24467
        _thriftId = thriftId;
24468
        _fieldName = fieldName;
24469
      }
24470
 
24471
      public short getThriftFieldId() {
24472
        return _thriftId;
24473
      }
24474
 
24475
      public String getFieldName() {
24476
        return _fieldName;
24477
      }
24478
    }
24479
 
24480
    // isset id assignments
24481
    private static final int __PROVIDERID_ISSET_ID = 0;
24482
    private static final int __WAREHOUSEID_ISSET_ID = 1;
24483
    private BitSet __isset_bit_vector = new BitSet(2);
24484
 
24485
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24486
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24487
          new FieldValueMetaData(TType.I64)));
24488
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
24489
          new FieldValueMetaData(TType.I64)));
24490
    }});
24491
 
24492
    static {
24493
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
24494
    }
24495
 
24496
    public getUndeliveredOrders_args() {
24497
    }
24498
 
24499
    public getUndeliveredOrders_args(
24500
      long providerId,
24501
      long warehouseId)
24502
    {
24503
      this();
24504
      this.providerId = providerId;
24505
      setProviderIdIsSet(true);
24506
      this.warehouseId = warehouseId;
24507
      setWarehouseIdIsSet(true);
24508
    }
24509
 
24510
    /**
24511
     * Performs a deep copy on <i>other</i>.
24512
     */
24513
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
24514
      __isset_bit_vector.clear();
24515
      __isset_bit_vector.or(other.__isset_bit_vector);
24516
      this.providerId = other.providerId;
24517
      this.warehouseId = other.warehouseId;
24518
    }
24519
 
24520
    public getUndeliveredOrders_args deepCopy() {
24521
      return new getUndeliveredOrders_args(this);
24522
    }
24523
 
24524
    @Deprecated
24525
    public getUndeliveredOrders_args clone() {
24526
      return new getUndeliveredOrders_args(this);
24527
    }
24528
 
24529
    public long getProviderId() {
24530
      return this.providerId;
24531
    }
24532
 
24533
    public getUndeliveredOrders_args setProviderId(long providerId) {
24534
      this.providerId = providerId;
24535
      setProviderIdIsSet(true);
24536
      return this;
24537
    }
24538
 
24539
    public void unsetProviderId() {
24540
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24541
    }
24542
 
24543
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24544
    public boolean isSetProviderId() {
24545
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24546
    }
24547
 
24548
    public void setProviderIdIsSet(boolean value) {
24549
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24550
    }
24551
 
24552
    public long getWarehouseId() {
24553
      return this.warehouseId;
24554
    }
24555
 
24556
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
24557
      this.warehouseId = warehouseId;
24558
      setWarehouseIdIsSet(true);
24559
      return this;
24560
    }
24561
 
24562
    public void unsetWarehouseId() {
24563
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
24564
    }
24565
 
24566
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
24567
    public boolean isSetWarehouseId() {
24568
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
24569
    }
24570
 
24571
    public void setWarehouseIdIsSet(boolean value) {
24572
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
24573
    }
24574
 
24575
    public void setFieldValue(_Fields field, Object value) {
24576
      switch (field) {
24577
      case PROVIDER_ID:
24578
        if (value == null) {
24579
          unsetProviderId();
24580
        } else {
24581
          setProviderId((Long)value);
24582
        }
24583
        break;
24584
 
24585
      case WAREHOUSE_ID:
24586
        if (value == null) {
24587
          unsetWarehouseId();
24588
        } else {
24589
          setWarehouseId((Long)value);
24590
        }
24591
        break;
24592
 
24593
      }
24594
    }
24595
 
24596
    public void setFieldValue(int fieldID, Object value) {
24597
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24598
    }
24599
 
24600
    public Object getFieldValue(_Fields field) {
24601
      switch (field) {
24602
      case PROVIDER_ID:
24603
        return new Long(getProviderId());
24604
 
24605
      case WAREHOUSE_ID:
24606
        return new Long(getWarehouseId());
24607
 
24608
      }
24609
      throw new IllegalStateException();
24610
    }
24611
 
24612
    public Object getFieldValue(int fieldId) {
24613
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24614
    }
24615
 
24616
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24617
    public boolean isSet(_Fields field) {
24618
      switch (field) {
24619
      case PROVIDER_ID:
24620
        return isSetProviderId();
24621
      case WAREHOUSE_ID:
24622
        return isSetWarehouseId();
24623
      }
24624
      throw new IllegalStateException();
24625
    }
24626
 
24627
    public boolean isSet(int fieldID) {
24628
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24629
    }
24630
 
24631
    @Override
24632
    public boolean equals(Object that) {
24633
      if (that == null)
24634
        return false;
24635
      if (that instanceof getUndeliveredOrders_args)
24636
        return this.equals((getUndeliveredOrders_args)that);
24637
      return false;
24638
    }
24639
 
24640
    public boolean equals(getUndeliveredOrders_args that) {
24641
      if (that == null)
24642
        return false;
24643
 
24644
      boolean this_present_providerId = true;
24645
      boolean that_present_providerId = true;
24646
      if (this_present_providerId || that_present_providerId) {
24647
        if (!(this_present_providerId && that_present_providerId))
24648
          return false;
24649
        if (this.providerId != that.providerId)
24650
          return false;
24651
      }
24652
 
24653
      boolean this_present_warehouseId = true;
24654
      boolean that_present_warehouseId = true;
24655
      if (this_present_warehouseId || that_present_warehouseId) {
24656
        if (!(this_present_warehouseId && that_present_warehouseId))
24657
          return false;
24658
        if (this.warehouseId != that.warehouseId)
24659
          return false;
24660
      }
24661
 
24662
      return true;
24663
    }
24664
 
24665
    @Override
24666
    public int hashCode() {
24667
      return 0;
24668
    }
24669
 
24670
    public int compareTo(getUndeliveredOrders_args other) {
24671
      if (!getClass().equals(other.getClass())) {
24672
        return getClass().getName().compareTo(other.getClass().getName());
24673
      }
24674
 
24675
      int lastComparison = 0;
24676
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
24677
 
24678
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
24679
      if (lastComparison != 0) {
24680
        return lastComparison;
24681
      }
24682
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
24683
      if (lastComparison != 0) {
24684
        return lastComparison;
24685
      }
24686
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
24687
      if (lastComparison != 0) {
24688
        return lastComparison;
24689
      }
24690
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
24691
      if (lastComparison != 0) {
24692
        return lastComparison;
24693
      }
24694
      return 0;
24695
    }
24696
 
24697
    public void read(TProtocol iprot) throws TException {
24698
      TField field;
24699
      iprot.readStructBegin();
24700
      while (true)
24701
      {
24702
        field = iprot.readFieldBegin();
24703
        if (field.type == TType.STOP) { 
24704
          break;
24705
        }
24706
        _Fields fieldId = _Fields.findByThriftId(field.id);
24707
        if (fieldId == null) {
24708
          TProtocolUtil.skip(iprot, field.type);
24709
        } else {
24710
          switch (fieldId) {
24711
            case PROVIDER_ID:
24712
              if (field.type == TType.I64) {
24713
                this.providerId = iprot.readI64();
24714
                setProviderIdIsSet(true);
24715
              } else { 
24716
                TProtocolUtil.skip(iprot, field.type);
24717
              }
24718
              break;
24719
            case WAREHOUSE_ID:
24720
              if (field.type == TType.I64) {
24721
                this.warehouseId = iprot.readI64();
24722
                setWarehouseIdIsSet(true);
24723
              } else { 
24724
                TProtocolUtil.skip(iprot, field.type);
24725
              }
24726
              break;
24727
          }
24728
          iprot.readFieldEnd();
24729
        }
24730
      }
24731
      iprot.readStructEnd();
24732
      validate();
24733
    }
24734
 
24735
    public void write(TProtocol oprot) throws TException {
24736
      validate();
24737
 
24738
      oprot.writeStructBegin(STRUCT_DESC);
24739
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24740
      oprot.writeI64(this.providerId);
24741
      oprot.writeFieldEnd();
24742
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
24743
      oprot.writeI64(this.warehouseId);
24744
      oprot.writeFieldEnd();
24745
      oprot.writeFieldStop();
24746
      oprot.writeStructEnd();
24747
    }
24748
 
24749
    @Override
24750
    public String toString() {
24751
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
24752
      boolean first = true;
24753
 
24754
      sb.append("providerId:");
24755
      sb.append(this.providerId);
24756
      first = false;
24757
      if (!first) sb.append(", ");
24758
      sb.append("warehouseId:");
24759
      sb.append(this.warehouseId);
24760
      first = false;
24761
      sb.append(")");
24762
      return sb.toString();
24763
    }
24764
 
24765
    public void validate() throws TException {
24766
      // check for required fields
24767
    }
24768
 
24769
  }
24770
 
24771
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
24772
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
24773
 
24774
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
24775
 
24776
    private List<Order> success;
24777
 
24778
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24779
    public enum _Fields implements TFieldIdEnum {
24780
      SUCCESS((short)0, "success");
24781
 
24782
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24783
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24784
 
24785
      static {
24786
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24787
          byId.put((int)field._thriftId, field);
24788
          byName.put(field.getFieldName(), field);
24789
        }
24790
      }
24791
 
24792
      /**
24793
       * Find the _Fields constant that matches fieldId, or null if its not found.
24794
       */
24795
      public static _Fields findByThriftId(int fieldId) {
24796
        return byId.get(fieldId);
24797
      }
24798
 
24799
      /**
24800
       * Find the _Fields constant that matches fieldId, throwing an exception
24801
       * if it is not found.
24802
       */
24803
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24804
        _Fields fields = findByThriftId(fieldId);
24805
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24806
        return fields;
24807
      }
24808
 
24809
      /**
24810
       * Find the _Fields constant that matches name, or null if its not found.
24811
       */
24812
      public static _Fields findByName(String name) {
24813
        return byName.get(name);
24814
      }
24815
 
24816
      private final short _thriftId;
24817
      private final String _fieldName;
24818
 
24819
      _Fields(short thriftId, String fieldName) {
24820
        _thriftId = thriftId;
24821
        _fieldName = fieldName;
24822
      }
24823
 
24824
      public short getThriftFieldId() {
24825
        return _thriftId;
24826
      }
24827
 
24828
      public String getFieldName() {
24829
        return _fieldName;
24830
      }
24831
    }
24832
 
24833
    // isset id assignments
24834
 
24835
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24836
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24837
          new ListMetaData(TType.LIST, 
24838
              new StructMetaData(TType.STRUCT, Order.class))));
24839
    }});
24840
 
24841
    static {
24842
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
24843
    }
24844
 
24845
    public getUndeliveredOrders_result() {
24846
    }
24847
 
24848
    public getUndeliveredOrders_result(
24849
      List<Order> success)
24850
    {
24851
      this();
24852
      this.success = success;
24853
    }
24854
 
24855
    /**
24856
     * Performs a deep copy on <i>other</i>.
24857
     */
24858
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
24859
      if (other.isSetSuccess()) {
24860
        List<Order> __this__success = new ArrayList<Order>();
24861
        for (Order other_element : other.success) {
24862
          __this__success.add(new Order(other_element));
24863
        }
24864
        this.success = __this__success;
24865
      }
24866
    }
24867
 
24868
    public getUndeliveredOrders_result deepCopy() {
24869
      return new getUndeliveredOrders_result(this);
24870
    }
24871
 
24872
    @Deprecated
24873
    public getUndeliveredOrders_result clone() {
24874
      return new getUndeliveredOrders_result(this);
24875
    }
24876
 
24877
    public int getSuccessSize() {
24878
      return (this.success == null) ? 0 : this.success.size();
24879
    }
24880
 
24881
    public java.util.Iterator<Order> getSuccessIterator() {
24882
      return (this.success == null) ? null : this.success.iterator();
24883
    }
24884
 
24885
    public void addToSuccess(Order elem) {
24886
      if (this.success == null) {
24887
        this.success = new ArrayList<Order>();
24888
      }
24889
      this.success.add(elem);
24890
    }
24891
 
24892
    public List<Order> getSuccess() {
24893
      return this.success;
24894
    }
24895
 
24896
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
24897
      this.success = success;
24898
      return this;
24899
    }
24900
 
24901
    public void unsetSuccess() {
24902
      this.success = null;
24903
    }
24904
 
24905
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24906
    public boolean isSetSuccess() {
24907
      return this.success != null;
24908
    }
24909
 
24910
    public void setSuccessIsSet(boolean value) {
24911
      if (!value) {
24912
        this.success = null;
24913
      }
24914
    }
24915
 
24916
    public void setFieldValue(_Fields field, Object value) {
24917
      switch (field) {
24918
      case SUCCESS:
24919
        if (value == null) {
24920
          unsetSuccess();
24921
        } else {
24922
          setSuccess((List<Order>)value);
24923
        }
24924
        break;
24925
 
24926
      }
24927
    }
24928
 
24929
    public void setFieldValue(int fieldID, Object value) {
24930
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24931
    }
24932
 
24933
    public Object getFieldValue(_Fields field) {
24934
      switch (field) {
24935
      case SUCCESS:
24936
        return getSuccess();
24937
 
24938
      }
24939
      throw new IllegalStateException();
24940
    }
24941
 
24942
    public Object getFieldValue(int fieldId) {
24943
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24944
    }
24945
 
24946
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24947
    public boolean isSet(_Fields field) {
24948
      switch (field) {
24949
      case SUCCESS:
24950
        return isSetSuccess();
24951
      }
24952
      throw new IllegalStateException();
24953
    }
24954
 
24955
    public boolean isSet(int fieldID) {
24956
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24957
    }
24958
 
24959
    @Override
24960
    public boolean equals(Object that) {
24961
      if (that == null)
24962
        return false;
24963
      if (that instanceof getUndeliveredOrders_result)
24964
        return this.equals((getUndeliveredOrders_result)that);
24965
      return false;
24966
    }
24967
 
24968
    public boolean equals(getUndeliveredOrders_result that) {
24969
      if (that == null)
24970
        return false;
24971
 
24972
      boolean this_present_success = true && this.isSetSuccess();
24973
      boolean that_present_success = true && that.isSetSuccess();
24974
      if (this_present_success || that_present_success) {
24975
        if (!(this_present_success && that_present_success))
24976
          return false;
24977
        if (!this.success.equals(that.success))
24978
          return false;
24979
      }
24980
 
24981
      return true;
24982
    }
24983
 
24984
    @Override
24985
    public int hashCode() {
24986
      return 0;
24987
    }
24988
 
24989
    public int compareTo(getUndeliveredOrders_result other) {
24990
      if (!getClass().equals(other.getClass())) {
24991
        return getClass().getName().compareTo(other.getClass().getName());
24992
      }
24993
 
24994
      int lastComparison = 0;
24995
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
24996
 
24997
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24998
      if (lastComparison != 0) {
24999
        return lastComparison;
25000
      }
25001
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25002
      if (lastComparison != 0) {
25003
        return lastComparison;
25004
      }
25005
      return 0;
25006
    }
25007
 
25008
    public void read(TProtocol iprot) throws TException {
25009
      TField field;
25010
      iprot.readStructBegin();
25011
      while (true)
25012
      {
25013
        field = iprot.readFieldBegin();
25014
        if (field.type == TType.STOP) { 
25015
          break;
25016
        }
25017
        _Fields fieldId = _Fields.findByThriftId(field.id);
25018
        if (fieldId == null) {
25019
          TProtocolUtil.skip(iprot, field.type);
25020
        } else {
25021
          switch (fieldId) {
25022
            case SUCCESS:
25023
              if (field.type == TType.LIST) {
25024
                {
25025
                  TList _list72 = iprot.readListBegin();
25026
                  this.success = new ArrayList<Order>(_list72.size);
25027
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
25028
                  {
25029
                    Order _elem74;
25030
                    _elem74 = new Order();
25031
                    _elem74.read(iprot);
25032
                    this.success.add(_elem74);
25033
                  }
25034
                  iprot.readListEnd();
25035
                }
25036
              } else { 
25037
                TProtocolUtil.skip(iprot, field.type);
25038
              }
25039
              break;
25040
          }
25041
          iprot.readFieldEnd();
25042
        }
25043
      }
25044
      iprot.readStructEnd();
25045
      validate();
25046
    }
25047
 
25048
    public void write(TProtocol oprot) throws TException {
25049
      oprot.writeStructBegin(STRUCT_DESC);
25050
 
25051
      if (this.isSetSuccess()) {
25052
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25053
        {
25054
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
25055
          for (Order _iter75 : this.success)
25056
          {
25057
            _iter75.write(oprot);
25058
          }
25059
          oprot.writeListEnd();
25060
        }
25061
        oprot.writeFieldEnd();
25062
      }
25063
      oprot.writeFieldStop();
25064
      oprot.writeStructEnd();
25065
    }
25066
 
25067
    @Override
25068
    public String toString() {
25069
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
25070
      boolean first = true;
25071
 
25072
      sb.append("success:");
25073
      if (this.success == null) {
25074
        sb.append("null");
25075
      } else {
25076
        sb.append(this.success);
25077
      }
25078
      first = false;
25079
      sb.append(")");
25080
      return sb.toString();
25081
    }
25082
 
25083
    public void validate() throws TException {
25084
      // check for required fields
25085
    }
25086
 
25087
  }
25088
 
305 ashish 25089
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
25090
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
25091
 
483 rajveer 25092
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25093
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
25094
 
483 rajveer 25095
    private long orderId;
305 ashish 25096
    private boolean valid;
25097
 
25098
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25099
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25100
      ORDER_ID((short)1, "orderId"),
305 ashish 25101
      VALID((short)2, "valid");
25102
 
25103
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25104
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25105
 
25106
      static {
25107
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25108
          byId.put((int)field._thriftId, field);
25109
          byName.put(field.getFieldName(), field);
25110
        }
25111
      }
25112
 
25113
      /**
25114
       * Find the _Fields constant that matches fieldId, or null if its not found.
25115
       */
25116
      public static _Fields findByThriftId(int fieldId) {
25117
        return byId.get(fieldId);
25118
      }
25119
 
25120
      /**
25121
       * Find the _Fields constant that matches fieldId, throwing an exception
25122
       * if it is not found.
25123
       */
25124
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25125
        _Fields fields = findByThriftId(fieldId);
25126
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25127
        return fields;
25128
      }
25129
 
25130
      /**
25131
       * Find the _Fields constant that matches name, or null if its not found.
25132
       */
25133
      public static _Fields findByName(String name) {
25134
        return byName.get(name);
25135
      }
25136
 
25137
      private final short _thriftId;
25138
      private final String _fieldName;
25139
 
25140
      _Fields(short thriftId, String fieldName) {
25141
        _thriftId = thriftId;
25142
        _fieldName = fieldName;
25143
      }
25144
 
25145
      public short getThriftFieldId() {
25146
        return _thriftId;
25147
      }
25148
 
25149
      public String getFieldName() {
25150
        return _fieldName;
25151
      }
25152
    }
25153
 
25154
    // isset id assignments
483 rajveer 25155
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25156
    private static final int __VALID_ISSET_ID = 1;
25157
    private BitSet __isset_bit_vector = new BitSet(2);
25158
 
25159
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25160
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25161
          new FieldValueMetaData(TType.I64)));
25162
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
25163
          new FieldValueMetaData(TType.BOOL)));
25164
    }});
25165
 
25166
    static {
25167
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
25168
    }
25169
 
25170
    public getAlerts_args() {
25171
    }
25172
 
25173
    public getAlerts_args(
483 rajveer 25174
      long orderId,
305 ashish 25175
      boolean valid)
25176
    {
25177
      this();
483 rajveer 25178
      this.orderId = orderId;
25179
      setOrderIdIsSet(true);
305 ashish 25180
      this.valid = valid;
25181
      setValidIsSet(true);
25182
    }
25183
 
25184
    /**
25185
     * Performs a deep copy on <i>other</i>.
25186
     */
25187
    public getAlerts_args(getAlerts_args other) {
25188
      __isset_bit_vector.clear();
25189
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25190
      this.orderId = other.orderId;
305 ashish 25191
      this.valid = other.valid;
25192
    }
25193
 
25194
    public getAlerts_args deepCopy() {
25195
      return new getAlerts_args(this);
25196
    }
25197
 
25198
    @Deprecated
25199
    public getAlerts_args clone() {
25200
      return new getAlerts_args(this);
25201
    }
25202
 
483 rajveer 25203
    public long getOrderId() {
25204
      return this.orderId;
305 ashish 25205
    }
25206
 
483 rajveer 25207
    public getAlerts_args setOrderId(long orderId) {
25208
      this.orderId = orderId;
25209
      setOrderIdIsSet(true);
305 ashish 25210
      return this;
25211
    }
25212
 
483 rajveer 25213
    public void unsetOrderId() {
25214
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25215
    }
25216
 
483 rajveer 25217
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25218
    public boolean isSetOrderId() {
25219
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25220
    }
25221
 
483 rajveer 25222
    public void setOrderIdIsSet(boolean value) {
25223
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25224
    }
25225
 
25226
    public boolean isValid() {
25227
      return this.valid;
25228
    }
25229
 
25230
    public getAlerts_args setValid(boolean valid) {
25231
      this.valid = valid;
25232
      setValidIsSet(true);
25233
      return this;
25234
    }
25235
 
25236
    public void unsetValid() {
25237
      __isset_bit_vector.clear(__VALID_ISSET_ID);
25238
    }
25239
 
25240
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
25241
    public boolean isSetValid() {
25242
      return __isset_bit_vector.get(__VALID_ISSET_ID);
25243
    }
25244
 
25245
    public void setValidIsSet(boolean value) {
25246
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
25247
    }
25248
 
25249
    public void setFieldValue(_Fields field, Object value) {
25250
      switch (field) {
483 rajveer 25251
      case ORDER_ID:
305 ashish 25252
        if (value == null) {
483 rajveer 25253
          unsetOrderId();
305 ashish 25254
        } else {
483 rajveer 25255
          setOrderId((Long)value);
305 ashish 25256
        }
25257
        break;
25258
 
25259
      case VALID:
25260
        if (value == null) {
25261
          unsetValid();
25262
        } else {
25263
          setValid((Boolean)value);
25264
        }
25265
        break;
25266
 
25267
      }
25268
    }
25269
 
25270
    public void setFieldValue(int fieldID, Object value) {
25271
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25272
    }
25273
 
25274
    public Object getFieldValue(_Fields field) {
25275
      switch (field) {
483 rajveer 25276
      case ORDER_ID:
25277
        return new Long(getOrderId());
305 ashish 25278
 
25279
      case VALID:
25280
        return new Boolean(isValid());
25281
 
25282
      }
25283
      throw new IllegalStateException();
25284
    }
25285
 
25286
    public Object getFieldValue(int fieldId) {
25287
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25288
    }
25289
 
25290
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25291
    public boolean isSet(_Fields field) {
25292
      switch (field) {
483 rajveer 25293
      case ORDER_ID:
25294
        return isSetOrderId();
305 ashish 25295
      case VALID:
25296
        return isSetValid();
25297
      }
25298
      throw new IllegalStateException();
25299
    }
25300
 
25301
    public boolean isSet(int fieldID) {
25302
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25303
    }
25304
 
25305
    @Override
25306
    public boolean equals(Object that) {
25307
      if (that == null)
25308
        return false;
25309
      if (that instanceof getAlerts_args)
25310
        return this.equals((getAlerts_args)that);
25311
      return false;
25312
    }
25313
 
25314
    public boolean equals(getAlerts_args that) {
25315
      if (that == null)
25316
        return false;
25317
 
483 rajveer 25318
      boolean this_present_orderId = true;
25319
      boolean that_present_orderId = true;
25320
      if (this_present_orderId || that_present_orderId) {
25321
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25322
          return false;
483 rajveer 25323
        if (this.orderId != that.orderId)
305 ashish 25324
          return false;
25325
      }
25326
 
25327
      boolean this_present_valid = true;
25328
      boolean that_present_valid = true;
25329
      if (this_present_valid || that_present_valid) {
25330
        if (!(this_present_valid && that_present_valid))
25331
          return false;
25332
        if (this.valid != that.valid)
25333
          return false;
25334
      }
25335
 
25336
      return true;
25337
    }
25338
 
25339
    @Override
25340
    public int hashCode() {
25341
      return 0;
25342
    }
25343
 
25344
    public int compareTo(getAlerts_args other) {
25345
      if (!getClass().equals(other.getClass())) {
25346
        return getClass().getName().compareTo(other.getClass().getName());
25347
      }
25348
 
25349
      int lastComparison = 0;
25350
      getAlerts_args typedOther = (getAlerts_args)other;
25351
 
483 rajveer 25352
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25353
      if (lastComparison != 0) {
25354
        return lastComparison;
25355
      }
483 rajveer 25356
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25357
      if (lastComparison != 0) {
25358
        return lastComparison;
25359
      }
25360
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
25361
      if (lastComparison != 0) {
25362
        return lastComparison;
25363
      }
25364
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
25365
      if (lastComparison != 0) {
25366
        return lastComparison;
25367
      }
25368
      return 0;
25369
    }
25370
 
25371
    public void read(TProtocol iprot) throws TException {
25372
      TField field;
25373
      iprot.readStructBegin();
25374
      while (true)
25375
      {
25376
        field = iprot.readFieldBegin();
25377
        if (field.type == TType.STOP) { 
25378
          break;
25379
        }
25380
        _Fields fieldId = _Fields.findByThriftId(field.id);
25381
        if (fieldId == null) {
25382
          TProtocolUtil.skip(iprot, field.type);
25383
        } else {
25384
          switch (fieldId) {
483 rajveer 25385
            case ORDER_ID:
305 ashish 25386
              if (field.type == TType.I64) {
483 rajveer 25387
                this.orderId = iprot.readI64();
25388
                setOrderIdIsSet(true);
305 ashish 25389
              } else { 
25390
                TProtocolUtil.skip(iprot, field.type);
25391
              }
25392
              break;
25393
            case VALID:
25394
              if (field.type == TType.BOOL) {
25395
                this.valid = iprot.readBool();
25396
                setValidIsSet(true);
25397
              } else { 
25398
                TProtocolUtil.skip(iprot, field.type);
25399
              }
25400
              break;
25401
          }
25402
          iprot.readFieldEnd();
25403
        }
25404
      }
25405
      iprot.readStructEnd();
25406
      validate();
25407
    }
25408
 
25409
    public void write(TProtocol oprot) throws TException {
25410
      validate();
25411
 
25412
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25413
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25414
      oprot.writeI64(this.orderId);
305 ashish 25415
      oprot.writeFieldEnd();
25416
      oprot.writeFieldBegin(VALID_FIELD_DESC);
25417
      oprot.writeBool(this.valid);
25418
      oprot.writeFieldEnd();
25419
      oprot.writeFieldStop();
25420
      oprot.writeStructEnd();
25421
    }
25422
 
25423
    @Override
25424
    public String toString() {
25425
      StringBuilder sb = new StringBuilder("getAlerts_args(");
25426
      boolean first = true;
25427
 
483 rajveer 25428
      sb.append("orderId:");
25429
      sb.append(this.orderId);
305 ashish 25430
      first = false;
25431
      if (!first) sb.append(", ");
25432
      sb.append("valid:");
25433
      sb.append(this.valid);
25434
      first = false;
25435
      sb.append(")");
25436
      return sb.toString();
25437
    }
25438
 
25439
    public void validate() throws TException {
25440
      // check for required fields
25441
    }
25442
 
25443
  }
25444
 
25445
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
25446
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
25447
 
25448
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25449
 
25450
    private List<Alert> success;
25451
 
25452
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25453
    public enum _Fields implements TFieldIdEnum {
25454
      SUCCESS((short)0, "success");
25455
 
25456
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25457
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25458
 
25459
      static {
25460
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25461
          byId.put((int)field._thriftId, field);
25462
          byName.put(field.getFieldName(), field);
25463
        }
25464
      }
25465
 
25466
      /**
25467
       * Find the _Fields constant that matches fieldId, or null if its not found.
25468
       */
25469
      public static _Fields findByThriftId(int fieldId) {
25470
        return byId.get(fieldId);
25471
      }
25472
 
25473
      /**
25474
       * Find the _Fields constant that matches fieldId, throwing an exception
25475
       * if it is not found.
25476
       */
25477
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25478
        _Fields fields = findByThriftId(fieldId);
25479
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25480
        return fields;
25481
      }
25482
 
25483
      /**
25484
       * Find the _Fields constant that matches name, or null if its not found.
25485
       */
25486
      public static _Fields findByName(String name) {
25487
        return byName.get(name);
25488
      }
25489
 
25490
      private final short _thriftId;
25491
      private final String _fieldName;
25492
 
25493
      _Fields(short thriftId, String fieldName) {
25494
        _thriftId = thriftId;
25495
        _fieldName = fieldName;
25496
      }
25497
 
25498
      public short getThriftFieldId() {
25499
        return _thriftId;
25500
      }
25501
 
25502
      public String getFieldName() {
25503
        return _fieldName;
25504
      }
25505
    }
25506
 
25507
    // isset id assignments
25508
 
25509
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25510
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25511
          new ListMetaData(TType.LIST, 
25512
              new StructMetaData(TType.STRUCT, Alert.class))));
25513
    }});
25514
 
25515
    static {
25516
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
25517
    }
25518
 
25519
    public getAlerts_result() {
25520
    }
25521
 
25522
    public getAlerts_result(
25523
      List<Alert> success)
25524
    {
25525
      this();
25526
      this.success = success;
25527
    }
25528
 
25529
    /**
25530
     * Performs a deep copy on <i>other</i>.
25531
     */
25532
    public getAlerts_result(getAlerts_result other) {
25533
      if (other.isSetSuccess()) {
25534
        List<Alert> __this__success = new ArrayList<Alert>();
25535
        for (Alert other_element : other.success) {
25536
          __this__success.add(new Alert(other_element));
25537
        }
25538
        this.success = __this__success;
25539
      }
25540
    }
25541
 
25542
    public getAlerts_result deepCopy() {
25543
      return new getAlerts_result(this);
25544
    }
25545
 
25546
    @Deprecated
25547
    public getAlerts_result clone() {
25548
      return new getAlerts_result(this);
25549
    }
25550
 
25551
    public int getSuccessSize() {
25552
      return (this.success == null) ? 0 : this.success.size();
25553
    }
25554
 
25555
    public java.util.Iterator<Alert> getSuccessIterator() {
25556
      return (this.success == null) ? null : this.success.iterator();
25557
    }
25558
 
25559
    public void addToSuccess(Alert elem) {
25560
      if (this.success == null) {
25561
        this.success = new ArrayList<Alert>();
25562
      }
25563
      this.success.add(elem);
25564
    }
25565
 
25566
    public List<Alert> getSuccess() {
25567
      return this.success;
25568
    }
25569
 
25570
    public getAlerts_result setSuccess(List<Alert> success) {
25571
      this.success = success;
25572
      return this;
25573
    }
25574
 
25575
    public void unsetSuccess() {
25576
      this.success = null;
25577
    }
25578
 
25579
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25580
    public boolean isSetSuccess() {
25581
      return this.success != null;
25582
    }
25583
 
25584
    public void setSuccessIsSet(boolean value) {
25585
      if (!value) {
25586
        this.success = null;
25587
      }
25588
    }
25589
 
25590
    public void setFieldValue(_Fields field, Object value) {
25591
      switch (field) {
25592
      case SUCCESS:
25593
        if (value == null) {
25594
          unsetSuccess();
25595
        } else {
25596
          setSuccess((List<Alert>)value);
25597
        }
25598
        break;
25599
 
25600
      }
25601
    }
25602
 
25603
    public void setFieldValue(int fieldID, Object value) {
25604
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25605
    }
25606
 
25607
    public Object getFieldValue(_Fields field) {
25608
      switch (field) {
25609
      case SUCCESS:
25610
        return getSuccess();
25611
 
25612
      }
25613
      throw new IllegalStateException();
25614
    }
25615
 
25616
    public Object getFieldValue(int fieldId) {
25617
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25618
    }
25619
 
25620
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25621
    public boolean isSet(_Fields field) {
25622
      switch (field) {
25623
      case SUCCESS:
25624
        return isSetSuccess();
25625
      }
25626
      throw new IllegalStateException();
25627
    }
25628
 
25629
    public boolean isSet(int fieldID) {
25630
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25631
    }
25632
 
25633
    @Override
25634
    public boolean equals(Object that) {
25635
      if (that == null)
25636
        return false;
25637
      if (that instanceof getAlerts_result)
25638
        return this.equals((getAlerts_result)that);
25639
      return false;
25640
    }
25641
 
25642
    public boolean equals(getAlerts_result that) {
25643
      if (that == null)
25644
        return false;
25645
 
25646
      boolean this_present_success = true && this.isSetSuccess();
25647
      boolean that_present_success = true && that.isSetSuccess();
25648
      if (this_present_success || that_present_success) {
25649
        if (!(this_present_success && that_present_success))
25650
          return false;
25651
        if (!this.success.equals(that.success))
25652
          return false;
25653
      }
25654
 
25655
      return true;
25656
    }
25657
 
25658
    @Override
25659
    public int hashCode() {
25660
      return 0;
25661
    }
25662
 
25663
    public int compareTo(getAlerts_result other) {
25664
      if (!getClass().equals(other.getClass())) {
25665
        return getClass().getName().compareTo(other.getClass().getName());
25666
      }
25667
 
25668
      int lastComparison = 0;
25669
      getAlerts_result typedOther = (getAlerts_result)other;
25670
 
25671
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25672
      if (lastComparison != 0) {
25673
        return lastComparison;
25674
      }
25675
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25676
      if (lastComparison != 0) {
25677
        return lastComparison;
25678
      }
25679
      return 0;
25680
    }
25681
 
25682
    public void read(TProtocol iprot) throws TException {
25683
      TField field;
25684
      iprot.readStructBegin();
25685
      while (true)
25686
      {
25687
        field = iprot.readFieldBegin();
25688
        if (field.type == TType.STOP) { 
25689
          break;
25690
        }
25691
        _Fields fieldId = _Fields.findByThriftId(field.id);
25692
        if (fieldId == null) {
25693
          TProtocolUtil.skip(iprot, field.type);
25694
        } else {
25695
          switch (fieldId) {
25696
            case SUCCESS:
25697
              if (field.type == TType.LIST) {
25698
                {
1406 ankur.sing 25699
                  TList _list76 = iprot.readListBegin();
25700
                  this.success = new ArrayList<Alert>(_list76.size);
25701
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 25702
                  {
1406 ankur.sing 25703
                    Alert _elem78;
25704
                    _elem78 = new Alert();
25705
                    _elem78.read(iprot);
25706
                    this.success.add(_elem78);
305 ashish 25707
                  }
25708
                  iprot.readListEnd();
25709
                }
25710
              } else { 
25711
                TProtocolUtil.skip(iprot, field.type);
25712
              }
25713
              break;
25714
          }
25715
          iprot.readFieldEnd();
25716
        }
25717
      }
25718
      iprot.readStructEnd();
25719
      validate();
25720
    }
25721
 
25722
    public void write(TProtocol oprot) throws TException {
25723
      oprot.writeStructBegin(STRUCT_DESC);
25724
 
25725
      if (this.isSetSuccess()) {
25726
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25727
        {
25728
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 25729
          for (Alert _iter79 : this.success)
305 ashish 25730
          {
1406 ankur.sing 25731
            _iter79.write(oprot);
305 ashish 25732
          }
25733
          oprot.writeListEnd();
25734
        }
25735
        oprot.writeFieldEnd();
25736
      }
25737
      oprot.writeFieldStop();
25738
      oprot.writeStructEnd();
25739
    }
25740
 
25741
    @Override
25742
    public String toString() {
25743
      StringBuilder sb = new StringBuilder("getAlerts_result(");
25744
      boolean first = true;
25745
 
25746
      sb.append("success:");
25747
      if (this.success == null) {
25748
        sb.append("null");
25749
      } else {
25750
        sb.append(this.success);
25751
      }
25752
      first = false;
25753
      sb.append(")");
25754
      return sb.toString();
25755
    }
25756
 
25757
    public void validate() throws TException {
25758
      // check for required fields
25759
    }
25760
 
25761
  }
25762
 
25763
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
25764
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
25765
 
483 rajveer 25766
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25767
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
25768
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
25769
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
25770
 
483 rajveer 25771
    private long orderId;
305 ashish 25772
    private boolean unset;
25773
    private long type;
25774
    private String comment;
25775
 
25776
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25777
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25778
      ORDER_ID((short)1, "orderId"),
305 ashish 25779
      UNSET((short)2, "unset"),
25780
      TYPE((short)3, "type"),
25781
      COMMENT((short)4, "comment");
25782
 
25783
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25784
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25785
 
25786
      static {
25787
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25788
          byId.put((int)field._thriftId, field);
25789
          byName.put(field.getFieldName(), field);
25790
        }
25791
      }
25792
 
25793
      /**
25794
       * Find the _Fields constant that matches fieldId, or null if its not found.
25795
       */
25796
      public static _Fields findByThriftId(int fieldId) {
25797
        return byId.get(fieldId);
25798
      }
25799
 
25800
      /**
25801
       * Find the _Fields constant that matches fieldId, throwing an exception
25802
       * if it is not found.
25803
       */
25804
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25805
        _Fields fields = findByThriftId(fieldId);
25806
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25807
        return fields;
25808
      }
25809
 
25810
      /**
25811
       * Find the _Fields constant that matches name, or null if its not found.
25812
       */
25813
      public static _Fields findByName(String name) {
25814
        return byName.get(name);
25815
      }
25816
 
25817
      private final short _thriftId;
25818
      private final String _fieldName;
25819
 
25820
      _Fields(short thriftId, String fieldName) {
25821
        _thriftId = thriftId;
25822
        _fieldName = fieldName;
25823
      }
25824
 
25825
      public short getThriftFieldId() {
25826
        return _thriftId;
25827
      }
25828
 
25829
      public String getFieldName() {
25830
        return _fieldName;
25831
      }
25832
    }
25833
 
25834
    // isset id assignments
483 rajveer 25835
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25836
    private static final int __UNSET_ISSET_ID = 1;
25837
    private static final int __TYPE_ISSET_ID = 2;
25838
    private BitSet __isset_bit_vector = new BitSet(3);
25839
 
25840
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25841
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25842
          new FieldValueMetaData(TType.I64)));
25843
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
25844
          new FieldValueMetaData(TType.BOOL)));
25845
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
25846
          new FieldValueMetaData(TType.I64)));
25847
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
25848
          new FieldValueMetaData(TType.STRING)));
25849
    }});
25850
 
25851
    static {
25852
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
25853
    }
25854
 
25855
    public setAlert_args() {
25856
    }
25857
 
25858
    public setAlert_args(
483 rajveer 25859
      long orderId,
305 ashish 25860
      boolean unset,
25861
      long type,
25862
      String comment)
25863
    {
25864
      this();
483 rajveer 25865
      this.orderId = orderId;
25866
      setOrderIdIsSet(true);
305 ashish 25867
      this.unset = unset;
25868
      setUnsetIsSet(true);
25869
      this.type = type;
25870
      setTypeIsSet(true);
25871
      this.comment = comment;
25872
    }
25873
 
25874
    /**
25875
     * Performs a deep copy on <i>other</i>.
25876
     */
25877
    public setAlert_args(setAlert_args other) {
25878
      __isset_bit_vector.clear();
25879
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25880
      this.orderId = other.orderId;
305 ashish 25881
      this.unset = other.unset;
25882
      this.type = other.type;
25883
      if (other.isSetComment()) {
25884
        this.comment = other.comment;
25885
      }
25886
    }
25887
 
25888
    public setAlert_args deepCopy() {
25889
      return new setAlert_args(this);
25890
    }
25891
 
25892
    @Deprecated
25893
    public setAlert_args clone() {
25894
      return new setAlert_args(this);
25895
    }
25896
 
483 rajveer 25897
    public long getOrderId() {
25898
      return this.orderId;
305 ashish 25899
    }
25900
 
483 rajveer 25901
    public setAlert_args setOrderId(long orderId) {
25902
      this.orderId = orderId;
25903
      setOrderIdIsSet(true);
305 ashish 25904
      return this;
25905
    }
25906
 
483 rajveer 25907
    public void unsetOrderId() {
25908
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25909
    }
25910
 
483 rajveer 25911
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25912
    public boolean isSetOrderId() {
25913
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25914
    }
25915
 
483 rajveer 25916
    public void setOrderIdIsSet(boolean value) {
25917
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25918
    }
25919
 
25920
    public boolean isUnset() {
25921
      return this.unset;
25922
    }
25923
 
25924
    public setAlert_args setUnset(boolean unset) {
25925
      this.unset = unset;
25926
      setUnsetIsSet(true);
25927
      return this;
25928
    }
25929
 
25930
    public void unsetUnset() {
25931
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
25932
    }
25933
 
25934
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
25935
    public boolean isSetUnset() {
25936
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
25937
    }
25938
 
25939
    public void setUnsetIsSet(boolean value) {
25940
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
25941
    }
25942
 
25943
    public long getType() {
25944
      return this.type;
25945
    }
25946
 
25947
    public setAlert_args setType(long type) {
25948
      this.type = type;
25949
      setTypeIsSet(true);
25950
      return this;
25951
    }
25952
 
25953
    public void unsetType() {
25954
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
25955
    }
25956
 
25957
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
25958
    public boolean isSetType() {
25959
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
25960
    }
25961
 
25962
    public void setTypeIsSet(boolean value) {
25963
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
25964
    }
25965
 
25966
    public String getComment() {
25967
      return this.comment;
25968
    }
25969
 
25970
    public setAlert_args setComment(String comment) {
25971
      this.comment = comment;
25972
      return this;
25973
    }
25974
 
25975
    public void unsetComment() {
25976
      this.comment = null;
25977
    }
25978
 
25979
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
25980
    public boolean isSetComment() {
25981
      return this.comment != null;
25982
    }
25983
 
25984
    public void setCommentIsSet(boolean value) {
25985
      if (!value) {
25986
        this.comment = null;
25987
      }
25988
    }
25989
 
25990
    public void setFieldValue(_Fields field, Object value) {
25991
      switch (field) {
483 rajveer 25992
      case ORDER_ID:
305 ashish 25993
        if (value == null) {
483 rajveer 25994
          unsetOrderId();
305 ashish 25995
        } else {
483 rajveer 25996
          setOrderId((Long)value);
305 ashish 25997
        }
25998
        break;
25999
 
26000
      case UNSET:
26001
        if (value == null) {
26002
          unsetUnset();
26003
        } else {
26004
          setUnset((Boolean)value);
26005
        }
26006
        break;
26007
 
26008
      case TYPE:
26009
        if (value == null) {
26010
          unsetType();
26011
        } else {
26012
          setType((Long)value);
26013
        }
26014
        break;
26015
 
26016
      case COMMENT:
26017
        if (value == null) {
26018
          unsetComment();
26019
        } else {
26020
          setComment((String)value);
26021
        }
26022
        break;
26023
 
26024
      }
26025
    }
26026
 
26027
    public void setFieldValue(int fieldID, Object value) {
26028
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26029
    }
26030
 
26031
    public Object getFieldValue(_Fields field) {
26032
      switch (field) {
483 rajveer 26033
      case ORDER_ID:
26034
        return new Long(getOrderId());
305 ashish 26035
 
26036
      case UNSET:
26037
        return new Boolean(isUnset());
26038
 
26039
      case TYPE:
26040
        return new Long(getType());
26041
 
26042
      case COMMENT:
26043
        return getComment();
26044
 
26045
      }
26046
      throw new IllegalStateException();
26047
    }
26048
 
26049
    public Object getFieldValue(int fieldId) {
26050
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26051
    }
26052
 
26053
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26054
    public boolean isSet(_Fields field) {
26055
      switch (field) {
483 rajveer 26056
      case ORDER_ID:
26057
        return isSetOrderId();
305 ashish 26058
      case UNSET:
26059
        return isSetUnset();
26060
      case TYPE:
26061
        return isSetType();
26062
      case COMMENT:
26063
        return isSetComment();
26064
      }
26065
      throw new IllegalStateException();
26066
    }
26067
 
26068
    public boolean isSet(int fieldID) {
26069
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26070
    }
26071
 
26072
    @Override
26073
    public boolean equals(Object that) {
26074
      if (that == null)
26075
        return false;
26076
      if (that instanceof setAlert_args)
26077
        return this.equals((setAlert_args)that);
26078
      return false;
26079
    }
26080
 
26081
    public boolean equals(setAlert_args that) {
26082
      if (that == null)
26083
        return false;
26084
 
483 rajveer 26085
      boolean this_present_orderId = true;
26086
      boolean that_present_orderId = true;
26087
      if (this_present_orderId || that_present_orderId) {
26088
        if (!(this_present_orderId && that_present_orderId))
305 ashish 26089
          return false;
483 rajveer 26090
        if (this.orderId != that.orderId)
305 ashish 26091
          return false;
26092
      }
26093
 
26094
      boolean this_present_unset = true;
26095
      boolean that_present_unset = true;
26096
      if (this_present_unset || that_present_unset) {
26097
        if (!(this_present_unset && that_present_unset))
26098
          return false;
26099
        if (this.unset != that.unset)
26100
          return false;
26101
      }
26102
 
26103
      boolean this_present_type = true;
26104
      boolean that_present_type = true;
26105
      if (this_present_type || that_present_type) {
26106
        if (!(this_present_type && that_present_type))
26107
          return false;
26108
        if (this.type != that.type)
26109
          return false;
26110
      }
26111
 
26112
      boolean this_present_comment = true && this.isSetComment();
26113
      boolean that_present_comment = true && that.isSetComment();
26114
      if (this_present_comment || that_present_comment) {
26115
        if (!(this_present_comment && that_present_comment))
26116
          return false;
26117
        if (!this.comment.equals(that.comment))
26118
          return false;
26119
      }
26120
 
26121
      return true;
26122
    }
26123
 
26124
    @Override
26125
    public int hashCode() {
26126
      return 0;
26127
    }
26128
 
26129
    public int compareTo(setAlert_args other) {
26130
      if (!getClass().equals(other.getClass())) {
26131
        return getClass().getName().compareTo(other.getClass().getName());
26132
      }
26133
 
26134
      int lastComparison = 0;
26135
      setAlert_args typedOther = (setAlert_args)other;
26136
 
483 rajveer 26137
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 26138
      if (lastComparison != 0) {
26139
        return lastComparison;
26140
      }
483 rajveer 26141
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 26142
      if (lastComparison != 0) {
26143
        return lastComparison;
26144
      }
26145
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
26146
      if (lastComparison != 0) {
26147
        return lastComparison;
26148
      }
26149
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
26150
      if (lastComparison != 0) {
26151
        return lastComparison;
26152
      }
26153
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
26154
      if (lastComparison != 0) {
26155
        return lastComparison;
26156
      }
26157
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
26158
      if (lastComparison != 0) {
26159
        return lastComparison;
26160
      }
26161
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
26162
      if (lastComparison != 0) {
26163
        return lastComparison;
26164
      }
26165
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
26166
      if (lastComparison != 0) {
26167
        return lastComparison;
26168
      }
26169
      return 0;
26170
    }
26171
 
26172
    public void read(TProtocol iprot) throws TException {
26173
      TField field;
26174
      iprot.readStructBegin();
26175
      while (true)
26176
      {
26177
        field = iprot.readFieldBegin();
26178
        if (field.type == TType.STOP) { 
26179
          break;
26180
        }
26181
        _Fields fieldId = _Fields.findByThriftId(field.id);
26182
        if (fieldId == null) {
26183
          TProtocolUtil.skip(iprot, field.type);
26184
        } else {
26185
          switch (fieldId) {
483 rajveer 26186
            case ORDER_ID:
305 ashish 26187
              if (field.type == TType.I64) {
483 rajveer 26188
                this.orderId = iprot.readI64();
26189
                setOrderIdIsSet(true);
305 ashish 26190
              } else { 
26191
                TProtocolUtil.skip(iprot, field.type);
26192
              }
26193
              break;
26194
            case UNSET:
26195
              if (field.type == TType.BOOL) {
26196
                this.unset = iprot.readBool();
26197
                setUnsetIsSet(true);
26198
              } else { 
26199
                TProtocolUtil.skip(iprot, field.type);
26200
              }
26201
              break;
26202
            case TYPE:
26203
              if (field.type == TType.I64) {
26204
                this.type = iprot.readI64();
26205
                setTypeIsSet(true);
26206
              } else { 
26207
                TProtocolUtil.skip(iprot, field.type);
26208
              }
26209
              break;
26210
            case COMMENT:
26211
              if (field.type == TType.STRING) {
26212
                this.comment = iprot.readString();
26213
              } else { 
26214
                TProtocolUtil.skip(iprot, field.type);
26215
              }
26216
              break;
26217
          }
26218
          iprot.readFieldEnd();
26219
        }
26220
      }
26221
      iprot.readStructEnd();
26222
      validate();
26223
    }
26224
 
26225
    public void write(TProtocol oprot) throws TException {
26226
      validate();
26227
 
26228
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 26229
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
26230
      oprot.writeI64(this.orderId);
305 ashish 26231
      oprot.writeFieldEnd();
26232
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
26233
      oprot.writeBool(this.unset);
26234
      oprot.writeFieldEnd();
26235
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
26236
      oprot.writeI64(this.type);
26237
      oprot.writeFieldEnd();
26238
      if (this.comment != null) {
26239
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
26240
        oprot.writeString(this.comment);
26241
        oprot.writeFieldEnd();
26242
      }
26243
      oprot.writeFieldStop();
26244
      oprot.writeStructEnd();
26245
    }
26246
 
26247
    @Override
26248
    public String toString() {
26249
      StringBuilder sb = new StringBuilder("setAlert_args(");
26250
      boolean first = true;
26251
 
483 rajveer 26252
      sb.append("orderId:");
26253
      sb.append(this.orderId);
305 ashish 26254
      first = false;
26255
      if (!first) sb.append(", ");
26256
      sb.append("unset:");
26257
      sb.append(this.unset);
26258
      first = false;
26259
      if (!first) sb.append(", ");
26260
      sb.append("type:");
26261
      sb.append(this.type);
26262
      first = false;
26263
      if (!first) sb.append(", ");
26264
      sb.append("comment:");
26265
      if (this.comment == null) {
26266
        sb.append("null");
26267
      } else {
26268
        sb.append(this.comment);
26269
      }
26270
      first = false;
26271
      sb.append(")");
26272
      return sb.toString();
26273
    }
26274
 
26275
    public void validate() throws TException {
26276
      // check for required fields
26277
    }
26278
 
26279
  }
26280
 
26281
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
26282
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
26283
 
26284
 
26285
 
26286
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26287
    public enum _Fields implements TFieldIdEnum {
26288
;
26289
 
26290
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26291
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26292
 
26293
      static {
26294
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26295
          byId.put((int)field._thriftId, field);
26296
          byName.put(field.getFieldName(), field);
26297
        }
26298
      }
26299
 
26300
      /**
26301
       * Find the _Fields constant that matches fieldId, or null if its not found.
26302
       */
26303
      public static _Fields findByThriftId(int fieldId) {
26304
        return byId.get(fieldId);
26305
      }
26306
 
26307
      /**
26308
       * Find the _Fields constant that matches fieldId, throwing an exception
26309
       * if it is not found.
26310
       */
26311
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26312
        _Fields fields = findByThriftId(fieldId);
26313
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26314
        return fields;
26315
      }
26316
 
26317
      /**
26318
       * Find the _Fields constant that matches name, or null if its not found.
26319
       */
26320
      public static _Fields findByName(String name) {
26321
        return byName.get(name);
26322
      }
26323
 
26324
      private final short _thriftId;
26325
      private final String _fieldName;
26326
 
26327
      _Fields(short thriftId, String fieldName) {
26328
        _thriftId = thriftId;
26329
        _fieldName = fieldName;
26330
      }
26331
 
26332
      public short getThriftFieldId() {
26333
        return _thriftId;
26334
      }
26335
 
26336
      public String getFieldName() {
26337
        return _fieldName;
26338
      }
26339
    }
26340
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26341
    }});
26342
 
26343
    static {
26344
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
26345
    }
26346
 
26347
    public setAlert_result() {
26348
    }
26349
 
26350
    /**
26351
     * Performs a deep copy on <i>other</i>.
26352
     */
26353
    public setAlert_result(setAlert_result other) {
26354
    }
26355
 
26356
    public setAlert_result deepCopy() {
26357
      return new setAlert_result(this);
26358
    }
26359
 
26360
    @Deprecated
26361
    public setAlert_result clone() {
26362
      return new setAlert_result(this);
26363
    }
26364
 
26365
    public void setFieldValue(_Fields field, Object value) {
26366
      switch (field) {
26367
      }
26368
    }
26369
 
26370
    public void setFieldValue(int fieldID, Object value) {
26371
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26372
    }
26373
 
26374
    public Object getFieldValue(_Fields field) {
26375
      switch (field) {
26376
      }
26377
      throw new IllegalStateException();
26378
    }
26379
 
26380
    public Object getFieldValue(int fieldId) {
26381
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26382
    }
26383
 
26384
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26385
    public boolean isSet(_Fields field) {
26386
      switch (field) {
26387
      }
26388
      throw new IllegalStateException();
26389
    }
26390
 
26391
    public boolean isSet(int fieldID) {
26392
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26393
    }
26394
 
26395
    @Override
26396
    public boolean equals(Object that) {
26397
      if (that == null)
26398
        return false;
26399
      if (that instanceof setAlert_result)
26400
        return this.equals((setAlert_result)that);
26401
      return false;
26402
    }
26403
 
26404
    public boolean equals(setAlert_result that) {
26405
      if (that == null)
26406
        return false;
26407
 
26408
      return true;
26409
    }
26410
 
26411
    @Override
26412
    public int hashCode() {
26413
      return 0;
26414
    }
26415
 
26416
    public int compareTo(setAlert_result other) {
26417
      if (!getClass().equals(other.getClass())) {
26418
        return getClass().getName().compareTo(other.getClass().getName());
26419
      }
26420
 
26421
      int lastComparison = 0;
26422
      setAlert_result typedOther = (setAlert_result)other;
26423
 
26424
      return 0;
26425
    }
26426
 
26427
    public void read(TProtocol iprot) throws TException {
26428
      TField field;
26429
      iprot.readStructBegin();
26430
      while (true)
26431
      {
26432
        field = iprot.readFieldBegin();
26433
        if (field.type == TType.STOP) { 
26434
          break;
26435
        }
26436
        _Fields fieldId = _Fields.findByThriftId(field.id);
26437
        if (fieldId == null) {
26438
          TProtocolUtil.skip(iprot, field.type);
26439
        } else {
26440
          switch (fieldId) {
26441
          }
26442
          iprot.readFieldEnd();
26443
        }
26444
      }
26445
      iprot.readStructEnd();
26446
      validate();
26447
    }
26448
 
26449
    public void write(TProtocol oprot) throws TException {
26450
      oprot.writeStructBegin(STRUCT_DESC);
26451
 
26452
      oprot.writeFieldStop();
26453
      oprot.writeStructEnd();
26454
    }
26455
 
26456
    @Override
26457
    public String toString() {
26458
      StringBuilder sb = new StringBuilder("setAlert_result(");
26459
      boolean first = true;
26460
 
26461
      sb.append(")");
26462
      return sb.toString();
26463
    }
26464
 
26465
    public void validate() throws TException {
26466
      // check for required fields
26467
    }
26468
 
26469
  }
26470
 
1598 ankur.sing 26471
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
26472
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
26473
 
26474
 
26475
 
26476
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26477
    public enum _Fields implements TFieldIdEnum {
26478
;
26479
 
26480
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26481
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26482
 
26483
      static {
26484
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26485
          byId.put((int)field._thriftId, field);
26486
          byName.put(field.getFieldName(), field);
26487
        }
26488
      }
26489
 
26490
      /**
26491
       * Find the _Fields constant that matches fieldId, or null if its not found.
26492
       */
26493
      public static _Fields findByThriftId(int fieldId) {
26494
        return byId.get(fieldId);
26495
      }
26496
 
26497
      /**
26498
       * Find the _Fields constant that matches fieldId, throwing an exception
26499
       * if it is not found.
26500
       */
26501
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26502
        _Fields fields = findByThriftId(fieldId);
26503
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26504
        return fields;
26505
      }
26506
 
26507
      /**
26508
       * Find the _Fields constant that matches name, or null if its not found.
26509
       */
26510
      public static _Fields findByName(String name) {
26511
        return byName.get(name);
26512
      }
26513
 
26514
      private final short _thriftId;
26515
      private final String _fieldName;
26516
 
26517
      _Fields(short thriftId, String fieldName) {
26518
        _thriftId = thriftId;
26519
        _fieldName = fieldName;
26520
      }
26521
 
26522
      public short getThriftFieldId() {
26523
        return _thriftId;
26524
      }
26525
 
26526
      public String getFieldName() {
26527
        return _fieldName;
26528
      }
26529
    }
26530
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26531
    }});
26532
 
26533
    static {
26534
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
26535
    }
26536
 
26537
    public getValidOrderCount_args() {
26538
    }
26539
 
26540
    /**
26541
     * Performs a deep copy on <i>other</i>.
26542
     */
26543
    public getValidOrderCount_args(getValidOrderCount_args other) {
26544
    }
26545
 
26546
    public getValidOrderCount_args deepCopy() {
26547
      return new getValidOrderCount_args(this);
26548
    }
26549
 
26550
    @Deprecated
26551
    public getValidOrderCount_args clone() {
26552
      return new getValidOrderCount_args(this);
26553
    }
26554
 
26555
    public void setFieldValue(_Fields field, Object value) {
26556
      switch (field) {
26557
      }
26558
    }
26559
 
26560
    public void setFieldValue(int fieldID, Object value) {
26561
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26562
    }
26563
 
26564
    public Object getFieldValue(_Fields field) {
26565
      switch (field) {
26566
      }
26567
      throw new IllegalStateException();
26568
    }
26569
 
26570
    public Object getFieldValue(int fieldId) {
26571
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26572
    }
26573
 
26574
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26575
    public boolean isSet(_Fields field) {
26576
      switch (field) {
26577
      }
26578
      throw new IllegalStateException();
26579
    }
26580
 
26581
    public boolean isSet(int fieldID) {
26582
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26583
    }
26584
 
26585
    @Override
26586
    public boolean equals(Object that) {
26587
      if (that == null)
26588
        return false;
26589
      if (that instanceof getValidOrderCount_args)
26590
        return this.equals((getValidOrderCount_args)that);
26591
      return false;
26592
    }
26593
 
26594
    public boolean equals(getValidOrderCount_args that) {
26595
      if (that == null)
26596
        return false;
26597
 
26598
      return true;
26599
    }
26600
 
26601
    @Override
26602
    public int hashCode() {
26603
      return 0;
26604
    }
26605
 
26606
    public int compareTo(getValidOrderCount_args other) {
26607
      if (!getClass().equals(other.getClass())) {
26608
        return getClass().getName().compareTo(other.getClass().getName());
26609
      }
26610
 
26611
      int lastComparison = 0;
26612
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
26613
 
26614
      return 0;
26615
    }
26616
 
26617
    public void read(TProtocol iprot) throws TException {
26618
      TField field;
26619
      iprot.readStructBegin();
26620
      while (true)
26621
      {
26622
        field = iprot.readFieldBegin();
26623
        if (field.type == TType.STOP) { 
26624
          break;
26625
        }
26626
        _Fields fieldId = _Fields.findByThriftId(field.id);
26627
        if (fieldId == null) {
26628
          TProtocolUtil.skip(iprot, field.type);
26629
        } else {
26630
          switch (fieldId) {
26631
          }
26632
          iprot.readFieldEnd();
26633
        }
26634
      }
26635
      iprot.readStructEnd();
26636
      validate();
26637
    }
26638
 
26639
    public void write(TProtocol oprot) throws TException {
26640
      validate();
26641
 
26642
      oprot.writeStructBegin(STRUCT_DESC);
26643
      oprot.writeFieldStop();
26644
      oprot.writeStructEnd();
26645
    }
26646
 
26647
    @Override
26648
    public String toString() {
26649
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
26650
      boolean first = true;
26651
 
26652
      sb.append(")");
26653
      return sb.toString();
26654
    }
26655
 
26656
    public void validate() throws TException {
26657
      // check for required fields
26658
    }
26659
 
26660
  }
26661
 
26662
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
26663
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
26664
 
26665
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26666
 
26667
    private long success;
26668
 
26669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26670
    public enum _Fields implements TFieldIdEnum {
26671
      SUCCESS((short)0, "success");
26672
 
26673
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26674
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26675
 
26676
      static {
26677
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26678
          byId.put((int)field._thriftId, field);
26679
          byName.put(field.getFieldName(), field);
26680
        }
26681
      }
26682
 
26683
      /**
26684
       * Find the _Fields constant that matches fieldId, or null if its not found.
26685
       */
26686
      public static _Fields findByThriftId(int fieldId) {
26687
        return byId.get(fieldId);
26688
      }
26689
 
26690
      /**
26691
       * Find the _Fields constant that matches fieldId, throwing an exception
26692
       * if it is not found.
26693
       */
26694
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26695
        _Fields fields = findByThriftId(fieldId);
26696
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26697
        return fields;
26698
      }
26699
 
26700
      /**
26701
       * Find the _Fields constant that matches name, or null if its not found.
26702
       */
26703
      public static _Fields findByName(String name) {
26704
        return byName.get(name);
26705
      }
26706
 
26707
      private final short _thriftId;
26708
      private final String _fieldName;
26709
 
26710
      _Fields(short thriftId, String fieldName) {
26711
        _thriftId = thriftId;
26712
        _fieldName = fieldName;
26713
      }
26714
 
26715
      public short getThriftFieldId() {
26716
        return _thriftId;
26717
      }
26718
 
26719
      public String getFieldName() {
26720
        return _fieldName;
26721
      }
26722
    }
26723
 
26724
    // isset id assignments
26725
    private static final int __SUCCESS_ISSET_ID = 0;
26726
    private BitSet __isset_bit_vector = new BitSet(1);
26727
 
26728
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26729
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26730
          new FieldValueMetaData(TType.I64)));
26731
    }});
26732
 
26733
    static {
26734
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
26735
    }
26736
 
26737
    public getValidOrderCount_result() {
26738
    }
26739
 
26740
    public getValidOrderCount_result(
26741
      long success)
26742
    {
26743
      this();
26744
      this.success = success;
26745
      setSuccessIsSet(true);
26746
    }
26747
 
26748
    /**
26749
     * Performs a deep copy on <i>other</i>.
26750
     */
26751
    public getValidOrderCount_result(getValidOrderCount_result other) {
26752
      __isset_bit_vector.clear();
26753
      __isset_bit_vector.or(other.__isset_bit_vector);
26754
      this.success = other.success;
26755
    }
26756
 
26757
    public getValidOrderCount_result deepCopy() {
26758
      return new getValidOrderCount_result(this);
26759
    }
26760
 
26761
    @Deprecated
26762
    public getValidOrderCount_result clone() {
26763
      return new getValidOrderCount_result(this);
26764
    }
26765
 
26766
    public long getSuccess() {
26767
      return this.success;
26768
    }
26769
 
26770
    public getValidOrderCount_result setSuccess(long success) {
26771
      this.success = success;
26772
      setSuccessIsSet(true);
26773
      return this;
26774
    }
26775
 
26776
    public void unsetSuccess() {
26777
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26778
    }
26779
 
26780
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26781
    public boolean isSetSuccess() {
26782
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26783
    }
26784
 
26785
    public void setSuccessIsSet(boolean value) {
26786
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26787
    }
26788
 
26789
    public void setFieldValue(_Fields field, Object value) {
26790
      switch (field) {
26791
      case SUCCESS:
26792
        if (value == null) {
26793
          unsetSuccess();
26794
        } else {
26795
          setSuccess((Long)value);
26796
        }
26797
        break;
26798
 
26799
      }
26800
    }
26801
 
26802
    public void setFieldValue(int fieldID, Object value) {
26803
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26804
    }
26805
 
26806
    public Object getFieldValue(_Fields field) {
26807
      switch (field) {
26808
      case SUCCESS:
26809
        return new Long(getSuccess());
26810
 
26811
      }
26812
      throw new IllegalStateException();
26813
    }
26814
 
26815
    public Object getFieldValue(int fieldId) {
26816
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26817
    }
26818
 
26819
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26820
    public boolean isSet(_Fields field) {
26821
      switch (field) {
26822
      case SUCCESS:
26823
        return isSetSuccess();
26824
      }
26825
      throw new IllegalStateException();
26826
    }
26827
 
26828
    public boolean isSet(int fieldID) {
26829
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26830
    }
26831
 
26832
    @Override
26833
    public boolean equals(Object that) {
26834
      if (that == null)
26835
        return false;
26836
      if (that instanceof getValidOrderCount_result)
26837
        return this.equals((getValidOrderCount_result)that);
26838
      return false;
26839
    }
26840
 
26841
    public boolean equals(getValidOrderCount_result that) {
26842
      if (that == null)
26843
        return false;
26844
 
26845
      boolean this_present_success = true;
26846
      boolean that_present_success = true;
26847
      if (this_present_success || that_present_success) {
26848
        if (!(this_present_success && that_present_success))
26849
          return false;
26850
        if (this.success != that.success)
26851
          return false;
26852
      }
26853
 
26854
      return true;
26855
    }
26856
 
26857
    @Override
26858
    public int hashCode() {
26859
      return 0;
26860
    }
26861
 
26862
    public int compareTo(getValidOrderCount_result other) {
26863
      if (!getClass().equals(other.getClass())) {
26864
        return getClass().getName().compareTo(other.getClass().getName());
26865
      }
26866
 
26867
      int lastComparison = 0;
26868
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
26869
 
26870
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26871
      if (lastComparison != 0) {
26872
        return lastComparison;
26873
      }
26874
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26875
      if (lastComparison != 0) {
26876
        return lastComparison;
26877
      }
26878
      return 0;
26879
    }
26880
 
26881
    public void read(TProtocol iprot) throws TException {
26882
      TField field;
26883
      iprot.readStructBegin();
26884
      while (true)
26885
      {
26886
        field = iprot.readFieldBegin();
26887
        if (field.type == TType.STOP) { 
26888
          break;
26889
        }
26890
        _Fields fieldId = _Fields.findByThriftId(field.id);
26891
        if (fieldId == null) {
26892
          TProtocolUtil.skip(iprot, field.type);
26893
        } else {
26894
          switch (fieldId) {
26895
            case SUCCESS:
26896
              if (field.type == TType.I64) {
26897
                this.success = iprot.readI64();
26898
                setSuccessIsSet(true);
26899
              } else { 
26900
                TProtocolUtil.skip(iprot, field.type);
26901
              }
26902
              break;
26903
          }
26904
          iprot.readFieldEnd();
26905
        }
26906
      }
26907
      iprot.readStructEnd();
26908
      validate();
26909
    }
26910
 
26911
    public void write(TProtocol oprot) throws TException {
26912
      oprot.writeStructBegin(STRUCT_DESC);
26913
 
26914
      if (this.isSetSuccess()) {
26915
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26916
        oprot.writeI64(this.success);
26917
        oprot.writeFieldEnd();
26918
      }
26919
      oprot.writeFieldStop();
26920
      oprot.writeStructEnd();
26921
    }
26922
 
26923
    @Override
26924
    public String toString() {
26925
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
26926
      boolean first = true;
26927
 
26928
      sb.append("success:");
26929
      sb.append(this.success);
26930
      first = false;
26931
      sb.append(")");
26932
      return sb.toString();
26933
    }
26934
 
26935
    public void validate() throws TException {
26936
      // check for required fields
26937
    }
26938
 
26939
  }
26940
 
1629 ankur.sing 26941
  public static class getNoOfCustomersWithSuccessfulTransaction_args implements TBase<getNoOfCustomersWithSuccessfulTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_args>   {
26942
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_args");
26943
 
26944
 
26945
 
26946
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26947
    public enum _Fields implements TFieldIdEnum {
26948
;
26949
 
26950
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26951
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26952
 
26953
      static {
26954
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26955
          byId.put((int)field._thriftId, field);
26956
          byName.put(field.getFieldName(), field);
26957
        }
26958
      }
26959
 
26960
      /**
26961
       * Find the _Fields constant that matches fieldId, or null if its not found.
26962
       */
26963
      public static _Fields findByThriftId(int fieldId) {
26964
        return byId.get(fieldId);
26965
      }
26966
 
26967
      /**
26968
       * Find the _Fields constant that matches fieldId, throwing an exception
26969
       * if it is not found.
26970
       */
26971
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26972
        _Fields fields = findByThriftId(fieldId);
26973
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26974
        return fields;
26975
      }
26976
 
26977
      /**
26978
       * Find the _Fields constant that matches name, or null if its not found.
26979
       */
26980
      public static _Fields findByName(String name) {
26981
        return byName.get(name);
26982
      }
26983
 
26984
      private final short _thriftId;
26985
      private final String _fieldName;
26986
 
26987
      _Fields(short thriftId, String fieldName) {
26988
        _thriftId = thriftId;
26989
        _fieldName = fieldName;
26990
      }
26991
 
26992
      public short getThriftFieldId() {
26993
        return _thriftId;
26994
      }
26995
 
26996
      public String getFieldName() {
26997
        return _fieldName;
26998
      }
26999
    }
27000
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27001
    }});
27002
 
27003
    static {
27004
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_args.class, metaDataMap);
27005
    }
27006
 
27007
    public getNoOfCustomersWithSuccessfulTransaction_args() {
27008
    }
27009
 
27010
    /**
27011
     * Performs a deep copy on <i>other</i>.
27012
     */
27013
    public getNoOfCustomersWithSuccessfulTransaction_args(getNoOfCustomersWithSuccessfulTransaction_args other) {
27014
    }
27015
 
27016
    public getNoOfCustomersWithSuccessfulTransaction_args deepCopy() {
27017
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27018
    }
27019
 
27020
    @Deprecated
27021
    public getNoOfCustomersWithSuccessfulTransaction_args clone() {
27022
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27023
    }
27024
 
27025
    public void setFieldValue(_Fields field, Object value) {
27026
      switch (field) {
27027
      }
27028
    }
27029
 
27030
    public void setFieldValue(int fieldID, Object value) {
27031
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27032
    }
27033
 
27034
    public Object getFieldValue(_Fields field) {
27035
      switch (field) {
27036
      }
27037
      throw new IllegalStateException();
27038
    }
27039
 
27040
    public Object getFieldValue(int fieldId) {
27041
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27042
    }
27043
 
27044
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27045
    public boolean isSet(_Fields field) {
27046
      switch (field) {
27047
      }
27048
      throw new IllegalStateException();
27049
    }
27050
 
27051
    public boolean isSet(int fieldID) {
27052
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27053
    }
27054
 
27055
    @Override
27056
    public boolean equals(Object that) {
27057
      if (that == null)
27058
        return false;
27059
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_args)
27060
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_args)that);
27061
      return false;
27062
    }
27063
 
27064
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_args that) {
27065
      if (that == null)
27066
        return false;
27067
 
27068
      return true;
27069
    }
27070
 
27071
    @Override
27072
    public int hashCode() {
27073
      return 0;
27074
    }
27075
 
27076
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_args other) {
27077
      if (!getClass().equals(other.getClass())) {
27078
        return getClass().getName().compareTo(other.getClass().getName());
27079
      }
27080
 
27081
      int lastComparison = 0;
27082
      getNoOfCustomersWithSuccessfulTransaction_args typedOther = (getNoOfCustomersWithSuccessfulTransaction_args)other;
27083
 
27084
      return 0;
27085
    }
27086
 
27087
    public void read(TProtocol iprot) throws TException {
27088
      TField field;
27089
      iprot.readStructBegin();
27090
      while (true)
27091
      {
27092
        field = iprot.readFieldBegin();
27093
        if (field.type == TType.STOP) { 
27094
          break;
27095
        }
27096
        _Fields fieldId = _Fields.findByThriftId(field.id);
27097
        if (fieldId == null) {
27098
          TProtocolUtil.skip(iprot, field.type);
27099
        } else {
27100
          switch (fieldId) {
27101
          }
27102
          iprot.readFieldEnd();
27103
        }
27104
      }
27105
      iprot.readStructEnd();
27106
      validate();
27107
    }
27108
 
27109
    public void write(TProtocol oprot) throws TException {
27110
      validate();
27111
 
27112
      oprot.writeStructBegin(STRUCT_DESC);
27113
      oprot.writeFieldStop();
27114
      oprot.writeStructEnd();
27115
    }
27116
 
27117
    @Override
27118
    public String toString() {
27119
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_args(");
27120
      boolean first = true;
27121
 
27122
      sb.append(")");
27123
      return sb.toString();
27124
    }
27125
 
27126
    public void validate() throws TException {
27127
      // check for required fields
27128
    }
27129
 
27130
  }
27131
 
27132
  public static class getNoOfCustomersWithSuccessfulTransaction_result implements TBase<getNoOfCustomersWithSuccessfulTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_result>   {
27133
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_result");
27134
 
27135
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
27136
 
27137
    private long success;
27138
 
27139
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27140
    public enum _Fields implements TFieldIdEnum {
27141
      SUCCESS((short)0, "success");
27142
 
27143
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27144
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27145
 
27146
      static {
27147
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27148
          byId.put((int)field._thriftId, field);
27149
          byName.put(field.getFieldName(), field);
27150
        }
27151
      }
27152
 
27153
      /**
27154
       * Find the _Fields constant that matches fieldId, or null if its not found.
27155
       */
27156
      public static _Fields findByThriftId(int fieldId) {
27157
        return byId.get(fieldId);
27158
      }
27159
 
27160
      /**
27161
       * Find the _Fields constant that matches fieldId, throwing an exception
27162
       * if it is not found.
27163
       */
27164
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27165
        _Fields fields = findByThriftId(fieldId);
27166
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27167
        return fields;
27168
      }
27169
 
27170
      /**
27171
       * Find the _Fields constant that matches name, or null if its not found.
27172
       */
27173
      public static _Fields findByName(String name) {
27174
        return byName.get(name);
27175
      }
27176
 
27177
      private final short _thriftId;
27178
      private final String _fieldName;
27179
 
27180
      _Fields(short thriftId, String fieldName) {
27181
        _thriftId = thriftId;
27182
        _fieldName = fieldName;
27183
      }
27184
 
27185
      public short getThriftFieldId() {
27186
        return _thriftId;
27187
      }
27188
 
27189
      public String getFieldName() {
27190
        return _fieldName;
27191
      }
27192
    }
27193
 
27194
    // isset id assignments
27195
    private static final int __SUCCESS_ISSET_ID = 0;
27196
    private BitSet __isset_bit_vector = new BitSet(1);
27197
 
27198
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27199
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27200
          new FieldValueMetaData(TType.I64)));
27201
    }});
27202
 
27203
    static {
27204
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_result.class, metaDataMap);
27205
    }
27206
 
27207
    public getNoOfCustomersWithSuccessfulTransaction_result() {
27208
    }
27209
 
27210
    public getNoOfCustomersWithSuccessfulTransaction_result(
27211
      long success)
27212
    {
27213
      this();
27214
      this.success = success;
27215
      setSuccessIsSet(true);
27216
    }
27217
 
27218
    /**
27219
     * Performs a deep copy on <i>other</i>.
27220
     */
27221
    public getNoOfCustomersWithSuccessfulTransaction_result(getNoOfCustomersWithSuccessfulTransaction_result other) {
27222
      __isset_bit_vector.clear();
27223
      __isset_bit_vector.or(other.__isset_bit_vector);
27224
      this.success = other.success;
27225
    }
27226
 
27227
    public getNoOfCustomersWithSuccessfulTransaction_result deepCopy() {
27228
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27229
    }
27230
 
27231
    @Deprecated
27232
    public getNoOfCustomersWithSuccessfulTransaction_result clone() {
27233
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27234
    }
27235
 
27236
    public long getSuccess() {
27237
      return this.success;
27238
    }
27239
 
27240
    public getNoOfCustomersWithSuccessfulTransaction_result setSuccess(long success) {
27241
      this.success = success;
27242
      setSuccessIsSet(true);
27243
      return this;
27244
    }
27245
 
27246
    public void unsetSuccess() {
27247
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27248
    }
27249
 
27250
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27251
    public boolean isSetSuccess() {
27252
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27253
    }
27254
 
27255
    public void setSuccessIsSet(boolean value) {
27256
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27257
    }
27258
 
27259
    public void setFieldValue(_Fields field, Object value) {
27260
      switch (field) {
27261
      case SUCCESS:
27262
        if (value == null) {
27263
          unsetSuccess();
27264
        } else {
27265
          setSuccess((Long)value);
27266
        }
27267
        break;
27268
 
27269
      }
27270
    }
27271
 
27272
    public void setFieldValue(int fieldID, Object value) {
27273
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27274
    }
27275
 
27276
    public Object getFieldValue(_Fields field) {
27277
      switch (field) {
27278
      case SUCCESS:
27279
        return new Long(getSuccess());
27280
 
27281
      }
27282
      throw new IllegalStateException();
27283
    }
27284
 
27285
    public Object getFieldValue(int fieldId) {
27286
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27287
    }
27288
 
27289
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27290
    public boolean isSet(_Fields field) {
27291
      switch (field) {
27292
      case SUCCESS:
27293
        return isSetSuccess();
27294
      }
27295
      throw new IllegalStateException();
27296
    }
27297
 
27298
    public boolean isSet(int fieldID) {
27299
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27300
    }
27301
 
27302
    @Override
27303
    public boolean equals(Object that) {
27304
      if (that == null)
27305
        return false;
27306
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_result)
27307
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_result)that);
27308
      return false;
27309
    }
27310
 
27311
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_result that) {
27312
      if (that == null)
27313
        return false;
27314
 
27315
      boolean this_present_success = true;
27316
      boolean that_present_success = true;
27317
      if (this_present_success || that_present_success) {
27318
        if (!(this_present_success && that_present_success))
27319
          return false;
27320
        if (this.success != that.success)
27321
          return false;
27322
      }
27323
 
27324
      return true;
27325
    }
27326
 
27327
    @Override
27328
    public int hashCode() {
27329
      return 0;
27330
    }
27331
 
27332
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_result other) {
27333
      if (!getClass().equals(other.getClass())) {
27334
        return getClass().getName().compareTo(other.getClass().getName());
27335
      }
27336
 
27337
      int lastComparison = 0;
27338
      getNoOfCustomersWithSuccessfulTransaction_result typedOther = (getNoOfCustomersWithSuccessfulTransaction_result)other;
27339
 
27340
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27341
      if (lastComparison != 0) {
27342
        return lastComparison;
27343
      }
27344
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27345
      if (lastComparison != 0) {
27346
        return lastComparison;
27347
      }
27348
      return 0;
27349
    }
27350
 
27351
    public void read(TProtocol iprot) throws TException {
27352
      TField field;
27353
      iprot.readStructBegin();
27354
      while (true)
27355
      {
27356
        field = iprot.readFieldBegin();
27357
        if (field.type == TType.STOP) { 
27358
          break;
27359
        }
27360
        _Fields fieldId = _Fields.findByThriftId(field.id);
27361
        if (fieldId == null) {
27362
          TProtocolUtil.skip(iprot, field.type);
27363
        } else {
27364
          switch (fieldId) {
27365
            case SUCCESS:
27366
              if (field.type == TType.I64) {
27367
                this.success = iprot.readI64();
27368
                setSuccessIsSet(true);
27369
              } else { 
27370
                TProtocolUtil.skip(iprot, field.type);
27371
              }
27372
              break;
27373
          }
27374
          iprot.readFieldEnd();
27375
        }
27376
      }
27377
      iprot.readStructEnd();
27378
      validate();
27379
    }
27380
 
27381
    public void write(TProtocol oprot) throws TException {
27382
      oprot.writeStructBegin(STRUCT_DESC);
27383
 
27384
      if (this.isSetSuccess()) {
27385
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27386
        oprot.writeI64(this.success);
27387
        oprot.writeFieldEnd();
27388
      }
27389
      oprot.writeFieldStop();
27390
      oprot.writeStructEnd();
27391
    }
27392
 
27393
    @Override
27394
    public String toString() {
27395
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_result(");
27396
      boolean first = true;
27397
 
27398
      sb.append("success:");
27399
      sb.append(this.success);
27400
      first = false;
27401
      sb.append(")");
27402
      return sb.toString();
27403
    }
27404
 
27405
    public void validate() throws TException {
27406
      // check for required fields
27407
    }
27408
 
27409
  }
27410
 
1731 ankur.sing 27411
  public static class getValidOrdersAmountRange_args implements TBase<getValidOrdersAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_args>   {
27412
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_args");
1629 ankur.sing 27413
 
27414
 
27415
 
27416
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27417
    public enum _Fields implements TFieldIdEnum {
27418
;
27419
 
27420
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27421
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27422
 
27423
      static {
27424
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27425
          byId.put((int)field._thriftId, field);
27426
          byName.put(field.getFieldName(), field);
27427
        }
27428
      }
27429
 
27430
      /**
27431
       * Find the _Fields constant that matches fieldId, or null if its not found.
27432
       */
27433
      public static _Fields findByThriftId(int fieldId) {
27434
        return byId.get(fieldId);
27435
      }
27436
 
27437
      /**
27438
       * Find the _Fields constant that matches fieldId, throwing an exception
27439
       * if it is not found.
27440
       */
27441
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27442
        _Fields fields = findByThriftId(fieldId);
27443
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27444
        return fields;
27445
      }
27446
 
27447
      /**
27448
       * Find the _Fields constant that matches name, or null if its not found.
27449
       */
27450
      public static _Fields findByName(String name) {
27451
        return byName.get(name);
27452
      }
27453
 
27454
      private final short _thriftId;
27455
      private final String _fieldName;
27456
 
27457
      _Fields(short thriftId, String fieldName) {
27458
        _thriftId = thriftId;
27459
        _fieldName = fieldName;
27460
      }
27461
 
27462
      public short getThriftFieldId() {
27463
        return _thriftId;
27464
      }
27465
 
27466
      public String getFieldName() {
27467
        return _fieldName;
27468
      }
27469
    }
27470
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27471
    }});
27472
 
27473
    static {
1731 ankur.sing 27474
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_args.class, metaDataMap);
1629 ankur.sing 27475
    }
27476
 
1731 ankur.sing 27477
    public getValidOrdersAmountRange_args() {
1629 ankur.sing 27478
    }
27479
 
27480
    /**
27481
     * Performs a deep copy on <i>other</i>.
27482
     */
1731 ankur.sing 27483
    public getValidOrdersAmountRange_args(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27484
    }
27485
 
1731 ankur.sing 27486
    public getValidOrdersAmountRange_args deepCopy() {
27487
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27488
    }
27489
 
27490
    @Deprecated
1731 ankur.sing 27491
    public getValidOrdersAmountRange_args clone() {
27492
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27493
    }
27494
 
27495
    public void setFieldValue(_Fields field, Object value) {
27496
      switch (field) {
27497
      }
27498
    }
27499
 
27500
    public void setFieldValue(int fieldID, Object value) {
27501
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27502
    }
27503
 
27504
    public Object getFieldValue(_Fields field) {
27505
      switch (field) {
27506
      }
27507
      throw new IllegalStateException();
27508
    }
27509
 
27510
    public Object getFieldValue(int fieldId) {
27511
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27512
    }
27513
 
27514
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27515
    public boolean isSet(_Fields field) {
27516
      switch (field) {
27517
      }
27518
      throw new IllegalStateException();
27519
    }
27520
 
27521
    public boolean isSet(int fieldID) {
27522
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27523
    }
27524
 
27525
    @Override
27526
    public boolean equals(Object that) {
27527
      if (that == null)
27528
        return false;
1731 ankur.sing 27529
      if (that instanceof getValidOrdersAmountRange_args)
27530
        return this.equals((getValidOrdersAmountRange_args)that);
1629 ankur.sing 27531
      return false;
27532
    }
27533
 
1731 ankur.sing 27534
    public boolean equals(getValidOrdersAmountRange_args that) {
1629 ankur.sing 27535
      if (that == null)
27536
        return false;
27537
 
27538
      return true;
27539
    }
27540
 
27541
    @Override
27542
    public int hashCode() {
27543
      return 0;
27544
    }
27545
 
1731 ankur.sing 27546
    public int compareTo(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27547
      if (!getClass().equals(other.getClass())) {
27548
        return getClass().getName().compareTo(other.getClass().getName());
27549
      }
27550
 
27551
      int lastComparison = 0;
1731 ankur.sing 27552
      getValidOrdersAmountRange_args typedOther = (getValidOrdersAmountRange_args)other;
1629 ankur.sing 27553
 
27554
      return 0;
27555
    }
27556
 
27557
    public void read(TProtocol iprot) throws TException {
27558
      TField field;
27559
      iprot.readStructBegin();
27560
      while (true)
27561
      {
27562
        field = iprot.readFieldBegin();
27563
        if (field.type == TType.STOP) { 
27564
          break;
27565
        }
27566
        _Fields fieldId = _Fields.findByThriftId(field.id);
27567
        if (fieldId == null) {
27568
          TProtocolUtil.skip(iprot, field.type);
27569
        } else {
27570
          switch (fieldId) {
27571
          }
27572
          iprot.readFieldEnd();
27573
        }
27574
      }
27575
      iprot.readStructEnd();
27576
      validate();
27577
    }
27578
 
27579
    public void write(TProtocol oprot) throws TException {
27580
      validate();
27581
 
27582
      oprot.writeStructBegin(STRUCT_DESC);
27583
      oprot.writeFieldStop();
27584
      oprot.writeStructEnd();
27585
    }
27586
 
27587
    @Override
27588
    public String toString() {
1731 ankur.sing 27589
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_args(");
1629 ankur.sing 27590
      boolean first = true;
27591
 
27592
      sb.append(")");
27593
      return sb.toString();
27594
    }
27595
 
27596
    public void validate() throws TException {
27597
      // check for required fields
27598
    }
27599
 
27600
  }
27601
 
1731 ankur.sing 27602
  public static class getValidOrdersAmountRange_result implements TBase<getValidOrdersAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_result>   {
27603
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_result");
1629 ankur.sing 27604
 
1731 ankur.sing 27605
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 27606
 
1731 ankur.sing 27607
    private List<Double> success;
1629 ankur.sing 27608
 
27609
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27610
    public enum _Fields implements TFieldIdEnum {
27611
      SUCCESS((short)0, "success");
27612
 
27613
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27614
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27615
 
27616
      static {
27617
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27618
          byId.put((int)field._thriftId, field);
27619
          byName.put(field.getFieldName(), field);
27620
        }
27621
      }
27622
 
27623
      /**
27624
       * Find the _Fields constant that matches fieldId, or null if its not found.
27625
       */
27626
      public static _Fields findByThriftId(int fieldId) {
27627
        return byId.get(fieldId);
27628
      }
27629
 
27630
      /**
27631
       * Find the _Fields constant that matches fieldId, throwing an exception
27632
       * if it is not found.
27633
       */
27634
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27635
        _Fields fields = findByThriftId(fieldId);
27636
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27637
        return fields;
27638
      }
27639
 
27640
      /**
27641
       * Find the _Fields constant that matches name, or null if its not found.
27642
       */
27643
      public static _Fields findByName(String name) {
27644
        return byName.get(name);
27645
      }
27646
 
27647
      private final short _thriftId;
27648
      private final String _fieldName;
27649
 
27650
      _Fields(short thriftId, String fieldName) {
27651
        _thriftId = thriftId;
27652
        _fieldName = fieldName;
27653
      }
27654
 
27655
      public short getThriftFieldId() {
27656
        return _thriftId;
27657
      }
27658
 
27659
      public String getFieldName() {
27660
        return _fieldName;
27661
      }
27662
    }
27663
 
27664
    // isset id assignments
27665
 
27666
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27667
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 27668
          new ListMetaData(TType.LIST, 
27669
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 27670
    }});
27671
 
27672
    static {
1731 ankur.sing 27673
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_result.class, metaDataMap);
1629 ankur.sing 27674
    }
27675
 
1731 ankur.sing 27676
    public getValidOrdersAmountRange_result() {
1629 ankur.sing 27677
    }
27678
 
1731 ankur.sing 27679
    public getValidOrdersAmountRange_result(
27680
      List<Double> success)
1629 ankur.sing 27681
    {
27682
      this();
27683
      this.success = success;
27684
    }
27685
 
27686
    /**
27687
     * Performs a deep copy on <i>other</i>.
27688
     */
1731 ankur.sing 27689
    public getValidOrdersAmountRange_result(getValidOrdersAmountRange_result other) {
27690
      if (other.isSetSuccess()) {
27691
        List<Double> __this__success = new ArrayList<Double>();
27692
        for (Double other_element : other.success) {
27693
          __this__success.add(other_element);
1629 ankur.sing 27694
        }
1731 ankur.sing 27695
        this.success = __this__success;
1629 ankur.sing 27696
      }
27697
    }
27698
 
1731 ankur.sing 27699
    public getValidOrdersAmountRange_result deepCopy() {
27700
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27701
    }
27702
 
27703
    @Deprecated
1731 ankur.sing 27704
    public getValidOrdersAmountRange_result clone() {
27705
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27706
    }
27707
 
1731 ankur.sing 27708
    public int getSuccessSize() {
27709
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 27710
    }
27711
 
1731 ankur.sing 27712
    public java.util.Iterator<Double> getSuccessIterator() {
27713
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 27714
    }
27715
 
1731 ankur.sing 27716
    public void addToSuccess(double elem) {
27717
      if (this.success == null) {
27718
        this.success = new ArrayList<Double>();
1629 ankur.sing 27719
      }
1731 ankur.sing 27720
      this.success.add(elem);
1629 ankur.sing 27721
    }
27722
 
1731 ankur.sing 27723
    public List<Double> getSuccess() {
1629 ankur.sing 27724
      return this.success;
27725
    }
27726
 
1731 ankur.sing 27727
    public getValidOrdersAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 27728
      this.success = success;
27729
      return this;
27730
    }
27731
 
27732
    public void unsetSuccess() {
1731 ankur.sing 27733
      this.success = null;
1629 ankur.sing 27734
    }
27735
 
27736
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27737
    public boolean isSetSuccess() {
1731 ankur.sing 27738
      return this.success != null;
1629 ankur.sing 27739
    }
27740
 
27741
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 27742
      if (!value) {
27743
        this.success = null;
27744
      }
1629 ankur.sing 27745
    }
27746
 
27747
    public void setFieldValue(_Fields field, Object value) {
27748
      switch (field) {
27749
      case SUCCESS:
27750
        if (value == null) {
27751
          unsetSuccess();
27752
        } else {
1731 ankur.sing 27753
          setSuccess((List<Double>)value);
1629 ankur.sing 27754
        }
27755
        break;
27756
 
27757
      }
27758
    }
27759
 
27760
    public void setFieldValue(int fieldID, Object value) {
27761
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27762
    }
27763
 
27764
    public Object getFieldValue(_Fields field) {
27765
      switch (field) {
27766
      case SUCCESS:
1731 ankur.sing 27767
        return getSuccess();
1629 ankur.sing 27768
 
27769
      }
27770
      throw new IllegalStateException();
27771
    }
27772
 
27773
    public Object getFieldValue(int fieldId) {
27774
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27775
    }
27776
 
27777
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27778
    public boolean isSet(_Fields field) {
27779
      switch (field) {
27780
      case SUCCESS:
27781
        return isSetSuccess();
27782
      }
27783
      throw new IllegalStateException();
27784
    }
27785
 
27786
    public boolean isSet(int fieldID) {
27787
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27788
    }
27789
 
27790
    @Override
27791
    public boolean equals(Object that) {
27792
      if (that == null)
27793
        return false;
1731 ankur.sing 27794
      if (that instanceof getValidOrdersAmountRange_result)
27795
        return this.equals((getValidOrdersAmountRange_result)that);
1629 ankur.sing 27796
      return false;
27797
    }
27798
 
1731 ankur.sing 27799
    public boolean equals(getValidOrdersAmountRange_result that) {
1629 ankur.sing 27800
      if (that == null)
27801
        return false;
27802
 
1731 ankur.sing 27803
      boolean this_present_success = true && this.isSetSuccess();
27804
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 27805
      if (this_present_success || that_present_success) {
27806
        if (!(this_present_success && that_present_success))
27807
          return false;
1731 ankur.sing 27808
        if (!this.success.equals(that.success))
1629 ankur.sing 27809
          return false;
27810
      }
27811
 
27812
      return true;
27813
    }
27814
 
27815
    @Override
27816
    public int hashCode() {
27817
      return 0;
27818
    }
27819
 
1731 ankur.sing 27820
    public int compareTo(getValidOrdersAmountRange_result other) {
1629 ankur.sing 27821
      if (!getClass().equals(other.getClass())) {
27822
        return getClass().getName().compareTo(other.getClass().getName());
27823
      }
27824
 
27825
      int lastComparison = 0;
1731 ankur.sing 27826
      getValidOrdersAmountRange_result typedOther = (getValidOrdersAmountRange_result)other;
1629 ankur.sing 27827
 
27828
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27829
      if (lastComparison != 0) {
27830
        return lastComparison;
27831
      }
27832
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27833
      if (lastComparison != 0) {
27834
        return lastComparison;
27835
      }
27836
      return 0;
27837
    }
27838
 
27839
    public void read(TProtocol iprot) throws TException {
27840
      TField field;
27841
      iprot.readStructBegin();
27842
      while (true)
27843
      {
27844
        field = iprot.readFieldBegin();
27845
        if (field.type == TType.STOP) { 
27846
          break;
27847
        }
27848
        _Fields fieldId = _Fields.findByThriftId(field.id);
27849
        if (fieldId == null) {
27850
          TProtocolUtil.skip(iprot, field.type);
27851
        } else {
27852
          switch (fieldId) {
27853
            case SUCCESS:
1731 ankur.sing 27854
              if (field.type == TType.LIST) {
27855
                {
27856
                  TList _list80 = iprot.readListBegin();
27857
                  this.success = new ArrayList<Double>(_list80.size);
27858
                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
27859
                  {
27860
                    double _elem82;
27861
                    _elem82 = iprot.readDouble();
27862
                    this.success.add(_elem82);
27863
                  }
27864
                  iprot.readListEnd();
27865
                }
1629 ankur.sing 27866
              } else { 
27867
                TProtocolUtil.skip(iprot, field.type);
27868
              }
27869
              break;
27870
          }
27871
          iprot.readFieldEnd();
27872
        }
27873
      }
27874
      iprot.readStructEnd();
27875
      validate();
27876
    }
27877
 
27878
    public void write(TProtocol oprot) throws TException {
27879
      oprot.writeStructBegin(STRUCT_DESC);
27880
 
27881
      if (this.isSetSuccess()) {
27882
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 27883
        {
27884
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
27885
          for (double _iter83 : this.success)
27886
          {
27887
            oprot.writeDouble(_iter83);
27888
          }
27889
          oprot.writeListEnd();
27890
        }
1629 ankur.sing 27891
        oprot.writeFieldEnd();
27892
      }
27893
      oprot.writeFieldStop();
27894
      oprot.writeStructEnd();
27895
    }
27896
 
27897
    @Override
27898
    public String toString() {
1731 ankur.sing 27899
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_result(");
1629 ankur.sing 27900
      boolean first = true;
27901
 
27902
      sb.append("success:");
1731 ankur.sing 27903
      if (this.success == null) {
27904
        sb.append("null");
27905
      } else {
27906
        sb.append(this.success);
27907
      }
1629 ankur.sing 27908
      first = false;
27909
      sb.append(")");
27910
      return sb.toString();
27911
    }
27912
 
27913
    public void validate() throws TException {
27914
      // check for required fields
27915
    }
27916
 
27917
  }
27918
 
1886 ankur.sing 27919
  public static class getValidOrders_args implements TBase<getValidOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_args>   {
27920
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_args");
27921
 
27922
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)1);
27923
 
27924
    private long limit;
27925
 
27926
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27927
    public enum _Fields implements TFieldIdEnum {
27928
      LIMIT((short)1, "limit");
27929
 
27930
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27931
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27932
 
27933
      static {
27934
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27935
          byId.put((int)field._thriftId, field);
27936
          byName.put(field.getFieldName(), field);
27937
        }
27938
      }
27939
 
27940
      /**
27941
       * Find the _Fields constant that matches fieldId, or null if its not found.
27942
       */
27943
      public static _Fields findByThriftId(int fieldId) {
27944
        return byId.get(fieldId);
27945
      }
27946
 
27947
      /**
27948
       * Find the _Fields constant that matches fieldId, throwing an exception
27949
       * if it is not found.
27950
       */
27951
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27952
        _Fields fields = findByThriftId(fieldId);
27953
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27954
        return fields;
27955
      }
27956
 
27957
      /**
27958
       * Find the _Fields constant that matches name, or null if its not found.
27959
       */
27960
      public static _Fields findByName(String name) {
27961
        return byName.get(name);
27962
      }
27963
 
27964
      private final short _thriftId;
27965
      private final String _fieldName;
27966
 
27967
      _Fields(short thriftId, String fieldName) {
27968
        _thriftId = thriftId;
27969
        _fieldName = fieldName;
27970
      }
27971
 
27972
      public short getThriftFieldId() {
27973
        return _thriftId;
27974
      }
27975
 
27976
      public String getFieldName() {
27977
        return _fieldName;
27978
      }
27979
    }
27980
 
27981
    // isset id assignments
27982
    private static final int __LIMIT_ISSET_ID = 0;
27983
    private BitSet __isset_bit_vector = new BitSet(1);
27984
 
27985
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27986
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
27987
          new FieldValueMetaData(TType.I64)));
27988
    }});
27989
 
27990
    static {
27991
      FieldMetaData.addStructMetaDataMap(getValidOrders_args.class, metaDataMap);
27992
    }
27993
 
27994
    public getValidOrders_args() {
27995
    }
27996
 
27997
    public getValidOrders_args(
27998
      long limit)
27999
    {
28000
      this();
28001
      this.limit = limit;
28002
      setLimitIsSet(true);
28003
    }
28004
 
28005
    /**
28006
     * Performs a deep copy on <i>other</i>.
28007
     */
28008
    public getValidOrders_args(getValidOrders_args other) {
28009
      __isset_bit_vector.clear();
28010
      __isset_bit_vector.or(other.__isset_bit_vector);
28011
      this.limit = other.limit;
28012
    }
28013
 
28014
    public getValidOrders_args deepCopy() {
28015
      return new getValidOrders_args(this);
28016
    }
28017
 
28018
    @Deprecated
28019
    public getValidOrders_args clone() {
28020
      return new getValidOrders_args(this);
28021
    }
28022
 
28023
    public long getLimit() {
28024
      return this.limit;
28025
    }
28026
 
28027
    public getValidOrders_args setLimit(long limit) {
28028
      this.limit = limit;
28029
      setLimitIsSet(true);
28030
      return this;
28031
    }
28032
 
28033
    public void unsetLimit() {
28034
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
28035
    }
28036
 
28037
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
28038
    public boolean isSetLimit() {
28039
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
28040
    }
28041
 
28042
    public void setLimitIsSet(boolean value) {
28043
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
28044
    }
28045
 
28046
    public void setFieldValue(_Fields field, Object value) {
28047
      switch (field) {
28048
      case LIMIT:
28049
        if (value == null) {
28050
          unsetLimit();
28051
        } else {
28052
          setLimit((Long)value);
28053
        }
28054
        break;
28055
 
28056
      }
28057
    }
28058
 
28059
    public void setFieldValue(int fieldID, Object value) {
28060
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28061
    }
28062
 
28063
    public Object getFieldValue(_Fields field) {
28064
      switch (field) {
28065
      case LIMIT:
28066
        return new Long(getLimit());
28067
 
28068
      }
28069
      throw new IllegalStateException();
28070
    }
28071
 
28072
    public Object getFieldValue(int fieldId) {
28073
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28074
    }
28075
 
28076
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28077
    public boolean isSet(_Fields field) {
28078
      switch (field) {
28079
      case LIMIT:
28080
        return isSetLimit();
28081
      }
28082
      throw new IllegalStateException();
28083
    }
28084
 
28085
    public boolean isSet(int fieldID) {
28086
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28087
    }
28088
 
28089
    @Override
28090
    public boolean equals(Object that) {
28091
      if (that == null)
28092
        return false;
28093
      if (that instanceof getValidOrders_args)
28094
        return this.equals((getValidOrders_args)that);
28095
      return false;
28096
    }
28097
 
28098
    public boolean equals(getValidOrders_args that) {
28099
      if (that == null)
28100
        return false;
28101
 
28102
      boolean this_present_limit = true;
28103
      boolean that_present_limit = true;
28104
      if (this_present_limit || that_present_limit) {
28105
        if (!(this_present_limit && that_present_limit))
28106
          return false;
28107
        if (this.limit != that.limit)
28108
          return false;
28109
      }
28110
 
28111
      return true;
28112
    }
28113
 
28114
    @Override
28115
    public int hashCode() {
28116
      return 0;
28117
    }
28118
 
28119
    public int compareTo(getValidOrders_args other) {
28120
      if (!getClass().equals(other.getClass())) {
28121
        return getClass().getName().compareTo(other.getClass().getName());
28122
      }
28123
 
28124
      int lastComparison = 0;
28125
      getValidOrders_args typedOther = (getValidOrders_args)other;
28126
 
28127
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
28128
      if (lastComparison != 0) {
28129
        return lastComparison;
28130
      }
28131
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
28132
      if (lastComparison != 0) {
28133
        return lastComparison;
28134
      }
28135
      return 0;
28136
    }
28137
 
28138
    public void read(TProtocol iprot) throws TException {
28139
      TField field;
28140
      iprot.readStructBegin();
28141
      while (true)
28142
      {
28143
        field = iprot.readFieldBegin();
28144
        if (field.type == TType.STOP) { 
28145
          break;
28146
        }
28147
        _Fields fieldId = _Fields.findByThriftId(field.id);
28148
        if (fieldId == null) {
28149
          TProtocolUtil.skip(iprot, field.type);
28150
        } else {
28151
          switch (fieldId) {
28152
            case LIMIT:
28153
              if (field.type == TType.I64) {
28154
                this.limit = iprot.readI64();
28155
                setLimitIsSet(true);
28156
              } else { 
28157
                TProtocolUtil.skip(iprot, field.type);
28158
              }
28159
              break;
28160
          }
28161
          iprot.readFieldEnd();
28162
        }
28163
      }
28164
      iprot.readStructEnd();
28165
      validate();
28166
    }
28167
 
28168
    public void write(TProtocol oprot) throws TException {
28169
      validate();
28170
 
28171
      oprot.writeStructBegin(STRUCT_DESC);
28172
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
28173
      oprot.writeI64(this.limit);
28174
      oprot.writeFieldEnd();
28175
      oprot.writeFieldStop();
28176
      oprot.writeStructEnd();
28177
    }
28178
 
28179
    @Override
28180
    public String toString() {
28181
      StringBuilder sb = new StringBuilder("getValidOrders_args(");
28182
      boolean first = true;
28183
 
28184
      sb.append("limit:");
28185
      sb.append(this.limit);
28186
      first = false;
28187
      sb.append(")");
28188
      return sb.toString();
28189
    }
28190
 
28191
    public void validate() throws TException {
28192
      // check for required fields
28193
    }
28194
 
28195
  }
28196
 
28197
  public static class getValidOrders_result implements TBase<getValidOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_result>   {
28198
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_result");
28199
 
28200
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
28201
 
28202
    private List<Order> success;
28203
 
28204
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28205
    public enum _Fields implements TFieldIdEnum {
28206
      SUCCESS((short)0, "success");
28207
 
28208
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28209
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28210
 
28211
      static {
28212
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28213
          byId.put((int)field._thriftId, field);
28214
          byName.put(field.getFieldName(), field);
28215
        }
28216
      }
28217
 
28218
      /**
28219
       * Find the _Fields constant that matches fieldId, or null if its not found.
28220
       */
28221
      public static _Fields findByThriftId(int fieldId) {
28222
        return byId.get(fieldId);
28223
      }
28224
 
28225
      /**
28226
       * Find the _Fields constant that matches fieldId, throwing an exception
28227
       * if it is not found.
28228
       */
28229
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28230
        _Fields fields = findByThriftId(fieldId);
28231
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28232
        return fields;
28233
      }
28234
 
28235
      /**
28236
       * Find the _Fields constant that matches name, or null if its not found.
28237
       */
28238
      public static _Fields findByName(String name) {
28239
        return byName.get(name);
28240
      }
28241
 
28242
      private final short _thriftId;
28243
      private final String _fieldName;
28244
 
28245
      _Fields(short thriftId, String fieldName) {
28246
        _thriftId = thriftId;
28247
        _fieldName = fieldName;
28248
      }
28249
 
28250
      public short getThriftFieldId() {
28251
        return _thriftId;
28252
      }
28253
 
28254
      public String getFieldName() {
28255
        return _fieldName;
28256
      }
28257
    }
28258
 
28259
    // isset id assignments
28260
 
28261
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28262
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28263
          new ListMetaData(TType.LIST, 
28264
              new StructMetaData(TType.STRUCT, Order.class))));
28265
    }});
28266
 
28267
    static {
28268
      FieldMetaData.addStructMetaDataMap(getValidOrders_result.class, metaDataMap);
28269
    }
28270
 
28271
    public getValidOrders_result() {
28272
    }
28273
 
28274
    public getValidOrders_result(
28275
      List<Order> success)
28276
    {
28277
      this();
28278
      this.success = success;
28279
    }
28280
 
28281
    /**
28282
     * Performs a deep copy on <i>other</i>.
28283
     */
28284
    public getValidOrders_result(getValidOrders_result other) {
28285
      if (other.isSetSuccess()) {
28286
        List<Order> __this__success = new ArrayList<Order>();
28287
        for (Order other_element : other.success) {
28288
          __this__success.add(new Order(other_element));
28289
        }
28290
        this.success = __this__success;
28291
      }
28292
    }
28293
 
28294
    public getValidOrders_result deepCopy() {
28295
      return new getValidOrders_result(this);
28296
    }
28297
 
28298
    @Deprecated
28299
    public getValidOrders_result clone() {
28300
      return new getValidOrders_result(this);
28301
    }
28302
 
28303
    public int getSuccessSize() {
28304
      return (this.success == null) ? 0 : this.success.size();
28305
    }
28306
 
28307
    public java.util.Iterator<Order> getSuccessIterator() {
28308
      return (this.success == null) ? null : this.success.iterator();
28309
    }
28310
 
28311
    public void addToSuccess(Order elem) {
28312
      if (this.success == null) {
28313
        this.success = new ArrayList<Order>();
28314
      }
28315
      this.success.add(elem);
28316
    }
28317
 
28318
    public List<Order> getSuccess() {
28319
      return this.success;
28320
    }
28321
 
28322
    public getValidOrders_result setSuccess(List<Order> success) {
28323
      this.success = success;
28324
      return this;
28325
    }
28326
 
28327
    public void unsetSuccess() {
28328
      this.success = null;
28329
    }
28330
 
28331
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28332
    public boolean isSetSuccess() {
28333
      return this.success != null;
28334
    }
28335
 
28336
    public void setSuccessIsSet(boolean value) {
28337
      if (!value) {
28338
        this.success = null;
28339
      }
28340
    }
28341
 
28342
    public void setFieldValue(_Fields field, Object value) {
28343
      switch (field) {
28344
      case SUCCESS:
28345
        if (value == null) {
28346
          unsetSuccess();
28347
        } else {
28348
          setSuccess((List<Order>)value);
28349
        }
28350
        break;
28351
 
28352
      }
28353
    }
28354
 
28355
    public void setFieldValue(int fieldID, Object value) {
28356
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28357
    }
28358
 
28359
    public Object getFieldValue(_Fields field) {
28360
      switch (field) {
28361
      case SUCCESS:
28362
        return getSuccess();
28363
 
28364
      }
28365
      throw new IllegalStateException();
28366
    }
28367
 
28368
    public Object getFieldValue(int fieldId) {
28369
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28370
    }
28371
 
28372
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28373
    public boolean isSet(_Fields field) {
28374
      switch (field) {
28375
      case SUCCESS:
28376
        return isSetSuccess();
28377
      }
28378
      throw new IllegalStateException();
28379
    }
28380
 
28381
    public boolean isSet(int fieldID) {
28382
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28383
    }
28384
 
28385
    @Override
28386
    public boolean equals(Object that) {
28387
      if (that == null)
28388
        return false;
28389
      if (that instanceof getValidOrders_result)
28390
        return this.equals((getValidOrders_result)that);
28391
      return false;
28392
    }
28393
 
28394
    public boolean equals(getValidOrders_result that) {
28395
      if (that == null)
28396
        return false;
28397
 
28398
      boolean this_present_success = true && this.isSetSuccess();
28399
      boolean that_present_success = true && that.isSetSuccess();
28400
      if (this_present_success || that_present_success) {
28401
        if (!(this_present_success && that_present_success))
28402
          return false;
28403
        if (!this.success.equals(that.success))
28404
          return false;
28405
      }
28406
 
28407
      return true;
28408
    }
28409
 
28410
    @Override
28411
    public int hashCode() {
28412
      return 0;
28413
    }
28414
 
28415
    public int compareTo(getValidOrders_result other) {
28416
      if (!getClass().equals(other.getClass())) {
28417
        return getClass().getName().compareTo(other.getClass().getName());
28418
      }
28419
 
28420
      int lastComparison = 0;
28421
      getValidOrders_result typedOther = (getValidOrders_result)other;
28422
 
28423
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28424
      if (lastComparison != 0) {
28425
        return lastComparison;
28426
      }
28427
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28428
      if (lastComparison != 0) {
28429
        return lastComparison;
28430
      }
28431
      return 0;
28432
    }
28433
 
28434
    public void read(TProtocol iprot) throws TException {
28435
      TField field;
28436
      iprot.readStructBegin();
28437
      while (true)
28438
      {
28439
        field = iprot.readFieldBegin();
28440
        if (field.type == TType.STOP) { 
28441
          break;
28442
        }
28443
        _Fields fieldId = _Fields.findByThriftId(field.id);
28444
        if (fieldId == null) {
28445
          TProtocolUtil.skip(iprot, field.type);
28446
        } else {
28447
          switch (fieldId) {
28448
            case SUCCESS:
28449
              if (field.type == TType.LIST) {
28450
                {
28451
                  TList _list84 = iprot.readListBegin();
28452
                  this.success = new ArrayList<Order>(_list84.size);
28453
                  for (int _i85 = 0; _i85 < _list84.size; ++_i85)
28454
                  {
28455
                    Order _elem86;
28456
                    _elem86 = new Order();
28457
                    _elem86.read(iprot);
28458
                    this.success.add(_elem86);
28459
                  }
28460
                  iprot.readListEnd();
28461
                }
28462
              } else { 
28463
                TProtocolUtil.skip(iprot, field.type);
28464
              }
28465
              break;
28466
          }
28467
          iprot.readFieldEnd();
28468
        }
28469
      }
28470
      iprot.readStructEnd();
28471
      validate();
28472
    }
28473
 
28474
    public void write(TProtocol oprot) throws TException {
28475
      oprot.writeStructBegin(STRUCT_DESC);
28476
 
28477
      if (this.isSetSuccess()) {
28478
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28479
        {
28480
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
28481
          for (Order _iter87 : this.success)
28482
          {
28483
            _iter87.write(oprot);
28484
          }
28485
          oprot.writeListEnd();
28486
        }
28487
        oprot.writeFieldEnd();
28488
      }
28489
      oprot.writeFieldStop();
28490
      oprot.writeStructEnd();
28491
    }
28492
 
28493
    @Override
28494
    public String toString() {
28495
      StringBuilder sb = new StringBuilder("getValidOrders_result(");
28496
      boolean first = true;
28497
 
28498
      sb.append("success:");
28499
      if (this.success == null) {
28500
        sb.append("null");
28501
      } else {
28502
        sb.append(this.success);
28503
      }
28504
      first = false;
28505
      sb.append(")");
28506
      return sb.toString();
28507
    }
28508
 
28509
    public void validate() throws TException {
28510
      // check for required fields
28511
    }
28512
 
28513
  }
28514
 
68 ashish 28515
}