Subversion Repositories SmartDukaan

Rev

Rev 2590 | Rev 2612 | 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.
2383 rajveer 90
     * Also marks the order as billed and sets the billing timestamp.
91
     * Return false if it doesn't find the order with the given ID.
1148 chandransh 92
     * 
93
     * @param orderId
94
     * @param jacketNumber
95
     */
2383 rajveer 96
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException;
1148 chandransh 97
 
923 rajveer 98
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
99
 
100
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
101
 
1529 ankur.sing 102
    /**
103
     * Returns list of orders for given transaction Id. Also filters based on customer Id so that
104
     * only user who owns the transaction can view its order details.
105
     * 
106
     * @param transactionId
107
     * @param customerId
108
     */
109
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException;
68 ashish 110
 
483 rajveer 111
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 112
 
483 rajveer 113
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 114
 
483 rajveer 115
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 116
 
483 rajveer 117
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 118
 
758 chandransh 119
    /**
1529 ankur.sing 120
     * Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
121
     * Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
122
     * 
123
     * @param orderId
124
     * @param customerId
125
     */
126
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException;
127
 
128
    /**
1221 chandransh 129
     * Create a batch of all the pending orders for the given warehouse.
130
     * The returned list is orderd by created_timestamp.
131
     * If there are no pending orders, an empty list is returned.
132
     * 
133
     * @param warehouseId
134
     */
135
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
136
 
137
    /**
1209 chandransh 138
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
139
     * 
140
     * @param orderId
141
     */
142
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
143
 
144
    /**
758 chandransh 145
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
146
     * 
147
     * @param warehouseId
148
     * @param providerId
149
     */
150
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
151
 
1114 chandransh 152
    /**
153
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
154
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
155
     * Raises an exception if we encounter report for an AWB number that we did not ship.
156
     * 
157
     * @param providerId
158
     * @param pickupDetails
159
     */
1245 chandransh 160
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 161
 
1133 chandransh 162
    /**
163
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
164
     * the name of the receiver.
165
     * Raises an exception if we encounter report for an AWB number that we did not ship.
166
     * 
167
     * @param providerId
168
     * @param deliveredOrders
169
     */
170
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
171
 
172
    /**
173
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
174
     * Raises an exception if we encounter report for an AWB number that we did not ship.
175
     * 
176
     * @param providerId
177
     * @param returnedOrders
178
     */
179
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
180
 
1245 chandransh 181
    /**
182
     * Update the status description of orders whose AWB numbers are keys of the Map.
183
     * 
184
     * @param providerId
185
     * @param undeliveredOrders
186
     */
187
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
188
 
1406 ankur.sing 189
    /**
190
     * Returns the list of orders whose delivery time has passed but have not been
191
     * delivered yet for the given provider and warehouse. To get a complete list of
192
     * undelivered orders, pass them as -1.
193
     * Returns an empty list if no such orders exist.
194
     * 
195
     * @param providerId
196
     * @param warehouseId
197
     */
198
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
199
 
483 rajveer 200
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 201
 
483 rajveer 202
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 203
 
1598 ankur.sing 204
    /**
205
     * Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
206
     */
207
    public long getValidOrderCount() throws TException;
208
 
1629 ankur.sing 209
    /**
210
     * Returns the number of distinct customers who have done successful transactions
211
     */
212
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException;
213
 
214
    /**
1731 ankur.sing 215
     * Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
216
     * List contains two values, first minimum amount and second maximum amount.
1629 ankur.sing 217
     */
1731 ankur.sing 218
    public List<Double> getValidOrdersAmountRange() throws TException;
1629 ankur.sing 219
 
1886 ankur.sing 220
    /**
221
     * Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
222
     * If limit is passed as 0, then all valid Orders are returned.
223
     * 
224
     * @param limit
225
     */
226
    public List<Order> getValidOrders(long limit) throws TException;
227
 
2538 chandransh 228
    /**
229
     * Toggle the DOA flag of an order. This should be used to flag an order for follow-up and unflag it when the follow-up is complete.
230
     * Returns the final flag status.
231
     * Throws an exception if the order with the given id couldn't be found or if the order status is not DELVIERY_SUCCESS.
232
     * 
233
     * @param orderId
234
     */
235
    public boolean toggleDOAFlag(long orderId) throws TransactionServiceException, TException;
236
 
237
    /**
238
     * Sends out an email to the account manager of the original courier provider used to ship the order.
239
     * If the order status was DELIVERY_SUCCESS, it is changed to be DOA_PICKUP_REQUESTED.
240
     * If the order status was DOA_PICKUP_REQUESTED, it is left unchanged.
241
     * For any other status, it returns false.
242
     * Throws an exception if the order with the given id couldn't be found.
243
     * 
244
     * @param orderId
245
     */
246
    public boolean requestPickupNumber(long orderId) throws TransactionServiceException, TException;
247
 
248
    /**
249
     * If the order status is DOA_PICKUP_REQUESTED, it does the following
250
     * 	1. Sends out an email to the customer with the dispatch advice that he has to print as an attachment.
251
     * 	2. Changes order status to be DOA_PICKUP_AUTHORIZED.
252
     * 	3. Returns true
2590 chandransh 253
     * If the order is in any other status, it returns false.
2538 chandransh 254
     * Throws an exception if the order with the given id couldn't be found.
255
     * 
256
     * @param orderId
257
     * @param pickupNumber
258
     */
259
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException;
260
 
2590 chandransh 261
    /**
2601 chandransh 262
     * If the order status is DOA_RETURN_AUTHORIZED or DOA_RETURN_IN_TRANSIT, marks the order status as DOA_RECEIVED and returns true.
2590 chandransh 263
     * If the order is in any other state, it returns false.
264
     * Throws an exception if the order with the given id couldn't be found.
265
     * 
266
     * @param orderId
267
     */
268
    public boolean acceptDoa(long orderId) throws TransactionServiceException, TException;
269
 
270
    /**
2601 chandransh 271
     * Used to validate the DOA certificate for an order in the DOA_RECEIVED state. If the certificate is valid,
272
     * the order state is changed to DOA_PENDING.
2590 chandransh 273
     * If the certificate is invalid, the order state is changed to DOA_CERT_INVALID.
274
     * If the order is in any other state, it returns false.
275
     * Throws an exception if the order with the given id couldn't be found.
276
     * 
277
     * @param orderId
278
     * @param isValid
279
     */
280
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException;
281
 
68 ashish 282
  }
283
 
284
  public static class Client implements Iface {
285
    public Client(TProtocol prot)
286
    {
287
      this(prot, prot);
288
    }
289
 
290
    public Client(TProtocol iprot, TProtocol oprot)
291
    {
292
      iprot_ = iprot;
293
      oprot_ = oprot;
294
    }
295
 
296
    protected TProtocol iprot_;
297
    protected TProtocol oprot_;
298
 
299
    protected int seqid_;
300
 
301
    public TProtocol getInputProtocol()
302
    {
303
      return this.iprot_;
304
    }
305
 
306
    public TProtocol getOutputProtocol()
307
    {
308
      return this.oprot_;
309
    }
310
 
764 rajveer 311
    public void closeSession() throws TException
312
    {
313
      send_closeSession();
314
      recv_closeSession();
315
    }
316
 
317
    public void send_closeSession() throws TException
318
    {
319
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
320
      closeSession_args args = new closeSession_args();
321
      args.write(oprot_);
322
      oprot_.writeMessageEnd();
323
      oprot_.getTransport().flush();
324
    }
325
 
326
    public void recv_closeSession() throws TException
327
    {
328
      TMessage msg = iprot_.readMessageBegin();
329
      if (msg.type == TMessageType.EXCEPTION) {
330
        TApplicationException x = TApplicationException.read(iprot_);
331
        iprot_.readMessageEnd();
332
        throw x;
333
      }
334
      closeSession_result result = new closeSession_result();
335
      result.read(iprot_);
336
      iprot_.readMessageEnd();
337
      return;
338
    }
339
 
132 ashish 340
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 341
    {
342
      send_createTransaction(transaction);
132 ashish 343
      return recv_createTransaction();
68 ashish 344
    }
345
 
346
    public void send_createTransaction(Transaction transaction) throws TException
347
    {
348
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
349
      createTransaction_args args = new createTransaction_args();
350
      args.transaction = transaction;
351
      args.write(oprot_);
352
      oprot_.writeMessageEnd();
353
      oprot_.getTransport().flush();
354
    }
355
 
132 ashish 356
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 357
    {
358
      TMessage msg = iprot_.readMessageBegin();
359
      if (msg.type == TMessageType.EXCEPTION) {
360
        TApplicationException x = TApplicationException.read(iprot_);
361
        iprot_.readMessageEnd();
362
        throw x;
363
      }
364
      createTransaction_result result = new createTransaction_result();
365
      result.read(iprot_);
366
      iprot_.readMessageEnd();
132 ashish 367
      if (result.isSetSuccess()) {
368
        return result.success;
369
      }
68 ashish 370
      if (result.ex != null) {
371
        throw result.ex;
372
      }
132 ashish 373
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 374
    }
375
 
376
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
377
    {
378
      send_getTransaction(id);
379
      return recv_getTransaction();
380
    }
381
 
382
    public void send_getTransaction(long id) throws TException
383
    {
384
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
385
      getTransaction_args args = new getTransaction_args();
386
      args.id = id;
387
      args.write(oprot_);
388
      oprot_.writeMessageEnd();
389
      oprot_.getTransport().flush();
390
    }
391
 
392
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
393
    {
394
      TMessage msg = iprot_.readMessageBegin();
395
      if (msg.type == TMessageType.EXCEPTION) {
396
        TApplicationException x = TApplicationException.read(iprot_);
397
        iprot_.readMessageEnd();
398
        throw x;
399
      }
400
      getTransaction_result result = new getTransaction_result();
401
      result.read(iprot_);
402
      iprot_.readMessageEnd();
403
      if (result.isSetSuccess()) {
404
        return result.success;
405
      }
406
      if (result.ex != null) {
407
        throw result.ex;
408
      }
409
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
410
    }
411
 
132 ashish 412
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 413
    {
132 ashish 414
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 415
      return recv_getTransactionsForCustomer();
416
    }
417
 
132 ashish 418
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 419
    {
420
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
421
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
422
      args.customerId = customerId;
132 ashish 423
      args.from_date = from_date;
424
      args.to_date = to_date;
68 ashish 425
      args.status = status;
426
      args.write(oprot_);
427
      oprot_.writeMessageEnd();
428
      oprot_.getTransport().flush();
429
    }
430
 
431
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
432
    {
433
      TMessage msg = iprot_.readMessageBegin();
434
      if (msg.type == TMessageType.EXCEPTION) {
435
        TApplicationException x = TApplicationException.read(iprot_);
436
        iprot_.readMessageEnd();
437
        throw x;
438
      }
439
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
440
      result.read(iprot_);
441
      iprot_.readMessageEnd();
442
      if (result.isSetSuccess()) {
443
        return result.success;
444
      }
445
      if (result.ex != null) {
446
        throw result.ex;
447
      }
448
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
449
    }
450
 
132 ashish 451
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
452
    {
453
      send_getTransactionsForShoppingCartId(shoppingCartId);
454
      return recv_getTransactionsForShoppingCartId();
455
    }
456
 
457
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
458
    {
459
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
460
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
461
      args.shoppingCartId = shoppingCartId;
462
      args.write(oprot_);
463
      oprot_.writeMessageEnd();
464
      oprot_.getTransport().flush();
465
    }
466
 
467
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
468
    {
469
      TMessage msg = iprot_.readMessageBegin();
470
      if (msg.type == TMessageType.EXCEPTION) {
471
        TApplicationException x = TApplicationException.read(iprot_);
472
        iprot_.readMessageEnd();
473
        throw x;
474
      }
475
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
476
      result.read(iprot_);
477
      iprot_.readMessageEnd();
478
      if (result.isSetSuccess()) {
479
        return result.success;
480
      }
481
      if (result.ex != null) {
482
        throw result.ex;
483
      }
484
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
485
    }
486
 
68 ashish 487
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
488
    {
489
      send_getTransactionStatus(transactionId);
490
      return recv_getTransactionStatus();
491
    }
492
 
493
    public void send_getTransactionStatus(long transactionId) throws TException
494
    {
495
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
496
      getTransactionStatus_args args = new getTransactionStatus_args();
497
      args.transactionId = transactionId;
498
      args.write(oprot_);
499
      oprot_.writeMessageEnd();
500
      oprot_.getTransport().flush();
501
    }
502
 
503
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
504
    {
505
      TMessage msg = iprot_.readMessageBegin();
506
      if (msg.type == TMessageType.EXCEPTION) {
507
        TApplicationException x = TApplicationException.read(iprot_);
508
        iprot_.readMessageEnd();
509
        throw x;
510
      }
511
      getTransactionStatus_result result = new getTransactionStatus_result();
512
      result.read(iprot_);
513
      iprot_.readMessageEnd();
514
      if (result.isSetSuccess()) {
515
        return result.success;
516
      }
517
      if (result.ex != null) {
518
        throw result.ex;
519
      }
520
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
521
    }
522
 
523
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
524
    {
525
      send_changeTransactionStatus(transactionId, status, description);
526
      return recv_changeTransactionStatus();
527
    }
528
 
529
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
530
    {
531
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
532
      changeTransactionStatus_args args = new changeTransactionStatus_args();
533
      args.transactionId = transactionId;
534
      args.status = status;
535
      args.description = description;
536
      args.write(oprot_);
537
      oprot_.writeMessageEnd();
538
      oprot_.getTransport().flush();
539
    }
540
 
541
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
542
    {
543
      TMessage msg = iprot_.readMessageBegin();
544
      if (msg.type == TMessageType.EXCEPTION) {
545
        TApplicationException x = TApplicationException.read(iprot_);
546
        iprot_.readMessageEnd();
547
        throw x;
548
      }
549
      changeTransactionStatus_result result = new changeTransactionStatus_result();
550
      result.read(iprot_);
551
      iprot_.readMessageEnd();
552
      if (result.isSetSuccess()) {
553
        return result.success;
554
      }
555
      if (result.ex != null) {
556
        throw result.ex;
557
      }
558
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
559
    }
560
 
1398 varun.gupt 561
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 562
    {
1398 varun.gupt 563
      send_enqueueTransactionInfoEmail(transactionId);
564
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 565
    }
566
 
1398 varun.gupt 567
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 568
    {
1398 varun.gupt 569
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
570
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 571
      args.transactionId = transactionId;
572
      args.write(oprot_);
573
      oprot_.writeMessageEnd();
574
      oprot_.getTransport().flush();
575
    }
576
 
1398 varun.gupt 577
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 578
    {
579
      TMessage msg = iprot_.readMessageBegin();
580
      if (msg.type == TMessageType.EXCEPTION) {
581
        TApplicationException x = TApplicationException.read(iprot_);
582
        iprot_.readMessageEnd();
583
        throw x;
584
      }
1398 varun.gupt 585
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 586
      result.read(iprot_);
587
      iprot_.readMessageEnd();
588
      if (result.isSetSuccess()) {
589
        return result.success;
590
      }
591
      if (result.ex != null) {
592
        throw result.ex;
593
      }
1398 varun.gupt 594
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 595
    }
596
 
483 rajveer 597
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 598
    {
483 rajveer 599
      send_getAllOrders(status, from_date, to_date, warehouse_id);
600
      return recv_getAllOrders();
68 ashish 601
    }
602
 
483 rajveer 603
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 604
    {
483 rajveer 605
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
606
      getAllOrders_args args = new getAllOrders_args();
607
      args.status = status;
608
      args.from_date = from_date;
609
      args.to_date = to_date;
610
      args.warehouse_id = warehouse_id;
68 ashish 611
      args.write(oprot_);
612
      oprot_.writeMessageEnd();
613
      oprot_.getTransport().flush();
614
    }
615
 
483 rajveer 616
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 617
    {
618
      TMessage msg = iprot_.readMessageBegin();
619
      if (msg.type == TMessageType.EXCEPTION) {
620
        TApplicationException x = TApplicationException.read(iprot_);
621
        iprot_.readMessageEnd();
622
        throw x;
623
      }
483 rajveer 624
      getAllOrders_result result = new getAllOrders_result();
68 ashish 625
      result.read(iprot_);
626
      iprot_.readMessageEnd();
627
      if (result.isSetSuccess()) {
628
        return result.success;
629
      }
630
      if (result.ex != null) {
631
        throw result.ex;
632
      }
483 rajveer 633
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 634
    }
635
 
1022 varun.gupt 636
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
637
    {
638
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
639
      return recv_getOrdersByBillingDate();
640
    }
641
 
642
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
643
    {
644
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
645
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
646
      args.status = status;
647
      args.start_billing_date = start_billing_date;
648
      args.end_billing_date = end_billing_date;
649
      args.warehouse_id = warehouse_id;
650
      args.write(oprot_);
651
      oprot_.writeMessageEnd();
652
      oprot_.getTransport().flush();
653
    }
654
 
655
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
656
    {
657
      TMessage msg = iprot_.readMessageBegin();
658
      if (msg.type == TMessageType.EXCEPTION) {
659
        TApplicationException x = TApplicationException.read(iprot_);
660
        iprot_.readMessageEnd();
661
        throw x;
662
      }
663
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
664
      result.read(iprot_);
665
      iprot_.readMessageEnd();
666
      if (result.isSetSuccess()) {
667
        return result.success;
668
      }
669
      if (result.ex != null) {
670
        throw result.ex;
671
      }
672
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
673
    }
674
 
1382 varun.gupt 675
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
676
    {
677
      send_getReturnableOrdersForCustomer(customer_id, limit);
678
      return recv_getReturnableOrdersForCustomer();
679
    }
680
 
681
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
682
    {
683
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
684
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
685
      args.customer_id = customer_id;
686
      args.limit = limit;
687
      args.write(oprot_);
688
      oprot_.writeMessageEnd();
689
      oprot_.getTransport().flush();
690
    }
691
 
692
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
693
    {
694
      TMessage msg = iprot_.readMessageBegin();
695
      if (msg.type == TMessageType.EXCEPTION) {
696
        TApplicationException x = TApplicationException.read(iprot_);
697
        iprot_.readMessageEnd();
698
        throw x;
699
      }
700
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
701
      result.read(iprot_);
702
      iprot_.readMessageEnd();
703
      if (result.isSetSuccess()) {
704
        return result.success;
705
      }
706
      if (result.ex != null) {
707
        throw result.ex;
708
      }
709
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
710
    }
711
 
712
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
713
    {
714
      send_getCancellableOrdersForCustomer(customer_id, limit);
715
      return recv_getCancellableOrdersForCustomer();
716
    }
717
 
718
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
719
    {
720
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
721
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
722
      args.customer_id = customer_id;
723
      args.limit = limit;
724
      args.write(oprot_);
725
      oprot_.writeMessageEnd();
726
      oprot_.getTransport().flush();
727
    }
728
 
729
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
730
    {
731
      TMessage msg = iprot_.readMessageBegin();
732
      if (msg.type == TMessageType.EXCEPTION) {
733
        TApplicationException x = TApplicationException.read(iprot_);
734
        iprot_.readMessageEnd();
735
        throw x;
736
      }
737
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
738
      result.read(iprot_);
739
      iprot_.readMessageEnd();
740
      if (result.isSetSuccess()) {
741
        return result.success;
742
      }
743
      if (result.ex != null) {
744
        throw result.ex;
745
      }
746
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
747
    }
748
 
483 rajveer 749
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 750
    {
483 rajveer 751
      send_changeOrderStatus(orderId, status, description);
752
      return recv_changeOrderStatus();
68 ashish 753
    }
754
 
483 rajveer 755
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 756
    {
483 rajveer 757
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
758
      changeOrderStatus_args args = new changeOrderStatus_args();
759
      args.orderId = orderId;
760
      args.status = status;
761
      args.description = description;
68 ashish 762
      args.write(oprot_);
763
      oprot_.writeMessageEnd();
764
      oprot_.getTransport().flush();
765
    }
766
 
483 rajveer 767
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 768
    {
769
      TMessage msg = iprot_.readMessageBegin();
770
      if (msg.type == TMessageType.EXCEPTION) {
771
        TApplicationException x = TApplicationException.read(iprot_);
772
        iprot_.readMessageEnd();
773
        throw x;
774
      }
483 rajveer 775
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 776
      result.read(iprot_);
777
      iprot_.readMessageEnd();
778
      if (result.isSetSuccess()) {
779
        return result.success;
780
      }
781
      if (result.ex != null) {
782
        throw result.ex;
783
      }
483 rajveer 784
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 785
    }
786
 
1148 chandransh 787
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 788
    {
1148 chandransh 789
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 790
      return recv_addBillingDetails();
791
    }
792
 
1148 chandransh 793
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 794
    {
795
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
796
      addBillingDetails_args args = new addBillingDetails_args();
797
      args.orderId = orderId;
798
      args.invoice_number = invoice_number;
799
      args.billed_by = billed_by;
800
      args.write(oprot_);
801
      oprot_.writeMessageEnd();
802
      oprot_.getTransport().flush();
803
    }
804
 
805
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
806
    {
807
      TMessage msg = iprot_.readMessageBegin();
808
      if (msg.type == TMessageType.EXCEPTION) {
809
        TApplicationException x = TApplicationException.read(iprot_);
810
        iprot_.readMessageEnd();
811
        throw x;
812
      }
813
      addBillingDetails_result result = new addBillingDetails_result();
814
      result.read(iprot_);
815
      iprot_.readMessageEnd();
816
      if (result.isSetSuccess()) {
817
        return result.success;
818
      }
819
      if (result.ex != null) {
820
        throw result.ex;
821
      }
822
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
823
    }
824
 
2383 rajveer 825
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
1148 chandransh 826
    {
2383 rajveer 827
      send_addJacketNumber(orderId, jacketNumber);
1148 chandransh 828
      return recv_addJacketNumber();
829
    }
830
 
2383 rajveer 831
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
1148 chandransh 832
    {
833
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
834
      addJacketNumber_args args = new addJacketNumber_args();
835
      args.orderId = orderId;
836
      args.jacketNumber = jacketNumber;
837
      args.write(oprot_);
838
      oprot_.writeMessageEnd();
839
      oprot_.getTransport().flush();
840
    }
841
 
842
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
843
    {
844
      TMessage msg = iprot_.readMessageBegin();
845
      if (msg.type == TMessageType.EXCEPTION) {
846
        TApplicationException x = TApplicationException.read(iprot_);
847
        iprot_.readMessageEnd();
848
        throw x;
849
      }
850
      addJacketNumber_result result = new addJacketNumber_result();
851
      result.read(iprot_);
852
      iprot_.readMessageEnd();
853
      if (result.isSetSuccess()) {
854
        return result.success;
855
      }
856
      if (result.ex != null) {
857
        throw result.ex;
858
      }
859
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
860
    }
861
 
923 rajveer 862
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
863
    {
864
      send_acceptOrder(orderId);
865
      return recv_acceptOrder();
866
    }
867
 
868
    public void send_acceptOrder(long orderId) throws TException
869
    {
870
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
871
      acceptOrder_args args = new acceptOrder_args();
872
      args.orderId = orderId;
873
      args.write(oprot_);
874
      oprot_.writeMessageEnd();
875
      oprot_.getTransport().flush();
876
    }
877
 
878
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
879
    {
880
      TMessage msg = iprot_.readMessageBegin();
881
      if (msg.type == TMessageType.EXCEPTION) {
882
        TApplicationException x = TApplicationException.read(iprot_);
883
        iprot_.readMessageEnd();
884
        throw x;
885
      }
886
      acceptOrder_result result = new acceptOrder_result();
887
      result.read(iprot_);
888
      iprot_.readMessageEnd();
889
      if (result.isSetSuccess()) {
890
        return result.success;
891
      }
892
      if (result.ex != null) {
893
        throw result.ex;
894
      }
895
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
896
    }
897
 
898
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
899
    {
900
      send_billOrder(orderId);
901
      return recv_billOrder();
902
    }
903
 
904
    public void send_billOrder(long orderId) throws TException
905
    {
906
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
907
      billOrder_args args = new billOrder_args();
908
      args.orderId = orderId;
909
      args.write(oprot_);
910
      oprot_.writeMessageEnd();
911
      oprot_.getTransport().flush();
912
    }
913
 
914
    public boolean recv_billOrder() throws TransactionServiceException, TException
915
    {
916
      TMessage msg = iprot_.readMessageBegin();
917
      if (msg.type == TMessageType.EXCEPTION) {
918
        TApplicationException x = TApplicationException.read(iprot_);
919
        iprot_.readMessageEnd();
920
        throw x;
921
      }
922
      billOrder_result result = new billOrder_result();
923
      result.read(iprot_);
924
      iprot_.readMessageEnd();
925
      if (result.isSetSuccess()) {
926
        return result.success;
927
      }
928
      if (result.ex != null) {
929
        throw result.ex;
930
      }
931
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
932
    }
933
 
1529 ankur.sing 934
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 935
    {
1529 ankur.sing 936
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 937
      return recv_getOrdersForTransaction();
68 ashish 938
    }
939
 
1529 ankur.sing 940
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 941
    {
483 rajveer 942
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
943
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 944
      args.transactionId = transactionId;
1529 ankur.sing 945
      args.customerId = customerId;
68 ashish 946
      args.write(oprot_);
947
      oprot_.writeMessageEnd();
948
      oprot_.getTransport().flush();
949
    }
950
 
483 rajveer 951
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 952
    {
953
      TMessage msg = iprot_.readMessageBegin();
954
      if (msg.type == TMessageType.EXCEPTION) {
955
        TApplicationException x = TApplicationException.read(iprot_);
956
        iprot_.readMessageEnd();
957
        throw x;
958
      }
483 rajveer 959
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 960
      result.read(iprot_);
961
      iprot_.readMessageEnd();
962
      if (result.isSetSuccess()) {
963
        return result.success;
964
      }
965
      if (result.ex != null) {
966
        throw result.ex;
967
      }
483 rajveer 968
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 969
    }
970
 
483 rajveer 971
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 972
    {
483 rajveer 973
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
974
      return recv_getOrdersForCustomer();
68 ashish 975
    }
976
 
483 rajveer 977
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 978
    {
483 rajveer 979
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
980
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
981
      args.customerId = customerId;
982
      args.from_date = from_date;
983
      args.to_date = to_date;
984
      args.status = status;
68 ashish 985
      args.write(oprot_);
986
      oprot_.writeMessageEnd();
987
      oprot_.getTransport().flush();
988
    }
989
 
483 rajveer 990
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 991
    {
992
      TMessage msg = iprot_.readMessageBegin();
993
      if (msg.type == TMessageType.EXCEPTION) {
994
        TApplicationException x = TApplicationException.read(iprot_);
995
        iprot_.readMessageEnd();
996
        throw x;
997
      }
483 rajveer 998
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 999
      result.read(iprot_);
1000
      iprot_.readMessageEnd();
1001
      if (result.isSetSuccess()) {
1002
        return result.success;
1003
      }
1004
      if (result.ex != null) {
1005
        throw result.ex;
1006
      }
483 rajveer 1007
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 1008
    }
1009
 
483 rajveer 1010
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 1011
    {
483 rajveer 1012
      send_createOrder(order);
1013
      return recv_createOrder();
68 ashish 1014
    }
1015
 
483 rajveer 1016
    public void send_createOrder(Order order) throws TException
68 ashish 1017
    {
483 rajveer 1018
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
1019
      createOrder_args args = new createOrder_args();
1020
      args.order = order;
68 ashish 1021
      args.write(oprot_);
1022
      oprot_.writeMessageEnd();
1023
      oprot_.getTransport().flush();
1024
    }
1025
 
483 rajveer 1026
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 1027
    {
1028
      TMessage msg = iprot_.readMessageBegin();
1029
      if (msg.type == TMessageType.EXCEPTION) {
1030
        TApplicationException x = TApplicationException.read(iprot_);
1031
        iprot_.readMessageEnd();
1032
        throw x;
1033
      }
483 rajveer 1034
      createOrder_result result = new createOrder_result();
68 ashish 1035
      result.read(iprot_);
1036
      iprot_.readMessageEnd();
1037
      if (result.isSetSuccess()) {
1038
        return result.success;
1039
      }
1040
      if (result.ex != null) {
1041
        throw result.ex;
1042
      }
483 rajveer 1043
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 1044
    }
1045
 
483 rajveer 1046
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 1047
    {
483 rajveer 1048
      send_getOrder(id);
1049
      return recv_getOrder();
68 ashish 1050
    }
1051
 
483 rajveer 1052
    public void send_getOrder(long id) throws TException
68 ashish 1053
    {
483 rajveer 1054
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
1055
      getOrder_args args = new getOrder_args();
1056
      args.id = id;
68 ashish 1057
      args.write(oprot_);
1058
      oprot_.writeMessageEnd();
1059
      oprot_.getTransport().flush();
1060
    }
1061
 
483 rajveer 1062
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 1063
    {
1064
      TMessage msg = iprot_.readMessageBegin();
1065
      if (msg.type == TMessageType.EXCEPTION) {
1066
        TApplicationException x = TApplicationException.read(iprot_);
1067
        iprot_.readMessageEnd();
1068
        throw x;
1069
      }
483 rajveer 1070
      getOrder_result result = new getOrder_result();
68 ashish 1071
      result.read(iprot_);
1072
      iprot_.readMessageEnd();
1073
      if (result.isSetSuccess()) {
1074
        return result.success;
1075
      }
1076
      if (result.ex != null) {
1077
        throw result.ex;
1078
      }
483 rajveer 1079
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1080
    }
1081
 
483 rajveer 1082
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1083
    {
483 rajveer 1084
      send_getLineItemsForOrder(orderId);
1085
      return recv_getLineItemsForOrder();
68 ashish 1086
    }
1087
 
483 rajveer 1088
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1089
    {
483 rajveer 1090
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1091
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1092
      args.orderId = orderId;
68 ashish 1093
      args.write(oprot_);
1094
      oprot_.writeMessageEnd();
1095
      oprot_.getTransport().flush();
1096
    }
1097
 
483 rajveer 1098
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1099
    {
1100
      TMessage msg = iprot_.readMessageBegin();
1101
      if (msg.type == TMessageType.EXCEPTION) {
1102
        TApplicationException x = TApplicationException.read(iprot_);
1103
        iprot_.readMessageEnd();
1104
        throw x;
1105
      }
483 rajveer 1106
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1107
      result.read(iprot_);
1108
      iprot_.readMessageEnd();
1109
      if (result.isSetSuccess()) {
1110
        return result.success;
1111
      }
1112
      if (result.ex != null) {
1113
        throw result.ex;
1114
      }
483 rajveer 1115
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1116
    }
1117
 
1529 ankur.sing 1118
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1119
    {
1120
      send_getOrderForCustomer(orderId, customerId);
1121
      return recv_getOrderForCustomer();
1122
    }
1123
 
1124
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1125
    {
1126
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1127
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1128
      args.orderId = orderId;
1129
      args.customerId = customerId;
1130
      args.write(oprot_);
1131
      oprot_.writeMessageEnd();
1132
      oprot_.getTransport().flush();
1133
    }
1134
 
1135
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1136
    {
1137
      TMessage msg = iprot_.readMessageBegin();
1138
      if (msg.type == TMessageType.EXCEPTION) {
1139
        TApplicationException x = TApplicationException.read(iprot_);
1140
        iprot_.readMessageEnd();
1141
        throw x;
1142
      }
1143
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1144
      result.read(iprot_);
1145
      iprot_.readMessageEnd();
1146
      if (result.isSetSuccess()) {
1147
        return result.success;
1148
      }
1149
      if (result.ex != null) {
1150
        throw result.ex;
1151
      }
1152
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1153
    }
1154
 
1221 chandransh 1155
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1156
    {
1157
      send_batchOrders(warehouseId);
1158
      return recv_batchOrders();
1159
    }
1160
 
1161
    public void send_batchOrders(long warehouseId) throws TException
1162
    {
1163
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1164
      batchOrders_args args = new batchOrders_args();
1165
      args.warehouseId = warehouseId;
1166
      args.write(oprot_);
1167
      oprot_.writeMessageEnd();
1168
      oprot_.getTransport().flush();
1169
    }
1170
 
1171
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1172
    {
1173
      TMessage msg = iprot_.readMessageBegin();
1174
      if (msg.type == TMessageType.EXCEPTION) {
1175
        TApplicationException x = TApplicationException.read(iprot_);
1176
        iprot_.readMessageEnd();
1177
        throw x;
1178
      }
1179
      batchOrders_result result = new batchOrders_result();
1180
      result.read(iprot_);
1181
      iprot_.readMessageEnd();
1182
      if (result.isSetSuccess()) {
1183
        return result.success;
1184
      }
1185
      if (result.ex != null) {
1186
        throw result.ex;
1187
      }
1188
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1189
    }
1190
 
1209 chandransh 1191
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1192
    {
1193
      send_markOrderAsOutOfStock(orderId);
1194
      return recv_markOrderAsOutOfStock();
1195
    }
1196
 
1197
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1198
    {
1199
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1200
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1201
      args.orderId = orderId;
1202
      args.write(oprot_);
1203
      oprot_.writeMessageEnd();
1204
      oprot_.getTransport().flush();
1205
    }
1206
 
1207
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1208
    {
1209
      TMessage msg = iprot_.readMessageBegin();
1210
      if (msg.type == TMessageType.EXCEPTION) {
1211
        TApplicationException x = TApplicationException.read(iprot_);
1212
        iprot_.readMessageEnd();
1213
        throw x;
1214
      }
1215
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1216
      result.read(iprot_);
1217
      iprot_.readMessageEnd();
1218
      if (result.isSetSuccess()) {
1219
        return result.success;
1220
      }
1221
      if (result.ex != null) {
1222
        throw result.ex;
1223
      }
1224
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1225
    }
1226
 
758 chandransh 1227
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1228
    {
1229
      send_markOrdersAsManifested(warehouseId, providerId);
1230
      return recv_markOrdersAsManifested();
1231
    }
1232
 
1233
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1234
    {
1235
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1236
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1237
      args.warehouseId = warehouseId;
1238
      args.providerId = providerId;
1239
      args.write(oprot_);
1240
      oprot_.writeMessageEnd();
1241
      oprot_.getTransport().flush();
1242
    }
1243
 
1244
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1245
    {
1246
      TMessage msg = iprot_.readMessageBegin();
1247
      if (msg.type == TMessageType.EXCEPTION) {
1248
        TApplicationException x = TApplicationException.read(iprot_);
1249
        iprot_.readMessageEnd();
1250
        throw x;
1251
      }
1252
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1253
      result.read(iprot_);
1254
      iprot_.readMessageEnd();
1255
      if (result.isSetSuccess()) {
1256
        return result.success;
1257
      }
1258
      if (result.ex != null) {
1259
        throw result.ex;
1260
      }
1261
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1262
    }
1263
 
1245 chandransh 1264
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1265
    {
1266
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1267
      return recv_markOrdersAsPickedUp();
1268
    }
1269
 
1245 chandransh 1270
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1271
    {
1272
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1273
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1274
      args.providerId = providerId;
1275
      args.pickupDetails = pickupDetails;
1276
      args.write(oprot_);
1277
      oprot_.writeMessageEnd();
1278
      oprot_.getTransport().flush();
1279
    }
1280
 
1281
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1282
    {
1283
      TMessage msg = iprot_.readMessageBegin();
1284
      if (msg.type == TMessageType.EXCEPTION) {
1285
        TApplicationException x = TApplicationException.read(iprot_);
1286
        iprot_.readMessageEnd();
1287
        throw x;
1288
      }
1289
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1290
      result.read(iprot_);
1291
      iprot_.readMessageEnd();
1292
      if (result.isSetSuccess()) {
1293
        return result.success;
1294
      }
1295
      if (result.ex != null) {
1296
        throw result.ex;
1297
      }
1298
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1299
    }
1300
 
1133 chandransh 1301
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1302
    {
1303
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1304
      recv_markOrdersAsDelivered();
1305
    }
1306
 
1307
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1308
    {
1309
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1310
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1311
      args.providerId = providerId;
1312
      args.deliveredOrders = deliveredOrders;
1313
      args.write(oprot_);
1314
      oprot_.writeMessageEnd();
1315
      oprot_.getTransport().flush();
1316
    }
1317
 
1318
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1319
    {
1320
      TMessage msg = iprot_.readMessageBegin();
1321
      if (msg.type == TMessageType.EXCEPTION) {
1322
        TApplicationException x = TApplicationException.read(iprot_);
1323
        iprot_.readMessageEnd();
1324
        throw x;
1325
      }
1326
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1327
      result.read(iprot_);
1328
      iprot_.readMessageEnd();
1329
      if (result.ex != null) {
1330
        throw result.ex;
1331
      }
1332
      return;
1333
    }
1334
 
1335
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1336
    {
1337
      send_markOrdersAsFailed(providerId, returnedOrders);
1338
      recv_markOrdersAsFailed();
1339
    }
1340
 
1341
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1342
    {
1343
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1344
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1345
      args.providerId = providerId;
1346
      args.returnedOrders = returnedOrders;
1347
      args.write(oprot_);
1348
      oprot_.writeMessageEnd();
1349
      oprot_.getTransport().flush();
1350
    }
1351
 
1352
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1353
    {
1354
      TMessage msg = iprot_.readMessageBegin();
1355
      if (msg.type == TMessageType.EXCEPTION) {
1356
        TApplicationException x = TApplicationException.read(iprot_);
1357
        iprot_.readMessageEnd();
1358
        throw x;
1359
      }
1360
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1361
      result.read(iprot_);
1362
      iprot_.readMessageEnd();
1363
      if (result.ex != null) {
1364
        throw result.ex;
1365
      }
1366
      return;
1367
    }
1368
 
1245 chandransh 1369
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1370
    {
1371
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1372
      recv_updateNonDeliveryReason();
1373
    }
1374
 
1375
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1376
    {
1377
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1378
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1379
      args.providerId = providerId;
1380
      args.undeliveredOrders = undeliveredOrders;
1381
      args.write(oprot_);
1382
      oprot_.writeMessageEnd();
1383
      oprot_.getTransport().flush();
1384
    }
1385
 
1386
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1387
    {
1388
      TMessage msg = iprot_.readMessageBegin();
1389
      if (msg.type == TMessageType.EXCEPTION) {
1390
        TApplicationException x = TApplicationException.read(iprot_);
1391
        iprot_.readMessageEnd();
1392
        throw x;
1393
      }
1394
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1395
      result.read(iprot_);
1396
      iprot_.readMessageEnd();
1397
      if (result.ex != null) {
1398
        throw result.ex;
1399
      }
1400
      return;
1401
    }
1402
 
1406 ankur.sing 1403
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1404
    {
1405
      send_getUndeliveredOrders(providerId, warehouseId);
1406
      return recv_getUndeliveredOrders();
1407
    }
1408
 
1409
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1410
    {
1411
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1412
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1413
      args.providerId = providerId;
1414
      args.warehouseId = warehouseId;
1415
      args.write(oprot_);
1416
      oprot_.writeMessageEnd();
1417
      oprot_.getTransport().flush();
1418
    }
1419
 
1420
    public List<Order> recv_getUndeliveredOrders() throws TException
1421
    {
1422
      TMessage msg = iprot_.readMessageBegin();
1423
      if (msg.type == TMessageType.EXCEPTION) {
1424
        TApplicationException x = TApplicationException.read(iprot_);
1425
        iprot_.readMessageEnd();
1426
        throw x;
1427
      }
1428
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1429
      result.read(iprot_);
1430
      iprot_.readMessageEnd();
1431
      if (result.isSetSuccess()) {
1432
        return result.success;
1433
      }
1434
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1435
    }
1436
 
483 rajveer 1437
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1438
    {
483 rajveer 1439
      send_getAlerts(orderId, valid);
305 ashish 1440
      return recv_getAlerts();
1441
    }
1442
 
483 rajveer 1443
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1444
    {
1445
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1446
      getAlerts_args args = new getAlerts_args();
483 rajveer 1447
      args.orderId = orderId;
305 ashish 1448
      args.valid = valid;
1449
      args.write(oprot_);
1450
      oprot_.writeMessageEnd();
1451
      oprot_.getTransport().flush();
1452
    }
1453
 
1454
    public List<Alert> recv_getAlerts() throws TException
1455
    {
1456
      TMessage msg = iprot_.readMessageBegin();
1457
      if (msg.type == TMessageType.EXCEPTION) {
1458
        TApplicationException x = TApplicationException.read(iprot_);
1459
        iprot_.readMessageEnd();
1460
        throw x;
1461
      }
1462
      getAlerts_result result = new getAlerts_result();
1463
      result.read(iprot_);
1464
      iprot_.readMessageEnd();
1465
      if (result.isSetSuccess()) {
1466
        return result.success;
1467
      }
1468
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1469
    }
1470
 
483 rajveer 1471
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1472
    {
483 rajveer 1473
      send_setAlert(orderId, unset, type, comment);
305 ashish 1474
      recv_setAlert();
1475
    }
1476
 
483 rajveer 1477
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1478
    {
1479
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1480
      setAlert_args args = new setAlert_args();
483 rajveer 1481
      args.orderId = orderId;
305 ashish 1482
      args.unset = unset;
1483
      args.type = type;
1484
      args.comment = comment;
1485
      args.write(oprot_);
1486
      oprot_.writeMessageEnd();
1487
      oprot_.getTransport().flush();
1488
    }
1489
 
1490
    public void recv_setAlert() throws TException
1491
    {
1492
      TMessage msg = iprot_.readMessageBegin();
1493
      if (msg.type == TMessageType.EXCEPTION) {
1494
        TApplicationException x = TApplicationException.read(iprot_);
1495
        iprot_.readMessageEnd();
1496
        throw x;
1497
      }
1498
      setAlert_result result = new setAlert_result();
1499
      result.read(iprot_);
1500
      iprot_.readMessageEnd();
1501
      return;
1502
    }
1503
 
1598 ankur.sing 1504
    public long getValidOrderCount() throws TException
1505
    {
1506
      send_getValidOrderCount();
1507
      return recv_getValidOrderCount();
1508
    }
1509
 
1510
    public void send_getValidOrderCount() throws TException
1511
    {
1512
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1513
      getValidOrderCount_args args = new getValidOrderCount_args();
1514
      args.write(oprot_);
1515
      oprot_.writeMessageEnd();
1516
      oprot_.getTransport().flush();
1517
    }
1518
 
1519
    public long recv_getValidOrderCount() throws TException
1520
    {
1521
      TMessage msg = iprot_.readMessageBegin();
1522
      if (msg.type == TMessageType.EXCEPTION) {
1523
        TApplicationException x = TApplicationException.read(iprot_);
1524
        iprot_.readMessageEnd();
1525
        throw x;
1526
      }
1527
      getValidOrderCount_result result = new getValidOrderCount_result();
1528
      result.read(iprot_);
1529
      iprot_.readMessageEnd();
1530
      if (result.isSetSuccess()) {
1531
        return result.success;
1532
      }
1533
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1534
    }
1535
 
1629 ankur.sing 1536
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException
1537
    {
1538
      send_getNoOfCustomersWithSuccessfulTransaction();
1539
      return recv_getNoOfCustomersWithSuccessfulTransaction();
1540
    }
1541
 
1542
    public void send_getNoOfCustomersWithSuccessfulTransaction() throws TException
1543
    {
1544
      oprot_.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.CALL, seqid_));
1545
      getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
1546
      args.write(oprot_);
1547
      oprot_.writeMessageEnd();
1548
      oprot_.getTransport().flush();
1549
    }
1550
 
1551
    public long recv_getNoOfCustomersWithSuccessfulTransaction() throws TException
1552
    {
1553
      TMessage msg = iprot_.readMessageBegin();
1554
      if (msg.type == TMessageType.EXCEPTION) {
1555
        TApplicationException x = TApplicationException.read(iprot_);
1556
        iprot_.readMessageEnd();
1557
        throw x;
1558
      }
1559
      getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
1560
      result.read(iprot_);
1561
      iprot_.readMessageEnd();
1562
      if (result.isSetSuccess()) {
1563
        return result.success;
1564
      }
1565
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1566
    }
1567
 
1731 ankur.sing 1568
    public List<Double> getValidOrdersAmountRange() throws TException
1629 ankur.sing 1569
    {
1731 ankur.sing 1570
      send_getValidOrdersAmountRange();
1571
      return recv_getValidOrdersAmountRange();
1629 ankur.sing 1572
    }
1573
 
1731 ankur.sing 1574
    public void send_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1575
    {
1731 ankur.sing 1576
      oprot_.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.CALL, seqid_));
1577
      getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 1578
      args.write(oprot_);
1579
      oprot_.writeMessageEnd();
1580
      oprot_.getTransport().flush();
1581
    }
1582
 
1731 ankur.sing 1583
    public List<Double> recv_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1584
    {
1585
      TMessage msg = iprot_.readMessageBegin();
1586
      if (msg.type == TMessageType.EXCEPTION) {
1587
        TApplicationException x = TApplicationException.read(iprot_);
1588
        iprot_.readMessageEnd();
1589
        throw x;
1590
      }
1731 ankur.sing 1591
      getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
1629 ankur.sing 1592
      result.read(iprot_);
1593
      iprot_.readMessageEnd();
1594
      if (result.isSetSuccess()) {
1595
        return result.success;
1596
      }
1731 ankur.sing 1597
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1629 ankur.sing 1598
    }
1599
 
1886 ankur.sing 1600
    public List<Order> getValidOrders(long limit) throws TException
1601
    {
1602
      send_getValidOrders(limit);
1603
      return recv_getValidOrders();
1604
    }
1605
 
1606
    public void send_getValidOrders(long limit) throws TException
1607
    {
1608
      oprot_.writeMessageBegin(new TMessage("getValidOrders", TMessageType.CALL, seqid_));
1609
      getValidOrders_args args = new getValidOrders_args();
1610
      args.limit = limit;
1611
      args.write(oprot_);
1612
      oprot_.writeMessageEnd();
1613
      oprot_.getTransport().flush();
1614
    }
1615
 
1616
    public List<Order> recv_getValidOrders() throws TException
1617
    {
1618
      TMessage msg = iprot_.readMessageBegin();
1619
      if (msg.type == TMessageType.EXCEPTION) {
1620
        TApplicationException x = TApplicationException.read(iprot_);
1621
        iprot_.readMessageEnd();
1622
        throw x;
1623
      }
1624
      getValidOrders_result result = new getValidOrders_result();
1625
      result.read(iprot_);
1626
      iprot_.readMessageEnd();
1627
      if (result.isSetSuccess()) {
1628
        return result.success;
1629
      }
1630
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1631
    }
1632
 
2538 chandransh 1633
    public boolean toggleDOAFlag(long orderId) throws TransactionServiceException, TException
1634
    {
1635
      send_toggleDOAFlag(orderId);
1636
      return recv_toggleDOAFlag();
1637
    }
1638
 
1639
    public void send_toggleDOAFlag(long orderId) throws TException
1640
    {
1641
      oprot_.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.CALL, seqid_));
1642
      toggleDOAFlag_args args = new toggleDOAFlag_args();
1643
      args.orderId = orderId;
1644
      args.write(oprot_);
1645
      oprot_.writeMessageEnd();
1646
      oprot_.getTransport().flush();
1647
    }
1648
 
1649
    public boolean recv_toggleDOAFlag() throws TransactionServiceException, TException
1650
    {
1651
      TMessage msg = iprot_.readMessageBegin();
1652
      if (msg.type == TMessageType.EXCEPTION) {
1653
        TApplicationException x = TApplicationException.read(iprot_);
1654
        iprot_.readMessageEnd();
1655
        throw x;
1656
      }
1657
      toggleDOAFlag_result result = new toggleDOAFlag_result();
1658
      result.read(iprot_);
1659
      iprot_.readMessageEnd();
1660
      if (result.isSetSuccess()) {
1661
        return result.success;
1662
      }
1663
      if (result.ex != null) {
1664
        throw result.ex;
1665
      }
1666
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");
1667
    }
1668
 
1669
    public boolean requestPickupNumber(long orderId) throws TransactionServiceException, TException
1670
    {
1671
      send_requestPickupNumber(orderId);
1672
      return recv_requestPickupNumber();
1673
    }
1674
 
1675
    public void send_requestPickupNumber(long orderId) throws TException
1676
    {
1677
      oprot_.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.CALL, seqid_));
1678
      requestPickupNumber_args args = new requestPickupNumber_args();
1679
      args.orderId = orderId;
1680
      args.write(oprot_);
1681
      oprot_.writeMessageEnd();
1682
      oprot_.getTransport().flush();
1683
    }
1684
 
1685
    public boolean recv_requestPickupNumber() throws TransactionServiceException, TException
1686
    {
1687
      TMessage msg = iprot_.readMessageBegin();
1688
      if (msg.type == TMessageType.EXCEPTION) {
1689
        TApplicationException x = TApplicationException.read(iprot_);
1690
        iprot_.readMessageEnd();
1691
        throw x;
1692
      }
1693
      requestPickupNumber_result result = new requestPickupNumber_result();
1694
      result.read(iprot_);
1695
      iprot_.readMessageEnd();
1696
      if (result.isSetSuccess()) {
1697
        return result.success;
1698
      }
1699
      if (result.ex != null) {
1700
        throw result.ex;
1701
      }
1702
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");
1703
    }
1704
 
1705
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException
1706
    {
1707
      send_authorizePickup(orderId, pickupNumber);
1708
      return recv_authorizePickup();
1709
    }
1710
 
1711
    public void send_authorizePickup(long orderId, String pickupNumber) throws TException
1712
    {
1713
      oprot_.writeMessageBegin(new TMessage("authorizePickup", TMessageType.CALL, seqid_));
1714
      authorizePickup_args args = new authorizePickup_args();
1715
      args.orderId = orderId;
1716
      args.pickupNumber = pickupNumber;
1717
      args.write(oprot_);
1718
      oprot_.writeMessageEnd();
1719
      oprot_.getTransport().flush();
1720
    }
1721
 
1722
    public boolean recv_authorizePickup() throws TransactionServiceException, TException
1723
    {
1724
      TMessage msg = iprot_.readMessageBegin();
1725
      if (msg.type == TMessageType.EXCEPTION) {
1726
        TApplicationException x = TApplicationException.read(iprot_);
1727
        iprot_.readMessageEnd();
1728
        throw x;
1729
      }
1730
      authorizePickup_result result = new authorizePickup_result();
1731
      result.read(iprot_);
1732
      iprot_.readMessageEnd();
1733
      if (result.isSetSuccess()) {
1734
        return result.success;
1735
      }
1736
      if (result.ex != null) {
1737
        throw result.ex;
1738
      }
1739
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1740
    }
1741
 
2590 chandransh 1742
    public boolean acceptDoa(long orderId) throws TransactionServiceException, TException
1743
    {
1744
      send_acceptDoa(orderId);
1745
      return recv_acceptDoa();
1746
    }
1747
 
1748
    public void send_acceptDoa(long orderId) throws TException
1749
    {
1750
      oprot_.writeMessageBegin(new TMessage("acceptDoa", TMessageType.CALL, seqid_));
1751
      acceptDoa_args args = new acceptDoa_args();
1752
      args.orderId = orderId;
1753
      args.write(oprot_);
1754
      oprot_.writeMessageEnd();
1755
      oprot_.getTransport().flush();
1756
    }
1757
 
1758
    public boolean recv_acceptDoa() throws TransactionServiceException, TException
1759
    {
1760
      TMessage msg = iprot_.readMessageBegin();
1761
      if (msg.type == TMessageType.EXCEPTION) {
1762
        TApplicationException x = TApplicationException.read(iprot_);
1763
        iprot_.readMessageEnd();
1764
        throw x;
1765
      }
1766
      acceptDoa_result result = new acceptDoa_result();
1767
      result.read(iprot_);
1768
      iprot_.readMessageEnd();
1769
      if (result.isSetSuccess()) {
1770
        return result.success;
1771
      }
1772
      if (result.ex != null) {
1773
        throw result.ex;
1774
      }
1775
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptDoa failed: unknown result");
1776
    }
1777
 
1778
    public boolean validateDoa(long orderId, boolean isValid) throws TransactionServiceException, TException
1779
    {
1780
      send_validateDoa(orderId, isValid);
1781
      return recv_validateDoa();
1782
    }
1783
 
1784
    public void send_validateDoa(long orderId, boolean isValid) throws TException
1785
    {
1786
      oprot_.writeMessageBegin(new TMessage("validateDoa", TMessageType.CALL, seqid_));
1787
      validateDoa_args args = new validateDoa_args();
1788
      args.orderId = orderId;
1789
      args.isValid = isValid;
1790
      args.write(oprot_);
1791
      oprot_.writeMessageEnd();
1792
      oprot_.getTransport().flush();
1793
    }
1794
 
1795
    public boolean recv_validateDoa() throws TransactionServiceException, TException
1796
    {
1797
      TMessage msg = iprot_.readMessageBegin();
1798
      if (msg.type == TMessageType.EXCEPTION) {
1799
        TApplicationException x = TApplicationException.read(iprot_);
1800
        iprot_.readMessageEnd();
1801
        throw x;
1802
      }
1803
      validateDoa_result result = new validateDoa_result();
1804
      result.read(iprot_);
1805
      iprot_.readMessageEnd();
1806
      if (result.isSetSuccess()) {
1807
        return result.success;
1808
      }
1809
      if (result.ex != null) {
1810
        throw result.ex;
1811
      }
1812
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "validateDoa failed: unknown result");
1813
    }
1814
 
68 ashish 1815
  }
1816
  public static class Processor implements TProcessor {
1817
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1818
    public Processor(Iface iface)
1819
    {
1820
      iface_ = iface;
764 rajveer 1821
      processMap_.put("closeSession", new closeSession());
68 ashish 1822
      processMap_.put("createTransaction", new createTransaction());
1823
      processMap_.put("getTransaction", new getTransaction());
1824
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1825
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1826
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1827
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1828
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1829
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1830
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1831
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1832
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1833
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1834
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1835
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1836
      processMap_.put("acceptOrder", new acceptOrder());
1837
      processMap_.put("billOrder", new billOrder());
483 rajveer 1838
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1839
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1840
      processMap_.put("createOrder", new createOrder());
1841
      processMap_.put("getOrder", new getOrder());
1842
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 1843
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 1844
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1845
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1846
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1847
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1848
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1849
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1850
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1851
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1852
      processMap_.put("getAlerts", new getAlerts());
1853
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 1854
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1629 ankur.sing 1855
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1731 ankur.sing 1856
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1886 ankur.sing 1857
      processMap_.put("getValidOrders", new getValidOrders());
2538 chandransh 1858
      processMap_.put("toggleDOAFlag", new toggleDOAFlag());
1859
      processMap_.put("requestPickupNumber", new requestPickupNumber());
1860
      processMap_.put("authorizePickup", new authorizePickup());
2590 chandransh 1861
      processMap_.put("acceptDoa", new acceptDoa());
1862
      processMap_.put("validateDoa", new validateDoa());
68 ashish 1863
    }
1864
 
1865
    protected static interface ProcessFunction {
1866
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1867
    }
1868
 
1869
    private Iface iface_;
1870
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1871
 
1872
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1873
    {
1874
      TMessage msg = iprot.readMessageBegin();
1875
      ProcessFunction fn = processMap_.get(msg.name);
1876
      if (fn == null) {
1877
        TProtocolUtil.skip(iprot, TType.STRUCT);
1878
        iprot.readMessageEnd();
1879
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1880
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1881
        x.write(oprot);
1882
        oprot.writeMessageEnd();
1883
        oprot.getTransport().flush();
1884
        return true;
1885
      }
1886
      fn.process(msg.seqid, iprot, oprot);
1887
      return true;
1888
    }
1889
 
764 rajveer 1890
    private class closeSession implements ProcessFunction {
1891
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1892
      {
1893
        closeSession_args args = new closeSession_args();
1894
        args.read(iprot);
1895
        iprot.readMessageEnd();
1896
        closeSession_result result = new closeSession_result();
1897
        iface_.closeSession();
1898
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1899
        result.write(oprot);
1900
        oprot.writeMessageEnd();
1901
        oprot.getTransport().flush();
1902
      }
1903
 
1904
    }
1905
 
68 ashish 1906
    private class createTransaction implements ProcessFunction {
1907
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1908
      {
1909
        createTransaction_args args = new createTransaction_args();
1910
        args.read(iprot);
1911
        iprot.readMessageEnd();
1912
        createTransaction_result result = new createTransaction_result();
1913
        try {
132 ashish 1914
          result.success = iface_.createTransaction(args.transaction);
1915
          result.setSuccessIsSet(true);
68 ashish 1916
        } catch (TransactionServiceException ex) {
1917
          result.ex = ex;
1918
        } catch (Throwable th) {
1919
          LOGGER.error("Internal error processing createTransaction", th);
1920
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1921
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1922
          x.write(oprot);
1923
          oprot.writeMessageEnd();
1924
          oprot.getTransport().flush();
1925
          return;
1926
        }
1927
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1928
        result.write(oprot);
1929
        oprot.writeMessageEnd();
1930
        oprot.getTransport().flush();
1931
      }
1932
 
1933
    }
1934
 
1935
    private class getTransaction implements ProcessFunction {
1936
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1937
      {
1938
        getTransaction_args args = new getTransaction_args();
1939
        args.read(iprot);
1940
        iprot.readMessageEnd();
1941
        getTransaction_result result = new getTransaction_result();
1942
        try {
1943
          result.success = iface_.getTransaction(args.id);
1944
        } catch (TransactionServiceException ex) {
1945
          result.ex = ex;
1946
        } catch (Throwable th) {
1947
          LOGGER.error("Internal error processing getTransaction", th);
1948
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1949
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1950
          x.write(oprot);
1951
          oprot.writeMessageEnd();
1952
          oprot.getTransport().flush();
1953
          return;
1954
        }
1955
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1956
        result.write(oprot);
1957
        oprot.writeMessageEnd();
1958
        oprot.getTransport().flush();
1959
      }
1960
 
1961
    }
1962
 
1963
    private class getTransactionsForCustomer implements ProcessFunction {
1964
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1965
      {
1966
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1967
        args.read(iprot);
1968
        iprot.readMessageEnd();
1969
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1970
        try {
132 ashish 1971
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1972
        } catch (TransactionServiceException ex) {
1973
          result.ex = ex;
1974
        } catch (Throwable th) {
1975
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1976
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1977
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1978
          x.write(oprot);
1979
          oprot.writeMessageEnd();
1980
          oprot.getTransport().flush();
1981
          return;
1982
        }
1983
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1984
        result.write(oprot);
1985
        oprot.writeMessageEnd();
1986
        oprot.getTransport().flush();
1987
      }
1988
 
1989
    }
1990
 
132 ashish 1991
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1992
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1993
      {
1994
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1995
        args.read(iprot);
1996
        iprot.readMessageEnd();
1997
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1998
        try {
1999
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
2000
        } catch (TransactionServiceException ex) {
2001
          result.ex = ex;
2002
        } catch (Throwable th) {
2003
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
2004
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
2005
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
2006
          x.write(oprot);
2007
          oprot.writeMessageEnd();
2008
          oprot.getTransport().flush();
2009
          return;
2010
        }
2011
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
2012
        result.write(oprot);
2013
        oprot.writeMessageEnd();
2014
        oprot.getTransport().flush();
2015
      }
2016
 
2017
    }
2018
 
68 ashish 2019
    private class getTransactionStatus implements ProcessFunction {
2020
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2021
      {
2022
        getTransactionStatus_args args = new getTransactionStatus_args();
2023
        args.read(iprot);
2024
        iprot.readMessageEnd();
2025
        getTransactionStatus_result result = new getTransactionStatus_result();
2026
        try {
2027
          result.success = iface_.getTransactionStatus(args.transactionId);
2028
        } catch (TransactionServiceException ex) {
2029
          result.ex = ex;
2030
        } catch (Throwable th) {
2031
          LOGGER.error("Internal error processing getTransactionStatus", th);
2032
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
2033
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
2034
          x.write(oprot);
2035
          oprot.writeMessageEnd();
2036
          oprot.getTransport().flush();
2037
          return;
2038
        }
2039
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
2040
        result.write(oprot);
2041
        oprot.writeMessageEnd();
2042
        oprot.getTransport().flush();
2043
      }
2044
 
2045
    }
2046
 
2047
    private class changeTransactionStatus implements ProcessFunction {
2048
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2049
      {
2050
        changeTransactionStatus_args args = new changeTransactionStatus_args();
2051
        args.read(iprot);
2052
        iprot.readMessageEnd();
2053
        changeTransactionStatus_result result = new changeTransactionStatus_result();
2054
        try {
2055
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
2056
          result.setSuccessIsSet(true);
2057
        } catch (TransactionServiceException ex) {
2058
          result.ex = ex;
2059
        } catch (Throwable th) {
2060
          LOGGER.error("Internal error processing changeTransactionStatus", th);
2061
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
2062
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
2063
          x.write(oprot);
2064
          oprot.writeMessageEnd();
2065
          oprot.getTransport().flush();
2066
          return;
2067
        }
2068
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
2069
        result.write(oprot);
2070
        oprot.writeMessageEnd();
2071
        oprot.getTransport().flush();
2072
      }
2073
 
2074
    }
2075
 
1398 varun.gupt 2076
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 2077
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2078
      {
1398 varun.gupt 2079
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 2080
        args.read(iprot);
2081
        iprot.readMessageEnd();
1398 varun.gupt 2082
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 2083
        try {
1398 varun.gupt 2084
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 2085
          result.setSuccessIsSet(true);
2086
        } catch (TransactionServiceException ex) {
2087
          result.ex = ex;
2088
        } catch (Throwable th) {
1398 varun.gupt 2089
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
2090
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
2091
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 2092
          x.write(oprot);
2093
          oprot.writeMessageEnd();
2094
          oprot.getTransport().flush();
2095
          return;
2096
        }
1398 varun.gupt 2097
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 2098
        result.write(oprot);
2099
        oprot.writeMessageEnd();
2100
        oprot.getTransport().flush();
2101
      }
2102
 
2103
    }
2104
 
483 rajveer 2105
    private class getAllOrders implements ProcessFunction {
68 ashish 2106
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2107
      {
483 rajveer 2108
        getAllOrders_args args = new getAllOrders_args();
68 ashish 2109
        args.read(iprot);
2110
        iprot.readMessageEnd();
483 rajveer 2111
        getAllOrders_result result = new getAllOrders_result();
68 ashish 2112
        try {
483 rajveer 2113
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 2114
        } catch (TransactionServiceException ex) {
2115
          result.ex = ex;
2116
        } catch (Throwable th) {
483 rajveer 2117
          LOGGER.error("Internal error processing getAllOrders", th);
2118
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
2119
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 2120
          x.write(oprot);
2121
          oprot.writeMessageEnd();
2122
          oprot.getTransport().flush();
2123
          return;
2124
        }
483 rajveer 2125
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 2126
        result.write(oprot);
2127
        oprot.writeMessageEnd();
2128
        oprot.getTransport().flush();
2129
      }
2130
 
2131
    }
2132
 
1022 varun.gupt 2133
    private class getOrdersByBillingDate implements ProcessFunction {
2134
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2135
      {
2136
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
2137
        args.read(iprot);
2138
        iprot.readMessageEnd();
2139
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
2140
        try {
2141
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
2142
        } catch (TransactionServiceException ex) {
2143
          result.ex = ex;
2144
        } catch (Throwable th) {
2145
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
2146
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
2147
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
2148
          x.write(oprot);
2149
          oprot.writeMessageEnd();
2150
          oprot.getTransport().flush();
2151
          return;
2152
        }
2153
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
2154
        result.write(oprot);
2155
        oprot.writeMessageEnd();
2156
        oprot.getTransport().flush();
2157
      }
2158
 
2159
    }
2160
 
1382 varun.gupt 2161
    private class getReturnableOrdersForCustomer implements ProcessFunction {
2162
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2163
      {
2164
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
2165
        args.read(iprot);
2166
        iprot.readMessageEnd();
2167
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
2168
        try {
2169
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
2170
        } catch (TransactionServiceException ex) {
2171
          result.ex = ex;
2172
        } catch (Throwable th) {
2173
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
2174
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
2175
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2176
          x.write(oprot);
2177
          oprot.writeMessageEnd();
2178
          oprot.getTransport().flush();
2179
          return;
2180
        }
2181
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
2182
        result.write(oprot);
2183
        oprot.writeMessageEnd();
2184
        oprot.getTransport().flush();
2185
      }
2186
 
2187
    }
2188
 
2189
    private class getCancellableOrdersForCustomer implements ProcessFunction {
2190
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2191
      {
2192
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
2193
        args.read(iprot);
2194
        iprot.readMessageEnd();
2195
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
2196
        try {
2197
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
2198
        } catch (TransactionServiceException ex) {
2199
          result.ex = ex;
2200
        } catch (Throwable th) {
2201
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
2202
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
2203
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2204
          x.write(oprot);
2205
          oprot.writeMessageEnd();
2206
          oprot.getTransport().flush();
2207
          return;
2208
        }
2209
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
2210
        result.write(oprot);
2211
        oprot.writeMessageEnd();
2212
        oprot.getTransport().flush();
2213
      }
2214
 
2215
    }
2216
 
483 rajveer 2217
    private class changeOrderStatus implements ProcessFunction {
68 ashish 2218
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2219
      {
483 rajveer 2220
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 2221
        args.read(iprot);
2222
        iprot.readMessageEnd();
483 rajveer 2223
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 2224
        try {
483 rajveer 2225
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 2226
          result.setSuccessIsSet(true);
2227
        } catch (TransactionServiceException ex) {
2228
          result.ex = ex;
2229
        } catch (Throwable th) {
483 rajveer 2230
          LOGGER.error("Internal error processing changeOrderStatus", th);
2231
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
2232
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 2233
          x.write(oprot);
2234
          oprot.writeMessageEnd();
2235
          oprot.getTransport().flush();
2236
          return;
2237
        }
483 rajveer 2238
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 2239
        result.write(oprot);
2240
        oprot.writeMessageEnd();
2241
        oprot.getTransport().flush();
2242
      }
2243
 
2244
    }
2245
 
495 rajveer 2246
    private class addBillingDetails implements ProcessFunction {
2247
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2248
      {
2249
        addBillingDetails_args args = new addBillingDetails_args();
2250
        args.read(iprot);
2251
        iprot.readMessageEnd();
2252
        addBillingDetails_result result = new addBillingDetails_result();
2253
        try {
1148 chandransh 2254
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 2255
          result.setSuccessIsSet(true);
2256
        } catch (TransactionServiceException ex) {
2257
          result.ex = ex;
2258
        } catch (Throwable th) {
2259
          LOGGER.error("Internal error processing addBillingDetails", th);
2260
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
2261
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
2262
          x.write(oprot);
2263
          oprot.writeMessageEnd();
2264
          oprot.getTransport().flush();
2265
          return;
2266
        }
2267
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
2268
        result.write(oprot);
2269
        oprot.writeMessageEnd();
2270
        oprot.getTransport().flush();
2271
      }
2272
 
2273
    }
2274
 
1148 chandransh 2275
    private class addJacketNumber implements ProcessFunction {
2276
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2277
      {
2278
        addJacketNumber_args args = new addJacketNumber_args();
2279
        args.read(iprot);
2280
        iprot.readMessageEnd();
2281
        addJacketNumber_result result = new addJacketNumber_result();
2282
        try {
2383 rajveer 2283
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1148 chandransh 2284
          result.setSuccessIsSet(true);
2285
        } catch (TransactionServiceException ex) {
2286
          result.ex = ex;
2287
        } catch (Throwable th) {
2288
          LOGGER.error("Internal error processing addJacketNumber", th);
2289
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
2290
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
2291
          x.write(oprot);
2292
          oprot.writeMessageEnd();
2293
          oprot.getTransport().flush();
2294
          return;
2295
        }
2296
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
2297
        result.write(oprot);
2298
        oprot.writeMessageEnd();
2299
        oprot.getTransport().flush();
2300
      }
2301
 
2302
    }
2303
 
923 rajveer 2304
    private class acceptOrder implements ProcessFunction {
2305
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2306
      {
2307
        acceptOrder_args args = new acceptOrder_args();
2308
        args.read(iprot);
2309
        iprot.readMessageEnd();
2310
        acceptOrder_result result = new acceptOrder_result();
2311
        try {
2312
          result.success = iface_.acceptOrder(args.orderId);
2313
          result.setSuccessIsSet(true);
2314
        } catch (TransactionServiceException ex) {
2315
          result.ex = ex;
2316
        } catch (Throwable th) {
2317
          LOGGER.error("Internal error processing acceptOrder", th);
2318
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
2319
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
2320
          x.write(oprot);
2321
          oprot.writeMessageEnd();
2322
          oprot.getTransport().flush();
2323
          return;
2324
        }
2325
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
2326
        result.write(oprot);
2327
        oprot.writeMessageEnd();
2328
        oprot.getTransport().flush();
2329
      }
2330
 
2331
    }
2332
 
2333
    private class billOrder implements ProcessFunction {
2334
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2335
      {
2336
        billOrder_args args = new billOrder_args();
2337
        args.read(iprot);
2338
        iprot.readMessageEnd();
2339
        billOrder_result result = new billOrder_result();
2340
        try {
2341
          result.success = iface_.billOrder(args.orderId);
2342
          result.setSuccessIsSet(true);
2343
        } catch (TransactionServiceException ex) {
2344
          result.ex = ex;
2345
        } catch (Throwable th) {
2346
          LOGGER.error("Internal error processing billOrder", th);
2347
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
2348
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
2349
          x.write(oprot);
2350
          oprot.writeMessageEnd();
2351
          oprot.getTransport().flush();
2352
          return;
2353
        }
2354
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
2355
        result.write(oprot);
2356
        oprot.writeMessageEnd();
2357
        oprot.getTransport().flush();
2358
      }
2359
 
2360
    }
2361
 
483 rajveer 2362
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2363
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2364
      {
483 rajveer 2365
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2366
        args.read(iprot);
2367
        iprot.readMessageEnd();
483 rajveer 2368
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2369
        try {
1529 ankur.sing 2370
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2371
        } catch (TransactionServiceException ex) {
2372
          result.ex = ex;
2373
        } catch (Throwable th) {
483 rajveer 2374
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2375
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2376
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2377
          x.write(oprot);
2378
          oprot.writeMessageEnd();
2379
          oprot.getTransport().flush();
2380
          return;
2381
        }
483 rajveer 2382
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2383
        result.write(oprot);
2384
        oprot.writeMessageEnd();
2385
        oprot.getTransport().flush();
2386
      }
2387
 
2388
    }
2389
 
483 rajveer 2390
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2391
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2392
      {
483 rajveer 2393
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2394
        args.read(iprot);
2395
        iprot.readMessageEnd();
483 rajveer 2396
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2397
        try {
483 rajveer 2398
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2399
        } catch (TransactionServiceException ex) {
2400
          result.ex = ex;
2401
        } catch (Throwable th) {
483 rajveer 2402
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2403
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2404
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2405
          x.write(oprot);
2406
          oprot.writeMessageEnd();
2407
          oprot.getTransport().flush();
2408
          return;
2409
        }
483 rajveer 2410
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2411
        result.write(oprot);
2412
        oprot.writeMessageEnd();
2413
        oprot.getTransport().flush();
2414
      }
2415
 
2416
    }
2417
 
483 rajveer 2418
    private class createOrder implements ProcessFunction {
68 ashish 2419
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2420
      {
483 rajveer 2421
        createOrder_args args = new createOrder_args();
68 ashish 2422
        args.read(iprot);
2423
        iprot.readMessageEnd();
483 rajveer 2424
        createOrder_result result = new createOrder_result();
68 ashish 2425
        try {
483 rajveer 2426
          result.success = iface_.createOrder(args.order);
68 ashish 2427
          result.setSuccessIsSet(true);
2428
        } catch (TransactionServiceException ex) {
2429
          result.ex = ex;
2430
        } catch (Throwable th) {
483 rajveer 2431
          LOGGER.error("Internal error processing createOrder", th);
2432
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2433
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2434
          x.write(oprot);
2435
          oprot.writeMessageEnd();
2436
          oprot.getTransport().flush();
2437
          return;
2438
        }
483 rajveer 2439
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2440
        result.write(oprot);
2441
        oprot.writeMessageEnd();
2442
        oprot.getTransport().flush();
2443
      }
2444
 
2445
    }
2446
 
483 rajveer 2447
    private class getOrder implements ProcessFunction {
68 ashish 2448
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2449
      {
483 rajveer 2450
        getOrder_args args = new getOrder_args();
68 ashish 2451
        args.read(iprot);
2452
        iprot.readMessageEnd();
483 rajveer 2453
        getOrder_result result = new getOrder_result();
68 ashish 2454
        try {
483 rajveer 2455
          result.success = iface_.getOrder(args.id);
68 ashish 2456
        } catch (TransactionServiceException ex) {
2457
          result.ex = ex;
2458
        } catch (Throwable th) {
483 rajveer 2459
          LOGGER.error("Internal error processing getOrder", th);
2460
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2461
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2462
          x.write(oprot);
2463
          oprot.writeMessageEnd();
2464
          oprot.getTransport().flush();
2465
          return;
2466
        }
483 rajveer 2467
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2468
        result.write(oprot);
2469
        oprot.writeMessageEnd();
2470
        oprot.getTransport().flush();
2471
      }
2472
 
2473
    }
2474
 
483 rajveer 2475
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2476
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2477
      {
483 rajveer 2478
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2479
        args.read(iprot);
2480
        iprot.readMessageEnd();
483 rajveer 2481
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2482
        try {
483 rajveer 2483
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2484
        } catch (TransactionServiceException ex) {
2485
          result.ex = ex;
2486
        } catch (Throwable th) {
483 rajveer 2487
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2488
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2489
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2490
          x.write(oprot);
2491
          oprot.writeMessageEnd();
2492
          oprot.getTransport().flush();
2493
          return;
2494
        }
483 rajveer 2495
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2496
        result.write(oprot);
2497
        oprot.writeMessageEnd();
2498
        oprot.getTransport().flush();
2499
      }
2500
 
2501
    }
2502
 
1529 ankur.sing 2503
    private class getOrderForCustomer implements ProcessFunction {
2504
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2505
      {
2506
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2507
        args.read(iprot);
2508
        iprot.readMessageEnd();
2509
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2510
        try {
2511
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2512
        } catch (TransactionServiceException ex) {
2513
          result.ex = ex;
2514
        } catch (Throwable th) {
2515
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2516
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2517
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2518
          x.write(oprot);
2519
          oprot.writeMessageEnd();
2520
          oprot.getTransport().flush();
2521
          return;
2522
        }
2523
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2524
        result.write(oprot);
2525
        oprot.writeMessageEnd();
2526
        oprot.getTransport().flush();
2527
      }
2528
 
2529
    }
2530
 
1221 chandransh 2531
    private class batchOrders implements ProcessFunction {
2532
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2533
      {
2534
        batchOrders_args args = new batchOrders_args();
2535
        args.read(iprot);
2536
        iprot.readMessageEnd();
2537
        batchOrders_result result = new batchOrders_result();
2538
        try {
2539
          result.success = iface_.batchOrders(args.warehouseId);
2540
        } catch (TransactionServiceException ex) {
2541
          result.ex = ex;
2542
        } catch (Throwable th) {
2543
          LOGGER.error("Internal error processing batchOrders", th);
2544
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2545
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2546
          x.write(oprot);
2547
          oprot.writeMessageEnd();
2548
          oprot.getTransport().flush();
2549
          return;
2550
        }
2551
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2552
        result.write(oprot);
2553
        oprot.writeMessageEnd();
2554
        oprot.getTransport().flush();
2555
      }
2556
 
2557
    }
2558
 
1209 chandransh 2559
    private class markOrderAsOutOfStock implements ProcessFunction {
2560
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2561
      {
2562
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2563
        args.read(iprot);
2564
        iprot.readMessageEnd();
2565
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2566
        try {
2567
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2568
          result.setSuccessIsSet(true);
2569
        } catch (TransactionServiceException ex) {
2570
          result.ex = ex;
2571
        } catch (Throwable th) {
2572
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2573
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2574
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2575
          x.write(oprot);
2576
          oprot.writeMessageEnd();
2577
          oprot.getTransport().flush();
2578
          return;
2579
        }
2580
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2581
        result.write(oprot);
2582
        oprot.writeMessageEnd();
2583
        oprot.getTransport().flush();
2584
      }
2585
 
2586
    }
2587
 
758 chandransh 2588
    private class markOrdersAsManifested implements ProcessFunction {
2589
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2590
      {
2591
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2592
        args.read(iprot);
2593
        iprot.readMessageEnd();
2594
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2595
        try {
2596
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2597
          result.setSuccessIsSet(true);
2598
        } catch (TransactionServiceException ex) {
2599
          result.ex = ex;
2600
        } catch (Throwable th) {
2601
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2602
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2603
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2604
          x.write(oprot);
2605
          oprot.writeMessageEnd();
2606
          oprot.getTransport().flush();
2607
          return;
2608
        }
2609
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2610
        result.write(oprot);
2611
        oprot.writeMessageEnd();
2612
        oprot.getTransport().flush();
2613
      }
2614
 
2615
    }
2616
 
1114 chandransh 2617
    private class markOrdersAsPickedUp implements ProcessFunction {
2618
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2619
      {
2620
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2621
        args.read(iprot);
2622
        iprot.readMessageEnd();
2623
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2624
        try {
2625
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2626
        } catch (TransactionServiceException ex) {
2627
          result.ex = ex;
2628
        } catch (Throwable th) {
2629
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2630
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2631
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2632
          x.write(oprot);
2633
          oprot.writeMessageEnd();
2634
          oprot.getTransport().flush();
2635
          return;
2636
        }
2637
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2638
        result.write(oprot);
2639
        oprot.writeMessageEnd();
2640
        oprot.getTransport().flush();
2641
      }
2642
 
2643
    }
2644
 
1133 chandransh 2645
    private class markOrdersAsDelivered implements ProcessFunction {
2646
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2647
      {
2648
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2649
        args.read(iprot);
2650
        iprot.readMessageEnd();
2651
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2652
        try {
2653
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2654
        } catch (TransactionServiceException ex) {
2655
          result.ex = ex;
2656
        } catch (Throwable th) {
2657
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2658
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2659
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2660
          x.write(oprot);
2661
          oprot.writeMessageEnd();
2662
          oprot.getTransport().flush();
2663
          return;
2664
        }
2665
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2666
        result.write(oprot);
2667
        oprot.writeMessageEnd();
2668
        oprot.getTransport().flush();
2669
      }
2670
 
2671
    }
2672
 
2673
    private class markOrdersAsFailed implements ProcessFunction {
2674
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2675
      {
2676
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2677
        args.read(iprot);
2678
        iprot.readMessageEnd();
2679
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2680
        try {
2681
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2682
        } catch (TransactionServiceException ex) {
2683
          result.ex = ex;
2684
        } catch (Throwable th) {
2685
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2686
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2687
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2688
          x.write(oprot);
2689
          oprot.writeMessageEnd();
2690
          oprot.getTransport().flush();
2691
          return;
2692
        }
2693
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2694
        result.write(oprot);
2695
        oprot.writeMessageEnd();
2696
        oprot.getTransport().flush();
2697
      }
2698
 
2699
    }
2700
 
1245 chandransh 2701
    private class updateNonDeliveryReason implements ProcessFunction {
2702
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2703
      {
2704
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2705
        args.read(iprot);
2706
        iprot.readMessageEnd();
2707
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2708
        try {
2709
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2710
        } catch (TransactionServiceException ex) {
2711
          result.ex = ex;
2712
        } catch (Throwable th) {
2713
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2714
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2715
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2716
          x.write(oprot);
2717
          oprot.writeMessageEnd();
2718
          oprot.getTransport().flush();
2719
          return;
2720
        }
2721
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2722
        result.write(oprot);
2723
        oprot.writeMessageEnd();
2724
        oprot.getTransport().flush();
2725
      }
2726
 
2727
    }
2728
 
1406 ankur.sing 2729
    private class getUndeliveredOrders implements ProcessFunction {
2730
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2731
      {
2732
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2733
        args.read(iprot);
2734
        iprot.readMessageEnd();
2735
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2736
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2737
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2738
        result.write(oprot);
2739
        oprot.writeMessageEnd();
2740
        oprot.getTransport().flush();
2741
      }
2742
 
2743
    }
2744
 
305 ashish 2745
    private class getAlerts implements ProcessFunction {
2746
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2747
      {
2748
        getAlerts_args args = new getAlerts_args();
2749
        args.read(iprot);
2750
        iprot.readMessageEnd();
2751
        getAlerts_result result = new getAlerts_result();
483 rajveer 2752
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2753
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2754
        result.write(oprot);
2755
        oprot.writeMessageEnd();
2756
        oprot.getTransport().flush();
2757
      }
2758
 
2759
    }
2760
 
2761
    private class setAlert implements ProcessFunction {
2762
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2763
      {
2764
        setAlert_args args = new setAlert_args();
2765
        args.read(iprot);
2766
        iprot.readMessageEnd();
2767
        setAlert_result result = new setAlert_result();
483 rajveer 2768
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2769
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2770
        result.write(oprot);
2771
        oprot.writeMessageEnd();
2772
        oprot.getTransport().flush();
2773
      }
2774
 
2775
    }
2776
 
1598 ankur.sing 2777
    private class getValidOrderCount implements ProcessFunction {
2778
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2779
      {
2780
        getValidOrderCount_args args = new getValidOrderCount_args();
2781
        args.read(iprot);
2782
        iprot.readMessageEnd();
2783
        getValidOrderCount_result result = new getValidOrderCount_result();
2784
        result.success = iface_.getValidOrderCount();
2785
        result.setSuccessIsSet(true);
2786
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
2787
        result.write(oprot);
2788
        oprot.writeMessageEnd();
2789
        oprot.getTransport().flush();
2790
      }
2791
 
2792
    }
2793
 
1629 ankur.sing 2794
    private class getNoOfCustomersWithSuccessfulTransaction implements ProcessFunction {
2795
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2796
      {
2797
        getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
2798
        args.read(iprot);
2799
        iprot.readMessageEnd();
2800
        getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
2801
        result.success = iface_.getNoOfCustomersWithSuccessfulTransaction();
2802
        result.setSuccessIsSet(true);
2803
        oprot.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid));
2804
        result.write(oprot);
2805
        oprot.writeMessageEnd();
2806
        oprot.getTransport().flush();
2807
      }
2808
 
2809
    }
2810
 
1731 ankur.sing 2811
    private class getValidOrdersAmountRange implements ProcessFunction {
1629 ankur.sing 2812
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2813
      {
1731 ankur.sing 2814
        getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 2815
        args.read(iprot);
2816
        iprot.readMessageEnd();
1731 ankur.sing 2817
        getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
2818
        result.success = iface_.getValidOrdersAmountRange();
2819
        oprot.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 2820
        result.write(oprot);
2821
        oprot.writeMessageEnd();
2822
        oprot.getTransport().flush();
2823
      }
2824
 
2825
    }
2826
 
1886 ankur.sing 2827
    private class getValidOrders implements ProcessFunction {
2828
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2829
      {
2830
        getValidOrders_args args = new getValidOrders_args();
2831
        args.read(iprot);
2832
        iprot.readMessageEnd();
2833
        getValidOrders_result result = new getValidOrders_result();
2834
        result.success = iface_.getValidOrders(args.limit);
2835
        oprot.writeMessageBegin(new TMessage("getValidOrders", TMessageType.REPLY, seqid));
2836
        result.write(oprot);
2837
        oprot.writeMessageEnd();
2838
        oprot.getTransport().flush();
2839
      }
2840
 
2841
    }
2842
 
2538 chandransh 2843
    private class toggleDOAFlag implements ProcessFunction {
2844
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2845
      {
2846
        toggleDOAFlag_args args = new toggleDOAFlag_args();
2847
        args.read(iprot);
2848
        iprot.readMessageEnd();
2849
        toggleDOAFlag_result result = new toggleDOAFlag_result();
2850
        try {
2851
          result.success = iface_.toggleDOAFlag(args.orderId);
2852
          result.setSuccessIsSet(true);
2853
        } catch (TransactionServiceException ex) {
2854
          result.ex = ex;
2855
        } catch (Throwable th) {
2856
          LOGGER.error("Internal error processing toggleDOAFlag", th);
2857
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing toggleDOAFlag");
2858
          oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.EXCEPTION, seqid));
2859
          x.write(oprot);
2860
          oprot.writeMessageEnd();
2861
          oprot.getTransport().flush();
2862
          return;
2863
        }
2864
        oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.REPLY, seqid));
2865
        result.write(oprot);
2866
        oprot.writeMessageEnd();
2867
        oprot.getTransport().flush();
2868
      }
2869
 
2870
    }
2871
 
2872
    private class requestPickupNumber implements ProcessFunction {
2873
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2874
      {
2875
        requestPickupNumber_args args = new requestPickupNumber_args();
2876
        args.read(iprot);
2877
        iprot.readMessageEnd();
2878
        requestPickupNumber_result result = new requestPickupNumber_result();
2879
        try {
2880
          result.success = iface_.requestPickupNumber(args.orderId);
2881
          result.setSuccessIsSet(true);
2882
        } catch (TransactionServiceException ex) {
2883
          result.ex = ex;
2884
        } catch (Throwable th) {
2885
          LOGGER.error("Internal error processing requestPickupNumber", th);
2886
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing requestPickupNumber");
2887
          oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.EXCEPTION, seqid));
2888
          x.write(oprot);
2889
          oprot.writeMessageEnd();
2890
          oprot.getTransport().flush();
2891
          return;
2892
        }
2893
        oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.REPLY, seqid));
2894
        result.write(oprot);
2895
        oprot.writeMessageEnd();
2896
        oprot.getTransport().flush();
2897
      }
2898
 
2899
    }
2900
 
2901
    private class authorizePickup implements ProcessFunction {
2902
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2903
      {
2904
        authorizePickup_args args = new authorizePickup_args();
2905
        args.read(iprot);
2906
        iprot.readMessageEnd();
2907
        authorizePickup_result result = new authorizePickup_result();
2908
        try {
2909
          result.success = iface_.authorizePickup(args.orderId, args.pickupNumber);
2910
          result.setSuccessIsSet(true);
2911
        } catch (TransactionServiceException ex) {
2912
          result.ex = ex;
2913
        } catch (Throwable th) {
2914
          LOGGER.error("Internal error processing authorizePickup", th);
2915
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authorizePickup");
2916
          oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.EXCEPTION, seqid));
2917
          x.write(oprot);
2918
          oprot.writeMessageEnd();
2919
          oprot.getTransport().flush();
2920
          return;
2921
        }
2922
        oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.REPLY, seqid));
2923
        result.write(oprot);
2924
        oprot.writeMessageEnd();
2925
        oprot.getTransport().flush();
2926
      }
2927
 
2928
    }
2929
 
2590 chandransh 2930
    private class acceptDoa implements ProcessFunction {
2931
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2932
      {
2933
        acceptDoa_args args = new acceptDoa_args();
2934
        args.read(iprot);
2935
        iprot.readMessageEnd();
2936
        acceptDoa_result result = new acceptDoa_result();
2937
        try {
2938
          result.success = iface_.acceptDoa(args.orderId);
2939
          result.setSuccessIsSet(true);
2940
        } catch (TransactionServiceException ex) {
2941
          result.ex = ex;
2942
        } catch (Throwable th) {
2943
          LOGGER.error("Internal error processing acceptDoa", th);
2944
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptDoa");
2945
          oprot.writeMessageBegin(new TMessage("acceptDoa", TMessageType.EXCEPTION, seqid));
2946
          x.write(oprot);
2947
          oprot.writeMessageEnd();
2948
          oprot.getTransport().flush();
2949
          return;
2950
        }
2951
        oprot.writeMessageBegin(new TMessage("acceptDoa", TMessageType.REPLY, seqid));
2952
        result.write(oprot);
2953
        oprot.writeMessageEnd();
2954
        oprot.getTransport().flush();
2955
      }
2956
 
2957
    }
2958
 
2959
    private class validateDoa implements ProcessFunction {
2960
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2961
      {
2962
        validateDoa_args args = new validateDoa_args();
2963
        args.read(iprot);
2964
        iprot.readMessageEnd();
2965
        validateDoa_result result = new validateDoa_result();
2966
        try {
2967
          result.success = iface_.validateDoa(args.orderId, args.isValid);
2968
          result.setSuccessIsSet(true);
2969
        } catch (TransactionServiceException ex) {
2970
          result.ex = ex;
2971
        } catch (Throwable th) {
2972
          LOGGER.error("Internal error processing validateDoa", th);
2973
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing validateDoa");
2974
          oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.EXCEPTION, seqid));
2975
          x.write(oprot);
2976
          oprot.writeMessageEnd();
2977
          oprot.getTransport().flush();
2978
          return;
2979
        }
2980
        oprot.writeMessageBegin(new TMessage("validateDoa", TMessageType.REPLY, seqid));
2981
        result.write(oprot);
2982
        oprot.writeMessageEnd();
2983
        oprot.getTransport().flush();
2984
      }
2985
 
2986
    }
2987
 
68 ashish 2988
  }
2989
 
764 rajveer 2990
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2991
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2992
 
2993
 
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
;
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
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3050
    }});
3051
 
3052
    static {
3053
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
3054
    }
3055
 
3056
    public closeSession_args() {
3057
    }
3058
 
3059
    /**
3060
     * Performs a deep copy on <i>other</i>.
3061
     */
3062
    public closeSession_args(closeSession_args other) {
3063
    }
3064
 
3065
    public closeSession_args deepCopy() {
3066
      return new closeSession_args(this);
3067
    }
3068
 
3069
    @Deprecated
3070
    public closeSession_args clone() {
3071
      return new closeSession_args(this);
3072
    }
3073
 
3074
    public void setFieldValue(_Fields field, Object value) {
3075
      switch (field) {
3076
      }
3077
    }
3078
 
3079
    public void setFieldValue(int fieldID, Object value) {
3080
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3081
    }
3082
 
3083
    public Object getFieldValue(_Fields field) {
3084
      switch (field) {
3085
      }
3086
      throw new IllegalStateException();
3087
    }
3088
 
3089
    public Object getFieldValue(int fieldId) {
3090
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3091
    }
3092
 
3093
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3094
    public boolean isSet(_Fields field) {
3095
      switch (field) {
3096
      }
3097
      throw new IllegalStateException();
3098
    }
3099
 
3100
    public boolean isSet(int fieldID) {
3101
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3102
    }
3103
 
3104
    @Override
3105
    public boolean equals(Object that) {
3106
      if (that == null)
3107
        return false;
3108
      if (that instanceof closeSession_args)
3109
        return this.equals((closeSession_args)that);
3110
      return false;
3111
    }
3112
 
3113
    public boolean equals(closeSession_args that) {
3114
      if (that == null)
3115
        return false;
3116
 
3117
      return true;
3118
    }
3119
 
3120
    @Override
3121
    public int hashCode() {
3122
      return 0;
3123
    }
3124
 
3125
    public int compareTo(closeSession_args other) {
3126
      if (!getClass().equals(other.getClass())) {
3127
        return getClass().getName().compareTo(other.getClass().getName());
3128
      }
3129
 
3130
      int lastComparison = 0;
3131
      closeSession_args typedOther = (closeSession_args)other;
3132
 
3133
      return 0;
3134
    }
3135
 
3136
    public void read(TProtocol iprot) throws TException {
3137
      TField field;
3138
      iprot.readStructBegin();
3139
      while (true)
3140
      {
3141
        field = iprot.readFieldBegin();
3142
        if (field.type == TType.STOP) { 
3143
          break;
3144
        }
3145
        _Fields fieldId = _Fields.findByThriftId(field.id);
3146
        if (fieldId == null) {
3147
          TProtocolUtil.skip(iprot, field.type);
3148
        } else {
3149
          switch (fieldId) {
3150
          }
3151
          iprot.readFieldEnd();
3152
        }
3153
      }
3154
      iprot.readStructEnd();
3155
      validate();
3156
    }
3157
 
3158
    public void write(TProtocol oprot) throws TException {
3159
      validate();
3160
 
3161
      oprot.writeStructBegin(STRUCT_DESC);
3162
      oprot.writeFieldStop();
3163
      oprot.writeStructEnd();
3164
    }
3165
 
3166
    @Override
3167
    public String toString() {
3168
      StringBuilder sb = new StringBuilder("closeSession_args(");
3169
      boolean first = true;
3170
 
3171
      sb.append(")");
3172
      return sb.toString();
3173
    }
3174
 
3175
    public void validate() throws TException {
3176
      // check for required fields
3177
    }
3178
 
3179
  }
3180
 
3181
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3182
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3183
 
3184
 
3185
 
3186
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3187
    public enum _Fields implements TFieldIdEnum {
3188
;
3189
 
3190
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3191
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3192
 
3193
      static {
3194
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3195
          byId.put((int)field._thriftId, field);
3196
          byName.put(field.getFieldName(), field);
3197
        }
3198
      }
3199
 
3200
      /**
3201
       * Find the _Fields constant that matches fieldId, or null if its not found.
3202
       */
3203
      public static _Fields findByThriftId(int fieldId) {
3204
        return byId.get(fieldId);
3205
      }
3206
 
3207
      /**
3208
       * Find the _Fields constant that matches fieldId, throwing an exception
3209
       * if it is not found.
3210
       */
3211
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3212
        _Fields fields = findByThriftId(fieldId);
3213
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3214
        return fields;
3215
      }
3216
 
3217
      /**
3218
       * Find the _Fields constant that matches name, or null if its not found.
3219
       */
3220
      public static _Fields findByName(String name) {
3221
        return byName.get(name);
3222
      }
3223
 
3224
      private final short _thriftId;
3225
      private final String _fieldName;
3226
 
3227
      _Fields(short thriftId, String fieldName) {
3228
        _thriftId = thriftId;
3229
        _fieldName = fieldName;
3230
      }
3231
 
3232
      public short getThriftFieldId() {
3233
        return _thriftId;
3234
      }
3235
 
3236
      public String getFieldName() {
3237
        return _fieldName;
3238
      }
3239
    }
3240
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3241
    }});
3242
 
3243
    static {
3244
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3245
    }
3246
 
3247
    public closeSession_result() {
3248
    }
3249
 
3250
    /**
3251
     * Performs a deep copy on <i>other</i>.
3252
     */
3253
    public closeSession_result(closeSession_result other) {
3254
    }
3255
 
3256
    public closeSession_result deepCopy() {
3257
      return new closeSession_result(this);
3258
    }
3259
 
3260
    @Deprecated
3261
    public closeSession_result clone() {
3262
      return new closeSession_result(this);
3263
    }
3264
 
3265
    public void setFieldValue(_Fields field, Object value) {
3266
      switch (field) {
3267
      }
3268
    }
3269
 
3270
    public void setFieldValue(int fieldID, Object value) {
3271
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3272
    }
3273
 
3274
    public Object getFieldValue(_Fields field) {
3275
      switch (field) {
3276
      }
3277
      throw new IllegalStateException();
3278
    }
3279
 
3280
    public Object getFieldValue(int fieldId) {
3281
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3282
    }
3283
 
3284
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3285
    public boolean isSet(_Fields field) {
3286
      switch (field) {
3287
      }
3288
      throw new IllegalStateException();
3289
    }
3290
 
3291
    public boolean isSet(int fieldID) {
3292
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3293
    }
3294
 
3295
    @Override
3296
    public boolean equals(Object that) {
3297
      if (that == null)
3298
        return false;
3299
      if (that instanceof closeSession_result)
3300
        return this.equals((closeSession_result)that);
3301
      return false;
3302
    }
3303
 
3304
    public boolean equals(closeSession_result that) {
3305
      if (that == null)
3306
        return false;
3307
 
3308
      return true;
3309
    }
3310
 
3311
    @Override
3312
    public int hashCode() {
3313
      return 0;
3314
    }
3315
 
3316
    public int compareTo(closeSession_result other) {
3317
      if (!getClass().equals(other.getClass())) {
3318
        return getClass().getName().compareTo(other.getClass().getName());
3319
      }
3320
 
3321
      int lastComparison = 0;
3322
      closeSession_result typedOther = (closeSession_result)other;
3323
 
3324
      return 0;
3325
    }
3326
 
3327
    public void read(TProtocol iprot) throws TException {
3328
      TField field;
3329
      iprot.readStructBegin();
3330
      while (true)
3331
      {
3332
        field = iprot.readFieldBegin();
3333
        if (field.type == TType.STOP) { 
3334
          break;
3335
        }
3336
        _Fields fieldId = _Fields.findByThriftId(field.id);
3337
        if (fieldId == null) {
3338
          TProtocolUtil.skip(iprot, field.type);
3339
        } else {
3340
          switch (fieldId) {
3341
          }
3342
          iprot.readFieldEnd();
3343
        }
3344
      }
3345
      iprot.readStructEnd();
3346
      validate();
3347
    }
3348
 
3349
    public void write(TProtocol oprot) throws TException {
3350
      oprot.writeStructBegin(STRUCT_DESC);
3351
 
3352
      oprot.writeFieldStop();
3353
      oprot.writeStructEnd();
3354
    }
3355
 
3356
    @Override
3357
    public String toString() {
3358
      StringBuilder sb = new StringBuilder("closeSession_result(");
3359
      boolean first = true;
3360
 
3361
      sb.append(")");
3362
      return sb.toString();
3363
    }
3364
 
3365
    public void validate() throws TException {
3366
      // check for required fields
3367
    }
3368
 
3369
  }
3370
 
684 chandransh 3371
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 3372
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
3373
 
3374
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
3375
 
3376
    private Transaction transaction;
3377
 
3378
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3379
    public enum _Fields implements TFieldIdEnum {
3380
      TRANSACTION((short)1, "transaction");
3381
 
3382
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3383
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3384
 
3385
      static {
3386
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3387
          byId.put((int)field._thriftId, field);
3388
          byName.put(field.getFieldName(), field);
3389
        }
3390
      }
3391
 
3392
      /**
3393
       * Find the _Fields constant that matches fieldId, or null if its not found.
3394
       */
3395
      public static _Fields findByThriftId(int fieldId) {
3396
        return byId.get(fieldId);
3397
      }
3398
 
3399
      /**
3400
       * Find the _Fields constant that matches fieldId, throwing an exception
3401
       * if it is not found.
3402
       */
3403
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3404
        _Fields fields = findByThriftId(fieldId);
3405
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3406
        return fields;
3407
      }
3408
 
3409
      /**
3410
       * Find the _Fields constant that matches name, or null if its not found.
3411
       */
3412
      public static _Fields findByName(String name) {
3413
        return byName.get(name);
3414
      }
3415
 
3416
      private final short _thriftId;
3417
      private final String _fieldName;
3418
 
3419
      _Fields(short thriftId, String fieldName) {
3420
        _thriftId = thriftId;
3421
        _fieldName = fieldName;
3422
      }
3423
 
3424
      public short getThriftFieldId() {
3425
        return _thriftId;
3426
      }
3427
 
3428
      public String getFieldName() {
3429
        return _fieldName;
3430
      }
3431
    }
3432
 
3433
    // isset id assignments
3434
 
3435
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3436
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
3437
          new StructMetaData(TType.STRUCT, Transaction.class)));
3438
    }});
3439
 
3440
    static {
3441
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
3442
    }
3443
 
3444
    public createTransaction_args() {
3445
    }
3446
 
3447
    public createTransaction_args(
3448
      Transaction transaction)
3449
    {
3450
      this();
3451
      this.transaction = transaction;
3452
    }
3453
 
3454
    /**
3455
     * Performs a deep copy on <i>other</i>.
3456
     */
3457
    public createTransaction_args(createTransaction_args other) {
3458
      if (other.isSetTransaction()) {
3459
        this.transaction = new Transaction(other.transaction);
3460
      }
3461
    }
3462
 
3463
    public createTransaction_args deepCopy() {
3464
      return new createTransaction_args(this);
3465
    }
3466
 
3467
    @Deprecated
3468
    public createTransaction_args clone() {
3469
      return new createTransaction_args(this);
3470
    }
3471
 
3472
    public Transaction getTransaction() {
3473
      return this.transaction;
3474
    }
3475
 
3476
    public createTransaction_args setTransaction(Transaction transaction) {
3477
      this.transaction = transaction;
3478
      return this;
3479
    }
3480
 
3481
    public void unsetTransaction() {
3482
      this.transaction = null;
3483
    }
3484
 
3485
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
3486
    public boolean isSetTransaction() {
3487
      return this.transaction != null;
3488
    }
3489
 
3490
    public void setTransactionIsSet(boolean value) {
3491
      if (!value) {
3492
        this.transaction = null;
3493
      }
3494
    }
3495
 
3496
    public void setFieldValue(_Fields field, Object value) {
3497
      switch (field) {
3498
      case TRANSACTION:
3499
        if (value == null) {
3500
          unsetTransaction();
3501
        } else {
3502
          setTransaction((Transaction)value);
3503
        }
3504
        break;
3505
 
3506
      }
3507
    }
3508
 
3509
    public void setFieldValue(int fieldID, Object value) {
3510
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3511
    }
3512
 
3513
    public Object getFieldValue(_Fields field) {
3514
      switch (field) {
3515
      case TRANSACTION:
3516
        return getTransaction();
3517
 
3518
      }
3519
      throw new IllegalStateException();
3520
    }
3521
 
3522
    public Object getFieldValue(int fieldId) {
3523
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3524
    }
3525
 
3526
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3527
    public boolean isSet(_Fields field) {
3528
      switch (field) {
3529
      case TRANSACTION:
3530
        return isSetTransaction();
3531
      }
3532
      throw new IllegalStateException();
3533
    }
3534
 
3535
    public boolean isSet(int fieldID) {
3536
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3537
    }
3538
 
3539
    @Override
3540
    public boolean equals(Object that) {
3541
      if (that == null)
3542
        return false;
3543
      if (that instanceof createTransaction_args)
3544
        return this.equals((createTransaction_args)that);
3545
      return false;
3546
    }
3547
 
3548
    public boolean equals(createTransaction_args that) {
3549
      if (that == null)
3550
        return false;
3551
 
3552
      boolean this_present_transaction = true && this.isSetTransaction();
3553
      boolean that_present_transaction = true && that.isSetTransaction();
3554
      if (this_present_transaction || that_present_transaction) {
3555
        if (!(this_present_transaction && that_present_transaction))
3556
          return false;
3557
        if (!this.transaction.equals(that.transaction))
3558
          return false;
3559
      }
3560
 
3561
      return true;
3562
    }
3563
 
3564
    @Override
3565
    public int hashCode() {
3566
      return 0;
3567
    }
3568
 
684 chandransh 3569
    public int compareTo(createTransaction_args other) {
3570
      if (!getClass().equals(other.getClass())) {
3571
        return getClass().getName().compareTo(other.getClass().getName());
3572
      }
3573
 
3574
      int lastComparison = 0;
3575
      createTransaction_args typedOther = (createTransaction_args)other;
3576
 
3577
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
3578
      if (lastComparison != 0) {
3579
        return lastComparison;
3580
      }
3581
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
3582
      if (lastComparison != 0) {
3583
        return lastComparison;
3584
      }
3585
      return 0;
3586
    }
3587
 
68 ashish 3588
    public void read(TProtocol iprot) throws TException {
3589
      TField field;
3590
      iprot.readStructBegin();
3591
      while (true)
3592
      {
3593
        field = iprot.readFieldBegin();
3594
        if (field.type == TType.STOP) { 
3595
          break;
3596
        }
3597
        _Fields fieldId = _Fields.findByThriftId(field.id);
3598
        if (fieldId == null) {
3599
          TProtocolUtil.skip(iprot, field.type);
3600
        } else {
3601
          switch (fieldId) {
3602
            case TRANSACTION:
3603
              if (field.type == TType.STRUCT) {
3604
                this.transaction = new Transaction();
3605
                this.transaction.read(iprot);
3606
              } else { 
3607
                TProtocolUtil.skip(iprot, field.type);
3608
              }
3609
              break;
3610
          }
3611
          iprot.readFieldEnd();
3612
        }
3613
      }
3614
      iprot.readStructEnd();
3615
      validate();
3616
    }
3617
 
3618
    public void write(TProtocol oprot) throws TException {
3619
      validate();
3620
 
3621
      oprot.writeStructBegin(STRUCT_DESC);
3622
      if (this.transaction != null) {
3623
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
3624
        this.transaction.write(oprot);
3625
        oprot.writeFieldEnd();
3626
      }
3627
      oprot.writeFieldStop();
3628
      oprot.writeStructEnd();
3629
    }
3630
 
3631
    @Override
3632
    public String toString() {
3633
      StringBuilder sb = new StringBuilder("createTransaction_args(");
3634
      boolean first = true;
3635
 
3636
      sb.append("transaction:");
3637
      if (this.transaction == null) {
3638
        sb.append("null");
3639
      } else {
3640
        sb.append(this.transaction);
3641
      }
3642
      first = false;
3643
      sb.append(")");
3644
      return sb.toString();
3645
    }
3646
 
3647
    public void validate() throws TException {
3648
      // check for required fields
3649
    }
3650
 
3651
  }
3652
 
3653
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
3654
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
3655
 
132 ashish 3656
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 3657
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3658
 
132 ashish 3659
    private long success;
68 ashish 3660
    private TransactionServiceException ex;
3661
 
3662
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3663
    public enum _Fields implements TFieldIdEnum {
132 ashish 3664
      SUCCESS((short)0, "success"),
68 ashish 3665
      EX((short)1, "ex");
3666
 
3667
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3668
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3669
 
3670
      static {
3671
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3672
          byId.put((int)field._thriftId, field);
3673
          byName.put(field.getFieldName(), field);
3674
        }
3675
      }
3676
 
3677
      /**
3678
       * Find the _Fields constant that matches fieldId, or null if its not found.
3679
       */
3680
      public static _Fields findByThriftId(int fieldId) {
3681
        return byId.get(fieldId);
3682
      }
3683
 
3684
      /**
3685
       * Find the _Fields constant that matches fieldId, throwing an exception
3686
       * if it is not found.
3687
       */
3688
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3689
        _Fields fields = findByThriftId(fieldId);
3690
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3691
        return fields;
3692
      }
3693
 
3694
      /**
3695
       * Find the _Fields constant that matches name, or null if its not found.
3696
       */
3697
      public static _Fields findByName(String name) {
3698
        return byName.get(name);
3699
      }
3700
 
3701
      private final short _thriftId;
3702
      private final String _fieldName;
3703
 
3704
      _Fields(short thriftId, String fieldName) {
3705
        _thriftId = thriftId;
3706
        _fieldName = fieldName;
3707
      }
3708
 
3709
      public short getThriftFieldId() {
3710
        return _thriftId;
3711
      }
3712
 
3713
      public String getFieldName() {
3714
        return _fieldName;
3715
      }
3716
    }
3717
 
3718
    // isset id assignments
132 ashish 3719
    private static final int __SUCCESS_ISSET_ID = 0;
3720
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3721
 
3722
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3723
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3724
          new FieldValueMetaData(TType.I64)));
68 ashish 3725
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3726
          new FieldValueMetaData(TType.STRUCT)));
3727
    }});
3728
 
3729
    static {
3730
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3731
    }
3732
 
3733
    public createTransaction_result() {
3734
    }
3735
 
3736
    public createTransaction_result(
132 ashish 3737
      long success,
68 ashish 3738
      TransactionServiceException ex)
3739
    {
3740
      this();
132 ashish 3741
      this.success = success;
3742
      setSuccessIsSet(true);
68 ashish 3743
      this.ex = ex;
3744
    }
3745
 
3746
    /**
3747
     * Performs a deep copy on <i>other</i>.
3748
     */
3749
    public createTransaction_result(createTransaction_result other) {
132 ashish 3750
      __isset_bit_vector.clear();
3751
      __isset_bit_vector.or(other.__isset_bit_vector);
3752
      this.success = other.success;
68 ashish 3753
      if (other.isSetEx()) {
3754
        this.ex = new TransactionServiceException(other.ex);
3755
      }
3756
    }
3757
 
3758
    public createTransaction_result deepCopy() {
3759
      return new createTransaction_result(this);
3760
    }
3761
 
3762
    @Deprecated
3763
    public createTransaction_result clone() {
3764
      return new createTransaction_result(this);
3765
    }
3766
 
132 ashish 3767
    public long getSuccess() {
3768
      return this.success;
3769
    }
3770
 
3771
    public createTransaction_result setSuccess(long success) {
3772
      this.success = success;
3773
      setSuccessIsSet(true);
3774
      return this;
3775
    }
3776
 
3777
    public void unsetSuccess() {
3778
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3779
    }
3780
 
3781
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3782
    public boolean isSetSuccess() {
3783
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3784
    }
3785
 
3786
    public void setSuccessIsSet(boolean value) {
3787
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3788
    }
3789
 
68 ashish 3790
    public TransactionServiceException getEx() {
3791
      return this.ex;
3792
    }
3793
 
3794
    public createTransaction_result setEx(TransactionServiceException ex) {
3795
      this.ex = ex;
3796
      return this;
3797
    }
3798
 
3799
    public void unsetEx() {
3800
      this.ex = null;
3801
    }
3802
 
3803
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3804
    public boolean isSetEx() {
3805
      return this.ex != null;
3806
    }
3807
 
3808
    public void setExIsSet(boolean value) {
3809
      if (!value) {
3810
        this.ex = null;
3811
      }
3812
    }
3813
 
3814
    public void setFieldValue(_Fields field, Object value) {
3815
      switch (field) {
132 ashish 3816
      case SUCCESS:
3817
        if (value == null) {
3818
          unsetSuccess();
3819
        } else {
3820
          setSuccess((Long)value);
3821
        }
3822
        break;
3823
 
68 ashish 3824
      case EX:
3825
        if (value == null) {
3826
          unsetEx();
3827
        } else {
3828
          setEx((TransactionServiceException)value);
3829
        }
3830
        break;
3831
 
3832
      }
3833
    }
3834
 
3835
    public void setFieldValue(int fieldID, Object value) {
3836
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3837
    }
3838
 
3839
    public Object getFieldValue(_Fields field) {
3840
      switch (field) {
132 ashish 3841
      case SUCCESS:
3842
        return new Long(getSuccess());
3843
 
68 ashish 3844
      case EX:
3845
        return getEx();
3846
 
3847
      }
3848
      throw new IllegalStateException();
3849
    }
3850
 
3851
    public Object getFieldValue(int fieldId) {
3852
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3853
    }
3854
 
3855
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3856
    public boolean isSet(_Fields field) {
3857
      switch (field) {
132 ashish 3858
      case SUCCESS:
3859
        return isSetSuccess();
68 ashish 3860
      case EX:
3861
        return isSetEx();
3862
      }
3863
      throw new IllegalStateException();
3864
    }
3865
 
3866
    public boolean isSet(int fieldID) {
3867
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3868
    }
3869
 
3870
    @Override
3871
    public boolean equals(Object that) {
3872
      if (that == null)
3873
        return false;
3874
      if (that instanceof createTransaction_result)
3875
        return this.equals((createTransaction_result)that);
3876
      return false;
3877
    }
3878
 
3879
    public boolean equals(createTransaction_result that) {
3880
      if (that == null)
3881
        return false;
3882
 
132 ashish 3883
      boolean this_present_success = true;
3884
      boolean that_present_success = true;
3885
      if (this_present_success || that_present_success) {
3886
        if (!(this_present_success && that_present_success))
3887
          return false;
3888
        if (this.success != that.success)
3889
          return false;
3890
      }
3891
 
68 ashish 3892
      boolean this_present_ex = true && this.isSetEx();
3893
      boolean that_present_ex = true && that.isSetEx();
3894
      if (this_present_ex || that_present_ex) {
3895
        if (!(this_present_ex && that_present_ex))
3896
          return false;
3897
        if (!this.ex.equals(that.ex))
3898
          return false;
3899
      }
3900
 
3901
      return true;
3902
    }
3903
 
3904
    @Override
3905
    public int hashCode() {
3906
      return 0;
3907
    }
3908
 
3909
    public int compareTo(createTransaction_result other) {
3910
      if (!getClass().equals(other.getClass())) {
3911
        return getClass().getName().compareTo(other.getClass().getName());
3912
      }
3913
 
3914
      int lastComparison = 0;
3915
      createTransaction_result typedOther = (createTransaction_result)other;
3916
 
132 ashish 3917
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3918
      if (lastComparison != 0) {
3919
        return lastComparison;
3920
      }
3921
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3922
      if (lastComparison != 0) {
3923
        return lastComparison;
3924
      }
68 ashish 3925
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3926
      if (lastComparison != 0) {
3927
        return lastComparison;
3928
      }
3929
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3930
      if (lastComparison != 0) {
3931
        return lastComparison;
3932
      }
3933
      return 0;
3934
    }
3935
 
3936
    public void read(TProtocol iprot) throws TException {
3937
      TField field;
3938
      iprot.readStructBegin();
3939
      while (true)
3940
      {
3941
        field = iprot.readFieldBegin();
3942
        if (field.type == TType.STOP) { 
3943
          break;
3944
        }
3945
        _Fields fieldId = _Fields.findByThriftId(field.id);
3946
        if (fieldId == null) {
3947
          TProtocolUtil.skip(iprot, field.type);
3948
        } else {
3949
          switch (fieldId) {
132 ashish 3950
            case SUCCESS:
3951
              if (field.type == TType.I64) {
3952
                this.success = iprot.readI64();
3953
                setSuccessIsSet(true);
3954
              } else { 
3955
                TProtocolUtil.skip(iprot, field.type);
3956
              }
3957
              break;
68 ashish 3958
            case EX:
3959
              if (field.type == TType.STRUCT) {
3960
                this.ex = new TransactionServiceException();
3961
                this.ex.read(iprot);
3962
              } else { 
3963
                TProtocolUtil.skip(iprot, field.type);
3964
              }
3965
              break;
3966
          }
3967
          iprot.readFieldEnd();
3968
        }
3969
      }
3970
      iprot.readStructEnd();
3971
      validate();
3972
    }
3973
 
3974
    public void write(TProtocol oprot) throws TException {
3975
      oprot.writeStructBegin(STRUCT_DESC);
3976
 
132 ashish 3977
      if (this.isSetSuccess()) {
3978
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3979
        oprot.writeI64(this.success);
3980
        oprot.writeFieldEnd();
3981
      } else if (this.isSetEx()) {
68 ashish 3982
        oprot.writeFieldBegin(EX_FIELD_DESC);
3983
        this.ex.write(oprot);
3984
        oprot.writeFieldEnd();
3985
      }
3986
      oprot.writeFieldStop();
3987
      oprot.writeStructEnd();
3988
    }
3989
 
3990
    @Override
3991
    public String toString() {
3992
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3993
      boolean first = true;
3994
 
132 ashish 3995
      sb.append("success:");
3996
      sb.append(this.success);
3997
      first = false;
3998
      if (!first) sb.append(", ");
68 ashish 3999
      sb.append("ex:");
4000
      if (this.ex == null) {
4001
        sb.append("null");
4002
      } else {
4003
        sb.append(this.ex);
4004
      }
4005
      first = false;
4006
      sb.append(")");
4007
      return sb.toString();
4008
    }
4009
 
4010
    public void validate() throws TException {
4011
      // check for required fields
4012
    }
4013
 
4014
  }
4015
 
4016
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
4017
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
4018
 
4019
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
4020
 
4021
    private long id;
4022
 
4023
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4024
    public enum _Fields implements TFieldIdEnum {
4025
      ID((short)1, "id");
4026
 
4027
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4028
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4029
 
4030
      static {
4031
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4032
          byId.put((int)field._thriftId, field);
4033
          byName.put(field.getFieldName(), field);
4034
        }
4035
      }
4036
 
4037
      /**
4038
       * Find the _Fields constant that matches fieldId, or null if its not found.
4039
       */
4040
      public static _Fields findByThriftId(int fieldId) {
4041
        return byId.get(fieldId);
4042
      }
4043
 
4044
      /**
4045
       * Find the _Fields constant that matches fieldId, throwing an exception
4046
       * if it is not found.
4047
       */
4048
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4049
        _Fields fields = findByThriftId(fieldId);
4050
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4051
        return fields;
4052
      }
4053
 
4054
      /**
4055
       * Find the _Fields constant that matches name, or null if its not found.
4056
       */
4057
      public static _Fields findByName(String name) {
4058
        return byName.get(name);
4059
      }
4060
 
4061
      private final short _thriftId;
4062
      private final String _fieldName;
4063
 
4064
      _Fields(short thriftId, String fieldName) {
4065
        _thriftId = thriftId;
4066
        _fieldName = fieldName;
4067
      }
4068
 
4069
      public short getThriftFieldId() {
4070
        return _thriftId;
4071
      }
4072
 
4073
      public String getFieldName() {
4074
        return _fieldName;
4075
      }
4076
    }
4077
 
4078
    // isset id assignments
4079
    private static final int __ID_ISSET_ID = 0;
4080
    private BitSet __isset_bit_vector = new BitSet(1);
4081
 
4082
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4083
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
4084
          new FieldValueMetaData(TType.I64)));
4085
    }});
4086
 
4087
    static {
4088
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
4089
    }
4090
 
4091
    public getTransaction_args() {
4092
    }
4093
 
4094
    public getTransaction_args(
4095
      long id)
4096
    {
4097
      this();
4098
      this.id = id;
4099
      setIdIsSet(true);
4100
    }
4101
 
4102
    /**
4103
     * Performs a deep copy on <i>other</i>.
4104
     */
4105
    public getTransaction_args(getTransaction_args other) {
4106
      __isset_bit_vector.clear();
4107
      __isset_bit_vector.or(other.__isset_bit_vector);
4108
      this.id = other.id;
4109
    }
4110
 
4111
    public getTransaction_args deepCopy() {
4112
      return new getTransaction_args(this);
4113
    }
4114
 
4115
    @Deprecated
4116
    public getTransaction_args clone() {
4117
      return new getTransaction_args(this);
4118
    }
4119
 
4120
    public long getId() {
4121
      return this.id;
4122
    }
4123
 
4124
    public getTransaction_args setId(long id) {
4125
      this.id = id;
4126
      setIdIsSet(true);
4127
      return this;
4128
    }
4129
 
4130
    public void unsetId() {
4131
      __isset_bit_vector.clear(__ID_ISSET_ID);
4132
    }
4133
 
4134
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
4135
    public boolean isSetId() {
4136
      return __isset_bit_vector.get(__ID_ISSET_ID);
4137
    }
4138
 
4139
    public void setIdIsSet(boolean value) {
4140
      __isset_bit_vector.set(__ID_ISSET_ID, value);
4141
    }
4142
 
4143
    public void setFieldValue(_Fields field, Object value) {
4144
      switch (field) {
4145
      case ID:
4146
        if (value == null) {
4147
          unsetId();
4148
        } else {
4149
          setId((Long)value);
4150
        }
4151
        break;
4152
 
4153
      }
4154
    }
4155
 
4156
    public void setFieldValue(int fieldID, Object value) {
4157
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4158
    }
4159
 
4160
    public Object getFieldValue(_Fields field) {
4161
      switch (field) {
4162
      case ID:
4163
        return new Long(getId());
4164
 
4165
      }
4166
      throw new IllegalStateException();
4167
    }
4168
 
4169
    public Object getFieldValue(int fieldId) {
4170
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4171
    }
4172
 
4173
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4174
    public boolean isSet(_Fields field) {
4175
      switch (field) {
4176
      case ID:
4177
        return isSetId();
4178
      }
4179
      throw new IllegalStateException();
4180
    }
4181
 
4182
    public boolean isSet(int fieldID) {
4183
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4184
    }
4185
 
4186
    @Override
4187
    public boolean equals(Object that) {
4188
      if (that == null)
4189
        return false;
4190
      if (that instanceof getTransaction_args)
4191
        return this.equals((getTransaction_args)that);
4192
      return false;
4193
    }
4194
 
4195
    public boolean equals(getTransaction_args that) {
4196
      if (that == null)
4197
        return false;
4198
 
4199
      boolean this_present_id = true;
4200
      boolean that_present_id = true;
4201
      if (this_present_id || that_present_id) {
4202
        if (!(this_present_id && that_present_id))
4203
          return false;
4204
        if (this.id != that.id)
4205
          return false;
4206
      }
4207
 
4208
      return true;
4209
    }
4210
 
4211
    @Override
4212
    public int hashCode() {
4213
      return 0;
4214
    }
4215
 
4216
    public int compareTo(getTransaction_args other) {
4217
      if (!getClass().equals(other.getClass())) {
4218
        return getClass().getName().compareTo(other.getClass().getName());
4219
      }
4220
 
4221
      int lastComparison = 0;
4222
      getTransaction_args typedOther = (getTransaction_args)other;
4223
 
4224
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
4225
      if (lastComparison != 0) {
4226
        return lastComparison;
4227
      }
4228
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
4229
      if (lastComparison != 0) {
4230
        return lastComparison;
4231
      }
4232
      return 0;
4233
    }
4234
 
4235
    public void read(TProtocol iprot) throws TException {
4236
      TField field;
4237
      iprot.readStructBegin();
4238
      while (true)
4239
      {
4240
        field = iprot.readFieldBegin();
4241
        if (field.type == TType.STOP) { 
4242
          break;
4243
        }
4244
        _Fields fieldId = _Fields.findByThriftId(field.id);
4245
        if (fieldId == null) {
4246
          TProtocolUtil.skip(iprot, field.type);
4247
        } else {
4248
          switch (fieldId) {
4249
            case ID:
4250
              if (field.type == TType.I64) {
4251
                this.id = iprot.readI64();
4252
                setIdIsSet(true);
4253
              } else { 
4254
                TProtocolUtil.skip(iprot, field.type);
4255
              }
4256
              break;
4257
          }
4258
          iprot.readFieldEnd();
4259
        }
4260
      }
4261
      iprot.readStructEnd();
4262
      validate();
4263
    }
4264
 
4265
    public void write(TProtocol oprot) throws TException {
4266
      validate();
4267
 
4268
      oprot.writeStructBegin(STRUCT_DESC);
4269
      oprot.writeFieldBegin(ID_FIELD_DESC);
4270
      oprot.writeI64(this.id);
4271
      oprot.writeFieldEnd();
4272
      oprot.writeFieldStop();
4273
      oprot.writeStructEnd();
4274
    }
4275
 
4276
    @Override
4277
    public String toString() {
4278
      StringBuilder sb = new StringBuilder("getTransaction_args(");
4279
      boolean first = true;
4280
 
4281
      sb.append("id:");
4282
      sb.append(this.id);
4283
      first = false;
4284
      sb.append(")");
4285
      return sb.toString();
4286
    }
4287
 
4288
    public void validate() throws TException {
4289
      // check for required fields
4290
    }
4291
 
4292
  }
4293
 
684 chandransh 4294
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 4295
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
4296
 
4297
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4298
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4299
 
4300
    private Transaction success;
4301
    private TransactionServiceException ex;
4302
 
4303
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4304
    public enum _Fields implements TFieldIdEnum {
4305
      SUCCESS((short)0, "success"),
4306
      EX((short)1, "ex");
4307
 
4308
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4309
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4310
 
4311
      static {
4312
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4313
          byId.put((int)field._thriftId, field);
4314
          byName.put(field.getFieldName(), field);
4315
        }
4316
      }
4317
 
4318
      /**
4319
       * Find the _Fields constant that matches fieldId, or null if its not found.
4320
       */
4321
      public static _Fields findByThriftId(int fieldId) {
4322
        return byId.get(fieldId);
4323
      }
4324
 
4325
      /**
4326
       * Find the _Fields constant that matches fieldId, throwing an exception
4327
       * if it is not found.
4328
       */
4329
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4330
        _Fields fields = findByThriftId(fieldId);
4331
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4332
        return fields;
4333
      }
4334
 
4335
      /**
4336
       * Find the _Fields constant that matches name, or null if its not found.
4337
       */
4338
      public static _Fields findByName(String name) {
4339
        return byName.get(name);
4340
      }
4341
 
4342
      private final short _thriftId;
4343
      private final String _fieldName;
4344
 
4345
      _Fields(short thriftId, String fieldName) {
4346
        _thriftId = thriftId;
4347
        _fieldName = fieldName;
4348
      }
4349
 
4350
      public short getThriftFieldId() {
4351
        return _thriftId;
4352
      }
4353
 
4354
      public String getFieldName() {
4355
        return _fieldName;
4356
      }
4357
    }
4358
 
4359
    // isset id assignments
4360
 
4361
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4362
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4363
          new StructMetaData(TType.STRUCT, Transaction.class)));
4364
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4365
          new FieldValueMetaData(TType.STRUCT)));
4366
    }});
4367
 
4368
    static {
4369
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
4370
    }
4371
 
4372
    public getTransaction_result() {
4373
    }
4374
 
4375
    public getTransaction_result(
4376
      Transaction success,
4377
      TransactionServiceException ex)
4378
    {
4379
      this();
4380
      this.success = success;
4381
      this.ex = ex;
4382
    }
4383
 
4384
    /**
4385
     * Performs a deep copy on <i>other</i>.
4386
     */
4387
    public getTransaction_result(getTransaction_result other) {
4388
      if (other.isSetSuccess()) {
4389
        this.success = new Transaction(other.success);
4390
      }
4391
      if (other.isSetEx()) {
4392
        this.ex = new TransactionServiceException(other.ex);
4393
      }
4394
    }
4395
 
4396
    public getTransaction_result deepCopy() {
4397
      return new getTransaction_result(this);
4398
    }
4399
 
4400
    @Deprecated
4401
    public getTransaction_result clone() {
4402
      return new getTransaction_result(this);
4403
    }
4404
 
4405
    public Transaction getSuccess() {
4406
      return this.success;
4407
    }
4408
 
4409
    public getTransaction_result setSuccess(Transaction success) {
4410
      this.success = success;
4411
      return this;
4412
    }
4413
 
4414
    public void unsetSuccess() {
4415
      this.success = null;
4416
    }
4417
 
4418
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4419
    public boolean isSetSuccess() {
4420
      return this.success != null;
4421
    }
4422
 
4423
    public void setSuccessIsSet(boolean value) {
4424
      if (!value) {
4425
        this.success = null;
4426
      }
4427
    }
4428
 
4429
    public TransactionServiceException getEx() {
4430
      return this.ex;
4431
    }
4432
 
4433
    public getTransaction_result setEx(TransactionServiceException ex) {
4434
      this.ex = ex;
4435
      return this;
4436
    }
4437
 
4438
    public void unsetEx() {
4439
      this.ex = null;
4440
    }
4441
 
4442
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4443
    public boolean isSetEx() {
4444
      return this.ex != null;
4445
    }
4446
 
4447
    public void setExIsSet(boolean value) {
4448
      if (!value) {
4449
        this.ex = null;
4450
      }
4451
    }
4452
 
4453
    public void setFieldValue(_Fields field, Object value) {
4454
      switch (field) {
4455
      case SUCCESS:
4456
        if (value == null) {
4457
          unsetSuccess();
4458
        } else {
4459
          setSuccess((Transaction)value);
4460
        }
4461
        break;
4462
 
4463
      case EX:
4464
        if (value == null) {
4465
          unsetEx();
4466
        } else {
4467
          setEx((TransactionServiceException)value);
4468
        }
4469
        break;
4470
 
4471
      }
4472
    }
4473
 
4474
    public void setFieldValue(int fieldID, Object value) {
4475
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4476
    }
4477
 
4478
    public Object getFieldValue(_Fields field) {
4479
      switch (field) {
4480
      case SUCCESS:
4481
        return getSuccess();
4482
 
4483
      case EX:
4484
        return getEx();
4485
 
4486
      }
4487
      throw new IllegalStateException();
4488
    }
4489
 
4490
    public Object getFieldValue(int fieldId) {
4491
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4492
    }
4493
 
4494
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4495
    public boolean isSet(_Fields field) {
4496
      switch (field) {
4497
      case SUCCESS:
4498
        return isSetSuccess();
4499
      case EX:
4500
        return isSetEx();
4501
      }
4502
      throw new IllegalStateException();
4503
    }
4504
 
4505
    public boolean isSet(int fieldID) {
4506
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4507
    }
4508
 
4509
    @Override
4510
    public boolean equals(Object that) {
4511
      if (that == null)
4512
        return false;
4513
      if (that instanceof getTransaction_result)
4514
        return this.equals((getTransaction_result)that);
4515
      return false;
4516
    }
4517
 
4518
    public boolean equals(getTransaction_result that) {
4519
      if (that == null)
4520
        return false;
4521
 
4522
      boolean this_present_success = true && this.isSetSuccess();
4523
      boolean that_present_success = true && that.isSetSuccess();
4524
      if (this_present_success || that_present_success) {
4525
        if (!(this_present_success && that_present_success))
4526
          return false;
4527
        if (!this.success.equals(that.success))
4528
          return false;
4529
      }
4530
 
4531
      boolean this_present_ex = true && this.isSetEx();
4532
      boolean that_present_ex = true && that.isSetEx();
4533
      if (this_present_ex || that_present_ex) {
4534
        if (!(this_present_ex && that_present_ex))
4535
          return false;
4536
        if (!this.ex.equals(that.ex))
4537
          return false;
4538
      }
4539
 
4540
      return true;
4541
    }
4542
 
4543
    @Override
4544
    public int hashCode() {
4545
      return 0;
4546
    }
4547
 
684 chandransh 4548
    public int compareTo(getTransaction_result other) {
4549
      if (!getClass().equals(other.getClass())) {
4550
        return getClass().getName().compareTo(other.getClass().getName());
4551
      }
4552
 
4553
      int lastComparison = 0;
4554
      getTransaction_result typedOther = (getTransaction_result)other;
4555
 
4556
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4557
      if (lastComparison != 0) {
4558
        return lastComparison;
4559
      }
4560
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4561
      if (lastComparison != 0) {
4562
        return lastComparison;
4563
      }
4564
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4565
      if (lastComparison != 0) {
4566
        return lastComparison;
4567
      }
4568
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4569
      if (lastComparison != 0) {
4570
        return lastComparison;
4571
      }
4572
      return 0;
4573
    }
4574
 
68 ashish 4575
    public void read(TProtocol iprot) throws TException {
4576
      TField field;
4577
      iprot.readStructBegin();
4578
      while (true)
4579
      {
4580
        field = iprot.readFieldBegin();
4581
        if (field.type == TType.STOP) { 
4582
          break;
4583
        }
4584
        _Fields fieldId = _Fields.findByThriftId(field.id);
4585
        if (fieldId == null) {
4586
          TProtocolUtil.skip(iprot, field.type);
4587
        } else {
4588
          switch (fieldId) {
4589
            case SUCCESS:
4590
              if (field.type == TType.STRUCT) {
4591
                this.success = new Transaction();
4592
                this.success.read(iprot);
4593
              } else { 
4594
                TProtocolUtil.skip(iprot, field.type);
4595
              }
4596
              break;
4597
            case EX:
4598
              if (field.type == TType.STRUCT) {
4599
                this.ex = new TransactionServiceException();
4600
                this.ex.read(iprot);
4601
              } else { 
4602
                TProtocolUtil.skip(iprot, field.type);
4603
              }
4604
              break;
4605
          }
4606
          iprot.readFieldEnd();
4607
        }
4608
      }
4609
      iprot.readStructEnd();
4610
      validate();
4611
    }
4612
 
4613
    public void write(TProtocol oprot) throws TException {
4614
      oprot.writeStructBegin(STRUCT_DESC);
4615
 
4616
      if (this.isSetSuccess()) {
4617
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4618
        this.success.write(oprot);
4619
        oprot.writeFieldEnd();
4620
      } else if (this.isSetEx()) {
4621
        oprot.writeFieldBegin(EX_FIELD_DESC);
4622
        this.ex.write(oprot);
4623
        oprot.writeFieldEnd();
4624
      }
4625
      oprot.writeFieldStop();
4626
      oprot.writeStructEnd();
4627
    }
4628
 
4629
    @Override
4630
    public String toString() {
4631
      StringBuilder sb = new StringBuilder("getTransaction_result(");
4632
      boolean first = true;
4633
 
4634
      sb.append("success:");
4635
      if (this.success == null) {
4636
        sb.append("null");
4637
      } else {
4638
        sb.append(this.success);
4639
      }
4640
      first = false;
4641
      if (!first) sb.append(", ");
4642
      sb.append("ex:");
4643
      if (this.ex == null) {
4644
        sb.append("null");
4645
      } else {
4646
        sb.append(this.ex);
4647
      }
4648
      first = false;
4649
      sb.append(")");
4650
      return sb.toString();
4651
    }
4652
 
4653
    public void validate() throws TException {
4654
      // check for required fields
4655
    }
4656
 
4657
  }
4658
 
4659
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4660
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4661
 
4662
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4663
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4664
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4665
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4666
 
4667
    private long customerId;
132 ashish 4668
    private long from_date;
4669
    private long to_date;
68 ashish 4670
    private TransactionStatus status;
4671
 
4672
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4673
    public enum _Fields implements TFieldIdEnum {
4674
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4675
      FROM_DATE((short)2, "from_date"),
4676
      TO_DATE((short)3, "to_date"),
68 ashish 4677
      /**
4678
       * 
4679
       * @see TransactionStatus
4680
       */
4681
      STATUS((short)4, "status");
4682
 
4683
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4684
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4685
 
4686
      static {
4687
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4688
          byId.put((int)field._thriftId, field);
4689
          byName.put(field.getFieldName(), field);
4690
        }
4691
      }
4692
 
4693
      /**
4694
       * Find the _Fields constant that matches fieldId, or null if its not found.
4695
       */
4696
      public static _Fields findByThriftId(int fieldId) {
4697
        return byId.get(fieldId);
4698
      }
4699
 
4700
      /**
4701
       * Find the _Fields constant that matches fieldId, throwing an exception
4702
       * if it is not found.
4703
       */
4704
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4705
        _Fields fields = findByThriftId(fieldId);
4706
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4707
        return fields;
4708
      }
4709
 
4710
      /**
4711
       * Find the _Fields constant that matches name, or null if its not found.
4712
       */
4713
      public static _Fields findByName(String name) {
4714
        return byName.get(name);
4715
      }
4716
 
4717
      private final short _thriftId;
4718
      private final String _fieldName;
4719
 
4720
      _Fields(short thriftId, String fieldName) {
4721
        _thriftId = thriftId;
4722
        _fieldName = fieldName;
4723
      }
4724
 
4725
      public short getThriftFieldId() {
4726
        return _thriftId;
4727
      }
4728
 
4729
      public String getFieldName() {
4730
        return _fieldName;
4731
      }
4732
    }
4733
 
4734
    // isset id assignments
4735
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4736
    private static final int __FROM_DATE_ISSET_ID = 1;
4737
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4738
    private BitSet __isset_bit_vector = new BitSet(3);
4739
 
4740
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4741
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4742
          new FieldValueMetaData(TType.I64)));
132 ashish 4743
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4744
          new FieldValueMetaData(TType.I64)));
132 ashish 4745
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4746
          new FieldValueMetaData(TType.I64)));
4747
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4748
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4749
    }});
4750
 
4751
    static {
4752
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4753
    }
4754
 
4755
    public getTransactionsForCustomer_args() {
4756
    }
4757
 
4758
    public getTransactionsForCustomer_args(
4759
      long customerId,
132 ashish 4760
      long from_date,
4761
      long to_date,
68 ashish 4762
      TransactionStatus status)
4763
    {
4764
      this();
4765
      this.customerId = customerId;
4766
      setCustomerIdIsSet(true);
132 ashish 4767
      this.from_date = from_date;
4768
      setFrom_dateIsSet(true);
4769
      this.to_date = to_date;
4770
      setTo_dateIsSet(true);
68 ashish 4771
      this.status = status;
4772
    }
4773
 
4774
    /**
4775
     * Performs a deep copy on <i>other</i>.
4776
     */
4777
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4778
      __isset_bit_vector.clear();
4779
      __isset_bit_vector.or(other.__isset_bit_vector);
4780
      this.customerId = other.customerId;
132 ashish 4781
      this.from_date = other.from_date;
4782
      this.to_date = other.to_date;
68 ashish 4783
      if (other.isSetStatus()) {
4784
        this.status = other.status;
4785
      }
4786
    }
4787
 
4788
    public getTransactionsForCustomer_args deepCopy() {
4789
      return new getTransactionsForCustomer_args(this);
4790
    }
4791
 
4792
    @Deprecated
4793
    public getTransactionsForCustomer_args clone() {
4794
      return new getTransactionsForCustomer_args(this);
4795
    }
4796
 
4797
    public long getCustomerId() {
4798
      return this.customerId;
4799
    }
4800
 
4801
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4802
      this.customerId = customerId;
4803
      setCustomerIdIsSet(true);
4804
      return this;
4805
    }
4806
 
4807
    public void unsetCustomerId() {
4808
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4809
    }
4810
 
4811
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4812
    public boolean isSetCustomerId() {
4813
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4814
    }
4815
 
4816
    public void setCustomerIdIsSet(boolean value) {
4817
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4818
    }
4819
 
132 ashish 4820
    public long getFrom_date() {
4821
      return this.from_date;
68 ashish 4822
    }
4823
 
132 ashish 4824
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4825
      this.from_date = from_date;
4826
      setFrom_dateIsSet(true);
68 ashish 4827
      return this;
4828
    }
4829
 
132 ashish 4830
    public void unsetFrom_date() {
4831
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4832
    }
4833
 
132 ashish 4834
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4835
    public boolean isSetFrom_date() {
4836
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4837
    }
4838
 
132 ashish 4839
    public void setFrom_dateIsSet(boolean value) {
4840
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4841
    }
4842
 
132 ashish 4843
    public long getTo_date() {
4844
      return this.to_date;
68 ashish 4845
    }
4846
 
132 ashish 4847
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4848
      this.to_date = to_date;
4849
      setTo_dateIsSet(true);
68 ashish 4850
      return this;
4851
    }
4852
 
132 ashish 4853
    public void unsetTo_date() {
4854
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4855
    }
4856
 
132 ashish 4857
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4858
    public boolean isSetTo_date() {
4859
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4860
    }
4861
 
132 ashish 4862
    public void setTo_dateIsSet(boolean value) {
4863
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4864
    }
4865
 
4866
    /**
4867
     * 
4868
     * @see TransactionStatus
4869
     */
4870
    public TransactionStatus getStatus() {
4871
      return this.status;
4872
    }
4873
 
4874
    /**
4875
     * 
4876
     * @see TransactionStatus
4877
     */
4878
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4879
      this.status = status;
4880
      return this;
4881
    }
4882
 
4883
    public void unsetStatus() {
4884
      this.status = null;
4885
    }
4886
 
4887
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4888
    public boolean isSetStatus() {
4889
      return this.status != null;
4890
    }
4891
 
4892
    public void setStatusIsSet(boolean value) {
4893
      if (!value) {
4894
        this.status = null;
4895
      }
4896
    }
4897
 
4898
    public void setFieldValue(_Fields field, Object value) {
4899
      switch (field) {
4900
      case CUSTOMER_ID:
4901
        if (value == null) {
4902
          unsetCustomerId();
4903
        } else {
4904
          setCustomerId((Long)value);
4905
        }
4906
        break;
4907
 
132 ashish 4908
      case FROM_DATE:
68 ashish 4909
        if (value == null) {
132 ashish 4910
          unsetFrom_date();
68 ashish 4911
        } else {
132 ashish 4912
          setFrom_date((Long)value);
68 ashish 4913
        }
4914
        break;
4915
 
132 ashish 4916
      case TO_DATE:
68 ashish 4917
        if (value == null) {
132 ashish 4918
          unsetTo_date();
68 ashish 4919
        } else {
132 ashish 4920
          setTo_date((Long)value);
68 ashish 4921
        }
4922
        break;
4923
 
4924
      case STATUS:
4925
        if (value == null) {
4926
          unsetStatus();
4927
        } else {
4928
          setStatus((TransactionStatus)value);
4929
        }
4930
        break;
4931
 
4932
      }
4933
    }
4934
 
4935
    public void setFieldValue(int fieldID, Object value) {
4936
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4937
    }
4938
 
4939
    public Object getFieldValue(_Fields field) {
4940
      switch (field) {
4941
      case CUSTOMER_ID:
4942
        return new Long(getCustomerId());
4943
 
132 ashish 4944
      case FROM_DATE:
4945
        return new Long(getFrom_date());
68 ashish 4946
 
132 ashish 4947
      case TO_DATE:
4948
        return new Long(getTo_date());
68 ashish 4949
 
4950
      case STATUS:
4951
        return getStatus();
4952
 
4953
      }
4954
      throw new IllegalStateException();
4955
    }
4956
 
4957
    public Object getFieldValue(int fieldId) {
4958
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4959
    }
4960
 
4961
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4962
    public boolean isSet(_Fields field) {
4963
      switch (field) {
4964
      case CUSTOMER_ID:
4965
        return isSetCustomerId();
132 ashish 4966
      case FROM_DATE:
4967
        return isSetFrom_date();
4968
      case TO_DATE:
4969
        return isSetTo_date();
68 ashish 4970
      case STATUS:
4971
        return isSetStatus();
4972
      }
4973
      throw new IllegalStateException();
4974
    }
4975
 
4976
    public boolean isSet(int fieldID) {
4977
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4978
    }
4979
 
4980
    @Override
4981
    public boolean equals(Object that) {
4982
      if (that == null)
4983
        return false;
4984
      if (that instanceof getTransactionsForCustomer_args)
4985
        return this.equals((getTransactionsForCustomer_args)that);
4986
      return false;
4987
    }
4988
 
4989
    public boolean equals(getTransactionsForCustomer_args that) {
4990
      if (that == null)
4991
        return false;
4992
 
4993
      boolean this_present_customerId = true;
4994
      boolean that_present_customerId = true;
4995
      if (this_present_customerId || that_present_customerId) {
4996
        if (!(this_present_customerId && that_present_customerId))
4997
          return false;
4998
        if (this.customerId != that.customerId)
4999
          return false;
5000
      }
5001
 
132 ashish 5002
      boolean this_present_from_date = true;
5003
      boolean that_present_from_date = true;
5004
      if (this_present_from_date || that_present_from_date) {
5005
        if (!(this_present_from_date && that_present_from_date))
68 ashish 5006
          return false;
132 ashish 5007
        if (this.from_date != that.from_date)
68 ashish 5008
          return false;
5009
      }
5010
 
132 ashish 5011
      boolean this_present_to_date = true;
5012
      boolean that_present_to_date = true;
5013
      if (this_present_to_date || that_present_to_date) {
5014
        if (!(this_present_to_date && that_present_to_date))
68 ashish 5015
          return false;
132 ashish 5016
        if (this.to_date != that.to_date)
68 ashish 5017
          return false;
5018
      }
5019
 
5020
      boolean this_present_status = true && this.isSetStatus();
5021
      boolean that_present_status = true && that.isSetStatus();
5022
      if (this_present_status || that_present_status) {
5023
        if (!(this_present_status && that_present_status))
5024
          return false;
5025
        if (!this.status.equals(that.status))
5026
          return false;
5027
      }
5028
 
5029
      return true;
5030
    }
5031
 
5032
    @Override
5033
    public int hashCode() {
5034
      return 0;
5035
    }
5036
 
5037
    public int compareTo(getTransactionsForCustomer_args other) {
5038
      if (!getClass().equals(other.getClass())) {
5039
        return getClass().getName().compareTo(other.getClass().getName());
5040
      }
5041
 
5042
      int lastComparison = 0;
5043
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
5044
 
5045
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
5046
      if (lastComparison != 0) {
5047
        return lastComparison;
5048
      }
5049
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
5050
      if (lastComparison != 0) {
5051
        return lastComparison;
5052
      }
132 ashish 5053
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 5054
      if (lastComparison != 0) {
5055
        return lastComparison;
5056
      }
132 ashish 5057
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 5058
      if (lastComparison != 0) {
5059
        return lastComparison;
5060
      }
132 ashish 5061
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 5062
      if (lastComparison != 0) {
5063
        return lastComparison;
5064
      }
132 ashish 5065
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 5066
      if (lastComparison != 0) {
5067
        return lastComparison;
5068
      }
5069
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
5070
      if (lastComparison != 0) {
5071
        return lastComparison;
5072
      }
5073
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
5074
      if (lastComparison != 0) {
5075
        return lastComparison;
5076
      }
5077
      return 0;
5078
    }
5079
 
5080
    public void read(TProtocol iprot) throws TException {
5081
      TField field;
5082
      iprot.readStructBegin();
5083
      while (true)
5084
      {
5085
        field = iprot.readFieldBegin();
5086
        if (field.type == TType.STOP) { 
5087
          break;
5088
        }
5089
        _Fields fieldId = _Fields.findByThriftId(field.id);
5090
        if (fieldId == null) {
5091
          TProtocolUtil.skip(iprot, field.type);
5092
        } else {
5093
          switch (fieldId) {
5094
            case CUSTOMER_ID:
5095
              if (field.type == TType.I64) {
5096
                this.customerId = iprot.readI64();
5097
                setCustomerIdIsSet(true);
5098
              } else { 
5099
                TProtocolUtil.skip(iprot, field.type);
5100
              }
5101
              break;
132 ashish 5102
            case FROM_DATE:
68 ashish 5103
              if (field.type == TType.I64) {
132 ashish 5104
                this.from_date = iprot.readI64();
5105
                setFrom_dateIsSet(true);
68 ashish 5106
              } else { 
5107
                TProtocolUtil.skip(iprot, field.type);
5108
              }
5109
              break;
132 ashish 5110
            case TO_DATE:
68 ashish 5111
              if (field.type == TType.I64) {
132 ashish 5112
                this.to_date = iprot.readI64();
5113
                setTo_dateIsSet(true);
68 ashish 5114
              } else { 
5115
                TProtocolUtil.skip(iprot, field.type);
5116
              }
5117
              break;
5118
            case STATUS:
5119
              if (field.type == TType.I32) {
5120
                this.status = TransactionStatus.findByValue(iprot.readI32());
5121
              } else { 
5122
                TProtocolUtil.skip(iprot, field.type);
5123
              }
5124
              break;
5125
          }
5126
          iprot.readFieldEnd();
5127
        }
5128
      }
5129
      iprot.readStructEnd();
5130
      validate();
5131
    }
5132
 
5133
    public void write(TProtocol oprot) throws TException {
5134
      validate();
5135
 
5136
      oprot.writeStructBegin(STRUCT_DESC);
5137
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
5138
      oprot.writeI64(this.customerId);
5139
      oprot.writeFieldEnd();
132 ashish 5140
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
5141
      oprot.writeI64(this.from_date);
68 ashish 5142
      oprot.writeFieldEnd();
132 ashish 5143
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
5144
      oprot.writeI64(this.to_date);
68 ashish 5145
      oprot.writeFieldEnd();
5146
      if (this.status != null) {
5147
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
5148
        oprot.writeI32(this.status.getValue());
5149
        oprot.writeFieldEnd();
5150
      }
5151
      oprot.writeFieldStop();
5152
      oprot.writeStructEnd();
5153
    }
5154
 
5155
    @Override
5156
    public String toString() {
5157
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
5158
      boolean first = true;
5159
 
5160
      sb.append("customerId:");
5161
      sb.append(this.customerId);
5162
      first = false;
5163
      if (!first) sb.append(", ");
132 ashish 5164
      sb.append("from_date:");
5165
      sb.append(this.from_date);
68 ashish 5166
      first = false;
5167
      if (!first) sb.append(", ");
132 ashish 5168
      sb.append("to_date:");
5169
      sb.append(this.to_date);
68 ashish 5170
      first = false;
5171
      if (!first) sb.append(", ");
5172
      sb.append("status:");
5173
      if (this.status == null) {
5174
        sb.append("null");
5175
      } else {
5176
        String status_name = status.name();
5177
        if (status_name != null) {
5178
          sb.append(status_name);
5179
          sb.append(" (");
5180
        }
5181
        sb.append(this.status);
5182
        if (status_name != null) {
5183
          sb.append(")");
5184
        }
5185
      }
5186
      first = false;
5187
      sb.append(")");
5188
      return sb.toString();
5189
    }
5190
 
5191
    public void validate() throws TException {
5192
      // check for required fields
5193
    }
5194
 
5195
  }
5196
 
684 chandransh 5197
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 5198
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
5199
 
5200
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5201
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5202
 
5203
    private List<Transaction> success;
5204
    private TransactionServiceException ex;
5205
 
5206
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5207
    public enum _Fields implements TFieldIdEnum {
5208
      SUCCESS((short)0, "success"),
5209
      EX((short)1, "ex");
5210
 
5211
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5212
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5213
 
5214
      static {
5215
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5216
          byId.put((int)field._thriftId, field);
5217
          byName.put(field.getFieldName(), field);
5218
        }
5219
      }
5220
 
5221
      /**
5222
       * Find the _Fields constant that matches fieldId, or null if its not found.
5223
       */
5224
      public static _Fields findByThriftId(int fieldId) {
5225
        return byId.get(fieldId);
5226
      }
5227
 
5228
      /**
5229
       * Find the _Fields constant that matches fieldId, throwing an exception
5230
       * if it is not found.
5231
       */
5232
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5233
        _Fields fields = findByThriftId(fieldId);
5234
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5235
        return fields;
5236
      }
5237
 
5238
      /**
5239
       * Find the _Fields constant that matches name, or null if its not found.
5240
       */
5241
      public static _Fields findByName(String name) {
5242
        return byName.get(name);
5243
      }
5244
 
5245
      private final short _thriftId;
5246
      private final String _fieldName;
5247
 
5248
      _Fields(short thriftId, String fieldName) {
5249
        _thriftId = thriftId;
5250
        _fieldName = fieldName;
5251
      }
5252
 
5253
      public short getThriftFieldId() {
5254
        return _thriftId;
5255
      }
5256
 
5257
      public String getFieldName() {
5258
        return _fieldName;
5259
      }
5260
    }
5261
 
5262
    // isset id assignments
5263
 
5264
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5265
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5266
          new ListMetaData(TType.LIST, 
5267
              new StructMetaData(TType.STRUCT, Transaction.class))));
5268
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5269
          new FieldValueMetaData(TType.STRUCT)));
5270
    }});
5271
 
5272
    static {
5273
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
5274
    }
5275
 
5276
    public getTransactionsForCustomer_result() {
5277
    }
5278
 
5279
    public getTransactionsForCustomer_result(
5280
      List<Transaction> success,
5281
      TransactionServiceException ex)
5282
    {
5283
      this();
5284
      this.success = success;
5285
      this.ex = ex;
5286
    }
5287
 
5288
    /**
5289
     * Performs a deep copy on <i>other</i>.
5290
     */
5291
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
5292
      if (other.isSetSuccess()) {
5293
        List<Transaction> __this__success = new ArrayList<Transaction>();
5294
        for (Transaction other_element : other.success) {
5295
          __this__success.add(new Transaction(other_element));
5296
        }
5297
        this.success = __this__success;
5298
      }
5299
      if (other.isSetEx()) {
5300
        this.ex = new TransactionServiceException(other.ex);
5301
      }
5302
    }
5303
 
5304
    public getTransactionsForCustomer_result deepCopy() {
5305
      return new getTransactionsForCustomer_result(this);
5306
    }
5307
 
5308
    @Deprecated
5309
    public getTransactionsForCustomer_result clone() {
5310
      return new getTransactionsForCustomer_result(this);
5311
    }
5312
 
5313
    public int getSuccessSize() {
5314
      return (this.success == null) ? 0 : this.success.size();
5315
    }
5316
 
5317
    public java.util.Iterator<Transaction> getSuccessIterator() {
5318
      return (this.success == null) ? null : this.success.iterator();
5319
    }
5320
 
5321
    public void addToSuccess(Transaction elem) {
5322
      if (this.success == null) {
5323
        this.success = new ArrayList<Transaction>();
5324
      }
5325
      this.success.add(elem);
5326
    }
5327
 
5328
    public List<Transaction> getSuccess() {
5329
      return this.success;
5330
    }
5331
 
5332
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
5333
      this.success = success;
5334
      return this;
5335
    }
5336
 
5337
    public void unsetSuccess() {
5338
      this.success = null;
5339
    }
5340
 
5341
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5342
    public boolean isSetSuccess() {
5343
      return this.success != null;
5344
    }
5345
 
5346
    public void setSuccessIsSet(boolean value) {
5347
      if (!value) {
5348
        this.success = null;
5349
      }
5350
    }
5351
 
5352
    public TransactionServiceException getEx() {
5353
      return this.ex;
5354
    }
5355
 
5356
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
5357
      this.ex = ex;
5358
      return this;
5359
    }
5360
 
5361
    public void unsetEx() {
5362
      this.ex = null;
5363
    }
5364
 
5365
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5366
    public boolean isSetEx() {
5367
      return this.ex != null;
5368
    }
5369
 
5370
    public void setExIsSet(boolean value) {
5371
      if (!value) {
5372
        this.ex = null;
5373
      }
5374
    }
5375
 
5376
    public void setFieldValue(_Fields field, Object value) {
5377
      switch (field) {
5378
      case SUCCESS:
5379
        if (value == null) {
5380
          unsetSuccess();
5381
        } else {
5382
          setSuccess((List<Transaction>)value);
5383
        }
5384
        break;
5385
 
5386
      case EX:
5387
        if (value == null) {
5388
          unsetEx();
5389
        } else {
5390
          setEx((TransactionServiceException)value);
5391
        }
5392
        break;
5393
 
5394
      }
5395
    }
5396
 
5397
    public void setFieldValue(int fieldID, Object value) {
5398
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5399
    }
5400
 
5401
    public Object getFieldValue(_Fields field) {
5402
      switch (field) {
5403
      case SUCCESS:
5404
        return getSuccess();
5405
 
5406
      case EX:
5407
        return getEx();
5408
 
5409
      }
5410
      throw new IllegalStateException();
5411
    }
5412
 
5413
    public Object getFieldValue(int fieldId) {
5414
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5415
    }
5416
 
5417
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5418
    public boolean isSet(_Fields field) {
5419
      switch (field) {
5420
      case SUCCESS:
5421
        return isSetSuccess();
5422
      case EX:
5423
        return isSetEx();
5424
      }
5425
      throw new IllegalStateException();
5426
    }
5427
 
5428
    public boolean isSet(int fieldID) {
5429
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5430
    }
5431
 
5432
    @Override
5433
    public boolean equals(Object that) {
5434
      if (that == null)
5435
        return false;
5436
      if (that instanceof getTransactionsForCustomer_result)
5437
        return this.equals((getTransactionsForCustomer_result)that);
5438
      return false;
5439
    }
5440
 
5441
    public boolean equals(getTransactionsForCustomer_result that) {
5442
      if (that == null)
5443
        return false;
5444
 
5445
      boolean this_present_success = true && this.isSetSuccess();
5446
      boolean that_present_success = true && that.isSetSuccess();
5447
      if (this_present_success || that_present_success) {
5448
        if (!(this_present_success && that_present_success))
5449
          return false;
5450
        if (!this.success.equals(that.success))
5451
          return false;
5452
      }
5453
 
5454
      boolean this_present_ex = true && this.isSetEx();
5455
      boolean that_present_ex = true && that.isSetEx();
5456
      if (this_present_ex || that_present_ex) {
5457
        if (!(this_present_ex && that_present_ex))
5458
          return false;
5459
        if (!this.ex.equals(that.ex))
5460
          return false;
5461
      }
5462
 
5463
      return true;
5464
    }
5465
 
5466
    @Override
5467
    public int hashCode() {
5468
      return 0;
5469
    }
5470
 
684 chandransh 5471
    public int compareTo(getTransactionsForCustomer_result other) {
5472
      if (!getClass().equals(other.getClass())) {
5473
        return getClass().getName().compareTo(other.getClass().getName());
5474
      }
5475
 
5476
      int lastComparison = 0;
5477
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
5478
 
5479
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5480
      if (lastComparison != 0) {
5481
        return lastComparison;
5482
      }
5483
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5484
      if (lastComparison != 0) {
5485
        return lastComparison;
5486
      }
5487
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5488
      if (lastComparison != 0) {
5489
        return lastComparison;
5490
      }
5491
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5492
      if (lastComparison != 0) {
5493
        return lastComparison;
5494
      }
5495
      return 0;
5496
    }
5497
 
68 ashish 5498
    public void read(TProtocol iprot) throws TException {
5499
      TField field;
5500
      iprot.readStructBegin();
5501
      while (true)
5502
      {
5503
        field = iprot.readFieldBegin();
5504
        if (field.type == TType.STOP) { 
5505
          break;
5506
        }
5507
        _Fields fieldId = _Fields.findByThriftId(field.id);
5508
        if (fieldId == null) {
5509
          TProtocolUtil.skip(iprot, field.type);
5510
        } else {
5511
          switch (fieldId) {
5512
            case SUCCESS:
5513
              if (field.type == TType.LIST) {
5514
                {
684 chandransh 5515
                  TList _list8 = iprot.readListBegin();
5516
                  this.success = new ArrayList<Transaction>(_list8.size);
5517
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 5518
                  {
684 chandransh 5519
                    Transaction _elem10;
5520
                    _elem10 = new Transaction();
5521
                    _elem10.read(iprot);
5522
                    this.success.add(_elem10);
68 ashish 5523
                  }
5524
                  iprot.readListEnd();
5525
                }
5526
              } else { 
5527
                TProtocolUtil.skip(iprot, field.type);
5528
              }
5529
              break;
5530
            case EX:
5531
              if (field.type == TType.STRUCT) {
5532
                this.ex = new TransactionServiceException();
5533
                this.ex.read(iprot);
5534
              } else { 
5535
                TProtocolUtil.skip(iprot, field.type);
5536
              }
5537
              break;
5538
          }
5539
          iprot.readFieldEnd();
5540
        }
5541
      }
5542
      iprot.readStructEnd();
5543
      validate();
5544
    }
5545
 
5546
    public void write(TProtocol oprot) throws TException {
5547
      oprot.writeStructBegin(STRUCT_DESC);
5548
 
5549
      if (this.isSetSuccess()) {
5550
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5551
        {
5552
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5553
          for (Transaction _iter11 : this.success)
68 ashish 5554
          {
684 chandransh 5555
            _iter11.write(oprot);
68 ashish 5556
          }
5557
          oprot.writeListEnd();
5558
        }
5559
        oprot.writeFieldEnd();
5560
      } else if (this.isSetEx()) {
5561
        oprot.writeFieldBegin(EX_FIELD_DESC);
5562
        this.ex.write(oprot);
5563
        oprot.writeFieldEnd();
5564
      }
5565
      oprot.writeFieldStop();
5566
      oprot.writeStructEnd();
5567
    }
5568
 
5569
    @Override
5570
    public String toString() {
5571
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5572
      boolean first = true;
5573
 
5574
      sb.append("success:");
5575
      if (this.success == null) {
5576
        sb.append("null");
5577
      } else {
5578
        sb.append(this.success);
5579
      }
5580
      first = false;
5581
      if (!first) sb.append(", ");
5582
      sb.append("ex:");
5583
      if (this.ex == null) {
5584
        sb.append("null");
5585
      } else {
5586
        sb.append(this.ex);
5587
      }
5588
      first = false;
5589
      sb.append(")");
5590
      return sb.toString();
5591
    }
5592
 
5593
    public void validate() throws TException {
5594
      // check for required fields
5595
    }
5596
 
5597
  }
5598
 
132 ashish 5599
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
5600
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
5601
 
5602
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
5603
 
5604
    private long shoppingCartId;
5605
 
5606
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5607
    public enum _Fields implements TFieldIdEnum {
5608
      SHOPPING_CART_ID((short)1, "shoppingCartId");
5609
 
5610
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5611
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5612
 
5613
      static {
5614
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5615
          byId.put((int)field._thriftId, field);
5616
          byName.put(field.getFieldName(), field);
5617
        }
5618
      }
5619
 
5620
      /**
5621
       * Find the _Fields constant that matches fieldId, or null if its not found.
5622
       */
5623
      public static _Fields findByThriftId(int fieldId) {
5624
        return byId.get(fieldId);
5625
      }
5626
 
5627
      /**
5628
       * Find the _Fields constant that matches fieldId, throwing an exception
5629
       * if it is not found.
5630
       */
5631
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5632
        _Fields fields = findByThriftId(fieldId);
5633
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5634
        return fields;
5635
      }
5636
 
5637
      /**
5638
       * Find the _Fields constant that matches name, or null if its not found.
5639
       */
5640
      public static _Fields findByName(String name) {
5641
        return byName.get(name);
5642
      }
5643
 
5644
      private final short _thriftId;
5645
      private final String _fieldName;
5646
 
5647
      _Fields(short thriftId, String fieldName) {
5648
        _thriftId = thriftId;
5649
        _fieldName = fieldName;
5650
      }
5651
 
5652
      public short getThriftFieldId() {
5653
        return _thriftId;
5654
      }
5655
 
5656
      public String getFieldName() {
5657
        return _fieldName;
5658
      }
5659
    }
5660
 
5661
    // isset id assignments
5662
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
5663
    private BitSet __isset_bit_vector = new BitSet(1);
5664
 
5665
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5666
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
5667
          new FieldValueMetaData(TType.I64)));
5668
    }});
5669
 
5670
    static {
5671
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
5672
    }
5673
 
5674
    public getTransactionsForShoppingCartId_args() {
5675
    }
5676
 
5677
    public getTransactionsForShoppingCartId_args(
5678
      long shoppingCartId)
5679
    {
5680
      this();
5681
      this.shoppingCartId = shoppingCartId;
5682
      setShoppingCartIdIsSet(true);
5683
    }
5684
 
5685
    /**
5686
     * Performs a deep copy on <i>other</i>.
5687
     */
5688
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
5689
      __isset_bit_vector.clear();
5690
      __isset_bit_vector.or(other.__isset_bit_vector);
5691
      this.shoppingCartId = other.shoppingCartId;
5692
    }
5693
 
5694
    public getTransactionsForShoppingCartId_args deepCopy() {
5695
      return new getTransactionsForShoppingCartId_args(this);
5696
    }
5697
 
5698
    @Deprecated
5699
    public getTransactionsForShoppingCartId_args clone() {
5700
      return new getTransactionsForShoppingCartId_args(this);
5701
    }
5702
 
5703
    public long getShoppingCartId() {
5704
      return this.shoppingCartId;
5705
    }
5706
 
5707
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5708
      this.shoppingCartId = shoppingCartId;
5709
      setShoppingCartIdIsSet(true);
5710
      return this;
5711
    }
5712
 
5713
    public void unsetShoppingCartId() {
5714
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5715
    }
5716
 
5717
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5718
    public boolean isSetShoppingCartId() {
5719
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5720
    }
5721
 
5722
    public void setShoppingCartIdIsSet(boolean value) {
5723
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5724
    }
5725
 
5726
    public void setFieldValue(_Fields field, Object value) {
5727
      switch (field) {
5728
      case SHOPPING_CART_ID:
5729
        if (value == null) {
5730
          unsetShoppingCartId();
5731
        } else {
5732
          setShoppingCartId((Long)value);
5733
        }
5734
        break;
5735
 
5736
      }
5737
    }
5738
 
5739
    public void setFieldValue(int fieldID, Object value) {
5740
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5741
    }
5742
 
5743
    public Object getFieldValue(_Fields field) {
5744
      switch (field) {
5745
      case SHOPPING_CART_ID:
5746
        return new Long(getShoppingCartId());
5747
 
5748
      }
5749
      throw new IllegalStateException();
5750
    }
5751
 
5752
    public Object getFieldValue(int fieldId) {
5753
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5754
    }
5755
 
5756
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5757
    public boolean isSet(_Fields field) {
5758
      switch (field) {
5759
      case SHOPPING_CART_ID:
5760
        return isSetShoppingCartId();
5761
      }
5762
      throw new IllegalStateException();
5763
    }
5764
 
5765
    public boolean isSet(int fieldID) {
5766
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5767
    }
5768
 
5769
    @Override
5770
    public boolean equals(Object that) {
5771
      if (that == null)
5772
        return false;
5773
      if (that instanceof getTransactionsForShoppingCartId_args)
5774
        return this.equals((getTransactionsForShoppingCartId_args)that);
5775
      return false;
5776
    }
5777
 
5778
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5779
      if (that == null)
5780
        return false;
5781
 
5782
      boolean this_present_shoppingCartId = true;
5783
      boolean that_present_shoppingCartId = true;
5784
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5785
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5786
          return false;
5787
        if (this.shoppingCartId != that.shoppingCartId)
5788
          return false;
5789
      }
5790
 
5791
      return true;
5792
    }
5793
 
5794
    @Override
5795
    public int hashCode() {
5796
      return 0;
5797
    }
5798
 
5799
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5800
      if (!getClass().equals(other.getClass())) {
5801
        return getClass().getName().compareTo(other.getClass().getName());
5802
      }
5803
 
5804
      int lastComparison = 0;
5805
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5806
 
5807
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5808
      if (lastComparison != 0) {
5809
        return lastComparison;
5810
      }
5811
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5812
      if (lastComparison != 0) {
5813
        return lastComparison;
5814
      }
5815
      return 0;
5816
    }
5817
 
5818
    public void read(TProtocol iprot) throws TException {
5819
      TField field;
5820
      iprot.readStructBegin();
5821
      while (true)
5822
      {
5823
        field = iprot.readFieldBegin();
5824
        if (field.type == TType.STOP) { 
5825
          break;
5826
        }
5827
        _Fields fieldId = _Fields.findByThriftId(field.id);
5828
        if (fieldId == null) {
5829
          TProtocolUtil.skip(iprot, field.type);
5830
        } else {
5831
          switch (fieldId) {
5832
            case SHOPPING_CART_ID:
5833
              if (field.type == TType.I64) {
5834
                this.shoppingCartId = iprot.readI64();
5835
                setShoppingCartIdIsSet(true);
5836
              } else { 
5837
                TProtocolUtil.skip(iprot, field.type);
5838
              }
5839
              break;
5840
          }
5841
          iprot.readFieldEnd();
5842
        }
5843
      }
5844
      iprot.readStructEnd();
5845
      validate();
5846
    }
5847
 
5848
    public void write(TProtocol oprot) throws TException {
5849
      validate();
5850
 
5851
      oprot.writeStructBegin(STRUCT_DESC);
5852
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5853
      oprot.writeI64(this.shoppingCartId);
5854
      oprot.writeFieldEnd();
5855
      oprot.writeFieldStop();
5856
      oprot.writeStructEnd();
5857
    }
5858
 
5859
    @Override
5860
    public String toString() {
5861
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5862
      boolean first = true;
5863
 
5864
      sb.append("shoppingCartId:");
5865
      sb.append(this.shoppingCartId);
5866
      first = false;
5867
      sb.append(")");
5868
      return sb.toString();
5869
    }
5870
 
5871
    public void validate() throws TException {
5872
      // check for required fields
5873
    }
5874
 
5875
  }
5876
 
684 chandransh 5877
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5878
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5879
 
5880
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5881
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5882
 
5883
    private List<Transaction> success;
5884
    private TransactionServiceException ex;
5885
 
5886
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5887
    public enum _Fields implements TFieldIdEnum {
5888
      SUCCESS((short)0, "success"),
5889
      EX((short)1, "ex");
5890
 
5891
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5892
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5893
 
5894
      static {
5895
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5896
          byId.put((int)field._thriftId, field);
5897
          byName.put(field.getFieldName(), field);
5898
        }
5899
      }
5900
 
5901
      /**
5902
       * Find the _Fields constant that matches fieldId, or null if its not found.
5903
       */
5904
      public static _Fields findByThriftId(int fieldId) {
5905
        return byId.get(fieldId);
5906
      }
5907
 
5908
      /**
5909
       * Find the _Fields constant that matches fieldId, throwing an exception
5910
       * if it is not found.
5911
       */
5912
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5913
        _Fields fields = findByThriftId(fieldId);
5914
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5915
        return fields;
5916
      }
5917
 
5918
      /**
5919
       * Find the _Fields constant that matches name, or null if its not found.
5920
       */
5921
      public static _Fields findByName(String name) {
5922
        return byName.get(name);
5923
      }
5924
 
5925
      private final short _thriftId;
5926
      private final String _fieldName;
5927
 
5928
      _Fields(short thriftId, String fieldName) {
5929
        _thriftId = thriftId;
5930
        _fieldName = fieldName;
5931
      }
5932
 
5933
      public short getThriftFieldId() {
5934
        return _thriftId;
5935
      }
5936
 
5937
      public String getFieldName() {
5938
        return _fieldName;
5939
      }
5940
    }
5941
 
5942
    // isset id assignments
5943
 
5944
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5945
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5946
          new ListMetaData(TType.LIST, 
5947
              new StructMetaData(TType.STRUCT, Transaction.class))));
5948
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5949
          new FieldValueMetaData(TType.STRUCT)));
5950
    }});
5951
 
5952
    static {
5953
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5954
    }
5955
 
5956
    public getTransactionsForShoppingCartId_result() {
5957
    }
5958
 
5959
    public getTransactionsForShoppingCartId_result(
5960
      List<Transaction> success,
5961
      TransactionServiceException ex)
5962
    {
5963
      this();
5964
      this.success = success;
5965
      this.ex = ex;
5966
    }
5967
 
5968
    /**
5969
     * Performs a deep copy on <i>other</i>.
5970
     */
5971
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5972
      if (other.isSetSuccess()) {
5973
        List<Transaction> __this__success = new ArrayList<Transaction>();
5974
        for (Transaction other_element : other.success) {
5975
          __this__success.add(new Transaction(other_element));
5976
        }
5977
        this.success = __this__success;
5978
      }
5979
      if (other.isSetEx()) {
5980
        this.ex = new TransactionServiceException(other.ex);
5981
      }
5982
    }
5983
 
5984
    public getTransactionsForShoppingCartId_result deepCopy() {
5985
      return new getTransactionsForShoppingCartId_result(this);
5986
    }
5987
 
5988
    @Deprecated
5989
    public getTransactionsForShoppingCartId_result clone() {
5990
      return new getTransactionsForShoppingCartId_result(this);
5991
    }
5992
 
5993
    public int getSuccessSize() {
5994
      return (this.success == null) ? 0 : this.success.size();
5995
    }
5996
 
5997
    public java.util.Iterator<Transaction> getSuccessIterator() {
5998
      return (this.success == null) ? null : this.success.iterator();
5999
    }
6000
 
6001
    public void addToSuccess(Transaction elem) {
6002
      if (this.success == null) {
6003
        this.success = new ArrayList<Transaction>();
6004
      }
6005
      this.success.add(elem);
6006
    }
6007
 
6008
    public List<Transaction> getSuccess() {
6009
      return this.success;
6010
    }
6011
 
6012
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
6013
      this.success = success;
6014
      return this;
6015
    }
6016
 
6017
    public void unsetSuccess() {
6018
      this.success = null;
6019
    }
6020
 
6021
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6022
    public boolean isSetSuccess() {
6023
      return this.success != null;
6024
    }
6025
 
6026
    public void setSuccessIsSet(boolean value) {
6027
      if (!value) {
6028
        this.success = null;
6029
      }
6030
    }
6031
 
6032
    public TransactionServiceException getEx() {
6033
      return this.ex;
6034
    }
6035
 
6036
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
6037
      this.ex = ex;
6038
      return this;
6039
    }
6040
 
6041
    public void unsetEx() {
6042
      this.ex = null;
6043
    }
6044
 
6045
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6046
    public boolean isSetEx() {
6047
      return this.ex != null;
6048
    }
6049
 
6050
    public void setExIsSet(boolean value) {
6051
      if (!value) {
6052
        this.ex = null;
6053
      }
6054
    }
6055
 
6056
    public void setFieldValue(_Fields field, Object value) {
6057
      switch (field) {
6058
      case SUCCESS:
6059
        if (value == null) {
6060
          unsetSuccess();
6061
        } else {
6062
          setSuccess((List<Transaction>)value);
6063
        }
6064
        break;
6065
 
6066
      case EX:
6067
        if (value == null) {
6068
          unsetEx();
6069
        } else {
6070
          setEx((TransactionServiceException)value);
6071
        }
6072
        break;
6073
 
6074
      }
6075
    }
6076
 
6077
    public void setFieldValue(int fieldID, Object value) {
6078
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6079
    }
6080
 
6081
    public Object getFieldValue(_Fields field) {
6082
      switch (field) {
6083
      case SUCCESS:
6084
        return getSuccess();
6085
 
6086
      case EX:
6087
        return getEx();
6088
 
6089
      }
6090
      throw new IllegalStateException();
6091
    }
6092
 
6093
    public Object getFieldValue(int fieldId) {
6094
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6095
    }
6096
 
6097
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6098
    public boolean isSet(_Fields field) {
6099
      switch (field) {
6100
      case SUCCESS:
6101
        return isSetSuccess();
6102
      case EX:
6103
        return isSetEx();
6104
      }
6105
      throw new IllegalStateException();
6106
    }
6107
 
6108
    public boolean isSet(int fieldID) {
6109
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6110
    }
6111
 
6112
    @Override
6113
    public boolean equals(Object that) {
6114
      if (that == null)
6115
        return false;
6116
      if (that instanceof getTransactionsForShoppingCartId_result)
6117
        return this.equals((getTransactionsForShoppingCartId_result)that);
6118
      return false;
6119
    }
6120
 
6121
    public boolean equals(getTransactionsForShoppingCartId_result that) {
6122
      if (that == null)
6123
        return false;
6124
 
6125
      boolean this_present_success = true && this.isSetSuccess();
6126
      boolean that_present_success = true && that.isSetSuccess();
6127
      if (this_present_success || that_present_success) {
6128
        if (!(this_present_success && that_present_success))
6129
          return false;
6130
        if (!this.success.equals(that.success))
6131
          return false;
6132
      }
6133
 
6134
      boolean this_present_ex = true && this.isSetEx();
6135
      boolean that_present_ex = true && that.isSetEx();
6136
      if (this_present_ex || that_present_ex) {
6137
        if (!(this_present_ex && that_present_ex))
6138
          return false;
6139
        if (!this.ex.equals(that.ex))
6140
          return false;
6141
      }
6142
 
6143
      return true;
6144
    }
6145
 
6146
    @Override
6147
    public int hashCode() {
6148
      return 0;
6149
    }
6150
 
684 chandransh 6151
    public int compareTo(getTransactionsForShoppingCartId_result other) {
6152
      if (!getClass().equals(other.getClass())) {
6153
        return getClass().getName().compareTo(other.getClass().getName());
6154
      }
6155
 
6156
      int lastComparison = 0;
6157
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
6158
 
6159
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6160
      if (lastComparison != 0) {
6161
        return lastComparison;
6162
      }
6163
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6164
      if (lastComparison != 0) {
6165
        return lastComparison;
6166
      }
6167
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6168
      if (lastComparison != 0) {
6169
        return lastComparison;
6170
      }
6171
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6172
      if (lastComparison != 0) {
6173
        return lastComparison;
6174
      }
6175
      return 0;
6176
    }
6177
 
132 ashish 6178
    public void read(TProtocol iprot) throws TException {
6179
      TField field;
6180
      iprot.readStructBegin();
6181
      while (true)
6182
      {
6183
        field = iprot.readFieldBegin();
6184
        if (field.type == TType.STOP) { 
6185
          break;
6186
        }
6187
        _Fields fieldId = _Fields.findByThriftId(field.id);
6188
        if (fieldId == null) {
6189
          TProtocolUtil.skip(iprot, field.type);
6190
        } else {
6191
          switch (fieldId) {
6192
            case SUCCESS:
6193
              if (field.type == TType.LIST) {
6194
                {
684 chandransh 6195
                  TList _list12 = iprot.readListBegin();
6196
                  this.success = new ArrayList<Transaction>(_list12.size);
6197
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 6198
                  {
684 chandransh 6199
                    Transaction _elem14;
6200
                    _elem14 = new Transaction();
6201
                    _elem14.read(iprot);
6202
                    this.success.add(_elem14);
132 ashish 6203
                  }
6204
                  iprot.readListEnd();
6205
                }
6206
              } else { 
6207
                TProtocolUtil.skip(iprot, field.type);
6208
              }
6209
              break;
6210
            case EX:
6211
              if (field.type == TType.STRUCT) {
6212
                this.ex = new TransactionServiceException();
6213
                this.ex.read(iprot);
6214
              } else { 
6215
                TProtocolUtil.skip(iprot, field.type);
6216
              }
6217
              break;
6218
          }
6219
          iprot.readFieldEnd();
6220
        }
6221
      }
6222
      iprot.readStructEnd();
6223
      validate();
6224
    }
6225
 
6226
    public void write(TProtocol oprot) throws TException {
6227
      oprot.writeStructBegin(STRUCT_DESC);
6228
 
6229
      if (this.isSetSuccess()) {
6230
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6231
        {
6232
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 6233
          for (Transaction _iter15 : this.success)
132 ashish 6234
          {
684 chandransh 6235
            _iter15.write(oprot);
132 ashish 6236
          }
6237
          oprot.writeListEnd();
6238
        }
6239
        oprot.writeFieldEnd();
6240
      } else if (this.isSetEx()) {
6241
        oprot.writeFieldBegin(EX_FIELD_DESC);
6242
        this.ex.write(oprot);
6243
        oprot.writeFieldEnd();
6244
      }
6245
      oprot.writeFieldStop();
6246
      oprot.writeStructEnd();
6247
    }
6248
 
6249
    @Override
6250
    public String toString() {
6251
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
6252
      boolean first = true;
6253
 
6254
      sb.append("success:");
6255
      if (this.success == null) {
6256
        sb.append("null");
6257
      } else {
6258
        sb.append(this.success);
6259
      }
6260
      first = false;
6261
      if (!first) sb.append(", ");
6262
      sb.append("ex:");
6263
      if (this.ex == null) {
6264
        sb.append("null");
6265
      } else {
6266
        sb.append(this.ex);
6267
      }
6268
      first = false;
6269
      sb.append(")");
6270
      return sb.toString();
6271
    }
6272
 
6273
    public void validate() throws TException {
6274
      // check for required fields
6275
    }
6276
 
6277
  }
6278
 
68 ashish 6279
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
6280
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
6281
 
6282
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6283
 
6284
    private long transactionId;
6285
 
6286
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6287
    public enum _Fields implements TFieldIdEnum {
6288
      TRANSACTION_ID((short)1, "transactionId");
6289
 
6290
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6291
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6292
 
6293
      static {
6294
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6295
          byId.put((int)field._thriftId, field);
6296
          byName.put(field.getFieldName(), field);
6297
        }
6298
      }
6299
 
6300
      /**
6301
       * Find the _Fields constant that matches fieldId, or null if its not found.
6302
       */
6303
      public static _Fields findByThriftId(int fieldId) {
6304
        return byId.get(fieldId);
6305
      }
6306
 
6307
      /**
6308
       * Find the _Fields constant that matches fieldId, throwing an exception
6309
       * if it is not found.
6310
       */
6311
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6312
        _Fields fields = findByThriftId(fieldId);
6313
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6314
        return fields;
6315
      }
6316
 
6317
      /**
6318
       * Find the _Fields constant that matches name, or null if its not found.
6319
       */
6320
      public static _Fields findByName(String name) {
6321
        return byName.get(name);
6322
      }
6323
 
6324
      private final short _thriftId;
6325
      private final String _fieldName;
6326
 
6327
      _Fields(short thriftId, String fieldName) {
6328
        _thriftId = thriftId;
6329
        _fieldName = fieldName;
6330
      }
6331
 
6332
      public short getThriftFieldId() {
6333
        return _thriftId;
6334
      }
6335
 
6336
      public String getFieldName() {
6337
        return _fieldName;
6338
      }
6339
    }
6340
 
6341
    // isset id assignments
6342
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6343
    private BitSet __isset_bit_vector = new BitSet(1);
6344
 
6345
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6346
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6347
          new FieldValueMetaData(TType.I64)));
6348
    }});
6349
 
6350
    static {
6351
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
6352
    }
6353
 
6354
    public getTransactionStatus_args() {
6355
    }
6356
 
6357
    public getTransactionStatus_args(
6358
      long transactionId)
6359
    {
6360
      this();
6361
      this.transactionId = transactionId;
6362
      setTransactionIdIsSet(true);
6363
    }
6364
 
6365
    /**
6366
     * Performs a deep copy on <i>other</i>.
6367
     */
6368
    public getTransactionStatus_args(getTransactionStatus_args other) {
6369
      __isset_bit_vector.clear();
6370
      __isset_bit_vector.or(other.__isset_bit_vector);
6371
      this.transactionId = other.transactionId;
6372
    }
6373
 
6374
    public getTransactionStatus_args deepCopy() {
6375
      return new getTransactionStatus_args(this);
6376
    }
6377
 
6378
    @Deprecated
6379
    public getTransactionStatus_args clone() {
6380
      return new getTransactionStatus_args(this);
6381
    }
6382
 
6383
    public long getTransactionId() {
6384
      return this.transactionId;
6385
    }
6386
 
6387
    public getTransactionStatus_args setTransactionId(long transactionId) {
6388
      this.transactionId = transactionId;
6389
      setTransactionIdIsSet(true);
6390
      return this;
6391
    }
6392
 
6393
    public void unsetTransactionId() {
6394
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6395
    }
6396
 
6397
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6398
    public boolean isSetTransactionId() {
6399
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6400
    }
6401
 
6402
    public void setTransactionIdIsSet(boolean value) {
6403
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6404
    }
6405
 
6406
    public void setFieldValue(_Fields field, Object value) {
6407
      switch (field) {
6408
      case TRANSACTION_ID:
6409
        if (value == null) {
6410
          unsetTransactionId();
6411
        } else {
6412
          setTransactionId((Long)value);
6413
        }
6414
        break;
6415
 
6416
      }
6417
    }
6418
 
6419
    public void setFieldValue(int fieldID, Object value) {
6420
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6421
    }
6422
 
6423
    public Object getFieldValue(_Fields field) {
6424
      switch (field) {
6425
      case TRANSACTION_ID:
6426
        return new Long(getTransactionId());
6427
 
6428
      }
6429
      throw new IllegalStateException();
6430
    }
6431
 
6432
    public Object getFieldValue(int fieldId) {
6433
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6434
    }
6435
 
6436
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6437
    public boolean isSet(_Fields field) {
6438
      switch (field) {
6439
      case TRANSACTION_ID:
6440
        return isSetTransactionId();
6441
      }
6442
      throw new IllegalStateException();
6443
    }
6444
 
6445
    public boolean isSet(int fieldID) {
6446
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6447
    }
6448
 
6449
    @Override
6450
    public boolean equals(Object that) {
6451
      if (that == null)
6452
        return false;
6453
      if (that instanceof getTransactionStatus_args)
6454
        return this.equals((getTransactionStatus_args)that);
6455
      return false;
6456
    }
6457
 
6458
    public boolean equals(getTransactionStatus_args that) {
6459
      if (that == null)
6460
        return false;
6461
 
6462
      boolean this_present_transactionId = true;
6463
      boolean that_present_transactionId = true;
6464
      if (this_present_transactionId || that_present_transactionId) {
6465
        if (!(this_present_transactionId && that_present_transactionId))
6466
          return false;
6467
        if (this.transactionId != that.transactionId)
6468
          return false;
6469
      }
6470
 
6471
      return true;
6472
    }
6473
 
6474
    @Override
6475
    public int hashCode() {
6476
      return 0;
6477
    }
6478
 
6479
    public int compareTo(getTransactionStatus_args other) {
6480
      if (!getClass().equals(other.getClass())) {
6481
        return getClass().getName().compareTo(other.getClass().getName());
6482
      }
6483
 
6484
      int lastComparison = 0;
6485
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
6486
 
6487
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6488
      if (lastComparison != 0) {
6489
        return lastComparison;
6490
      }
6491
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6492
      if (lastComparison != 0) {
6493
        return lastComparison;
6494
      }
6495
      return 0;
6496
    }
6497
 
6498
    public void read(TProtocol iprot) throws TException {
6499
      TField field;
6500
      iprot.readStructBegin();
6501
      while (true)
6502
      {
6503
        field = iprot.readFieldBegin();
6504
        if (field.type == TType.STOP) { 
6505
          break;
6506
        }
6507
        _Fields fieldId = _Fields.findByThriftId(field.id);
6508
        if (fieldId == null) {
6509
          TProtocolUtil.skip(iprot, field.type);
6510
        } else {
6511
          switch (fieldId) {
6512
            case TRANSACTION_ID:
6513
              if (field.type == TType.I64) {
6514
                this.transactionId = iprot.readI64();
6515
                setTransactionIdIsSet(true);
6516
              } else { 
6517
                TProtocolUtil.skip(iprot, field.type);
6518
              }
6519
              break;
6520
          }
6521
          iprot.readFieldEnd();
6522
        }
6523
      }
6524
      iprot.readStructEnd();
6525
      validate();
6526
    }
6527
 
6528
    public void write(TProtocol oprot) throws TException {
6529
      validate();
6530
 
6531
      oprot.writeStructBegin(STRUCT_DESC);
6532
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6533
      oprot.writeI64(this.transactionId);
6534
      oprot.writeFieldEnd();
6535
      oprot.writeFieldStop();
6536
      oprot.writeStructEnd();
6537
    }
6538
 
6539
    @Override
6540
    public String toString() {
6541
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
6542
      boolean first = true;
6543
 
6544
      sb.append("transactionId:");
6545
      sb.append(this.transactionId);
6546
      first = false;
6547
      sb.append(")");
6548
      return sb.toString();
6549
    }
6550
 
6551
    public void validate() throws TException {
6552
      // check for required fields
6553
    }
6554
 
6555
  }
6556
 
6557
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
6558
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
6559
 
6560
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
6561
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6562
 
6563
    private TransactionStatus success;
6564
    private TransactionServiceException ex;
6565
 
6566
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6567
    public enum _Fields implements TFieldIdEnum {
6568
      /**
6569
       * 
6570
       * @see TransactionStatus
6571
       */
6572
      SUCCESS((short)0, "success"),
6573
      EX((short)1, "ex");
6574
 
6575
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6576
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6577
 
6578
      static {
6579
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6580
          byId.put((int)field._thriftId, field);
6581
          byName.put(field.getFieldName(), field);
6582
        }
6583
      }
6584
 
6585
      /**
6586
       * Find the _Fields constant that matches fieldId, or null if its not found.
6587
       */
6588
      public static _Fields findByThriftId(int fieldId) {
6589
        return byId.get(fieldId);
6590
      }
6591
 
6592
      /**
6593
       * Find the _Fields constant that matches fieldId, throwing an exception
6594
       * if it is not found.
6595
       */
6596
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6597
        _Fields fields = findByThriftId(fieldId);
6598
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6599
        return fields;
6600
      }
6601
 
6602
      /**
6603
       * Find the _Fields constant that matches name, or null if its not found.
6604
       */
6605
      public static _Fields findByName(String name) {
6606
        return byName.get(name);
6607
      }
6608
 
6609
      private final short _thriftId;
6610
      private final String _fieldName;
6611
 
6612
      _Fields(short thriftId, String fieldName) {
6613
        _thriftId = thriftId;
6614
        _fieldName = fieldName;
6615
      }
6616
 
6617
      public short getThriftFieldId() {
6618
        return _thriftId;
6619
      }
6620
 
6621
      public String getFieldName() {
6622
        return _fieldName;
6623
      }
6624
    }
6625
 
6626
    // isset id assignments
6627
 
6628
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6629
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6630
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6631
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6632
          new FieldValueMetaData(TType.STRUCT)));
6633
    }});
6634
 
6635
    static {
6636
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
6637
    }
6638
 
6639
    public getTransactionStatus_result() {
6640
    }
6641
 
6642
    public getTransactionStatus_result(
6643
      TransactionStatus success,
6644
      TransactionServiceException ex)
6645
    {
6646
      this();
6647
      this.success = success;
6648
      this.ex = ex;
6649
    }
6650
 
6651
    /**
6652
     * Performs a deep copy on <i>other</i>.
6653
     */
6654
    public getTransactionStatus_result(getTransactionStatus_result other) {
6655
      if (other.isSetSuccess()) {
6656
        this.success = other.success;
6657
      }
6658
      if (other.isSetEx()) {
6659
        this.ex = new TransactionServiceException(other.ex);
6660
      }
6661
    }
6662
 
6663
    public getTransactionStatus_result deepCopy() {
6664
      return new getTransactionStatus_result(this);
6665
    }
6666
 
6667
    @Deprecated
6668
    public getTransactionStatus_result clone() {
6669
      return new getTransactionStatus_result(this);
6670
    }
6671
 
6672
    /**
6673
     * 
6674
     * @see TransactionStatus
6675
     */
6676
    public TransactionStatus getSuccess() {
6677
      return this.success;
6678
    }
6679
 
6680
    /**
6681
     * 
6682
     * @see TransactionStatus
6683
     */
6684
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
6685
      this.success = success;
6686
      return this;
6687
    }
6688
 
6689
    public void unsetSuccess() {
6690
      this.success = null;
6691
    }
6692
 
6693
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6694
    public boolean isSetSuccess() {
6695
      return this.success != null;
6696
    }
6697
 
6698
    public void setSuccessIsSet(boolean value) {
6699
      if (!value) {
6700
        this.success = null;
6701
      }
6702
    }
6703
 
6704
    public TransactionServiceException getEx() {
6705
      return this.ex;
6706
    }
6707
 
6708
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6709
      this.ex = ex;
6710
      return this;
6711
    }
6712
 
6713
    public void unsetEx() {
6714
      this.ex = null;
6715
    }
6716
 
6717
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6718
    public boolean isSetEx() {
6719
      return this.ex != null;
6720
    }
6721
 
6722
    public void setExIsSet(boolean value) {
6723
      if (!value) {
6724
        this.ex = null;
6725
      }
6726
    }
6727
 
6728
    public void setFieldValue(_Fields field, Object value) {
6729
      switch (field) {
6730
      case SUCCESS:
6731
        if (value == null) {
6732
          unsetSuccess();
6733
        } else {
6734
          setSuccess((TransactionStatus)value);
6735
        }
6736
        break;
6737
 
6738
      case EX:
6739
        if (value == null) {
6740
          unsetEx();
6741
        } else {
6742
          setEx((TransactionServiceException)value);
6743
        }
6744
        break;
6745
 
6746
      }
6747
    }
6748
 
6749
    public void setFieldValue(int fieldID, Object value) {
6750
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6751
    }
6752
 
6753
    public Object getFieldValue(_Fields field) {
6754
      switch (field) {
6755
      case SUCCESS:
6756
        return getSuccess();
6757
 
6758
      case EX:
6759
        return getEx();
6760
 
6761
      }
6762
      throw new IllegalStateException();
6763
    }
6764
 
6765
    public Object getFieldValue(int fieldId) {
6766
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6767
    }
6768
 
6769
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6770
    public boolean isSet(_Fields field) {
6771
      switch (field) {
6772
      case SUCCESS:
6773
        return isSetSuccess();
6774
      case EX:
6775
        return isSetEx();
6776
      }
6777
      throw new IllegalStateException();
6778
    }
6779
 
6780
    public boolean isSet(int fieldID) {
6781
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6782
    }
6783
 
6784
    @Override
6785
    public boolean equals(Object that) {
6786
      if (that == null)
6787
        return false;
6788
      if (that instanceof getTransactionStatus_result)
6789
        return this.equals((getTransactionStatus_result)that);
6790
      return false;
6791
    }
6792
 
6793
    public boolean equals(getTransactionStatus_result that) {
6794
      if (that == null)
6795
        return false;
6796
 
6797
      boolean this_present_success = true && this.isSetSuccess();
6798
      boolean that_present_success = true && that.isSetSuccess();
6799
      if (this_present_success || that_present_success) {
6800
        if (!(this_present_success && that_present_success))
6801
          return false;
6802
        if (!this.success.equals(that.success))
6803
          return false;
6804
      }
6805
 
6806
      boolean this_present_ex = true && this.isSetEx();
6807
      boolean that_present_ex = true && that.isSetEx();
6808
      if (this_present_ex || that_present_ex) {
6809
        if (!(this_present_ex && that_present_ex))
6810
          return false;
6811
        if (!this.ex.equals(that.ex))
6812
          return false;
6813
      }
6814
 
6815
      return true;
6816
    }
6817
 
6818
    @Override
6819
    public int hashCode() {
6820
      return 0;
6821
    }
6822
 
6823
    public int compareTo(getTransactionStatus_result other) {
6824
      if (!getClass().equals(other.getClass())) {
6825
        return getClass().getName().compareTo(other.getClass().getName());
6826
      }
6827
 
6828
      int lastComparison = 0;
6829
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6830
 
6831
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6832
      if (lastComparison != 0) {
6833
        return lastComparison;
6834
      }
6835
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6836
      if (lastComparison != 0) {
6837
        return lastComparison;
6838
      }
6839
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6840
      if (lastComparison != 0) {
6841
        return lastComparison;
6842
      }
6843
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6844
      if (lastComparison != 0) {
6845
        return lastComparison;
6846
      }
6847
      return 0;
6848
    }
6849
 
6850
    public void read(TProtocol iprot) throws TException {
6851
      TField field;
6852
      iprot.readStructBegin();
6853
      while (true)
6854
      {
6855
        field = iprot.readFieldBegin();
6856
        if (field.type == TType.STOP) { 
6857
          break;
6858
        }
6859
        _Fields fieldId = _Fields.findByThriftId(field.id);
6860
        if (fieldId == null) {
6861
          TProtocolUtil.skip(iprot, field.type);
6862
        } else {
6863
          switch (fieldId) {
6864
            case SUCCESS:
6865
              if (field.type == TType.I32) {
6866
                this.success = TransactionStatus.findByValue(iprot.readI32());
6867
              } else { 
6868
                TProtocolUtil.skip(iprot, field.type);
6869
              }
6870
              break;
6871
            case EX:
6872
              if (field.type == TType.STRUCT) {
6873
                this.ex = new TransactionServiceException();
6874
                this.ex.read(iprot);
6875
              } else { 
6876
                TProtocolUtil.skip(iprot, field.type);
6877
              }
6878
              break;
6879
          }
6880
          iprot.readFieldEnd();
6881
        }
6882
      }
6883
      iprot.readStructEnd();
6884
      validate();
6885
    }
6886
 
6887
    public void write(TProtocol oprot) throws TException {
6888
      oprot.writeStructBegin(STRUCT_DESC);
6889
 
6890
      if (this.isSetSuccess()) {
6891
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6892
        oprot.writeI32(this.success.getValue());
6893
        oprot.writeFieldEnd();
6894
      } else if (this.isSetEx()) {
6895
        oprot.writeFieldBegin(EX_FIELD_DESC);
6896
        this.ex.write(oprot);
6897
        oprot.writeFieldEnd();
6898
      }
6899
      oprot.writeFieldStop();
6900
      oprot.writeStructEnd();
6901
    }
6902
 
6903
    @Override
6904
    public String toString() {
6905
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6906
      boolean first = true;
6907
 
6908
      sb.append("success:");
6909
      if (this.success == null) {
6910
        sb.append("null");
6911
      } else {
6912
        String success_name = success.name();
6913
        if (success_name != null) {
6914
          sb.append(success_name);
6915
          sb.append(" (");
6916
        }
6917
        sb.append(this.success);
6918
        if (success_name != null) {
6919
          sb.append(")");
6920
        }
6921
      }
6922
      first = false;
6923
      if (!first) sb.append(", ");
6924
      sb.append("ex:");
6925
      if (this.ex == null) {
6926
        sb.append("null");
6927
      } else {
6928
        sb.append(this.ex);
6929
      }
6930
      first = false;
6931
      sb.append(")");
6932
      return sb.toString();
6933
    }
6934
 
6935
    public void validate() throws TException {
6936
      // check for required fields
6937
    }
6938
 
6939
  }
6940
 
6941
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6942
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6943
 
6944
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6945
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6946
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6947
 
6948
    private long transactionId;
6949
    private TransactionStatus status;
6950
    private String description;
6951
 
6952
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6953
    public enum _Fields implements TFieldIdEnum {
6954
      TRANSACTION_ID((short)1, "transactionId"),
6955
      /**
6956
       * 
6957
       * @see TransactionStatus
6958
       */
6959
      STATUS((short)2, "status"),
6960
      DESCRIPTION((short)3, "description");
6961
 
6962
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6963
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6964
 
6965
      static {
6966
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6967
          byId.put((int)field._thriftId, field);
6968
          byName.put(field.getFieldName(), field);
6969
        }
6970
      }
6971
 
6972
      /**
6973
       * Find the _Fields constant that matches fieldId, or null if its not found.
6974
       */
6975
      public static _Fields findByThriftId(int fieldId) {
6976
        return byId.get(fieldId);
6977
      }
6978
 
6979
      /**
6980
       * Find the _Fields constant that matches fieldId, throwing an exception
6981
       * if it is not found.
6982
       */
6983
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6984
        _Fields fields = findByThriftId(fieldId);
6985
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6986
        return fields;
6987
      }
6988
 
6989
      /**
6990
       * Find the _Fields constant that matches name, or null if its not found.
6991
       */
6992
      public static _Fields findByName(String name) {
6993
        return byName.get(name);
6994
      }
6995
 
6996
      private final short _thriftId;
6997
      private final String _fieldName;
6998
 
6999
      _Fields(short thriftId, String fieldName) {
7000
        _thriftId = thriftId;
7001
        _fieldName = fieldName;
7002
      }
7003
 
7004
      public short getThriftFieldId() {
7005
        return _thriftId;
7006
      }
7007
 
7008
      public String getFieldName() {
7009
        return _fieldName;
7010
      }
7011
    }
7012
 
7013
    // isset id assignments
7014
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7015
    private BitSet __isset_bit_vector = new BitSet(1);
7016
 
7017
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7018
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7019
          new FieldValueMetaData(TType.I64)));
7020
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7021
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
7022
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
7023
          new FieldValueMetaData(TType.STRING)));
7024
    }});
7025
 
7026
    static {
7027
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
7028
    }
7029
 
7030
    public changeTransactionStatus_args() {
7031
    }
7032
 
7033
    public changeTransactionStatus_args(
7034
      long transactionId,
7035
      TransactionStatus status,
7036
      String description)
7037
    {
7038
      this();
7039
      this.transactionId = transactionId;
7040
      setTransactionIdIsSet(true);
7041
      this.status = status;
7042
      this.description = description;
7043
    }
7044
 
7045
    /**
7046
     * Performs a deep copy on <i>other</i>.
7047
     */
7048
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
7049
      __isset_bit_vector.clear();
7050
      __isset_bit_vector.or(other.__isset_bit_vector);
7051
      this.transactionId = other.transactionId;
7052
      if (other.isSetStatus()) {
7053
        this.status = other.status;
7054
      }
7055
      if (other.isSetDescription()) {
7056
        this.description = other.description;
7057
      }
7058
    }
7059
 
7060
    public changeTransactionStatus_args deepCopy() {
7061
      return new changeTransactionStatus_args(this);
7062
    }
7063
 
7064
    @Deprecated
7065
    public changeTransactionStatus_args clone() {
7066
      return new changeTransactionStatus_args(this);
7067
    }
7068
 
7069
    public long getTransactionId() {
7070
      return this.transactionId;
7071
    }
7072
 
7073
    public changeTransactionStatus_args setTransactionId(long transactionId) {
7074
      this.transactionId = transactionId;
7075
      setTransactionIdIsSet(true);
7076
      return this;
7077
    }
7078
 
7079
    public void unsetTransactionId() {
7080
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7081
    }
7082
 
7083
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7084
    public boolean isSetTransactionId() {
7085
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7086
    }
7087
 
7088
    public void setTransactionIdIsSet(boolean value) {
7089
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7090
    }
7091
 
7092
    /**
7093
     * 
7094
     * @see TransactionStatus
7095
     */
7096
    public TransactionStatus getStatus() {
7097
      return this.status;
7098
    }
7099
 
7100
    /**
7101
     * 
7102
     * @see TransactionStatus
7103
     */
7104
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
7105
      this.status = status;
7106
      return this;
7107
    }
7108
 
7109
    public void unsetStatus() {
7110
      this.status = null;
7111
    }
7112
 
7113
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
7114
    public boolean isSetStatus() {
7115
      return this.status != null;
7116
    }
7117
 
7118
    public void setStatusIsSet(boolean value) {
7119
      if (!value) {
7120
        this.status = null;
7121
      }
7122
    }
7123
 
7124
    public String getDescription() {
7125
      return this.description;
7126
    }
7127
 
7128
    public changeTransactionStatus_args setDescription(String description) {
7129
      this.description = description;
7130
      return this;
7131
    }
7132
 
7133
    public void unsetDescription() {
7134
      this.description = null;
7135
    }
7136
 
7137
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
7138
    public boolean isSetDescription() {
7139
      return this.description != null;
7140
    }
7141
 
7142
    public void setDescriptionIsSet(boolean value) {
7143
      if (!value) {
7144
        this.description = null;
7145
      }
7146
    }
7147
 
7148
    public void setFieldValue(_Fields field, Object value) {
7149
      switch (field) {
7150
      case TRANSACTION_ID:
7151
        if (value == null) {
7152
          unsetTransactionId();
7153
        } else {
7154
          setTransactionId((Long)value);
7155
        }
7156
        break;
7157
 
7158
      case STATUS:
7159
        if (value == null) {
7160
          unsetStatus();
7161
        } else {
7162
          setStatus((TransactionStatus)value);
7163
        }
7164
        break;
7165
 
7166
      case DESCRIPTION:
7167
        if (value == null) {
7168
          unsetDescription();
7169
        } else {
7170
          setDescription((String)value);
7171
        }
7172
        break;
7173
 
7174
      }
7175
    }
7176
 
7177
    public void setFieldValue(int fieldID, Object value) {
7178
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7179
    }
7180
 
7181
    public Object getFieldValue(_Fields field) {
7182
      switch (field) {
7183
      case TRANSACTION_ID:
7184
        return new Long(getTransactionId());
7185
 
7186
      case STATUS:
7187
        return getStatus();
7188
 
7189
      case DESCRIPTION:
7190
        return getDescription();
7191
 
7192
      }
7193
      throw new IllegalStateException();
7194
    }
7195
 
7196
    public Object getFieldValue(int fieldId) {
7197
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7198
    }
7199
 
7200
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7201
    public boolean isSet(_Fields field) {
7202
      switch (field) {
7203
      case TRANSACTION_ID:
7204
        return isSetTransactionId();
7205
      case STATUS:
7206
        return isSetStatus();
7207
      case DESCRIPTION:
7208
        return isSetDescription();
7209
      }
7210
      throw new IllegalStateException();
7211
    }
7212
 
7213
    public boolean isSet(int fieldID) {
7214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7215
    }
7216
 
7217
    @Override
7218
    public boolean equals(Object that) {
7219
      if (that == null)
7220
        return false;
7221
      if (that instanceof changeTransactionStatus_args)
7222
        return this.equals((changeTransactionStatus_args)that);
7223
      return false;
7224
    }
7225
 
7226
    public boolean equals(changeTransactionStatus_args that) {
7227
      if (that == null)
7228
        return false;
7229
 
7230
      boolean this_present_transactionId = true;
7231
      boolean that_present_transactionId = true;
7232
      if (this_present_transactionId || that_present_transactionId) {
7233
        if (!(this_present_transactionId && that_present_transactionId))
7234
          return false;
7235
        if (this.transactionId != that.transactionId)
7236
          return false;
7237
      }
7238
 
7239
      boolean this_present_status = true && this.isSetStatus();
7240
      boolean that_present_status = true && that.isSetStatus();
7241
      if (this_present_status || that_present_status) {
7242
        if (!(this_present_status && that_present_status))
7243
          return false;
7244
        if (!this.status.equals(that.status))
7245
          return false;
7246
      }
7247
 
7248
      boolean this_present_description = true && this.isSetDescription();
7249
      boolean that_present_description = true && that.isSetDescription();
7250
      if (this_present_description || that_present_description) {
7251
        if (!(this_present_description && that_present_description))
7252
          return false;
7253
        if (!this.description.equals(that.description))
7254
          return false;
7255
      }
7256
 
7257
      return true;
7258
    }
7259
 
7260
    @Override
7261
    public int hashCode() {
7262
      return 0;
7263
    }
7264
 
7265
    public int compareTo(changeTransactionStatus_args other) {
7266
      if (!getClass().equals(other.getClass())) {
7267
        return getClass().getName().compareTo(other.getClass().getName());
7268
      }
7269
 
7270
      int lastComparison = 0;
7271
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
7272
 
7273
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7274
      if (lastComparison != 0) {
7275
        return lastComparison;
7276
      }
7277
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7278
      if (lastComparison != 0) {
7279
        return lastComparison;
7280
      }
7281
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7282
      if (lastComparison != 0) {
7283
        return lastComparison;
7284
      }
7285
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7286
      if (lastComparison != 0) {
7287
        return lastComparison;
7288
      }
7289
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
7290
      if (lastComparison != 0) {
7291
        return lastComparison;
7292
      }
7293
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
7294
      if (lastComparison != 0) {
7295
        return lastComparison;
7296
      }
7297
      return 0;
7298
    }
7299
 
7300
    public void read(TProtocol iprot) throws TException {
7301
      TField field;
7302
      iprot.readStructBegin();
7303
      while (true)
7304
      {
7305
        field = iprot.readFieldBegin();
7306
        if (field.type == TType.STOP) { 
7307
          break;
7308
        }
7309
        _Fields fieldId = _Fields.findByThriftId(field.id);
7310
        if (fieldId == null) {
7311
          TProtocolUtil.skip(iprot, field.type);
7312
        } else {
7313
          switch (fieldId) {
7314
            case TRANSACTION_ID:
7315
              if (field.type == TType.I64) {
7316
                this.transactionId = iprot.readI64();
7317
                setTransactionIdIsSet(true);
7318
              } else { 
7319
                TProtocolUtil.skip(iprot, field.type);
7320
              }
7321
              break;
7322
            case STATUS:
7323
              if (field.type == TType.I32) {
7324
                this.status = TransactionStatus.findByValue(iprot.readI32());
7325
              } else { 
7326
                TProtocolUtil.skip(iprot, field.type);
7327
              }
7328
              break;
7329
            case DESCRIPTION:
7330
              if (field.type == TType.STRING) {
7331
                this.description = iprot.readString();
7332
              } else { 
7333
                TProtocolUtil.skip(iprot, field.type);
7334
              }
7335
              break;
7336
          }
7337
          iprot.readFieldEnd();
7338
        }
7339
      }
7340
      iprot.readStructEnd();
7341
      validate();
7342
    }
7343
 
7344
    public void write(TProtocol oprot) throws TException {
7345
      validate();
7346
 
7347
      oprot.writeStructBegin(STRUCT_DESC);
7348
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7349
      oprot.writeI64(this.transactionId);
7350
      oprot.writeFieldEnd();
7351
      if (this.status != null) {
7352
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7353
        oprot.writeI32(this.status.getValue());
7354
        oprot.writeFieldEnd();
7355
      }
7356
      if (this.description != null) {
7357
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
7358
        oprot.writeString(this.description);
7359
        oprot.writeFieldEnd();
7360
      }
7361
      oprot.writeFieldStop();
7362
      oprot.writeStructEnd();
7363
    }
7364
 
7365
    @Override
7366
    public String toString() {
7367
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
7368
      boolean first = true;
7369
 
7370
      sb.append("transactionId:");
7371
      sb.append(this.transactionId);
7372
      first = false;
7373
      if (!first) sb.append(", ");
7374
      sb.append("status:");
7375
      if (this.status == null) {
7376
        sb.append("null");
7377
      } else {
7378
        String status_name = status.name();
7379
        if (status_name != null) {
7380
          sb.append(status_name);
7381
          sb.append(" (");
7382
        }
7383
        sb.append(this.status);
7384
        if (status_name != null) {
7385
          sb.append(")");
7386
        }
7387
      }
7388
      first = false;
7389
      if (!first) sb.append(", ");
7390
      sb.append("description:");
7391
      if (this.description == null) {
7392
        sb.append("null");
7393
      } else {
7394
        sb.append(this.description);
7395
      }
7396
      first = false;
7397
      sb.append(")");
7398
      return sb.toString();
7399
    }
7400
 
7401
    public void validate() throws TException {
7402
      // check for required fields
7403
    }
7404
 
7405
  }
7406
 
7407
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
7408
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
7409
 
7410
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7411
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7412
 
7413
    private boolean success;
7414
    private TransactionServiceException ex;
7415
 
7416
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7417
    public enum _Fields implements TFieldIdEnum {
7418
      SUCCESS((short)0, "success"),
7419
      EX((short)1, "ex");
7420
 
7421
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7422
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7423
 
7424
      static {
7425
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7426
          byId.put((int)field._thriftId, field);
7427
          byName.put(field.getFieldName(), field);
7428
        }
7429
      }
7430
 
7431
      /**
7432
       * Find the _Fields constant that matches fieldId, or null if its not found.
7433
       */
7434
      public static _Fields findByThriftId(int fieldId) {
7435
        return byId.get(fieldId);
7436
      }
7437
 
7438
      /**
7439
       * Find the _Fields constant that matches fieldId, throwing an exception
7440
       * if it is not found.
7441
       */
7442
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7443
        _Fields fields = findByThriftId(fieldId);
7444
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7445
        return fields;
7446
      }
7447
 
7448
      /**
7449
       * Find the _Fields constant that matches name, or null if its not found.
7450
       */
7451
      public static _Fields findByName(String name) {
7452
        return byName.get(name);
7453
      }
7454
 
7455
      private final short _thriftId;
7456
      private final String _fieldName;
7457
 
7458
      _Fields(short thriftId, String fieldName) {
7459
        _thriftId = thriftId;
7460
        _fieldName = fieldName;
7461
      }
7462
 
7463
      public short getThriftFieldId() {
7464
        return _thriftId;
7465
      }
7466
 
7467
      public String getFieldName() {
7468
        return _fieldName;
7469
      }
7470
    }
7471
 
7472
    // isset id assignments
7473
    private static final int __SUCCESS_ISSET_ID = 0;
7474
    private BitSet __isset_bit_vector = new BitSet(1);
7475
 
7476
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7477
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7478
          new FieldValueMetaData(TType.BOOL)));
7479
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7480
          new FieldValueMetaData(TType.STRUCT)));
7481
    }});
7482
 
7483
    static {
7484
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
7485
    }
7486
 
7487
    public changeTransactionStatus_result() {
7488
    }
7489
 
7490
    public changeTransactionStatus_result(
7491
      boolean success,
7492
      TransactionServiceException ex)
7493
    {
7494
      this();
7495
      this.success = success;
7496
      setSuccessIsSet(true);
7497
      this.ex = ex;
7498
    }
7499
 
7500
    /**
7501
     * Performs a deep copy on <i>other</i>.
7502
     */
7503
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
7504
      __isset_bit_vector.clear();
7505
      __isset_bit_vector.or(other.__isset_bit_vector);
7506
      this.success = other.success;
7507
      if (other.isSetEx()) {
7508
        this.ex = new TransactionServiceException(other.ex);
7509
      }
7510
    }
7511
 
7512
    public changeTransactionStatus_result deepCopy() {
7513
      return new changeTransactionStatus_result(this);
7514
    }
7515
 
7516
    @Deprecated
7517
    public changeTransactionStatus_result clone() {
7518
      return new changeTransactionStatus_result(this);
7519
    }
7520
 
7521
    public boolean isSuccess() {
7522
      return this.success;
7523
    }
7524
 
7525
    public changeTransactionStatus_result setSuccess(boolean success) {
7526
      this.success = success;
7527
      setSuccessIsSet(true);
7528
      return this;
7529
    }
7530
 
7531
    public void unsetSuccess() {
7532
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7533
    }
7534
 
7535
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7536
    public boolean isSetSuccess() {
7537
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7538
    }
7539
 
7540
    public void setSuccessIsSet(boolean value) {
7541
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7542
    }
7543
 
7544
    public TransactionServiceException getEx() {
7545
      return this.ex;
7546
    }
7547
 
7548
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
7549
      this.ex = ex;
7550
      return this;
7551
    }
7552
 
7553
    public void unsetEx() {
7554
      this.ex = null;
7555
    }
7556
 
7557
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7558
    public boolean isSetEx() {
7559
      return this.ex != null;
7560
    }
7561
 
7562
    public void setExIsSet(boolean value) {
7563
      if (!value) {
7564
        this.ex = null;
7565
      }
7566
    }
7567
 
7568
    public void setFieldValue(_Fields field, Object value) {
7569
      switch (field) {
7570
      case SUCCESS:
7571
        if (value == null) {
7572
          unsetSuccess();
7573
        } else {
7574
          setSuccess((Boolean)value);
7575
        }
7576
        break;
7577
 
7578
      case EX:
7579
        if (value == null) {
7580
          unsetEx();
7581
        } else {
7582
          setEx((TransactionServiceException)value);
7583
        }
7584
        break;
7585
 
7586
      }
7587
    }
7588
 
7589
    public void setFieldValue(int fieldID, Object value) {
7590
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7591
    }
7592
 
7593
    public Object getFieldValue(_Fields field) {
7594
      switch (field) {
7595
      case SUCCESS:
7596
        return new Boolean(isSuccess());
7597
 
7598
      case EX:
7599
        return getEx();
7600
 
7601
      }
7602
      throw new IllegalStateException();
7603
    }
7604
 
7605
    public Object getFieldValue(int fieldId) {
7606
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7607
    }
7608
 
7609
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7610
    public boolean isSet(_Fields field) {
7611
      switch (field) {
7612
      case SUCCESS:
7613
        return isSetSuccess();
7614
      case EX:
7615
        return isSetEx();
7616
      }
7617
      throw new IllegalStateException();
7618
    }
7619
 
7620
    public boolean isSet(int fieldID) {
7621
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7622
    }
7623
 
7624
    @Override
7625
    public boolean equals(Object that) {
7626
      if (that == null)
7627
        return false;
7628
      if (that instanceof changeTransactionStatus_result)
7629
        return this.equals((changeTransactionStatus_result)that);
7630
      return false;
7631
    }
7632
 
7633
    public boolean equals(changeTransactionStatus_result that) {
7634
      if (that == null)
7635
        return false;
7636
 
7637
      boolean this_present_success = true;
7638
      boolean that_present_success = true;
7639
      if (this_present_success || that_present_success) {
7640
        if (!(this_present_success && that_present_success))
7641
          return false;
7642
        if (this.success != that.success)
7643
          return false;
7644
      }
7645
 
7646
      boolean this_present_ex = true && this.isSetEx();
7647
      boolean that_present_ex = true && that.isSetEx();
7648
      if (this_present_ex || that_present_ex) {
7649
        if (!(this_present_ex && that_present_ex))
7650
          return false;
7651
        if (!this.ex.equals(that.ex))
7652
          return false;
7653
      }
7654
 
7655
      return true;
7656
    }
7657
 
7658
    @Override
7659
    public int hashCode() {
7660
      return 0;
7661
    }
7662
 
7663
    public int compareTo(changeTransactionStatus_result other) {
7664
      if (!getClass().equals(other.getClass())) {
7665
        return getClass().getName().compareTo(other.getClass().getName());
7666
      }
7667
 
7668
      int lastComparison = 0;
7669
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
7670
 
7671
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7672
      if (lastComparison != 0) {
7673
        return lastComparison;
7674
      }
7675
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7676
      if (lastComparison != 0) {
7677
        return lastComparison;
7678
      }
7679
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7680
      if (lastComparison != 0) {
7681
        return lastComparison;
7682
      }
7683
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7684
      if (lastComparison != 0) {
7685
        return lastComparison;
7686
      }
7687
      return 0;
7688
    }
7689
 
7690
    public void read(TProtocol iprot) throws TException {
7691
      TField field;
7692
      iprot.readStructBegin();
7693
      while (true)
7694
      {
7695
        field = iprot.readFieldBegin();
7696
        if (field.type == TType.STOP) { 
7697
          break;
7698
        }
7699
        _Fields fieldId = _Fields.findByThriftId(field.id);
7700
        if (fieldId == null) {
7701
          TProtocolUtil.skip(iprot, field.type);
7702
        } else {
7703
          switch (fieldId) {
7704
            case SUCCESS:
7705
              if (field.type == TType.BOOL) {
7706
                this.success = iprot.readBool();
7707
                setSuccessIsSet(true);
7708
              } else { 
7709
                TProtocolUtil.skip(iprot, field.type);
7710
              }
7711
              break;
7712
            case EX:
7713
              if (field.type == TType.STRUCT) {
7714
                this.ex = new TransactionServiceException();
7715
                this.ex.read(iprot);
7716
              } else { 
7717
                TProtocolUtil.skip(iprot, field.type);
7718
              }
7719
              break;
7720
          }
7721
          iprot.readFieldEnd();
7722
        }
7723
      }
7724
      iprot.readStructEnd();
7725
      validate();
7726
    }
7727
 
7728
    public void write(TProtocol oprot) throws TException {
7729
      oprot.writeStructBegin(STRUCT_DESC);
7730
 
7731
      if (this.isSetSuccess()) {
7732
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7733
        oprot.writeBool(this.success);
7734
        oprot.writeFieldEnd();
7735
      } else if (this.isSetEx()) {
7736
        oprot.writeFieldBegin(EX_FIELD_DESC);
7737
        this.ex.write(oprot);
7738
        oprot.writeFieldEnd();
7739
      }
7740
      oprot.writeFieldStop();
7741
      oprot.writeStructEnd();
7742
    }
7743
 
7744
    @Override
7745
    public String toString() {
7746
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7747
      boolean first = true;
7748
 
7749
      sb.append("success:");
7750
      sb.append(this.success);
7751
      first = false;
7752
      if (!first) sb.append(", ");
7753
      sb.append("ex:");
7754
      if (this.ex == null) {
7755
        sb.append("null");
7756
      } else {
7757
        sb.append(this.ex);
7758
      }
7759
      first = false;
7760
      sb.append(")");
7761
      return sb.toString();
7762
    }
7763
 
7764
    public void validate() throws TException {
7765
      // check for required fields
7766
    }
7767
 
7768
  }
7769
 
1398 varun.gupt 7770
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7771
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7772
 
7773
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7774
 
7775
    private long transactionId;
7776
 
7777
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7778
    public enum _Fields implements TFieldIdEnum {
7779
      TRANSACTION_ID((short)1, "transactionId");
7780
 
7781
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7782
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7783
 
7784
      static {
7785
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7786
          byId.put((int)field._thriftId, field);
7787
          byName.put(field.getFieldName(), field);
7788
        }
7789
      }
7790
 
7791
      /**
7792
       * Find the _Fields constant that matches fieldId, or null if its not found.
7793
       */
7794
      public static _Fields findByThriftId(int fieldId) {
7795
        return byId.get(fieldId);
7796
      }
7797
 
7798
      /**
7799
       * Find the _Fields constant that matches fieldId, throwing an exception
7800
       * if it is not found.
7801
       */
7802
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7803
        _Fields fields = findByThriftId(fieldId);
7804
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7805
        return fields;
7806
      }
7807
 
7808
      /**
7809
       * Find the _Fields constant that matches name, or null if its not found.
7810
       */
7811
      public static _Fields findByName(String name) {
7812
        return byName.get(name);
7813
      }
7814
 
7815
      private final short _thriftId;
7816
      private final String _fieldName;
7817
 
7818
      _Fields(short thriftId, String fieldName) {
7819
        _thriftId = thriftId;
7820
        _fieldName = fieldName;
7821
      }
7822
 
7823
      public short getThriftFieldId() {
7824
        return _thriftId;
7825
      }
7826
 
7827
      public String getFieldName() {
7828
        return _fieldName;
7829
      }
7830
    }
7831
 
7832
    // isset id assignments
7833
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7834
    private BitSet __isset_bit_vector = new BitSet(1);
7835
 
7836
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7837
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7838
          new FieldValueMetaData(TType.I64)));
7839
    }});
7840
 
7841
    static {
1398 varun.gupt 7842
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7843
    }
7844
 
1398 varun.gupt 7845
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7846
    }
7847
 
1398 varun.gupt 7848
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7849
      long transactionId)
7850
    {
7851
      this();
7852
      this.transactionId = transactionId;
7853
      setTransactionIdIsSet(true);
7854
    }
7855
 
7856
    /**
7857
     * Performs a deep copy on <i>other</i>.
7858
     */
1398 varun.gupt 7859
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7860
      __isset_bit_vector.clear();
7861
      __isset_bit_vector.or(other.__isset_bit_vector);
7862
      this.transactionId = other.transactionId;
7863
    }
7864
 
1398 varun.gupt 7865
    public enqueueTransactionInfoEmail_args deepCopy() {
7866
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7867
    }
7868
 
7869
    @Deprecated
1398 varun.gupt 7870
    public enqueueTransactionInfoEmail_args clone() {
7871
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7872
    }
7873
 
7874
    public long getTransactionId() {
7875
      return this.transactionId;
7876
    }
7877
 
1398 varun.gupt 7878
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7879
      this.transactionId = transactionId;
7880
      setTransactionIdIsSet(true);
7881
      return this;
7882
    }
7883
 
7884
    public void unsetTransactionId() {
7885
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7886
    }
7887
 
7888
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7889
    public boolean isSetTransactionId() {
7890
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7891
    }
7892
 
7893
    public void setTransactionIdIsSet(boolean value) {
7894
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7895
    }
7896
 
7897
    public void setFieldValue(_Fields field, Object value) {
7898
      switch (field) {
7899
      case TRANSACTION_ID:
7900
        if (value == null) {
7901
          unsetTransactionId();
7902
        } else {
7903
          setTransactionId((Long)value);
7904
        }
7905
        break;
7906
 
7907
      }
7908
    }
7909
 
7910
    public void setFieldValue(int fieldID, Object value) {
7911
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7912
    }
7913
 
7914
    public Object getFieldValue(_Fields field) {
7915
      switch (field) {
7916
      case TRANSACTION_ID:
7917
        return new Long(getTransactionId());
7918
 
7919
      }
7920
      throw new IllegalStateException();
7921
    }
7922
 
7923
    public Object getFieldValue(int fieldId) {
7924
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7925
    }
7926
 
7927
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7928
    public boolean isSet(_Fields field) {
7929
      switch (field) {
7930
      case TRANSACTION_ID:
7931
        return isSetTransactionId();
7932
      }
7933
      throw new IllegalStateException();
7934
    }
7935
 
7936
    public boolean isSet(int fieldID) {
7937
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7938
    }
7939
 
7940
    @Override
7941
    public boolean equals(Object that) {
7942
      if (that == null)
7943
        return false;
1398 varun.gupt 7944
      if (that instanceof enqueueTransactionInfoEmail_args)
7945
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7946
      return false;
7947
    }
7948
 
1398 varun.gupt 7949
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7950
      if (that == null)
7951
        return false;
7952
 
7953
      boolean this_present_transactionId = true;
7954
      boolean that_present_transactionId = true;
7955
      if (this_present_transactionId || that_present_transactionId) {
7956
        if (!(this_present_transactionId && that_present_transactionId))
7957
          return false;
7958
        if (this.transactionId != that.transactionId)
7959
          return false;
7960
      }
7961
 
7962
      return true;
7963
    }
7964
 
7965
    @Override
7966
    public int hashCode() {
7967
      return 0;
7968
    }
7969
 
1398 varun.gupt 7970
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7971
      if (!getClass().equals(other.getClass())) {
7972
        return getClass().getName().compareTo(other.getClass().getName());
7973
      }
7974
 
7975
      int lastComparison = 0;
1398 varun.gupt 7976
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7977
 
7978
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7979
      if (lastComparison != 0) {
7980
        return lastComparison;
7981
      }
7982
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7983
      if (lastComparison != 0) {
7984
        return lastComparison;
7985
      }
7986
      return 0;
7987
    }
7988
 
7989
    public void read(TProtocol iprot) throws TException {
7990
      TField field;
7991
      iprot.readStructBegin();
7992
      while (true)
7993
      {
7994
        field = iprot.readFieldBegin();
7995
        if (field.type == TType.STOP) { 
7996
          break;
7997
        }
7998
        _Fields fieldId = _Fields.findByThriftId(field.id);
7999
        if (fieldId == null) {
8000
          TProtocolUtil.skip(iprot, field.type);
8001
        } else {
8002
          switch (fieldId) {
8003
            case TRANSACTION_ID:
8004
              if (field.type == TType.I64) {
8005
                this.transactionId = iprot.readI64();
8006
                setTransactionIdIsSet(true);
8007
              } else { 
8008
                TProtocolUtil.skip(iprot, field.type);
8009
              }
8010
              break;
8011
          }
8012
          iprot.readFieldEnd();
8013
        }
8014
      }
8015
      iprot.readStructEnd();
8016
      validate();
8017
    }
8018
 
8019
    public void write(TProtocol oprot) throws TException {
8020
      validate();
8021
 
8022
      oprot.writeStructBegin(STRUCT_DESC);
8023
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
8024
      oprot.writeI64(this.transactionId);
8025
      oprot.writeFieldEnd();
8026
      oprot.writeFieldStop();
8027
      oprot.writeStructEnd();
8028
    }
8029
 
8030
    @Override
8031
    public String toString() {
1398 varun.gupt 8032
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 8033
      boolean first = true;
8034
 
8035
      sb.append("transactionId:");
8036
      sb.append(this.transactionId);
8037
      first = false;
8038
      sb.append(")");
8039
      return sb.toString();
8040
    }
8041
 
8042
    public void validate() throws TException {
8043
      // check for required fields
8044
    }
8045
 
8046
  }
8047
 
1398 varun.gupt 8048
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
8049
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 8050
 
8051
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
8052
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8053
 
8054
    private boolean success;
8055
    private TransactionServiceException ex;
8056
 
8057
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8058
    public enum _Fields implements TFieldIdEnum {
8059
      SUCCESS((short)0, "success"),
8060
      EX((short)1, "ex");
8061
 
8062
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8063
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8064
 
8065
      static {
8066
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8067
          byId.put((int)field._thriftId, field);
8068
          byName.put(field.getFieldName(), field);
8069
        }
8070
      }
8071
 
8072
      /**
8073
       * Find the _Fields constant that matches fieldId, or null if its not found.
8074
       */
8075
      public static _Fields findByThriftId(int fieldId) {
8076
        return byId.get(fieldId);
8077
      }
8078
 
8079
      /**
8080
       * Find the _Fields constant that matches fieldId, throwing an exception
8081
       * if it is not found.
8082
       */
8083
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8084
        _Fields fields = findByThriftId(fieldId);
8085
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8086
        return fields;
8087
      }
8088
 
8089
      /**
8090
       * Find the _Fields constant that matches name, or null if its not found.
8091
       */
8092
      public static _Fields findByName(String name) {
8093
        return byName.get(name);
8094
      }
8095
 
8096
      private final short _thriftId;
8097
      private final String _fieldName;
8098
 
8099
      _Fields(short thriftId, String fieldName) {
8100
        _thriftId = thriftId;
8101
        _fieldName = fieldName;
8102
      }
8103
 
8104
      public short getThriftFieldId() {
8105
        return _thriftId;
8106
      }
8107
 
8108
      public String getFieldName() {
8109
        return _fieldName;
8110
      }
8111
    }
8112
 
8113
    // isset id assignments
8114
    private static final int __SUCCESS_ISSET_ID = 0;
8115
    private BitSet __isset_bit_vector = new BitSet(1);
8116
 
8117
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8118
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
8119
          new FieldValueMetaData(TType.BOOL)));
8120
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8121
          new FieldValueMetaData(TType.STRUCT)));
8122
    }});
8123
 
8124
    static {
1398 varun.gupt 8125
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 8126
    }
8127
 
1398 varun.gupt 8128
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 8129
    }
8130
 
1398 varun.gupt 8131
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 8132
      boolean success,
8133
      TransactionServiceException ex)
8134
    {
8135
      this();
8136
      this.success = success;
8137
      setSuccessIsSet(true);
8138
      this.ex = ex;
8139
    }
8140
 
8141
    /**
8142
     * Performs a deep copy on <i>other</i>.
8143
     */
1398 varun.gupt 8144
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 8145
      __isset_bit_vector.clear();
8146
      __isset_bit_vector.or(other.__isset_bit_vector);
8147
      this.success = other.success;
8148
      if (other.isSetEx()) {
8149
        this.ex = new TransactionServiceException(other.ex);
8150
      }
8151
    }
8152
 
1398 varun.gupt 8153
    public enqueueTransactionInfoEmail_result deepCopy() {
8154
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8155
    }
8156
 
8157
    @Deprecated
1398 varun.gupt 8158
    public enqueueTransactionInfoEmail_result clone() {
8159
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8160
    }
8161
 
8162
    public boolean isSuccess() {
8163
      return this.success;
8164
    }
8165
 
1398 varun.gupt 8166
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 8167
      this.success = success;
8168
      setSuccessIsSet(true);
8169
      return this;
8170
    }
8171
 
8172
    public void unsetSuccess() {
8173
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8174
    }
8175
 
8176
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8177
    public boolean isSetSuccess() {
8178
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8179
    }
8180
 
8181
    public void setSuccessIsSet(boolean value) {
8182
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8183
    }
8184
 
8185
    public TransactionServiceException getEx() {
8186
      return this.ex;
8187
    }
8188
 
1398 varun.gupt 8189
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 8190
      this.ex = ex;
8191
      return this;
8192
    }
8193
 
8194
    public void unsetEx() {
8195
      this.ex = null;
8196
    }
8197
 
8198
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8199
    public boolean isSetEx() {
8200
      return this.ex != null;
8201
    }
8202
 
8203
    public void setExIsSet(boolean value) {
8204
      if (!value) {
8205
        this.ex = null;
8206
      }
8207
    }
8208
 
8209
    public void setFieldValue(_Fields field, Object value) {
8210
      switch (field) {
8211
      case SUCCESS:
8212
        if (value == null) {
8213
          unsetSuccess();
8214
        } else {
8215
          setSuccess((Boolean)value);
8216
        }
8217
        break;
8218
 
8219
      case EX:
8220
        if (value == null) {
8221
          unsetEx();
8222
        } else {
8223
          setEx((TransactionServiceException)value);
8224
        }
8225
        break;
8226
 
8227
      }
8228
    }
8229
 
8230
    public void setFieldValue(int fieldID, Object value) {
8231
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8232
    }
8233
 
8234
    public Object getFieldValue(_Fields field) {
8235
      switch (field) {
8236
      case SUCCESS:
8237
        return new Boolean(isSuccess());
8238
 
8239
      case EX:
8240
        return getEx();
8241
 
8242
      }
8243
      throw new IllegalStateException();
8244
    }
8245
 
8246
    public Object getFieldValue(int fieldId) {
8247
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8248
    }
8249
 
8250
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8251
    public boolean isSet(_Fields field) {
8252
      switch (field) {
8253
      case SUCCESS:
8254
        return isSetSuccess();
8255
      case EX:
8256
        return isSetEx();
8257
      }
8258
      throw new IllegalStateException();
8259
    }
8260
 
8261
    public boolean isSet(int fieldID) {
8262
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8263
    }
8264
 
8265
    @Override
8266
    public boolean equals(Object that) {
8267
      if (that == null)
8268
        return false;
1398 varun.gupt 8269
      if (that instanceof enqueueTransactionInfoEmail_result)
8270
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 8271
      return false;
8272
    }
8273
 
1398 varun.gupt 8274
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 8275
      if (that == null)
8276
        return false;
8277
 
8278
      boolean this_present_success = true;
8279
      boolean that_present_success = true;
8280
      if (this_present_success || that_present_success) {
8281
        if (!(this_present_success && that_present_success))
8282
          return false;
8283
        if (this.success != that.success)
8284
          return false;
8285
      }
8286
 
8287
      boolean this_present_ex = true && this.isSetEx();
8288
      boolean that_present_ex = true && that.isSetEx();
8289
      if (this_present_ex || that_present_ex) {
8290
        if (!(this_present_ex && that_present_ex))
8291
          return false;
8292
        if (!this.ex.equals(that.ex))
8293
          return false;
8294
      }
8295
 
8296
      return true;
8297
    }
8298
 
8299
    @Override
8300
    public int hashCode() {
8301
      return 0;
8302
    }
8303
 
1398 varun.gupt 8304
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 8305
      if (!getClass().equals(other.getClass())) {
8306
        return getClass().getName().compareTo(other.getClass().getName());
8307
      }
8308
 
8309
      int lastComparison = 0;
1398 varun.gupt 8310
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 8311
 
8312
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8313
      if (lastComparison != 0) {
8314
        return lastComparison;
8315
      }
8316
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8317
      if (lastComparison != 0) {
8318
        return lastComparison;
8319
      }
8320
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8321
      if (lastComparison != 0) {
8322
        return lastComparison;
8323
      }
8324
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8325
      if (lastComparison != 0) {
8326
        return lastComparison;
8327
      }
8328
      return 0;
8329
    }
8330
 
8331
    public void read(TProtocol iprot) throws TException {
8332
      TField field;
8333
      iprot.readStructBegin();
8334
      while (true)
8335
      {
8336
        field = iprot.readFieldBegin();
8337
        if (field.type == TType.STOP) { 
8338
          break;
8339
        }
8340
        _Fields fieldId = _Fields.findByThriftId(field.id);
8341
        if (fieldId == null) {
8342
          TProtocolUtil.skip(iprot, field.type);
8343
        } else {
8344
          switch (fieldId) {
8345
            case SUCCESS:
8346
              if (field.type == TType.BOOL) {
8347
                this.success = iprot.readBool();
8348
                setSuccessIsSet(true);
8349
              } else { 
8350
                TProtocolUtil.skip(iprot, field.type);
8351
              }
8352
              break;
8353
            case EX:
8354
              if (field.type == TType.STRUCT) {
8355
                this.ex = new TransactionServiceException();
8356
                this.ex.read(iprot);
8357
              } else { 
8358
                TProtocolUtil.skip(iprot, field.type);
8359
              }
8360
              break;
8361
          }
8362
          iprot.readFieldEnd();
8363
        }
8364
      }
8365
      iprot.readStructEnd();
8366
      validate();
8367
    }
8368
 
8369
    public void write(TProtocol oprot) throws TException {
8370
      oprot.writeStructBegin(STRUCT_DESC);
8371
 
8372
      if (this.isSetSuccess()) {
8373
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8374
        oprot.writeBool(this.success);
8375
        oprot.writeFieldEnd();
8376
      } else if (this.isSetEx()) {
8377
        oprot.writeFieldBegin(EX_FIELD_DESC);
8378
        this.ex.write(oprot);
8379
        oprot.writeFieldEnd();
8380
      }
8381
      oprot.writeFieldStop();
8382
      oprot.writeStructEnd();
8383
    }
8384
 
8385
    @Override
8386
    public String toString() {
1398 varun.gupt 8387
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 8388
      boolean first = true;
8389
 
8390
      sb.append("success:");
8391
      sb.append(this.success);
8392
      first = false;
8393
      if (!first) sb.append(", ");
8394
      sb.append("ex:");
8395
      if (this.ex == null) {
8396
        sb.append("null");
8397
      } else {
8398
        sb.append(this.ex);
8399
      }
8400
      first = false;
8401
      sb.append(")");
8402
      return sb.toString();
8403
    }
8404
 
8405
    public void validate() throws TException {
8406
      // check for required fields
8407
    }
8408
 
8409
  }
8410
 
483 rajveer 8411
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
8412
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 8413
 
483 rajveer 8414
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8415
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
8416
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
8417
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 8418
 
483 rajveer 8419
    private OrderStatus status;
8420
    private long from_date;
8421
    private long to_date;
8422
    private long warehouse_id;
68 ashish 8423
 
8424
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8425
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8426
      /**
8427
       * 
8428
       * @see OrderStatus
8429
       */
8430
      STATUS((short)1, "status"),
8431
      FROM_DATE((short)2, "from_date"),
8432
      TO_DATE((short)3, "to_date"),
8433
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 8434
 
8435
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8436
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8437
 
8438
      static {
8439
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8440
          byId.put((int)field._thriftId, field);
8441
          byName.put(field.getFieldName(), field);
8442
        }
8443
      }
8444
 
8445
      /**
8446
       * Find the _Fields constant that matches fieldId, or null if its not found.
8447
       */
8448
      public static _Fields findByThriftId(int fieldId) {
8449
        return byId.get(fieldId);
8450
      }
8451
 
8452
      /**
8453
       * Find the _Fields constant that matches fieldId, throwing an exception
8454
       * if it is not found.
8455
       */
8456
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8457
        _Fields fields = findByThriftId(fieldId);
8458
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8459
        return fields;
8460
      }
8461
 
8462
      /**
8463
       * Find the _Fields constant that matches name, or null if its not found.
8464
       */
8465
      public static _Fields findByName(String name) {
8466
        return byName.get(name);
8467
      }
8468
 
8469
      private final short _thriftId;
8470
      private final String _fieldName;
8471
 
8472
      _Fields(short thriftId, String fieldName) {
8473
        _thriftId = thriftId;
8474
        _fieldName = fieldName;
8475
      }
8476
 
8477
      public short getThriftFieldId() {
8478
        return _thriftId;
8479
      }
8480
 
8481
      public String getFieldName() {
8482
        return _fieldName;
8483
      }
8484
    }
8485
 
8486
    // isset id assignments
483 rajveer 8487
    private static final int __FROM_DATE_ISSET_ID = 0;
8488
    private static final int __TO_DATE_ISSET_ID = 1;
8489
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8490
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 8491
 
8492
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8493
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8494
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8495
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 8496
          new FieldValueMetaData(TType.I64)));
483 rajveer 8497
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
8498
          new FieldValueMetaData(TType.I64)));
8499
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8500
          new FieldValueMetaData(TType.I64)));
68 ashish 8501
    }});
8502
 
8503
    static {
483 rajveer 8504
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 8505
    }
8506
 
483 rajveer 8507
    public getAllOrders_args() {
68 ashish 8508
    }
8509
 
483 rajveer 8510
    public getAllOrders_args(
8511
      OrderStatus status,
8512
      long from_date,
8513
      long to_date,
8514
      long warehouse_id)
68 ashish 8515
    {
8516
      this();
483 rajveer 8517
      this.status = status;
8518
      this.from_date = from_date;
8519
      setFrom_dateIsSet(true);
8520
      this.to_date = to_date;
8521
      setTo_dateIsSet(true);
8522
      this.warehouse_id = warehouse_id;
8523
      setWarehouse_idIsSet(true);
68 ashish 8524
    }
8525
 
8526
    /**
8527
     * Performs a deep copy on <i>other</i>.
8528
     */
483 rajveer 8529
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 8530
      __isset_bit_vector.clear();
8531
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8532
      if (other.isSetStatus()) {
8533
        this.status = other.status;
8534
      }
8535
      this.from_date = other.from_date;
8536
      this.to_date = other.to_date;
8537
      this.warehouse_id = other.warehouse_id;
68 ashish 8538
    }
8539
 
483 rajveer 8540
    public getAllOrders_args deepCopy() {
8541
      return new getAllOrders_args(this);
68 ashish 8542
    }
8543
 
8544
    @Deprecated
483 rajveer 8545
    public getAllOrders_args clone() {
8546
      return new getAllOrders_args(this);
68 ashish 8547
    }
8548
 
483 rajveer 8549
    /**
8550
     * 
8551
     * @see OrderStatus
8552
     */
8553
    public OrderStatus getStatus() {
8554
      return this.status;
68 ashish 8555
    }
8556
 
483 rajveer 8557
    /**
8558
     * 
8559
     * @see OrderStatus
8560
     */
8561
    public getAllOrders_args setStatus(OrderStatus status) {
8562
      this.status = status;
68 ashish 8563
      return this;
8564
    }
8565
 
483 rajveer 8566
    public void unsetStatus() {
8567
      this.status = null;
68 ashish 8568
    }
8569
 
483 rajveer 8570
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8571
    public boolean isSetStatus() {
8572
      return this.status != null;
68 ashish 8573
    }
8574
 
483 rajveer 8575
    public void setStatusIsSet(boolean value) {
8576
      if (!value) {
8577
        this.status = null;
68 ashish 8578
      }
8579
    }
8580
 
483 rajveer 8581
    public long getFrom_date() {
8582
      return this.from_date;
68 ashish 8583
    }
8584
 
483 rajveer 8585
    public getAllOrders_args setFrom_date(long from_date) {
8586
      this.from_date = from_date;
8587
      setFrom_dateIsSet(true);
8588
      return this;
68 ashish 8589
    }
8590
 
483 rajveer 8591
    public void unsetFrom_date() {
8592
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 8593
    }
8594
 
483 rajveer 8595
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
8596
    public boolean isSetFrom_date() {
8597
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 8598
    }
8599
 
483 rajveer 8600
    public void setFrom_dateIsSet(boolean value) {
8601
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 8602
    }
8603
 
483 rajveer 8604
    public long getTo_date() {
8605
      return this.to_date;
68 ashish 8606
    }
8607
 
483 rajveer 8608
    public getAllOrders_args setTo_date(long to_date) {
8609
      this.to_date = to_date;
8610
      setTo_dateIsSet(true);
68 ashish 8611
      return this;
8612
    }
8613
 
483 rajveer 8614
    public void unsetTo_date() {
8615
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 8616
    }
8617
 
483 rajveer 8618
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
8619
    public boolean isSetTo_date() {
8620
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 8621
    }
8622
 
483 rajveer 8623
    public void setTo_dateIsSet(boolean value) {
8624
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 8625
    }
8626
 
483 rajveer 8627
    public long getWarehouse_id() {
8628
      return this.warehouse_id;
68 ashish 8629
    }
8630
 
483 rajveer 8631
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
8632
      this.warehouse_id = warehouse_id;
8633
      setWarehouse_idIsSet(true);
68 ashish 8634
      return this;
8635
    }
8636
 
483 rajveer 8637
    public void unsetWarehouse_id() {
8638
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8639
    }
8640
 
483 rajveer 8641
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8642
    public boolean isSetWarehouse_id() {
8643
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8644
    }
8645
 
483 rajveer 8646
    public void setWarehouse_idIsSet(boolean value) {
8647
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 8648
    }
8649
 
8650
    public void setFieldValue(_Fields field, Object value) {
8651
      switch (field) {
483 rajveer 8652
      case STATUS:
68 ashish 8653
        if (value == null) {
483 rajveer 8654
          unsetStatus();
68 ashish 8655
        } else {
483 rajveer 8656
          setStatus((OrderStatus)value);
68 ashish 8657
        }
8658
        break;
8659
 
483 rajveer 8660
      case FROM_DATE:
68 ashish 8661
        if (value == null) {
483 rajveer 8662
          unsetFrom_date();
68 ashish 8663
        } else {
483 rajveer 8664
          setFrom_date((Long)value);
68 ashish 8665
        }
8666
        break;
8667
 
483 rajveer 8668
      case TO_DATE:
8669
        if (value == null) {
8670
          unsetTo_date();
8671
        } else {
8672
          setTo_date((Long)value);
8673
        }
8674
        break;
8675
 
8676
      case WAREHOUSE_ID:
8677
        if (value == null) {
8678
          unsetWarehouse_id();
8679
        } else {
8680
          setWarehouse_id((Long)value);
8681
        }
8682
        break;
8683
 
68 ashish 8684
      }
8685
    }
8686
 
8687
    public void setFieldValue(int fieldID, Object value) {
8688
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8689
    }
8690
 
8691
    public Object getFieldValue(_Fields field) {
8692
      switch (field) {
483 rajveer 8693
      case STATUS:
8694
        return getStatus();
68 ashish 8695
 
483 rajveer 8696
      case FROM_DATE:
8697
        return new Long(getFrom_date());
68 ashish 8698
 
483 rajveer 8699
      case TO_DATE:
8700
        return new Long(getTo_date());
8701
 
8702
      case WAREHOUSE_ID:
8703
        return new Long(getWarehouse_id());
8704
 
68 ashish 8705
      }
8706
      throw new IllegalStateException();
8707
    }
8708
 
8709
    public Object getFieldValue(int fieldId) {
8710
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8711
    }
8712
 
8713
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8714
    public boolean isSet(_Fields field) {
8715
      switch (field) {
483 rajveer 8716
      case STATUS:
8717
        return isSetStatus();
8718
      case FROM_DATE:
8719
        return isSetFrom_date();
8720
      case TO_DATE:
8721
        return isSetTo_date();
8722
      case WAREHOUSE_ID:
8723
        return isSetWarehouse_id();
68 ashish 8724
      }
8725
      throw new IllegalStateException();
8726
    }
8727
 
8728
    public boolean isSet(int fieldID) {
8729
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8730
    }
8731
 
8732
    @Override
8733
    public boolean equals(Object that) {
8734
      if (that == null)
8735
        return false;
483 rajveer 8736
      if (that instanceof getAllOrders_args)
8737
        return this.equals((getAllOrders_args)that);
68 ashish 8738
      return false;
8739
    }
8740
 
483 rajveer 8741
    public boolean equals(getAllOrders_args that) {
68 ashish 8742
      if (that == null)
8743
        return false;
8744
 
483 rajveer 8745
      boolean this_present_status = true && this.isSetStatus();
8746
      boolean that_present_status = true && that.isSetStatus();
8747
      if (this_present_status || that_present_status) {
8748
        if (!(this_present_status && that_present_status))
68 ashish 8749
          return false;
483 rajveer 8750
        if (!this.status.equals(that.status))
68 ashish 8751
          return false;
8752
      }
8753
 
483 rajveer 8754
      boolean this_present_from_date = true;
8755
      boolean that_present_from_date = true;
8756
      if (this_present_from_date || that_present_from_date) {
8757
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8758
          return false;
483 rajveer 8759
        if (this.from_date != that.from_date)
68 ashish 8760
          return false;
8761
      }
8762
 
483 rajveer 8763
      boolean this_present_to_date = true;
8764
      boolean that_present_to_date = true;
8765
      if (this_present_to_date || that_present_to_date) {
8766
        if (!(this_present_to_date && that_present_to_date))
8767
          return false;
8768
        if (this.to_date != that.to_date)
8769
          return false;
68 ashish 8770
      }
8771
 
483 rajveer 8772
      boolean this_present_warehouse_id = true;
8773
      boolean that_present_warehouse_id = true;
8774
      if (this_present_warehouse_id || that_present_warehouse_id) {
8775
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8776
          return false;
483 rajveer 8777
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8778
          return false;
8779
      }
8780
 
8781
      return true;
8782
    }
8783
 
8784
    @Override
8785
    public int hashCode() {
8786
      return 0;
8787
    }
8788
 
483 rajveer 8789
    public int compareTo(getAllOrders_args other) {
68 ashish 8790
      if (!getClass().equals(other.getClass())) {
8791
        return getClass().getName().compareTo(other.getClass().getName());
8792
      }
8793
 
8794
      int lastComparison = 0;
483 rajveer 8795
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8796
 
483 rajveer 8797
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8798
      if (lastComparison != 0) {
8799
        return lastComparison;
8800
      }
483 rajveer 8801
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8802
      if (lastComparison != 0) {
8803
        return lastComparison;
8804
      }
483 rajveer 8805
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8806
      if (lastComparison != 0) {
8807
        return lastComparison;
8808
      }
8809
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8810
      if (lastComparison != 0) {
8811
        return lastComparison;
8812
      }
8813
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8814
      if (lastComparison != 0) {
8815
        return lastComparison;
8816
      }
8817
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8818
      if (lastComparison != 0) {
8819
        return lastComparison;
8820
      }
8821
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8822
      if (lastComparison != 0) {
8823
        return lastComparison;
8824
      }
8825
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8826
      if (lastComparison != 0) {
8827
        return lastComparison;
8828
      }
68 ashish 8829
      return 0;
8830
    }
8831
 
8832
    public void read(TProtocol iprot) throws TException {
8833
      TField field;
8834
      iprot.readStructBegin();
8835
      while (true)
8836
      {
8837
        field = iprot.readFieldBegin();
8838
        if (field.type == TType.STOP) { 
8839
          break;
8840
        }
8841
        _Fields fieldId = _Fields.findByThriftId(field.id);
8842
        if (fieldId == null) {
8843
          TProtocolUtil.skip(iprot, field.type);
8844
        } else {
8845
          switch (fieldId) {
483 rajveer 8846
            case STATUS:
8847
              if (field.type == TType.I32) {
8848
                this.status = OrderStatus.findByValue(iprot.readI32());
8849
              } else { 
8850
                TProtocolUtil.skip(iprot, field.type);
8851
              }
8852
              break;
8853
            case FROM_DATE:
68 ashish 8854
              if (field.type == TType.I64) {
483 rajveer 8855
                this.from_date = iprot.readI64();
8856
                setFrom_dateIsSet(true);
68 ashish 8857
              } else { 
8858
                TProtocolUtil.skip(iprot, field.type);
8859
              }
8860
              break;
483 rajveer 8861
            case TO_DATE:
8862
              if (field.type == TType.I64) {
8863
                this.to_date = iprot.readI64();
8864
                setTo_dateIsSet(true);
8865
              } else { 
8866
                TProtocolUtil.skip(iprot, field.type);
8867
              }
8868
              break;
8869
            case WAREHOUSE_ID:
8870
              if (field.type == TType.I64) {
8871
                this.warehouse_id = iprot.readI64();
8872
                setWarehouse_idIsSet(true);
8873
              } else { 
8874
                TProtocolUtil.skip(iprot, field.type);
8875
              }
8876
              break;
68 ashish 8877
          }
8878
          iprot.readFieldEnd();
8879
        }
8880
      }
8881
      iprot.readStructEnd();
8882
      validate();
8883
    }
8884
 
8885
    public void write(TProtocol oprot) throws TException {
8886
      validate();
8887
 
8888
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8889
      if (this.status != null) {
8890
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8891
        oprot.writeI32(this.status.getValue());
8892
        oprot.writeFieldEnd();
8893
      }
8894
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8895
      oprot.writeI64(this.from_date);
68 ashish 8896
      oprot.writeFieldEnd();
483 rajveer 8897
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8898
      oprot.writeI64(this.to_date);
8899
      oprot.writeFieldEnd();
8900
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8901
      oprot.writeI64(this.warehouse_id);
8902
      oprot.writeFieldEnd();
68 ashish 8903
      oprot.writeFieldStop();
8904
      oprot.writeStructEnd();
8905
    }
8906
 
8907
    @Override
8908
    public String toString() {
483 rajveer 8909
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8910
      boolean first = true;
8911
 
483 rajveer 8912
      sb.append("status:");
8913
      if (this.status == null) {
8914
        sb.append("null");
8915
      } else {
8916
        String status_name = status.name();
8917
        if (status_name != null) {
8918
          sb.append(status_name);
8919
          sb.append(" (");
8920
        }
8921
        sb.append(this.status);
8922
        if (status_name != null) {
8923
          sb.append(")");
8924
        }
8925
      }
68 ashish 8926
      first = false;
483 rajveer 8927
      if (!first) sb.append(", ");
8928
      sb.append("from_date:");
8929
      sb.append(this.from_date);
8930
      first = false;
8931
      if (!first) sb.append(", ");
8932
      sb.append("to_date:");
8933
      sb.append(this.to_date);
8934
      first = false;
8935
      if (!first) sb.append(", ");
8936
      sb.append("warehouse_id:");
8937
      sb.append(this.warehouse_id);
8938
      first = false;
68 ashish 8939
      sb.append(")");
8940
      return sb.toString();
8941
    }
8942
 
8943
    public void validate() throws TException {
8944
      // check for required fields
8945
    }
8946
 
8947
  }
8948
 
483 rajveer 8949
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8950
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8951
 
483 rajveer 8952
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8953
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8954
 
483 rajveer 8955
    private List<Order> success;
68 ashish 8956
    private TransactionServiceException ex;
8957
 
8958
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8959
    public enum _Fields implements TFieldIdEnum {
8960
      SUCCESS((short)0, "success"),
8961
      EX((short)1, "ex");
8962
 
8963
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8964
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8965
 
8966
      static {
8967
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8968
          byId.put((int)field._thriftId, field);
8969
          byName.put(field.getFieldName(), field);
8970
        }
8971
      }
8972
 
8973
      /**
8974
       * Find the _Fields constant that matches fieldId, or null if its not found.
8975
       */
8976
      public static _Fields findByThriftId(int fieldId) {
8977
        return byId.get(fieldId);
8978
      }
8979
 
8980
      /**
8981
       * Find the _Fields constant that matches fieldId, throwing an exception
8982
       * if it is not found.
8983
       */
8984
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8985
        _Fields fields = findByThriftId(fieldId);
8986
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8987
        return fields;
8988
      }
8989
 
8990
      /**
8991
       * Find the _Fields constant that matches name, or null if its not found.
8992
       */
8993
      public static _Fields findByName(String name) {
8994
        return byName.get(name);
8995
      }
8996
 
8997
      private final short _thriftId;
8998
      private final String _fieldName;
8999
 
9000
      _Fields(short thriftId, String fieldName) {
9001
        _thriftId = thriftId;
9002
        _fieldName = fieldName;
9003
      }
9004
 
9005
      public short getThriftFieldId() {
9006
        return _thriftId;
9007
      }
9008
 
9009
      public String getFieldName() {
9010
        return _fieldName;
9011
      }
9012
    }
9013
 
9014
    // isset id assignments
9015
 
9016
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9017
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 9018
          new ListMetaData(TType.LIST, 
9019
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 9020
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9021
          new FieldValueMetaData(TType.STRUCT)));
9022
    }});
9023
 
9024
    static {
483 rajveer 9025
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 9026
    }
9027
 
483 rajveer 9028
    public getAllOrders_result() {
68 ashish 9029
    }
9030
 
483 rajveer 9031
    public getAllOrders_result(
9032
      List<Order> success,
68 ashish 9033
      TransactionServiceException ex)
9034
    {
9035
      this();
9036
      this.success = success;
9037
      this.ex = ex;
9038
    }
9039
 
9040
    /**
9041
     * Performs a deep copy on <i>other</i>.
9042
     */
483 rajveer 9043
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 9044
      if (other.isSetSuccess()) {
483 rajveer 9045
        List<Order> __this__success = new ArrayList<Order>();
9046
        for (Order other_element : other.success) {
9047
          __this__success.add(new Order(other_element));
9048
        }
9049
        this.success = __this__success;
68 ashish 9050
      }
9051
      if (other.isSetEx()) {
9052
        this.ex = new TransactionServiceException(other.ex);
9053
      }
9054
    }
9055
 
483 rajveer 9056
    public getAllOrders_result deepCopy() {
9057
      return new getAllOrders_result(this);
68 ashish 9058
    }
9059
 
9060
    @Deprecated
483 rajveer 9061
    public getAllOrders_result clone() {
9062
      return new getAllOrders_result(this);
68 ashish 9063
    }
9064
 
483 rajveer 9065
    public int getSuccessSize() {
9066
      return (this.success == null) ? 0 : this.success.size();
9067
    }
9068
 
9069
    public java.util.Iterator<Order> getSuccessIterator() {
9070
      return (this.success == null) ? null : this.success.iterator();
9071
    }
9072
 
9073
    public void addToSuccess(Order elem) {
9074
      if (this.success == null) {
9075
        this.success = new ArrayList<Order>();
9076
      }
9077
      this.success.add(elem);
9078
    }
9079
 
9080
    public List<Order> getSuccess() {
68 ashish 9081
      return this.success;
9082
    }
9083
 
483 rajveer 9084
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 9085
      this.success = success;
9086
      return this;
9087
    }
9088
 
9089
    public void unsetSuccess() {
9090
      this.success = null;
9091
    }
9092
 
9093
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9094
    public boolean isSetSuccess() {
9095
      return this.success != null;
9096
    }
9097
 
9098
    public void setSuccessIsSet(boolean value) {
9099
      if (!value) {
9100
        this.success = null;
9101
      }
9102
    }
9103
 
9104
    public TransactionServiceException getEx() {
9105
      return this.ex;
9106
    }
9107
 
483 rajveer 9108
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 9109
      this.ex = ex;
9110
      return this;
9111
    }
9112
 
9113
    public void unsetEx() {
9114
      this.ex = null;
9115
    }
9116
 
9117
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9118
    public boolean isSetEx() {
9119
      return this.ex != null;
9120
    }
9121
 
9122
    public void setExIsSet(boolean value) {
9123
      if (!value) {
9124
        this.ex = null;
9125
      }
9126
    }
9127
 
9128
    public void setFieldValue(_Fields field, Object value) {
9129
      switch (field) {
9130
      case SUCCESS:
9131
        if (value == null) {
9132
          unsetSuccess();
9133
        } else {
483 rajveer 9134
          setSuccess((List<Order>)value);
68 ashish 9135
        }
9136
        break;
9137
 
9138
      case EX:
9139
        if (value == null) {
9140
          unsetEx();
9141
        } else {
9142
          setEx((TransactionServiceException)value);
9143
        }
9144
        break;
9145
 
9146
      }
9147
    }
9148
 
9149
    public void setFieldValue(int fieldID, Object value) {
9150
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9151
    }
9152
 
9153
    public Object getFieldValue(_Fields field) {
9154
      switch (field) {
9155
      case SUCCESS:
9156
        return getSuccess();
9157
 
9158
      case EX:
9159
        return getEx();
9160
 
9161
      }
9162
      throw new IllegalStateException();
9163
    }
9164
 
9165
    public Object getFieldValue(int fieldId) {
9166
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9167
    }
9168
 
9169
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9170
    public boolean isSet(_Fields field) {
9171
      switch (field) {
9172
      case SUCCESS:
9173
        return isSetSuccess();
9174
      case EX:
9175
        return isSetEx();
9176
      }
9177
      throw new IllegalStateException();
9178
    }
9179
 
9180
    public boolean isSet(int fieldID) {
9181
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9182
    }
9183
 
9184
    @Override
9185
    public boolean equals(Object that) {
9186
      if (that == null)
9187
        return false;
483 rajveer 9188
      if (that instanceof getAllOrders_result)
9189
        return this.equals((getAllOrders_result)that);
68 ashish 9190
      return false;
9191
    }
9192
 
483 rajveer 9193
    public boolean equals(getAllOrders_result that) {
68 ashish 9194
      if (that == null)
9195
        return false;
9196
 
9197
      boolean this_present_success = true && this.isSetSuccess();
9198
      boolean that_present_success = true && that.isSetSuccess();
9199
      if (this_present_success || that_present_success) {
9200
        if (!(this_present_success && that_present_success))
9201
          return false;
9202
        if (!this.success.equals(that.success))
9203
          return false;
9204
      }
9205
 
9206
      boolean this_present_ex = true && this.isSetEx();
9207
      boolean that_present_ex = true && that.isSetEx();
9208
      if (this_present_ex || that_present_ex) {
9209
        if (!(this_present_ex && that_present_ex))
9210
          return false;
9211
        if (!this.ex.equals(that.ex))
9212
          return false;
9213
      }
9214
 
9215
      return true;
9216
    }
9217
 
9218
    @Override
9219
    public int hashCode() {
9220
      return 0;
9221
    }
9222
 
483 rajveer 9223
    public int compareTo(getAllOrders_result other) {
9224
      if (!getClass().equals(other.getClass())) {
9225
        return getClass().getName().compareTo(other.getClass().getName());
9226
      }
9227
 
9228
      int lastComparison = 0;
9229
      getAllOrders_result typedOther = (getAllOrders_result)other;
9230
 
9231
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9232
      if (lastComparison != 0) {
9233
        return lastComparison;
9234
      }
9235
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9236
      if (lastComparison != 0) {
9237
        return lastComparison;
9238
      }
9239
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9240
      if (lastComparison != 0) {
9241
        return lastComparison;
9242
      }
9243
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9244
      if (lastComparison != 0) {
9245
        return lastComparison;
9246
      }
9247
      return 0;
9248
    }
9249
 
68 ashish 9250
    public void read(TProtocol iprot) throws TException {
9251
      TField field;
9252
      iprot.readStructBegin();
9253
      while (true)
9254
      {
9255
        field = iprot.readFieldBegin();
9256
        if (field.type == TType.STOP) { 
9257
          break;
9258
        }
9259
        _Fields fieldId = _Fields.findByThriftId(field.id);
9260
        if (fieldId == null) {
9261
          TProtocolUtil.skip(iprot, field.type);
9262
        } else {
9263
          switch (fieldId) {
9264
            case SUCCESS:
483 rajveer 9265
              if (field.type == TType.LIST) {
9266
                {
684 chandransh 9267
                  TList _list16 = iprot.readListBegin();
9268
                  this.success = new ArrayList<Order>(_list16.size);
9269
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 9270
                  {
684 chandransh 9271
                    Order _elem18;
9272
                    _elem18 = new Order();
9273
                    _elem18.read(iprot);
9274
                    this.success.add(_elem18);
483 rajveer 9275
                  }
9276
                  iprot.readListEnd();
9277
                }
68 ashish 9278
              } else { 
9279
                TProtocolUtil.skip(iprot, field.type);
9280
              }
9281
              break;
9282
            case EX:
9283
              if (field.type == TType.STRUCT) {
9284
                this.ex = new TransactionServiceException();
9285
                this.ex.read(iprot);
9286
              } else { 
9287
                TProtocolUtil.skip(iprot, field.type);
9288
              }
9289
              break;
9290
          }
9291
          iprot.readFieldEnd();
9292
        }
9293
      }
9294
      iprot.readStructEnd();
9295
      validate();
9296
    }
9297
 
9298
    public void write(TProtocol oprot) throws TException {
9299
      oprot.writeStructBegin(STRUCT_DESC);
9300
 
9301
      if (this.isSetSuccess()) {
9302
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 9303
        {
9304
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 9305
          for (Order _iter19 : this.success)
483 rajveer 9306
          {
684 chandransh 9307
            _iter19.write(oprot);
483 rajveer 9308
          }
9309
          oprot.writeListEnd();
9310
        }
68 ashish 9311
        oprot.writeFieldEnd();
9312
      } else if (this.isSetEx()) {
9313
        oprot.writeFieldBegin(EX_FIELD_DESC);
9314
        this.ex.write(oprot);
9315
        oprot.writeFieldEnd();
9316
      }
9317
      oprot.writeFieldStop();
9318
      oprot.writeStructEnd();
9319
    }
9320
 
9321
    @Override
9322
    public String toString() {
483 rajveer 9323
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 9324
      boolean first = true;
9325
 
9326
      sb.append("success:");
9327
      if (this.success == null) {
9328
        sb.append("null");
9329
      } else {
9330
        sb.append(this.success);
9331
      }
9332
      first = false;
9333
      if (!first) sb.append(", ");
9334
      sb.append("ex:");
9335
      if (this.ex == null) {
9336
        sb.append("null");
9337
      } else {
9338
        sb.append(this.ex);
9339
      }
9340
      first = false;
9341
      sb.append(")");
9342
      return sb.toString();
9343
    }
9344
 
9345
    public void validate() throws TException {
9346
      // check for required fields
9347
    }
9348
 
9349
  }
9350
 
1022 varun.gupt 9351
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
9352
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
9353
 
9354
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
9355
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
9356
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
9357
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
9358
 
9359
    private OrderStatus status;
9360
    private long start_billing_date;
9361
    private long end_billing_date;
9362
    private long warehouse_id;
9363
 
9364
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9365
    public enum _Fields implements TFieldIdEnum {
9366
      /**
9367
       * 
9368
       * @see OrderStatus
9369
       */
9370
      STATUS((short)1, "status"),
9371
      START_BILLING_DATE((short)2, "start_billing_date"),
9372
      END_BILLING_DATE((short)3, "end_billing_date"),
9373
      WAREHOUSE_ID((short)4, "warehouse_id");
9374
 
9375
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9376
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9377
 
9378
      static {
9379
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9380
          byId.put((int)field._thriftId, field);
9381
          byName.put(field.getFieldName(), field);
9382
        }
9383
      }
9384
 
9385
      /**
9386
       * Find the _Fields constant that matches fieldId, or null if its not found.
9387
       */
9388
      public static _Fields findByThriftId(int fieldId) {
9389
        return byId.get(fieldId);
9390
      }
9391
 
9392
      /**
9393
       * Find the _Fields constant that matches fieldId, throwing an exception
9394
       * if it is not found.
9395
       */
9396
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9397
        _Fields fields = findByThriftId(fieldId);
9398
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9399
        return fields;
9400
      }
9401
 
9402
      /**
9403
       * Find the _Fields constant that matches name, or null if its not found.
9404
       */
9405
      public static _Fields findByName(String name) {
9406
        return byName.get(name);
9407
      }
9408
 
9409
      private final short _thriftId;
9410
      private final String _fieldName;
9411
 
9412
      _Fields(short thriftId, String fieldName) {
9413
        _thriftId = thriftId;
9414
        _fieldName = fieldName;
9415
      }
9416
 
9417
      public short getThriftFieldId() {
9418
        return _thriftId;
9419
      }
9420
 
9421
      public String getFieldName() {
9422
        return _fieldName;
9423
      }
9424
    }
9425
 
9426
    // isset id assignments
9427
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
9428
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
9429
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
9430
    private BitSet __isset_bit_vector = new BitSet(3);
9431
 
9432
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9433
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
9434
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
9435
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
9436
          new FieldValueMetaData(TType.I64)));
9437
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
9438
          new FieldValueMetaData(TType.I64)));
9439
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
9440
          new FieldValueMetaData(TType.I64)));
9441
    }});
9442
 
9443
    static {
9444
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
9445
    }
9446
 
9447
    public getOrdersByBillingDate_args() {
9448
    }
9449
 
9450
    public getOrdersByBillingDate_args(
9451
      OrderStatus status,
9452
      long start_billing_date,
9453
      long end_billing_date,
9454
      long warehouse_id)
9455
    {
9456
      this();
9457
      this.status = status;
9458
      this.start_billing_date = start_billing_date;
9459
      setStart_billing_dateIsSet(true);
9460
      this.end_billing_date = end_billing_date;
9461
      setEnd_billing_dateIsSet(true);
9462
      this.warehouse_id = warehouse_id;
9463
      setWarehouse_idIsSet(true);
9464
    }
9465
 
9466
    /**
9467
     * Performs a deep copy on <i>other</i>.
9468
     */
9469
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
9470
      __isset_bit_vector.clear();
9471
      __isset_bit_vector.or(other.__isset_bit_vector);
9472
      if (other.isSetStatus()) {
9473
        this.status = other.status;
9474
      }
9475
      this.start_billing_date = other.start_billing_date;
9476
      this.end_billing_date = other.end_billing_date;
9477
      this.warehouse_id = other.warehouse_id;
9478
    }
9479
 
9480
    public getOrdersByBillingDate_args deepCopy() {
9481
      return new getOrdersByBillingDate_args(this);
9482
    }
9483
 
9484
    @Deprecated
9485
    public getOrdersByBillingDate_args clone() {
9486
      return new getOrdersByBillingDate_args(this);
9487
    }
9488
 
9489
    /**
9490
     * 
9491
     * @see OrderStatus
9492
     */
9493
    public OrderStatus getStatus() {
9494
      return this.status;
9495
    }
9496
 
9497
    /**
9498
     * 
9499
     * @see OrderStatus
9500
     */
9501
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
9502
      this.status = status;
9503
      return this;
9504
    }
9505
 
9506
    public void unsetStatus() {
9507
      this.status = null;
9508
    }
9509
 
9510
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9511
    public boolean isSetStatus() {
9512
      return this.status != null;
9513
    }
9514
 
9515
    public void setStatusIsSet(boolean value) {
9516
      if (!value) {
9517
        this.status = null;
9518
      }
9519
    }
9520
 
9521
    public long getStart_billing_date() {
9522
      return this.start_billing_date;
9523
    }
9524
 
9525
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
9526
      this.start_billing_date = start_billing_date;
9527
      setStart_billing_dateIsSet(true);
9528
      return this;
9529
    }
9530
 
9531
    public void unsetStart_billing_date() {
9532
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
9533
    }
9534
 
9535
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
9536
    public boolean isSetStart_billing_date() {
9537
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
9538
    }
9539
 
9540
    public void setStart_billing_dateIsSet(boolean value) {
9541
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
9542
    }
9543
 
9544
    public long getEnd_billing_date() {
9545
      return this.end_billing_date;
9546
    }
9547
 
9548
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
9549
      this.end_billing_date = end_billing_date;
9550
      setEnd_billing_dateIsSet(true);
9551
      return this;
9552
    }
9553
 
9554
    public void unsetEnd_billing_date() {
9555
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
9556
    }
9557
 
9558
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
9559
    public boolean isSetEnd_billing_date() {
9560
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
9561
    }
9562
 
9563
    public void setEnd_billing_dateIsSet(boolean value) {
9564
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
9565
    }
9566
 
9567
    public long getWarehouse_id() {
9568
      return this.warehouse_id;
9569
    }
9570
 
9571
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
9572
      this.warehouse_id = warehouse_id;
9573
      setWarehouse_idIsSet(true);
9574
      return this;
9575
    }
9576
 
9577
    public void unsetWarehouse_id() {
9578
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
9579
    }
9580
 
9581
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9582
    public boolean isSetWarehouse_id() {
9583
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
9584
    }
9585
 
9586
    public void setWarehouse_idIsSet(boolean value) {
9587
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
9588
    }
9589
 
9590
    public void setFieldValue(_Fields field, Object value) {
9591
      switch (field) {
9592
      case STATUS:
9593
        if (value == null) {
9594
          unsetStatus();
9595
        } else {
9596
          setStatus((OrderStatus)value);
9597
        }
9598
        break;
9599
 
9600
      case START_BILLING_DATE:
9601
        if (value == null) {
9602
          unsetStart_billing_date();
9603
        } else {
9604
          setStart_billing_date((Long)value);
9605
        }
9606
        break;
9607
 
9608
      case END_BILLING_DATE:
9609
        if (value == null) {
9610
          unsetEnd_billing_date();
9611
        } else {
9612
          setEnd_billing_date((Long)value);
9613
        }
9614
        break;
9615
 
9616
      case WAREHOUSE_ID:
9617
        if (value == null) {
9618
          unsetWarehouse_id();
9619
        } else {
9620
          setWarehouse_id((Long)value);
9621
        }
9622
        break;
9623
 
9624
      }
9625
    }
9626
 
9627
    public void setFieldValue(int fieldID, Object value) {
9628
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9629
    }
9630
 
9631
    public Object getFieldValue(_Fields field) {
9632
      switch (field) {
9633
      case STATUS:
9634
        return getStatus();
9635
 
9636
      case START_BILLING_DATE:
9637
        return new Long(getStart_billing_date());
9638
 
9639
      case END_BILLING_DATE:
9640
        return new Long(getEnd_billing_date());
9641
 
9642
      case WAREHOUSE_ID:
9643
        return new Long(getWarehouse_id());
9644
 
9645
      }
9646
      throw new IllegalStateException();
9647
    }
9648
 
9649
    public Object getFieldValue(int fieldId) {
9650
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9651
    }
9652
 
9653
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9654
    public boolean isSet(_Fields field) {
9655
      switch (field) {
9656
      case STATUS:
9657
        return isSetStatus();
9658
      case START_BILLING_DATE:
9659
        return isSetStart_billing_date();
9660
      case END_BILLING_DATE:
9661
        return isSetEnd_billing_date();
9662
      case WAREHOUSE_ID:
9663
        return isSetWarehouse_id();
9664
      }
9665
      throw new IllegalStateException();
9666
    }
9667
 
9668
    public boolean isSet(int fieldID) {
9669
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9670
    }
9671
 
9672
    @Override
9673
    public boolean equals(Object that) {
9674
      if (that == null)
9675
        return false;
9676
      if (that instanceof getOrdersByBillingDate_args)
9677
        return this.equals((getOrdersByBillingDate_args)that);
9678
      return false;
9679
    }
9680
 
9681
    public boolean equals(getOrdersByBillingDate_args that) {
9682
      if (that == null)
9683
        return false;
9684
 
9685
      boolean this_present_status = true && this.isSetStatus();
9686
      boolean that_present_status = true && that.isSetStatus();
9687
      if (this_present_status || that_present_status) {
9688
        if (!(this_present_status && that_present_status))
9689
          return false;
9690
        if (!this.status.equals(that.status))
9691
          return false;
9692
      }
9693
 
9694
      boolean this_present_start_billing_date = true;
9695
      boolean that_present_start_billing_date = true;
9696
      if (this_present_start_billing_date || that_present_start_billing_date) {
9697
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9698
          return false;
9699
        if (this.start_billing_date != that.start_billing_date)
9700
          return false;
9701
      }
9702
 
9703
      boolean this_present_end_billing_date = true;
9704
      boolean that_present_end_billing_date = true;
9705
      if (this_present_end_billing_date || that_present_end_billing_date) {
9706
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9707
          return false;
9708
        if (this.end_billing_date != that.end_billing_date)
9709
          return false;
9710
      }
9711
 
9712
      boolean this_present_warehouse_id = true;
9713
      boolean that_present_warehouse_id = true;
9714
      if (this_present_warehouse_id || that_present_warehouse_id) {
9715
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9716
          return false;
9717
        if (this.warehouse_id != that.warehouse_id)
9718
          return false;
9719
      }
9720
 
9721
      return true;
9722
    }
9723
 
9724
    @Override
9725
    public int hashCode() {
9726
      return 0;
9727
    }
9728
 
9729
    public int compareTo(getOrdersByBillingDate_args other) {
9730
      if (!getClass().equals(other.getClass())) {
9731
        return getClass().getName().compareTo(other.getClass().getName());
9732
      }
9733
 
9734
      int lastComparison = 0;
9735
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9736
 
9737
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9738
      if (lastComparison != 0) {
9739
        return lastComparison;
9740
      }
9741
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9742
      if (lastComparison != 0) {
9743
        return lastComparison;
9744
      }
9745
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9746
      if (lastComparison != 0) {
9747
        return lastComparison;
9748
      }
9749
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9750
      if (lastComparison != 0) {
9751
        return lastComparison;
9752
      }
9753
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9754
      if (lastComparison != 0) {
9755
        return lastComparison;
9756
      }
9757
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9758
      if (lastComparison != 0) {
9759
        return lastComparison;
9760
      }
9761
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9762
      if (lastComparison != 0) {
9763
        return lastComparison;
9764
      }
9765
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9766
      if (lastComparison != 0) {
9767
        return lastComparison;
9768
      }
9769
      return 0;
9770
    }
9771
 
9772
    public void read(TProtocol iprot) throws TException {
9773
      TField field;
9774
      iprot.readStructBegin();
9775
      while (true)
9776
      {
9777
        field = iprot.readFieldBegin();
9778
        if (field.type == TType.STOP) { 
9779
          break;
9780
        }
9781
        _Fields fieldId = _Fields.findByThriftId(field.id);
9782
        if (fieldId == null) {
9783
          TProtocolUtil.skip(iprot, field.type);
9784
        } else {
9785
          switch (fieldId) {
9786
            case STATUS:
9787
              if (field.type == TType.I32) {
9788
                this.status = OrderStatus.findByValue(iprot.readI32());
9789
              } else { 
9790
                TProtocolUtil.skip(iprot, field.type);
9791
              }
9792
              break;
9793
            case START_BILLING_DATE:
9794
              if (field.type == TType.I64) {
9795
                this.start_billing_date = iprot.readI64();
9796
                setStart_billing_dateIsSet(true);
9797
              } else { 
9798
                TProtocolUtil.skip(iprot, field.type);
9799
              }
9800
              break;
9801
            case END_BILLING_DATE:
9802
              if (field.type == TType.I64) {
9803
                this.end_billing_date = iprot.readI64();
9804
                setEnd_billing_dateIsSet(true);
9805
              } else { 
9806
                TProtocolUtil.skip(iprot, field.type);
9807
              }
9808
              break;
9809
            case WAREHOUSE_ID:
9810
              if (field.type == TType.I64) {
9811
                this.warehouse_id = iprot.readI64();
9812
                setWarehouse_idIsSet(true);
9813
              } else { 
9814
                TProtocolUtil.skip(iprot, field.type);
9815
              }
9816
              break;
9817
          }
9818
          iprot.readFieldEnd();
9819
        }
9820
      }
9821
      iprot.readStructEnd();
9822
      validate();
9823
    }
9824
 
9825
    public void write(TProtocol oprot) throws TException {
9826
      validate();
9827
 
9828
      oprot.writeStructBegin(STRUCT_DESC);
9829
      if (this.status != null) {
9830
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9831
        oprot.writeI32(this.status.getValue());
9832
        oprot.writeFieldEnd();
9833
      }
9834
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9835
      oprot.writeI64(this.start_billing_date);
9836
      oprot.writeFieldEnd();
9837
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9838
      oprot.writeI64(this.end_billing_date);
9839
      oprot.writeFieldEnd();
9840
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9841
      oprot.writeI64(this.warehouse_id);
9842
      oprot.writeFieldEnd();
9843
      oprot.writeFieldStop();
9844
      oprot.writeStructEnd();
9845
    }
9846
 
9847
    @Override
9848
    public String toString() {
9849
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9850
      boolean first = true;
9851
 
9852
      sb.append("status:");
9853
      if (this.status == null) {
9854
        sb.append("null");
9855
      } else {
9856
        String status_name = status.name();
9857
        if (status_name != null) {
9858
          sb.append(status_name);
9859
          sb.append(" (");
9860
        }
9861
        sb.append(this.status);
9862
        if (status_name != null) {
9863
          sb.append(")");
9864
        }
9865
      }
9866
      first = false;
9867
      if (!first) sb.append(", ");
9868
      sb.append("start_billing_date:");
9869
      sb.append(this.start_billing_date);
9870
      first = false;
9871
      if (!first) sb.append(", ");
9872
      sb.append("end_billing_date:");
9873
      sb.append(this.end_billing_date);
9874
      first = false;
9875
      if (!first) sb.append(", ");
9876
      sb.append("warehouse_id:");
9877
      sb.append(this.warehouse_id);
9878
      first = false;
9879
      sb.append(")");
9880
      return sb.toString();
9881
    }
9882
 
9883
    public void validate() throws TException {
9884
      // check for required fields
9885
    }
9886
 
9887
  }
9888
 
9889
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9890
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9891
 
9892
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9893
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9894
 
9895
    private List<Order> success;
9896
    private TransactionServiceException ex;
9897
 
9898
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9899
    public enum _Fields implements TFieldIdEnum {
9900
      SUCCESS((short)0, "success"),
9901
      EX((short)1, "ex");
9902
 
9903
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9904
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9905
 
9906
      static {
9907
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9908
          byId.put((int)field._thriftId, field);
9909
          byName.put(field.getFieldName(), field);
9910
        }
9911
      }
9912
 
9913
      /**
9914
       * Find the _Fields constant that matches fieldId, or null if its not found.
9915
       */
9916
      public static _Fields findByThriftId(int fieldId) {
9917
        return byId.get(fieldId);
9918
      }
9919
 
9920
      /**
9921
       * Find the _Fields constant that matches fieldId, throwing an exception
9922
       * if it is not found.
9923
       */
9924
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9925
        _Fields fields = findByThriftId(fieldId);
9926
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9927
        return fields;
9928
      }
9929
 
9930
      /**
9931
       * Find the _Fields constant that matches name, or null if its not found.
9932
       */
9933
      public static _Fields findByName(String name) {
9934
        return byName.get(name);
9935
      }
9936
 
9937
      private final short _thriftId;
9938
      private final String _fieldName;
9939
 
9940
      _Fields(short thriftId, String fieldName) {
9941
        _thriftId = thriftId;
9942
        _fieldName = fieldName;
9943
      }
9944
 
9945
      public short getThriftFieldId() {
9946
        return _thriftId;
9947
      }
9948
 
9949
      public String getFieldName() {
9950
        return _fieldName;
9951
      }
9952
    }
9953
 
9954
    // isset id assignments
9955
 
9956
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9957
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9958
          new ListMetaData(TType.LIST, 
9959
              new StructMetaData(TType.STRUCT, Order.class))));
9960
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9961
          new FieldValueMetaData(TType.STRUCT)));
9962
    }});
9963
 
9964
    static {
9965
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9966
    }
9967
 
9968
    public getOrdersByBillingDate_result() {
9969
    }
9970
 
9971
    public getOrdersByBillingDate_result(
9972
      List<Order> success,
9973
      TransactionServiceException ex)
9974
    {
9975
      this();
9976
      this.success = success;
9977
      this.ex = ex;
9978
    }
9979
 
9980
    /**
9981
     * Performs a deep copy on <i>other</i>.
9982
     */
9983
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9984
      if (other.isSetSuccess()) {
9985
        List<Order> __this__success = new ArrayList<Order>();
9986
        for (Order other_element : other.success) {
9987
          __this__success.add(new Order(other_element));
9988
        }
9989
        this.success = __this__success;
9990
      }
9991
      if (other.isSetEx()) {
9992
        this.ex = new TransactionServiceException(other.ex);
9993
      }
9994
    }
9995
 
9996
    public getOrdersByBillingDate_result deepCopy() {
9997
      return new getOrdersByBillingDate_result(this);
9998
    }
9999
 
10000
    @Deprecated
10001
    public getOrdersByBillingDate_result clone() {
10002
      return new getOrdersByBillingDate_result(this);
10003
    }
10004
 
10005
    public int getSuccessSize() {
10006
      return (this.success == null) ? 0 : this.success.size();
10007
    }
10008
 
10009
    public java.util.Iterator<Order> getSuccessIterator() {
10010
      return (this.success == null) ? null : this.success.iterator();
10011
    }
10012
 
10013
    public void addToSuccess(Order elem) {
10014
      if (this.success == null) {
10015
        this.success = new ArrayList<Order>();
10016
      }
10017
      this.success.add(elem);
10018
    }
10019
 
10020
    public List<Order> getSuccess() {
10021
      return this.success;
10022
    }
10023
 
10024
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
10025
      this.success = success;
10026
      return this;
10027
    }
10028
 
10029
    public void unsetSuccess() {
10030
      this.success = null;
10031
    }
10032
 
10033
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10034
    public boolean isSetSuccess() {
10035
      return this.success != null;
10036
    }
10037
 
10038
    public void setSuccessIsSet(boolean value) {
10039
      if (!value) {
10040
        this.success = null;
10041
      }
10042
    }
10043
 
10044
    public TransactionServiceException getEx() {
10045
      return this.ex;
10046
    }
10047
 
10048
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
10049
      this.ex = ex;
10050
      return this;
10051
    }
10052
 
10053
    public void unsetEx() {
10054
      this.ex = null;
10055
    }
10056
 
10057
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10058
    public boolean isSetEx() {
10059
      return this.ex != null;
10060
    }
10061
 
10062
    public void setExIsSet(boolean value) {
10063
      if (!value) {
10064
        this.ex = null;
10065
      }
10066
    }
10067
 
10068
    public void setFieldValue(_Fields field, Object value) {
10069
      switch (field) {
10070
      case SUCCESS:
10071
        if (value == null) {
10072
          unsetSuccess();
10073
        } else {
10074
          setSuccess((List<Order>)value);
10075
        }
10076
        break;
10077
 
10078
      case EX:
10079
        if (value == null) {
10080
          unsetEx();
10081
        } else {
10082
          setEx((TransactionServiceException)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 SUCCESS:
10096
        return getSuccess();
10097
 
10098
      case EX:
10099
        return getEx();
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 SUCCESS:
10113
        return isSetSuccess();
10114
      case EX:
10115
        return isSetEx();
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 getOrdersByBillingDate_result)
10129
        return this.equals((getOrdersByBillingDate_result)that);
10130
      return false;
10131
    }
10132
 
10133
    public boolean equals(getOrdersByBillingDate_result that) {
10134
      if (that == null)
10135
        return false;
10136
 
10137
      boolean this_present_success = true && this.isSetSuccess();
10138
      boolean that_present_success = true && that.isSetSuccess();
10139
      if (this_present_success || that_present_success) {
10140
        if (!(this_present_success && that_present_success))
10141
          return false;
10142
        if (!this.success.equals(that.success))
10143
          return false;
10144
      }
10145
 
10146
      boolean this_present_ex = true && this.isSetEx();
10147
      boolean that_present_ex = true && that.isSetEx();
10148
      if (this_present_ex || that_present_ex) {
10149
        if (!(this_present_ex && that_present_ex))
10150
          return false;
10151
        if (!this.ex.equals(that.ex))
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(getOrdersByBillingDate_result other) {
10164
      if (!getClass().equals(other.getClass())) {
10165
        return getClass().getName().compareTo(other.getClass().getName());
10166
      }
10167
 
10168
      int lastComparison = 0;
10169
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
10170
 
10171
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10172
      if (lastComparison != 0) {
10173
        return lastComparison;
10174
      }
10175
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10176
      if (lastComparison != 0) {
10177
        return lastComparison;
10178
      }
10179
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10180
      if (lastComparison != 0) {
10181
        return lastComparison;
10182
      }
10183
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
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 SUCCESS:
10205
              if (field.type == TType.LIST) {
10206
                {
10207
                  TList _list20 = iprot.readListBegin();
10208
                  this.success = new ArrayList<Order>(_list20.size);
10209
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
10210
                  {
10211
                    Order _elem22;
10212
                    _elem22 = new Order();
10213
                    _elem22.read(iprot);
10214
                    this.success.add(_elem22);
10215
                  }
10216
                  iprot.readListEnd();
10217
                }
10218
              } else { 
10219
                TProtocolUtil.skip(iprot, field.type);
10220
              }
10221
              break;
10222
            case EX:
10223
              if (field.type == TType.STRUCT) {
10224
                this.ex = new TransactionServiceException();
10225
                this.ex.read(iprot);
10226
              } else { 
10227
                TProtocolUtil.skip(iprot, field.type);
10228
              }
10229
              break;
10230
          }
10231
          iprot.readFieldEnd();
10232
        }
10233
      }
10234
      iprot.readStructEnd();
10235
      validate();
10236
    }
10237
 
10238
    public void write(TProtocol oprot) throws TException {
10239
      oprot.writeStructBegin(STRUCT_DESC);
10240
 
10241
      if (this.isSetSuccess()) {
10242
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10243
        {
10244
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
10245
          for (Order _iter23 : this.success)
10246
          {
10247
            _iter23.write(oprot);
10248
          }
10249
          oprot.writeListEnd();
10250
        }
10251
        oprot.writeFieldEnd();
10252
      } else if (this.isSetEx()) {
10253
        oprot.writeFieldBegin(EX_FIELD_DESC);
10254
        this.ex.write(oprot);
10255
        oprot.writeFieldEnd();
10256
      }
10257
      oprot.writeFieldStop();
10258
      oprot.writeStructEnd();
10259
    }
10260
 
10261
    @Override
10262
    public String toString() {
10263
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
10264
      boolean first = true;
10265
 
10266
      sb.append("success:");
10267
      if (this.success == null) {
10268
        sb.append("null");
10269
      } else {
10270
        sb.append(this.success);
10271
      }
10272
      first = false;
10273
      if (!first) sb.append(", ");
10274
      sb.append("ex:");
10275
      if (this.ex == null) {
10276
        sb.append("null");
10277
      } else {
10278
        sb.append(this.ex);
10279
      }
10280
      first = false;
10281
      sb.append(")");
10282
      return sb.toString();
10283
    }
10284
 
10285
    public void validate() throws TException {
10286
      // check for required fields
10287
    }
10288
 
10289
  }
10290
 
1382 varun.gupt 10291
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
10292
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
10293
 
10294
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10295
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10296
 
10297
    private long customer_id;
10298
    private long limit;
10299
 
10300
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10301
    public enum _Fields implements TFieldIdEnum {
10302
      CUSTOMER_ID((short)1, "customer_id"),
10303
      LIMIT((short)2, "limit");
10304
 
10305
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10306
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10307
 
10308
      static {
10309
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10310
          byId.put((int)field._thriftId, field);
10311
          byName.put(field.getFieldName(), field);
10312
        }
10313
      }
10314
 
10315
      /**
10316
       * Find the _Fields constant that matches fieldId, or null if its not found.
10317
       */
10318
      public static _Fields findByThriftId(int fieldId) {
10319
        return byId.get(fieldId);
10320
      }
10321
 
10322
      /**
10323
       * Find the _Fields constant that matches fieldId, throwing an exception
10324
       * if it is not found.
10325
       */
10326
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10327
        _Fields fields = findByThriftId(fieldId);
10328
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10329
        return fields;
10330
      }
10331
 
10332
      /**
10333
       * Find the _Fields constant that matches name, or null if its not found.
10334
       */
10335
      public static _Fields findByName(String name) {
10336
        return byName.get(name);
10337
      }
10338
 
10339
      private final short _thriftId;
10340
      private final String _fieldName;
10341
 
10342
      _Fields(short thriftId, String fieldName) {
10343
        _thriftId = thriftId;
10344
        _fieldName = fieldName;
10345
      }
10346
 
10347
      public short getThriftFieldId() {
10348
        return _thriftId;
10349
      }
10350
 
10351
      public String getFieldName() {
10352
        return _fieldName;
10353
      }
10354
    }
10355
 
10356
    // isset id assignments
10357
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10358
    private static final int __LIMIT_ISSET_ID = 1;
10359
    private BitSet __isset_bit_vector = new BitSet(2);
10360
 
10361
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10362
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10363
          new FieldValueMetaData(TType.I64)));
10364
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10365
          new FieldValueMetaData(TType.I64)));
10366
    }});
10367
 
10368
    static {
10369
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
10370
    }
10371
 
10372
    public getReturnableOrdersForCustomer_args() {
10373
    }
10374
 
10375
    public getReturnableOrdersForCustomer_args(
10376
      long customer_id,
10377
      long limit)
10378
    {
10379
      this();
10380
      this.customer_id = customer_id;
10381
      setCustomer_idIsSet(true);
10382
      this.limit = limit;
10383
      setLimitIsSet(true);
10384
    }
10385
 
10386
    /**
10387
     * Performs a deep copy on <i>other</i>.
10388
     */
10389
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
10390
      __isset_bit_vector.clear();
10391
      __isset_bit_vector.or(other.__isset_bit_vector);
10392
      this.customer_id = other.customer_id;
10393
      this.limit = other.limit;
10394
    }
10395
 
10396
    public getReturnableOrdersForCustomer_args deepCopy() {
10397
      return new getReturnableOrdersForCustomer_args(this);
10398
    }
10399
 
10400
    @Deprecated
10401
    public getReturnableOrdersForCustomer_args clone() {
10402
      return new getReturnableOrdersForCustomer_args(this);
10403
    }
10404
 
10405
    public long getCustomer_id() {
10406
      return this.customer_id;
10407
    }
10408
 
10409
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
10410
      this.customer_id = customer_id;
10411
      setCustomer_idIsSet(true);
10412
      return this;
10413
    }
10414
 
10415
    public void unsetCustomer_id() {
10416
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10417
    }
10418
 
10419
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10420
    public boolean isSetCustomer_id() {
10421
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10422
    }
10423
 
10424
    public void setCustomer_idIsSet(boolean value) {
10425
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10426
    }
10427
 
10428
    public long getLimit() {
10429
      return this.limit;
10430
    }
10431
 
10432
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
10433
      this.limit = limit;
10434
      setLimitIsSet(true);
10435
      return this;
10436
    }
10437
 
10438
    public void unsetLimit() {
10439
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10440
    }
10441
 
10442
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10443
    public boolean isSetLimit() {
10444
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10445
    }
10446
 
10447
    public void setLimitIsSet(boolean value) {
10448
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10449
    }
10450
 
10451
    public void setFieldValue(_Fields field, Object value) {
10452
      switch (field) {
10453
      case CUSTOMER_ID:
10454
        if (value == null) {
10455
          unsetCustomer_id();
10456
        } else {
10457
          setCustomer_id((Long)value);
10458
        }
10459
        break;
10460
 
10461
      case LIMIT:
10462
        if (value == null) {
10463
          unsetLimit();
10464
        } else {
10465
          setLimit((Long)value);
10466
        }
10467
        break;
10468
 
10469
      }
10470
    }
10471
 
10472
    public void setFieldValue(int fieldID, Object value) {
10473
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10474
    }
10475
 
10476
    public Object getFieldValue(_Fields field) {
10477
      switch (field) {
10478
      case CUSTOMER_ID:
10479
        return new Long(getCustomer_id());
10480
 
10481
      case LIMIT:
10482
        return new Long(getLimit());
10483
 
10484
      }
10485
      throw new IllegalStateException();
10486
    }
10487
 
10488
    public Object getFieldValue(int fieldId) {
10489
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10490
    }
10491
 
10492
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10493
    public boolean isSet(_Fields field) {
10494
      switch (field) {
10495
      case CUSTOMER_ID:
10496
        return isSetCustomer_id();
10497
      case LIMIT:
10498
        return isSetLimit();
10499
      }
10500
      throw new IllegalStateException();
10501
    }
10502
 
10503
    public boolean isSet(int fieldID) {
10504
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10505
    }
10506
 
10507
    @Override
10508
    public boolean equals(Object that) {
10509
      if (that == null)
10510
        return false;
10511
      if (that instanceof getReturnableOrdersForCustomer_args)
10512
        return this.equals((getReturnableOrdersForCustomer_args)that);
10513
      return false;
10514
    }
10515
 
10516
    public boolean equals(getReturnableOrdersForCustomer_args that) {
10517
      if (that == null)
10518
        return false;
10519
 
10520
      boolean this_present_customer_id = true;
10521
      boolean that_present_customer_id = true;
10522
      if (this_present_customer_id || that_present_customer_id) {
10523
        if (!(this_present_customer_id && that_present_customer_id))
10524
          return false;
10525
        if (this.customer_id != that.customer_id)
10526
          return false;
10527
      }
10528
 
10529
      boolean this_present_limit = true;
10530
      boolean that_present_limit = true;
10531
      if (this_present_limit || that_present_limit) {
10532
        if (!(this_present_limit && that_present_limit))
10533
          return false;
10534
        if (this.limit != that.limit)
10535
          return false;
10536
      }
10537
 
10538
      return true;
10539
    }
10540
 
10541
    @Override
10542
    public int hashCode() {
10543
      return 0;
10544
    }
10545
 
10546
    public int compareTo(getReturnableOrdersForCustomer_args other) {
10547
      if (!getClass().equals(other.getClass())) {
10548
        return getClass().getName().compareTo(other.getClass().getName());
10549
      }
10550
 
10551
      int lastComparison = 0;
10552
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
10553
 
10554
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10555
      if (lastComparison != 0) {
10556
        return lastComparison;
10557
      }
10558
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10559
      if (lastComparison != 0) {
10560
        return lastComparison;
10561
      }
10562
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10563
      if (lastComparison != 0) {
10564
        return lastComparison;
10565
      }
10566
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10567
      if (lastComparison != 0) {
10568
        return lastComparison;
10569
      }
10570
      return 0;
10571
    }
10572
 
10573
    public void read(TProtocol iprot) throws TException {
10574
      TField field;
10575
      iprot.readStructBegin();
10576
      while (true)
10577
      {
10578
        field = iprot.readFieldBegin();
10579
        if (field.type == TType.STOP) { 
10580
          break;
10581
        }
10582
        _Fields fieldId = _Fields.findByThriftId(field.id);
10583
        if (fieldId == null) {
10584
          TProtocolUtil.skip(iprot, field.type);
10585
        } else {
10586
          switch (fieldId) {
10587
            case CUSTOMER_ID:
10588
              if (field.type == TType.I64) {
10589
                this.customer_id = iprot.readI64();
10590
                setCustomer_idIsSet(true);
10591
              } else { 
10592
                TProtocolUtil.skip(iprot, field.type);
10593
              }
10594
              break;
10595
            case LIMIT:
10596
              if (field.type == TType.I64) {
10597
                this.limit = iprot.readI64();
10598
                setLimitIsSet(true);
10599
              } else { 
10600
                TProtocolUtil.skip(iprot, field.type);
10601
              }
10602
              break;
10603
          }
10604
          iprot.readFieldEnd();
10605
        }
10606
      }
10607
      iprot.readStructEnd();
10608
      validate();
10609
    }
10610
 
10611
    public void write(TProtocol oprot) throws TException {
10612
      validate();
10613
 
10614
      oprot.writeStructBegin(STRUCT_DESC);
10615
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10616
      oprot.writeI64(this.customer_id);
10617
      oprot.writeFieldEnd();
10618
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10619
      oprot.writeI64(this.limit);
10620
      oprot.writeFieldEnd();
10621
      oprot.writeFieldStop();
10622
      oprot.writeStructEnd();
10623
    }
10624
 
10625
    @Override
10626
    public String toString() {
10627
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
10628
      boolean first = true;
10629
 
10630
      sb.append("customer_id:");
10631
      sb.append(this.customer_id);
10632
      first = false;
10633
      if (!first) sb.append(", ");
10634
      sb.append("limit:");
10635
      sb.append(this.limit);
10636
      first = false;
10637
      sb.append(")");
10638
      return sb.toString();
10639
    }
10640
 
10641
    public void validate() throws TException {
10642
      // check for required fields
10643
    }
10644
 
10645
  }
10646
 
10647
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
10648
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
10649
 
10650
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10651
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10652
 
10653
    private List<Long> success;
10654
    private TransactionServiceException ex;
10655
 
10656
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10657
    public enum _Fields implements TFieldIdEnum {
10658
      SUCCESS((short)0, "success"),
10659
      EX((short)1, "ex");
10660
 
10661
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10662
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10663
 
10664
      static {
10665
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10666
          byId.put((int)field._thriftId, field);
10667
          byName.put(field.getFieldName(), field);
10668
        }
10669
      }
10670
 
10671
      /**
10672
       * Find the _Fields constant that matches fieldId, or null if its not found.
10673
       */
10674
      public static _Fields findByThriftId(int fieldId) {
10675
        return byId.get(fieldId);
10676
      }
10677
 
10678
      /**
10679
       * Find the _Fields constant that matches fieldId, throwing an exception
10680
       * if it is not found.
10681
       */
10682
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10683
        _Fields fields = findByThriftId(fieldId);
10684
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10685
        return fields;
10686
      }
10687
 
10688
      /**
10689
       * Find the _Fields constant that matches name, or null if its not found.
10690
       */
10691
      public static _Fields findByName(String name) {
10692
        return byName.get(name);
10693
      }
10694
 
10695
      private final short _thriftId;
10696
      private final String _fieldName;
10697
 
10698
      _Fields(short thriftId, String fieldName) {
10699
        _thriftId = thriftId;
10700
        _fieldName = fieldName;
10701
      }
10702
 
10703
      public short getThriftFieldId() {
10704
        return _thriftId;
10705
      }
10706
 
10707
      public String getFieldName() {
10708
        return _fieldName;
10709
      }
10710
    }
10711
 
10712
    // isset id assignments
10713
 
10714
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10715
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10716
          new ListMetaData(TType.LIST, 
10717
              new FieldValueMetaData(TType.I64))));
10718
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10719
          new FieldValueMetaData(TType.STRUCT)));
10720
    }});
10721
 
10722
    static {
10723
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10724
    }
10725
 
10726
    public getReturnableOrdersForCustomer_result() {
10727
    }
10728
 
10729
    public getReturnableOrdersForCustomer_result(
10730
      List<Long> success,
10731
      TransactionServiceException ex)
10732
    {
10733
      this();
10734
      this.success = success;
10735
      this.ex = ex;
10736
    }
10737
 
10738
    /**
10739
     * Performs a deep copy on <i>other</i>.
10740
     */
10741
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10742
      if (other.isSetSuccess()) {
10743
        List<Long> __this__success = new ArrayList<Long>();
10744
        for (Long other_element : other.success) {
10745
          __this__success.add(other_element);
10746
        }
10747
        this.success = __this__success;
10748
      }
10749
      if (other.isSetEx()) {
10750
        this.ex = new TransactionServiceException(other.ex);
10751
      }
10752
    }
10753
 
10754
    public getReturnableOrdersForCustomer_result deepCopy() {
10755
      return new getReturnableOrdersForCustomer_result(this);
10756
    }
10757
 
10758
    @Deprecated
10759
    public getReturnableOrdersForCustomer_result clone() {
10760
      return new getReturnableOrdersForCustomer_result(this);
10761
    }
10762
 
10763
    public int getSuccessSize() {
10764
      return (this.success == null) ? 0 : this.success.size();
10765
    }
10766
 
10767
    public java.util.Iterator<Long> getSuccessIterator() {
10768
      return (this.success == null) ? null : this.success.iterator();
10769
    }
10770
 
10771
    public void addToSuccess(long elem) {
10772
      if (this.success == null) {
10773
        this.success = new ArrayList<Long>();
10774
      }
10775
      this.success.add(elem);
10776
    }
10777
 
10778
    public List<Long> getSuccess() {
10779
      return this.success;
10780
    }
10781
 
10782
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10783
      this.success = success;
10784
      return this;
10785
    }
10786
 
10787
    public void unsetSuccess() {
10788
      this.success = null;
10789
    }
10790
 
10791
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10792
    public boolean isSetSuccess() {
10793
      return this.success != null;
10794
    }
10795
 
10796
    public void setSuccessIsSet(boolean value) {
10797
      if (!value) {
10798
        this.success = null;
10799
      }
10800
    }
10801
 
10802
    public TransactionServiceException getEx() {
10803
      return this.ex;
10804
    }
10805
 
10806
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10807
      this.ex = ex;
10808
      return this;
10809
    }
10810
 
10811
    public void unsetEx() {
10812
      this.ex = null;
10813
    }
10814
 
10815
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10816
    public boolean isSetEx() {
10817
      return this.ex != null;
10818
    }
10819
 
10820
    public void setExIsSet(boolean value) {
10821
      if (!value) {
10822
        this.ex = null;
10823
      }
10824
    }
10825
 
10826
    public void setFieldValue(_Fields field, Object value) {
10827
      switch (field) {
10828
      case SUCCESS:
10829
        if (value == null) {
10830
          unsetSuccess();
10831
        } else {
10832
          setSuccess((List<Long>)value);
10833
        }
10834
        break;
10835
 
10836
      case EX:
10837
        if (value == null) {
10838
          unsetEx();
10839
        } else {
10840
          setEx((TransactionServiceException)value);
10841
        }
10842
        break;
10843
 
10844
      }
10845
    }
10846
 
10847
    public void setFieldValue(int fieldID, Object value) {
10848
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10849
    }
10850
 
10851
    public Object getFieldValue(_Fields field) {
10852
      switch (field) {
10853
      case SUCCESS:
10854
        return getSuccess();
10855
 
10856
      case EX:
10857
        return getEx();
10858
 
10859
      }
10860
      throw new IllegalStateException();
10861
    }
10862
 
10863
    public Object getFieldValue(int fieldId) {
10864
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10865
    }
10866
 
10867
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10868
    public boolean isSet(_Fields field) {
10869
      switch (field) {
10870
      case SUCCESS:
10871
        return isSetSuccess();
10872
      case EX:
10873
        return isSetEx();
10874
      }
10875
      throw new IllegalStateException();
10876
    }
10877
 
10878
    public boolean isSet(int fieldID) {
10879
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10880
    }
10881
 
10882
    @Override
10883
    public boolean equals(Object that) {
10884
      if (that == null)
10885
        return false;
10886
      if (that instanceof getReturnableOrdersForCustomer_result)
10887
        return this.equals((getReturnableOrdersForCustomer_result)that);
10888
      return false;
10889
    }
10890
 
10891
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10892
      if (that == null)
10893
        return false;
10894
 
10895
      boolean this_present_success = true && this.isSetSuccess();
10896
      boolean that_present_success = true && that.isSetSuccess();
10897
      if (this_present_success || that_present_success) {
10898
        if (!(this_present_success && that_present_success))
10899
          return false;
10900
        if (!this.success.equals(that.success))
10901
          return false;
10902
      }
10903
 
10904
      boolean this_present_ex = true && this.isSetEx();
10905
      boolean that_present_ex = true && that.isSetEx();
10906
      if (this_present_ex || that_present_ex) {
10907
        if (!(this_present_ex && that_present_ex))
10908
          return false;
10909
        if (!this.ex.equals(that.ex))
10910
          return false;
10911
      }
10912
 
10913
      return true;
10914
    }
10915
 
10916
    @Override
10917
    public int hashCode() {
10918
      return 0;
10919
    }
10920
 
10921
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10922
      if (!getClass().equals(other.getClass())) {
10923
        return getClass().getName().compareTo(other.getClass().getName());
10924
      }
10925
 
10926
      int lastComparison = 0;
10927
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10928
 
10929
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10930
      if (lastComparison != 0) {
10931
        return lastComparison;
10932
      }
10933
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10934
      if (lastComparison != 0) {
10935
        return lastComparison;
10936
      }
10937
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10938
      if (lastComparison != 0) {
10939
        return lastComparison;
10940
      }
10941
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10942
      if (lastComparison != 0) {
10943
        return lastComparison;
10944
      }
10945
      return 0;
10946
    }
10947
 
10948
    public void read(TProtocol iprot) throws TException {
10949
      TField field;
10950
      iprot.readStructBegin();
10951
      while (true)
10952
      {
10953
        field = iprot.readFieldBegin();
10954
        if (field.type == TType.STOP) { 
10955
          break;
10956
        }
10957
        _Fields fieldId = _Fields.findByThriftId(field.id);
10958
        if (fieldId == null) {
10959
          TProtocolUtil.skip(iprot, field.type);
10960
        } else {
10961
          switch (fieldId) {
10962
            case SUCCESS:
10963
              if (field.type == TType.LIST) {
10964
                {
10965
                  TList _list24 = iprot.readListBegin();
10966
                  this.success = new ArrayList<Long>(_list24.size);
10967
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10968
                  {
10969
                    long _elem26;
10970
                    _elem26 = iprot.readI64();
10971
                    this.success.add(_elem26);
10972
                  }
10973
                  iprot.readListEnd();
10974
                }
10975
              } else { 
10976
                TProtocolUtil.skip(iprot, field.type);
10977
              }
10978
              break;
10979
            case EX:
10980
              if (field.type == TType.STRUCT) {
10981
                this.ex = new TransactionServiceException();
10982
                this.ex.read(iprot);
10983
              } else { 
10984
                TProtocolUtil.skip(iprot, field.type);
10985
              }
10986
              break;
10987
          }
10988
          iprot.readFieldEnd();
10989
        }
10990
      }
10991
      iprot.readStructEnd();
10992
      validate();
10993
    }
10994
 
10995
    public void write(TProtocol oprot) throws TException {
10996
      oprot.writeStructBegin(STRUCT_DESC);
10997
 
10998
      if (this.isSetSuccess()) {
10999
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11000
        {
11001
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11002
          for (long _iter27 : this.success)
11003
          {
11004
            oprot.writeI64(_iter27);
11005
          }
11006
          oprot.writeListEnd();
11007
        }
11008
        oprot.writeFieldEnd();
11009
      } else if (this.isSetEx()) {
11010
        oprot.writeFieldBegin(EX_FIELD_DESC);
11011
        this.ex.write(oprot);
11012
        oprot.writeFieldEnd();
11013
      }
11014
      oprot.writeFieldStop();
11015
      oprot.writeStructEnd();
11016
    }
11017
 
11018
    @Override
11019
    public String toString() {
11020
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
11021
      boolean first = true;
11022
 
11023
      sb.append("success:");
11024
      if (this.success == null) {
11025
        sb.append("null");
11026
      } else {
11027
        sb.append(this.success);
11028
      }
11029
      first = false;
11030
      if (!first) sb.append(", ");
11031
      sb.append("ex:");
11032
      if (this.ex == null) {
11033
        sb.append("null");
11034
      } else {
11035
        sb.append(this.ex);
11036
      }
11037
      first = false;
11038
      sb.append(")");
11039
      return sb.toString();
11040
    }
11041
 
11042
    public void validate() throws TException {
11043
      // check for required fields
11044
    }
11045
 
11046
  }
11047
 
11048
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
11049
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
11050
 
11051
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
11052
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
11053
 
11054
    private long customer_id;
11055
    private long limit;
11056
 
11057
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11058
    public enum _Fields implements TFieldIdEnum {
11059
      CUSTOMER_ID((short)1, "customer_id"),
11060
      LIMIT((short)2, "limit");
11061
 
11062
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11063
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11064
 
11065
      static {
11066
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11067
          byId.put((int)field._thriftId, field);
11068
          byName.put(field.getFieldName(), field);
11069
        }
11070
      }
11071
 
11072
      /**
11073
       * Find the _Fields constant that matches fieldId, or null if its not found.
11074
       */
11075
      public static _Fields findByThriftId(int fieldId) {
11076
        return byId.get(fieldId);
11077
      }
11078
 
11079
      /**
11080
       * Find the _Fields constant that matches fieldId, throwing an exception
11081
       * if it is not found.
11082
       */
11083
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11084
        _Fields fields = findByThriftId(fieldId);
11085
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11086
        return fields;
11087
      }
11088
 
11089
      /**
11090
       * Find the _Fields constant that matches name, or null if its not found.
11091
       */
11092
      public static _Fields findByName(String name) {
11093
        return byName.get(name);
11094
      }
11095
 
11096
      private final short _thriftId;
11097
      private final String _fieldName;
11098
 
11099
      _Fields(short thriftId, String fieldName) {
11100
        _thriftId = thriftId;
11101
        _fieldName = fieldName;
11102
      }
11103
 
11104
      public short getThriftFieldId() {
11105
        return _thriftId;
11106
      }
11107
 
11108
      public String getFieldName() {
11109
        return _fieldName;
11110
      }
11111
    }
11112
 
11113
    // isset id assignments
11114
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
11115
    private static final int __LIMIT_ISSET_ID = 1;
11116
    private BitSet __isset_bit_vector = new BitSet(2);
11117
 
11118
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11119
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
11120
          new FieldValueMetaData(TType.I64)));
11121
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
11122
          new FieldValueMetaData(TType.I64)));
11123
    }});
11124
 
11125
    static {
11126
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
11127
    }
11128
 
11129
    public getCancellableOrdersForCustomer_args() {
11130
    }
11131
 
11132
    public getCancellableOrdersForCustomer_args(
11133
      long customer_id,
11134
      long limit)
11135
    {
11136
      this();
11137
      this.customer_id = customer_id;
11138
      setCustomer_idIsSet(true);
11139
      this.limit = limit;
11140
      setLimitIsSet(true);
11141
    }
11142
 
11143
    /**
11144
     * Performs a deep copy on <i>other</i>.
11145
     */
11146
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
11147
      __isset_bit_vector.clear();
11148
      __isset_bit_vector.or(other.__isset_bit_vector);
11149
      this.customer_id = other.customer_id;
11150
      this.limit = other.limit;
11151
    }
11152
 
11153
    public getCancellableOrdersForCustomer_args deepCopy() {
11154
      return new getCancellableOrdersForCustomer_args(this);
11155
    }
11156
 
11157
    @Deprecated
11158
    public getCancellableOrdersForCustomer_args clone() {
11159
      return new getCancellableOrdersForCustomer_args(this);
11160
    }
11161
 
11162
    public long getCustomer_id() {
11163
      return this.customer_id;
11164
    }
11165
 
11166
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
11167
      this.customer_id = customer_id;
11168
      setCustomer_idIsSet(true);
11169
      return this;
11170
    }
11171
 
11172
    public void unsetCustomer_id() {
11173
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
11174
    }
11175
 
11176
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
11177
    public boolean isSetCustomer_id() {
11178
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
11179
    }
11180
 
11181
    public void setCustomer_idIsSet(boolean value) {
11182
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
11183
    }
11184
 
11185
    public long getLimit() {
11186
      return this.limit;
11187
    }
11188
 
11189
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
11190
      this.limit = limit;
11191
      setLimitIsSet(true);
11192
      return this;
11193
    }
11194
 
11195
    public void unsetLimit() {
11196
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
11197
    }
11198
 
11199
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
11200
    public boolean isSetLimit() {
11201
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
11202
    }
11203
 
11204
    public void setLimitIsSet(boolean value) {
11205
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
11206
    }
11207
 
11208
    public void setFieldValue(_Fields field, Object value) {
11209
      switch (field) {
11210
      case CUSTOMER_ID:
11211
        if (value == null) {
11212
          unsetCustomer_id();
11213
        } else {
11214
          setCustomer_id((Long)value);
11215
        }
11216
        break;
11217
 
11218
      case LIMIT:
11219
        if (value == null) {
11220
          unsetLimit();
11221
        } else {
11222
          setLimit((Long)value);
11223
        }
11224
        break;
11225
 
11226
      }
11227
    }
11228
 
11229
    public void setFieldValue(int fieldID, Object value) {
11230
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11231
    }
11232
 
11233
    public Object getFieldValue(_Fields field) {
11234
      switch (field) {
11235
      case CUSTOMER_ID:
11236
        return new Long(getCustomer_id());
11237
 
11238
      case LIMIT:
11239
        return new Long(getLimit());
11240
 
11241
      }
11242
      throw new IllegalStateException();
11243
    }
11244
 
11245
    public Object getFieldValue(int fieldId) {
11246
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11247
    }
11248
 
11249
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11250
    public boolean isSet(_Fields field) {
11251
      switch (field) {
11252
      case CUSTOMER_ID:
11253
        return isSetCustomer_id();
11254
      case LIMIT:
11255
        return isSetLimit();
11256
      }
11257
      throw new IllegalStateException();
11258
    }
11259
 
11260
    public boolean isSet(int fieldID) {
11261
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11262
    }
11263
 
11264
    @Override
11265
    public boolean equals(Object that) {
11266
      if (that == null)
11267
        return false;
11268
      if (that instanceof getCancellableOrdersForCustomer_args)
11269
        return this.equals((getCancellableOrdersForCustomer_args)that);
11270
      return false;
11271
    }
11272
 
11273
    public boolean equals(getCancellableOrdersForCustomer_args that) {
11274
      if (that == null)
11275
        return false;
11276
 
11277
      boolean this_present_customer_id = true;
11278
      boolean that_present_customer_id = true;
11279
      if (this_present_customer_id || that_present_customer_id) {
11280
        if (!(this_present_customer_id && that_present_customer_id))
11281
          return false;
11282
        if (this.customer_id != that.customer_id)
11283
          return false;
11284
      }
11285
 
11286
      boolean this_present_limit = true;
11287
      boolean that_present_limit = true;
11288
      if (this_present_limit || that_present_limit) {
11289
        if (!(this_present_limit && that_present_limit))
11290
          return false;
11291
        if (this.limit != that.limit)
11292
          return false;
11293
      }
11294
 
11295
      return true;
11296
    }
11297
 
11298
    @Override
11299
    public int hashCode() {
11300
      return 0;
11301
    }
11302
 
11303
    public int compareTo(getCancellableOrdersForCustomer_args other) {
11304
      if (!getClass().equals(other.getClass())) {
11305
        return getClass().getName().compareTo(other.getClass().getName());
11306
      }
11307
 
11308
      int lastComparison = 0;
11309
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
11310
 
11311
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
11312
      if (lastComparison != 0) {
11313
        return lastComparison;
11314
      }
11315
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
11316
      if (lastComparison != 0) {
11317
        return lastComparison;
11318
      }
11319
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
11320
      if (lastComparison != 0) {
11321
        return lastComparison;
11322
      }
11323
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
11324
      if (lastComparison != 0) {
11325
        return lastComparison;
11326
      }
11327
      return 0;
11328
    }
11329
 
11330
    public void read(TProtocol iprot) throws TException {
11331
      TField field;
11332
      iprot.readStructBegin();
11333
      while (true)
11334
      {
11335
        field = iprot.readFieldBegin();
11336
        if (field.type == TType.STOP) { 
11337
          break;
11338
        }
11339
        _Fields fieldId = _Fields.findByThriftId(field.id);
11340
        if (fieldId == null) {
11341
          TProtocolUtil.skip(iprot, field.type);
11342
        } else {
11343
          switch (fieldId) {
11344
            case CUSTOMER_ID:
11345
              if (field.type == TType.I64) {
11346
                this.customer_id = iprot.readI64();
11347
                setCustomer_idIsSet(true);
11348
              } else { 
11349
                TProtocolUtil.skip(iprot, field.type);
11350
              }
11351
              break;
11352
            case LIMIT:
11353
              if (field.type == TType.I64) {
11354
                this.limit = iprot.readI64();
11355
                setLimitIsSet(true);
11356
              } else { 
11357
                TProtocolUtil.skip(iprot, field.type);
11358
              }
11359
              break;
11360
          }
11361
          iprot.readFieldEnd();
11362
        }
11363
      }
11364
      iprot.readStructEnd();
11365
      validate();
11366
    }
11367
 
11368
    public void write(TProtocol oprot) throws TException {
11369
      validate();
11370
 
11371
      oprot.writeStructBegin(STRUCT_DESC);
11372
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
11373
      oprot.writeI64(this.customer_id);
11374
      oprot.writeFieldEnd();
11375
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
11376
      oprot.writeI64(this.limit);
11377
      oprot.writeFieldEnd();
11378
      oprot.writeFieldStop();
11379
      oprot.writeStructEnd();
11380
    }
11381
 
11382
    @Override
11383
    public String toString() {
11384
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
11385
      boolean first = true;
11386
 
11387
      sb.append("customer_id:");
11388
      sb.append(this.customer_id);
11389
      first = false;
11390
      if (!first) sb.append(", ");
11391
      sb.append("limit:");
11392
      sb.append(this.limit);
11393
      first = false;
11394
      sb.append(")");
11395
      return sb.toString();
11396
    }
11397
 
11398
    public void validate() throws TException {
11399
      // check for required fields
11400
    }
11401
 
11402
  }
11403
 
11404
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
11405
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
11406
 
11407
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11408
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11409
 
11410
    private List<Long> success;
11411
    private TransactionServiceException ex;
11412
 
11413
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11414
    public enum _Fields implements TFieldIdEnum {
11415
      SUCCESS((short)0, "success"),
11416
      EX((short)1, "ex");
11417
 
11418
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11419
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11420
 
11421
      static {
11422
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11423
          byId.put((int)field._thriftId, field);
11424
          byName.put(field.getFieldName(), field);
11425
        }
11426
      }
11427
 
11428
      /**
11429
       * Find the _Fields constant that matches fieldId, or null if its not found.
11430
       */
11431
      public static _Fields findByThriftId(int fieldId) {
11432
        return byId.get(fieldId);
11433
      }
11434
 
11435
      /**
11436
       * Find the _Fields constant that matches fieldId, throwing an exception
11437
       * if it is not found.
11438
       */
11439
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11440
        _Fields fields = findByThriftId(fieldId);
11441
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11442
        return fields;
11443
      }
11444
 
11445
      /**
11446
       * Find the _Fields constant that matches name, or null if its not found.
11447
       */
11448
      public static _Fields findByName(String name) {
11449
        return byName.get(name);
11450
      }
11451
 
11452
      private final short _thriftId;
11453
      private final String _fieldName;
11454
 
11455
      _Fields(short thriftId, String fieldName) {
11456
        _thriftId = thriftId;
11457
        _fieldName = fieldName;
11458
      }
11459
 
11460
      public short getThriftFieldId() {
11461
        return _thriftId;
11462
      }
11463
 
11464
      public String getFieldName() {
11465
        return _fieldName;
11466
      }
11467
    }
11468
 
11469
    // isset id assignments
11470
 
11471
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11472
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11473
          new ListMetaData(TType.LIST, 
11474
              new FieldValueMetaData(TType.I64))));
11475
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11476
          new FieldValueMetaData(TType.STRUCT)));
11477
    }});
11478
 
11479
    static {
11480
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
11481
    }
11482
 
11483
    public getCancellableOrdersForCustomer_result() {
11484
    }
11485
 
11486
    public getCancellableOrdersForCustomer_result(
11487
      List<Long> success,
11488
      TransactionServiceException ex)
11489
    {
11490
      this();
11491
      this.success = success;
11492
      this.ex = ex;
11493
    }
11494
 
11495
    /**
11496
     * Performs a deep copy on <i>other</i>.
11497
     */
11498
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
11499
      if (other.isSetSuccess()) {
11500
        List<Long> __this__success = new ArrayList<Long>();
11501
        for (Long other_element : other.success) {
11502
          __this__success.add(other_element);
11503
        }
11504
        this.success = __this__success;
11505
      }
11506
      if (other.isSetEx()) {
11507
        this.ex = new TransactionServiceException(other.ex);
11508
      }
11509
    }
11510
 
11511
    public getCancellableOrdersForCustomer_result deepCopy() {
11512
      return new getCancellableOrdersForCustomer_result(this);
11513
    }
11514
 
11515
    @Deprecated
11516
    public getCancellableOrdersForCustomer_result clone() {
11517
      return new getCancellableOrdersForCustomer_result(this);
11518
    }
11519
 
11520
    public int getSuccessSize() {
11521
      return (this.success == null) ? 0 : this.success.size();
11522
    }
11523
 
11524
    public java.util.Iterator<Long> getSuccessIterator() {
11525
      return (this.success == null) ? null : this.success.iterator();
11526
    }
11527
 
11528
    public void addToSuccess(long elem) {
11529
      if (this.success == null) {
11530
        this.success = new ArrayList<Long>();
11531
      }
11532
      this.success.add(elem);
11533
    }
11534
 
11535
    public List<Long> getSuccess() {
11536
      return this.success;
11537
    }
11538
 
11539
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
11540
      this.success = success;
11541
      return this;
11542
    }
11543
 
11544
    public void unsetSuccess() {
11545
      this.success = null;
11546
    }
11547
 
11548
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11549
    public boolean isSetSuccess() {
11550
      return this.success != null;
11551
    }
11552
 
11553
    public void setSuccessIsSet(boolean value) {
11554
      if (!value) {
11555
        this.success = null;
11556
      }
11557
    }
11558
 
11559
    public TransactionServiceException getEx() {
11560
      return this.ex;
11561
    }
11562
 
11563
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11564
      this.ex = ex;
11565
      return this;
11566
    }
11567
 
11568
    public void unsetEx() {
11569
      this.ex = null;
11570
    }
11571
 
11572
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11573
    public boolean isSetEx() {
11574
      return this.ex != null;
11575
    }
11576
 
11577
    public void setExIsSet(boolean value) {
11578
      if (!value) {
11579
        this.ex = null;
11580
      }
11581
    }
11582
 
11583
    public void setFieldValue(_Fields field, Object value) {
11584
      switch (field) {
11585
      case SUCCESS:
11586
        if (value == null) {
11587
          unsetSuccess();
11588
        } else {
11589
          setSuccess((List<Long>)value);
11590
        }
11591
        break;
11592
 
11593
      case EX:
11594
        if (value == null) {
11595
          unsetEx();
11596
        } else {
11597
          setEx((TransactionServiceException)value);
11598
        }
11599
        break;
11600
 
11601
      }
11602
    }
11603
 
11604
    public void setFieldValue(int fieldID, Object value) {
11605
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11606
    }
11607
 
11608
    public Object getFieldValue(_Fields field) {
11609
      switch (field) {
11610
      case SUCCESS:
11611
        return getSuccess();
11612
 
11613
      case EX:
11614
        return getEx();
11615
 
11616
      }
11617
      throw new IllegalStateException();
11618
    }
11619
 
11620
    public Object getFieldValue(int fieldId) {
11621
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11622
    }
11623
 
11624
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11625
    public boolean isSet(_Fields field) {
11626
      switch (field) {
11627
      case SUCCESS:
11628
        return isSetSuccess();
11629
      case EX:
11630
        return isSetEx();
11631
      }
11632
      throw new IllegalStateException();
11633
    }
11634
 
11635
    public boolean isSet(int fieldID) {
11636
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11637
    }
11638
 
11639
    @Override
11640
    public boolean equals(Object that) {
11641
      if (that == null)
11642
        return false;
11643
      if (that instanceof getCancellableOrdersForCustomer_result)
11644
        return this.equals((getCancellableOrdersForCustomer_result)that);
11645
      return false;
11646
    }
11647
 
11648
    public boolean equals(getCancellableOrdersForCustomer_result that) {
11649
      if (that == null)
11650
        return false;
11651
 
11652
      boolean this_present_success = true && this.isSetSuccess();
11653
      boolean that_present_success = true && that.isSetSuccess();
11654
      if (this_present_success || that_present_success) {
11655
        if (!(this_present_success && that_present_success))
11656
          return false;
11657
        if (!this.success.equals(that.success))
11658
          return false;
11659
      }
11660
 
11661
      boolean this_present_ex = true && this.isSetEx();
11662
      boolean that_present_ex = true && that.isSetEx();
11663
      if (this_present_ex || that_present_ex) {
11664
        if (!(this_present_ex && that_present_ex))
11665
          return false;
11666
        if (!this.ex.equals(that.ex))
11667
          return false;
11668
      }
11669
 
11670
      return true;
11671
    }
11672
 
11673
    @Override
11674
    public int hashCode() {
11675
      return 0;
11676
    }
11677
 
11678
    public int compareTo(getCancellableOrdersForCustomer_result other) {
11679
      if (!getClass().equals(other.getClass())) {
11680
        return getClass().getName().compareTo(other.getClass().getName());
11681
      }
11682
 
11683
      int lastComparison = 0;
11684
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
11685
 
11686
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11687
      if (lastComparison != 0) {
11688
        return lastComparison;
11689
      }
11690
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11691
      if (lastComparison != 0) {
11692
        return lastComparison;
11693
      }
11694
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11695
      if (lastComparison != 0) {
11696
        return lastComparison;
11697
      }
11698
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11699
      if (lastComparison != 0) {
11700
        return lastComparison;
11701
      }
11702
      return 0;
11703
    }
11704
 
11705
    public void read(TProtocol iprot) throws TException {
11706
      TField field;
11707
      iprot.readStructBegin();
11708
      while (true)
11709
      {
11710
        field = iprot.readFieldBegin();
11711
        if (field.type == TType.STOP) { 
11712
          break;
11713
        }
11714
        _Fields fieldId = _Fields.findByThriftId(field.id);
11715
        if (fieldId == null) {
11716
          TProtocolUtil.skip(iprot, field.type);
11717
        } else {
11718
          switch (fieldId) {
11719
            case SUCCESS:
11720
              if (field.type == TType.LIST) {
11721
                {
11722
                  TList _list28 = iprot.readListBegin();
11723
                  this.success = new ArrayList<Long>(_list28.size);
11724
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11725
                  {
11726
                    long _elem30;
11727
                    _elem30 = iprot.readI64();
11728
                    this.success.add(_elem30);
11729
                  }
11730
                  iprot.readListEnd();
11731
                }
11732
              } else { 
11733
                TProtocolUtil.skip(iprot, field.type);
11734
              }
11735
              break;
11736
            case EX:
11737
              if (field.type == TType.STRUCT) {
11738
                this.ex = new TransactionServiceException();
11739
                this.ex.read(iprot);
11740
              } else { 
11741
                TProtocolUtil.skip(iprot, field.type);
11742
              }
11743
              break;
11744
          }
11745
          iprot.readFieldEnd();
11746
        }
11747
      }
11748
      iprot.readStructEnd();
11749
      validate();
11750
    }
11751
 
11752
    public void write(TProtocol oprot) throws TException {
11753
      oprot.writeStructBegin(STRUCT_DESC);
11754
 
11755
      if (this.isSetSuccess()) {
11756
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11757
        {
11758
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11759
          for (long _iter31 : this.success)
11760
          {
11761
            oprot.writeI64(_iter31);
11762
          }
11763
          oprot.writeListEnd();
11764
        }
11765
        oprot.writeFieldEnd();
11766
      } else if (this.isSetEx()) {
11767
        oprot.writeFieldBegin(EX_FIELD_DESC);
11768
        this.ex.write(oprot);
11769
        oprot.writeFieldEnd();
11770
      }
11771
      oprot.writeFieldStop();
11772
      oprot.writeStructEnd();
11773
    }
11774
 
11775
    @Override
11776
    public String toString() {
11777
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11778
      boolean first = true;
11779
 
11780
      sb.append("success:");
11781
      if (this.success == null) {
11782
        sb.append("null");
11783
      } else {
11784
        sb.append(this.success);
11785
      }
11786
      first = false;
11787
      if (!first) sb.append(", ");
11788
      sb.append("ex:");
11789
      if (this.ex == null) {
11790
        sb.append("null");
11791
      } else {
11792
        sb.append(this.ex);
11793
      }
11794
      first = false;
11795
      sb.append(")");
11796
      return sb.toString();
11797
    }
11798
 
11799
    public void validate() throws TException {
11800
      // check for required fields
11801
    }
11802
 
11803
  }
11804
 
483 rajveer 11805
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11806
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11807
 
483 rajveer 11808
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11809
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11810
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11811
 
483 rajveer 11812
    private long orderId;
11813
    private OrderStatus status;
11814
    private String description;
68 ashish 11815
 
11816
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11817
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11818
      ORDER_ID((short)1, "orderId"),
11819
      /**
11820
       * 
11821
       * @see OrderStatus
11822
       */
11823
      STATUS((short)2, "status"),
11824
      DESCRIPTION((short)3, "description");
68 ashish 11825
 
11826
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11827
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11828
 
11829
      static {
11830
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11831
          byId.put((int)field._thriftId, field);
11832
          byName.put(field.getFieldName(), field);
11833
        }
11834
      }
11835
 
11836
      /**
11837
       * Find the _Fields constant that matches fieldId, or null if its not found.
11838
       */
11839
      public static _Fields findByThriftId(int fieldId) {
11840
        return byId.get(fieldId);
11841
      }
11842
 
11843
      /**
11844
       * Find the _Fields constant that matches fieldId, throwing an exception
11845
       * if it is not found.
11846
       */
11847
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11848
        _Fields fields = findByThriftId(fieldId);
11849
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11850
        return fields;
11851
      }
11852
 
11853
      /**
11854
       * Find the _Fields constant that matches name, or null if its not found.
11855
       */
11856
      public static _Fields findByName(String name) {
11857
        return byName.get(name);
11858
      }
11859
 
11860
      private final short _thriftId;
11861
      private final String _fieldName;
11862
 
11863
      _Fields(short thriftId, String fieldName) {
11864
        _thriftId = thriftId;
11865
        _fieldName = fieldName;
11866
      }
11867
 
11868
      public short getThriftFieldId() {
11869
        return _thriftId;
11870
      }
11871
 
11872
      public String getFieldName() {
11873
        return _fieldName;
11874
      }
11875
    }
11876
 
11877
    // isset id assignments
483 rajveer 11878
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11879
    private BitSet __isset_bit_vector = new BitSet(1);
11880
 
11881
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11882
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11883
          new FieldValueMetaData(TType.I64)));
483 rajveer 11884
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11885
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11886
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11887
          new FieldValueMetaData(TType.STRING)));
68 ashish 11888
    }});
11889
 
11890
    static {
483 rajveer 11891
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11892
    }
11893
 
483 rajveer 11894
    public changeOrderStatus_args() {
68 ashish 11895
    }
11896
 
483 rajveer 11897
    public changeOrderStatus_args(
11898
      long orderId,
11899
      OrderStatus status,
11900
      String description)
68 ashish 11901
    {
11902
      this();
483 rajveer 11903
      this.orderId = orderId;
11904
      setOrderIdIsSet(true);
11905
      this.status = status;
11906
      this.description = description;
68 ashish 11907
    }
11908
 
11909
    /**
11910
     * Performs a deep copy on <i>other</i>.
11911
     */
483 rajveer 11912
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11913
      __isset_bit_vector.clear();
11914
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11915
      this.orderId = other.orderId;
11916
      if (other.isSetStatus()) {
11917
        this.status = other.status;
11918
      }
11919
      if (other.isSetDescription()) {
11920
        this.description = other.description;
11921
      }
68 ashish 11922
    }
11923
 
483 rajveer 11924
    public changeOrderStatus_args deepCopy() {
11925
      return new changeOrderStatus_args(this);
68 ashish 11926
    }
11927
 
11928
    @Deprecated
483 rajveer 11929
    public changeOrderStatus_args clone() {
11930
      return new changeOrderStatus_args(this);
68 ashish 11931
    }
11932
 
483 rajveer 11933
    public long getOrderId() {
11934
      return this.orderId;
68 ashish 11935
    }
11936
 
483 rajveer 11937
    public changeOrderStatus_args setOrderId(long orderId) {
11938
      this.orderId = orderId;
11939
      setOrderIdIsSet(true);
68 ashish 11940
      return this;
11941
    }
11942
 
483 rajveer 11943
    public void unsetOrderId() {
11944
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11945
    }
11946
 
483 rajveer 11947
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11948
    public boolean isSetOrderId() {
11949
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11950
    }
11951
 
483 rajveer 11952
    public void setOrderIdIsSet(boolean value) {
11953
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11954
    }
11955
 
483 rajveer 11956
    /**
11957
     * 
11958
     * @see OrderStatus
11959
     */
11960
    public OrderStatus getStatus() {
11961
      return this.status;
68 ashish 11962
    }
11963
 
11964
    /**
483 rajveer 11965
     * 
11966
     * @see OrderStatus
68 ashish 11967
     */
483 rajveer 11968
    public changeOrderStatus_args setStatus(OrderStatus status) {
11969
      this.status = status;
68 ashish 11970
      return this;
11971
    }
11972
 
483 rajveer 11973
    public void unsetStatus() {
11974
      this.status = null;
68 ashish 11975
    }
11976
 
483 rajveer 11977
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11978
    public boolean isSetStatus() {
11979
      return this.status != null;
68 ashish 11980
    }
11981
 
483 rajveer 11982
    public void setStatusIsSet(boolean value) {
68 ashish 11983
      if (!value) {
483 rajveer 11984
        this.status = null;
68 ashish 11985
      }
11986
    }
11987
 
483 rajveer 11988
    public String getDescription() {
11989
      return this.description;
68 ashish 11990
    }
11991
 
483 rajveer 11992
    public changeOrderStatus_args setDescription(String description) {
11993
      this.description = description;
68 ashish 11994
      return this;
11995
    }
11996
 
483 rajveer 11997
    public void unsetDescription() {
11998
      this.description = null;
68 ashish 11999
    }
12000
 
483 rajveer 12001
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
12002
    public boolean isSetDescription() {
12003
      return this.description != null;
68 ashish 12004
    }
12005
 
483 rajveer 12006
    public void setDescriptionIsSet(boolean value) {
68 ashish 12007
      if (!value) {
483 rajveer 12008
        this.description = null;
68 ashish 12009
      }
12010
    }
12011
 
12012
    public void setFieldValue(_Fields field, Object value) {
12013
      switch (field) {
483 rajveer 12014
      case ORDER_ID:
68 ashish 12015
        if (value == null) {
483 rajveer 12016
          unsetOrderId();
68 ashish 12017
        } else {
483 rajveer 12018
          setOrderId((Long)value);
68 ashish 12019
        }
12020
        break;
12021
 
483 rajveer 12022
      case STATUS:
68 ashish 12023
        if (value == null) {
483 rajveer 12024
          unsetStatus();
68 ashish 12025
        } else {
483 rajveer 12026
          setStatus((OrderStatus)value);
68 ashish 12027
        }
12028
        break;
12029
 
483 rajveer 12030
      case DESCRIPTION:
12031
        if (value == null) {
12032
          unsetDescription();
12033
        } else {
12034
          setDescription((String)value);
12035
        }
12036
        break;
12037
 
68 ashish 12038
      }
12039
    }
12040
 
12041
    public void setFieldValue(int fieldID, Object value) {
12042
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12043
    }
12044
 
12045
    public Object getFieldValue(_Fields field) {
12046
      switch (field) {
483 rajveer 12047
      case ORDER_ID:
12048
        return new Long(getOrderId());
68 ashish 12049
 
483 rajveer 12050
      case STATUS:
12051
        return getStatus();
68 ashish 12052
 
483 rajveer 12053
      case DESCRIPTION:
12054
        return getDescription();
12055
 
68 ashish 12056
      }
12057
      throw new IllegalStateException();
12058
    }
12059
 
12060
    public Object getFieldValue(int fieldId) {
12061
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12062
    }
12063
 
12064
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12065
    public boolean isSet(_Fields field) {
12066
      switch (field) {
483 rajveer 12067
      case ORDER_ID:
12068
        return isSetOrderId();
12069
      case STATUS:
12070
        return isSetStatus();
12071
      case DESCRIPTION:
12072
        return isSetDescription();
68 ashish 12073
      }
12074
      throw new IllegalStateException();
12075
    }
12076
 
12077
    public boolean isSet(int fieldID) {
12078
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12079
    }
12080
 
12081
    @Override
12082
    public boolean equals(Object that) {
12083
      if (that == null)
12084
        return false;
483 rajveer 12085
      if (that instanceof changeOrderStatus_args)
12086
        return this.equals((changeOrderStatus_args)that);
68 ashish 12087
      return false;
12088
    }
12089
 
483 rajveer 12090
    public boolean equals(changeOrderStatus_args that) {
68 ashish 12091
      if (that == null)
12092
        return false;
12093
 
483 rajveer 12094
      boolean this_present_orderId = true;
12095
      boolean that_present_orderId = true;
12096
      if (this_present_orderId || that_present_orderId) {
12097
        if (!(this_present_orderId && that_present_orderId))
68 ashish 12098
          return false;
483 rajveer 12099
        if (this.orderId != that.orderId)
68 ashish 12100
          return false;
12101
      }
12102
 
483 rajveer 12103
      boolean this_present_status = true && this.isSetStatus();
12104
      boolean that_present_status = true && that.isSetStatus();
12105
      if (this_present_status || that_present_status) {
12106
        if (!(this_present_status && that_present_status))
68 ashish 12107
          return false;
483 rajveer 12108
        if (!this.status.equals(that.status))
68 ashish 12109
          return false;
12110
      }
12111
 
483 rajveer 12112
      boolean this_present_description = true && this.isSetDescription();
12113
      boolean that_present_description = true && that.isSetDescription();
12114
      if (this_present_description || that_present_description) {
12115
        if (!(this_present_description && that_present_description))
12116
          return false;
12117
        if (!this.description.equals(that.description))
12118
          return false;
12119
      }
12120
 
68 ashish 12121
      return true;
12122
    }
12123
 
12124
    @Override
12125
    public int hashCode() {
12126
      return 0;
12127
    }
12128
 
483 rajveer 12129
    public int compareTo(changeOrderStatus_args other) {
12130
      if (!getClass().equals(other.getClass())) {
12131
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 12132
      }
12133
 
483 rajveer 12134
      int lastComparison = 0;
12135
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 12136
 
483 rajveer 12137
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12138
      if (lastComparison != 0) {
12139
        return lastComparison;
68 ashish 12140
      }
483 rajveer 12141
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12142
      if (lastComparison != 0) {
12143
        return lastComparison;
68 ashish 12144
      }
483 rajveer 12145
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
12146
      if (lastComparison != 0) {
12147
        return lastComparison;
68 ashish 12148
      }
483 rajveer 12149
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
12150
      if (lastComparison != 0) {
12151
        return lastComparison;
68 ashish 12152
      }
483 rajveer 12153
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
12154
      if (lastComparison != 0) {
12155
        return lastComparison;
68 ashish 12156
      }
483 rajveer 12157
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
12158
      if (lastComparison != 0) {
12159
        return lastComparison;
68 ashish 12160
      }
12161
      return 0;
12162
    }
12163
 
12164
    public void read(TProtocol iprot) throws TException {
12165
      TField field;
12166
      iprot.readStructBegin();
12167
      while (true)
12168
      {
12169
        field = iprot.readFieldBegin();
12170
        if (field.type == TType.STOP) { 
12171
          break;
12172
        }
12173
        _Fields fieldId = _Fields.findByThriftId(field.id);
12174
        if (fieldId == null) {
12175
          TProtocolUtil.skip(iprot, field.type);
12176
        } else {
12177
          switch (fieldId) {
483 rajveer 12178
            case ORDER_ID:
68 ashish 12179
              if (field.type == TType.I64) {
483 rajveer 12180
                this.orderId = iprot.readI64();
12181
                setOrderIdIsSet(true);
68 ashish 12182
              } else { 
12183
                TProtocolUtil.skip(iprot, field.type);
12184
              }
12185
              break;
483 rajveer 12186
            case STATUS:
12187
              if (field.type == TType.I32) {
12188
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 12189
              } else { 
12190
                TProtocolUtil.skip(iprot, field.type);
12191
              }
12192
              break;
483 rajveer 12193
            case DESCRIPTION:
12194
              if (field.type == TType.STRING) {
12195
                this.description = iprot.readString();
12196
              } else { 
12197
                TProtocolUtil.skip(iprot, field.type);
12198
              }
12199
              break;
68 ashish 12200
          }
12201
          iprot.readFieldEnd();
12202
        }
12203
      }
12204
      iprot.readStructEnd();
12205
      validate();
12206
    }
12207
 
12208
    public void write(TProtocol oprot) throws TException {
12209
      validate();
12210
 
12211
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12212
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12213
      oprot.writeI64(this.orderId);
68 ashish 12214
      oprot.writeFieldEnd();
483 rajveer 12215
      if (this.status != null) {
12216
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
12217
        oprot.writeI32(this.status.getValue());
68 ashish 12218
        oprot.writeFieldEnd();
12219
      }
483 rajveer 12220
      if (this.description != null) {
12221
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
12222
        oprot.writeString(this.description);
12223
        oprot.writeFieldEnd();
12224
      }
68 ashish 12225
      oprot.writeFieldStop();
12226
      oprot.writeStructEnd();
12227
    }
12228
 
12229
    @Override
12230
    public String toString() {
483 rajveer 12231
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 12232
      boolean first = true;
12233
 
483 rajveer 12234
      sb.append("orderId:");
12235
      sb.append(this.orderId);
68 ashish 12236
      first = false;
12237
      if (!first) sb.append(", ");
483 rajveer 12238
      sb.append("status:");
12239
      if (this.status == null) {
68 ashish 12240
        sb.append("null");
12241
      } else {
483 rajveer 12242
        String status_name = status.name();
12243
        if (status_name != null) {
12244
          sb.append(status_name);
12245
          sb.append(" (");
12246
        }
12247
        sb.append(this.status);
12248
        if (status_name != null) {
12249
          sb.append(")");
12250
        }
68 ashish 12251
      }
12252
      first = false;
483 rajveer 12253
      if (!first) sb.append(", ");
12254
      sb.append("description:");
12255
      if (this.description == null) {
12256
        sb.append("null");
12257
      } else {
12258
        sb.append(this.description);
12259
      }
12260
      first = false;
68 ashish 12261
      sb.append(")");
12262
      return sb.toString();
12263
    }
12264
 
12265
    public void validate() throws TException {
12266
      // check for required fields
12267
    }
12268
 
12269
  }
12270
 
483 rajveer 12271
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
12272
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 12273
 
12274
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12275
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12276
 
12277
    private boolean success;
12278
    private TransactionServiceException ex;
12279
 
12280
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12281
    public enum _Fields implements TFieldIdEnum {
12282
      SUCCESS((short)0, "success"),
12283
      EX((short)1, "ex");
12284
 
12285
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12286
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12287
 
12288
      static {
12289
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12290
          byId.put((int)field._thriftId, field);
12291
          byName.put(field.getFieldName(), field);
12292
        }
12293
      }
12294
 
12295
      /**
12296
       * Find the _Fields constant that matches fieldId, or null if its not found.
12297
       */
12298
      public static _Fields findByThriftId(int fieldId) {
12299
        return byId.get(fieldId);
12300
      }
12301
 
12302
      /**
12303
       * Find the _Fields constant that matches fieldId, throwing an exception
12304
       * if it is not found.
12305
       */
12306
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12307
        _Fields fields = findByThriftId(fieldId);
12308
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12309
        return fields;
12310
      }
12311
 
12312
      /**
12313
       * Find the _Fields constant that matches name, or null if its not found.
12314
       */
12315
      public static _Fields findByName(String name) {
12316
        return byName.get(name);
12317
      }
12318
 
12319
      private final short _thriftId;
12320
      private final String _fieldName;
12321
 
12322
      _Fields(short thriftId, String fieldName) {
12323
        _thriftId = thriftId;
12324
        _fieldName = fieldName;
12325
      }
12326
 
12327
      public short getThriftFieldId() {
12328
        return _thriftId;
12329
      }
12330
 
12331
      public String getFieldName() {
12332
        return _fieldName;
12333
      }
12334
    }
12335
 
12336
    // isset id assignments
12337
    private static final int __SUCCESS_ISSET_ID = 0;
12338
    private BitSet __isset_bit_vector = new BitSet(1);
12339
 
12340
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12341
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12342
          new FieldValueMetaData(TType.BOOL)));
12343
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12344
          new FieldValueMetaData(TType.STRUCT)));
12345
    }});
12346
 
12347
    static {
483 rajveer 12348
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 12349
    }
12350
 
483 rajveer 12351
    public changeOrderStatus_result() {
68 ashish 12352
    }
12353
 
483 rajveer 12354
    public changeOrderStatus_result(
68 ashish 12355
      boolean success,
12356
      TransactionServiceException ex)
12357
    {
12358
      this();
12359
      this.success = success;
12360
      setSuccessIsSet(true);
12361
      this.ex = ex;
12362
    }
12363
 
12364
    /**
12365
     * Performs a deep copy on <i>other</i>.
12366
     */
483 rajveer 12367
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 12368
      __isset_bit_vector.clear();
12369
      __isset_bit_vector.or(other.__isset_bit_vector);
12370
      this.success = other.success;
12371
      if (other.isSetEx()) {
12372
        this.ex = new TransactionServiceException(other.ex);
12373
      }
12374
    }
12375
 
483 rajveer 12376
    public changeOrderStatus_result deepCopy() {
12377
      return new changeOrderStatus_result(this);
68 ashish 12378
    }
12379
 
12380
    @Deprecated
483 rajveer 12381
    public changeOrderStatus_result clone() {
12382
      return new changeOrderStatus_result(this);
68 ashish 12383
    }
12384
 
12385
    public boolean isSuccess() {
12386
      return this.success;
12387
    }
12388
 
483 rajveer 12389
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 12390
      this.success = success;
12391
      setSuccessIsSet(true);
12392
      return this;
12393
    }
12394
 
12395
    public void unsetSuccess() {
12396
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12397
    }
12398
 
12399
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12400
    public boolean isSetSuccess() {
12401
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12402
    }
12403
 
12404
    public void setSuccessIsSet(boolean value) {
12405
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12406
    }
12407
 
12408
    public TransactionServiceException getEx() {
12409
      return this.ex;
12410
    }
12411
 
483 rajveer 12412
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 12413
      this.ex = ex;
12414
      return this;
12415
    }
12416
 
12417
    public void unsetEx() {
12418
      this.ex = null;
12419
    }
12420
 
12421
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12422
    public boolean isSetEx() {
12423
      return this.ex != null;
12424
    }
12425
 
12426
    public void setExIsSet(boolean value) {
12427
      if (!value) {
12428
        this.ex = null;
12429
      }
12430
    }
12431
 
12432
    public void setFieldValue(_Fields field, Object value) {
12433
      switch (field) {
12434
      case SUCCESS:
12435
        if (value == null) {
12436
          unsetSuccess();
12437
        } else {
12438
          setSuccess((Boolean)value);
12439
        }
12440
        break;
12441
 
12442
      case EX:
12443
        if (value == null) {
12444
          unsetEx();
12445
        } else {
12446
          setEx((TransactionServiceException)value);
12447
        }
12448
        break;
12449
 
12450
      }
12451
    }
12452
 
12453
    public void setFieldValue(int fieldID, Object value) {
12454
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12455
    }
12456
 
12457
    public Object getFieldValue(_Fields field) {
12458
      switch (field) {
12459
      case SUCCESS:
12460
        return new Boolean(isSuccess());
12461
 
12462
      case EX:
12463
        return getEx();
12464
 
12465
      }
12466
      throw new IllegalStateException();
12467
    }
12468
 
12469
    public Object getFieldValue(int fieldId) {
12470
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12471
    }
12472
 
12473
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12474
    public boolean isSet(_Fields field) {
12475
      switch (field) {
12476
      case SUCCESS:
12477
        return isSetSuccess();
12478
      case EX:
12479
        return isSetEx();
12480
      }
12481
      throw new IllegalStateException();
12482
    }
12483
 
12484
    public boolean isSet(int fieldID) {
12485
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12486
    }
12487
 
12488
    @Override
12489
    public boolean equals(Object that) {
12490
      if (that == null)
12491
        return false;
483 rajveer 12492
      if (that instanceof changeOrderStatus_result)
12493
        return this.equals((changeOrderStatus_result)that);
68 ashish 12494
      return false;
12495
    }
12496
 
483 rajveer 12497
    public boolean equals(changeOrderStatus_result that) {
68 ashish 12498
      if (that == null)
12499
        return false;
12500
 
12501
      boolean this_present_success = true;
12502
      boolean that_present_success = true;
12503
      if (this_present_success || that_present_success) {
12504
        if (!(this_present_success && that_present_success))
12505
          return false;
12506
        if (this.success != that.success)
12507
          return false;
12508
      }
12509
 
12510
      boolean this_present_ex = true && this.isSetEx();
12511
      boolean that_present_ex = true && that.isSetEx();
12512
      if (this_present_ex || that_present_ex) {
12513
        if (!(this_present_ex && that_present_ex))
12514
          return false;
12515
        if (!this.ex.equals(that.ex))
12516
          return false;
12517
      }
12518
 
12519
      return true;
12520
    }
12521
 
12522
    @Override
12523
    public int hashCode() {
12524
      return 0;
12525
    }
12526
 
483 rajveer 12527
    public int compareTo(changeOrderStatus_result other) {
68 ashish 12528
      if (!getClass().equals(other.getClass())) {
12529
        return getClass().getName().compareTo(other.getClass().getName());
12530
      }
12531
 
12532
      int lastComparison = 0;
483 rajveer 12533
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 12534
 
12535
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12536
      if (lastComparison != 0) {
12537
        return lastComparison;
12538
      }
12539
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12540
      if (lastComparison != 0) {
12541
        return lastComparison;
12542
      }
12543
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12544
      if (lastComparison != 0) {
12545
        return lastComparison;
12546
      }
12547
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12548
      if (lastComparison != 0) {
12549
        return lastComparison;
12550
      }
12551
      return 0;
12552
    }
12553
 
12554
    public void read(TProtocol iprot) throws TException {
12555
      TField field;
12556
      iprot.readStructBegin();
12557
      while (true)
12558
      {
12559
        field = iprot.readFieldBegin();
12560
        if (field.type == TType.STOP) { 
12561
          break;
12562
        }
12563
        _Fields fieldId = _Fields.findByThriftId(field.id);
12564
        if (fieldId == null) {
12565
          TProtocolUtil.skip(iprot, field.type);
12566
        } else {
12567
          switch (fieldId) {
12568
            case SUCCESS:
12569
              if (field.type == TType.BOOL) {
12570
                this.success = iprot.readBool();
12571
                setSuccessIsSet(true);
12572
              } else { 
12573
                TProtocolUtil.skip(iprot, field.type);
12574
              }
12575
              break;
12576
            case EX:
12577
              if (field.type == TType.STRUCT) {
12578
                this.ex = new TransactionServiceException();
12579
                this.ex.read(iprot);
12580
              } else { 
12581
                TProtocolUtil.skip(iprot, field.type);
12582
              }
12583
              break;
12584
          }
12585
          iprot.readFieldEnd();
12586
        }
12587
      }
12588
      iprot.readStructEnd();
12589
      validate();
12590
    }
12591
 
12592
    public void write(TProtocol oprot) throws TException {
12593
      oprot.writeStructBegin(STRUCT_DESC);
12594
 
12595
      if (this.isSetSuccess()) {
12596
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12597
        oprot.writeBool(this.success);
12598
        oprot.writeFieldEnd();
12599
      } else if (this.isSetEx()) {
12600
        oprot.writeFieldBegin(EX_FIELD_DESC);
12601
        this.ex.write(oprot);
12602
        oprot.writeFieldEnd();
12603
      }
12604
      oprot.writeFieldStop();
12605
      oprot.writeStructEnd();
12606
    }
12607
 
12608
    @Override
12609
    public String toString() {
483 rajveer 12610
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 12611
      boolean first = true;
12612
 
12613
      sb.append("success:");
12614
      sb.append(this.success);
12615
      first = false;
12616
      if (!first) sb.append(", ");
12617
      sb.append("ex:");
12618
      if (this.ex == null) {
12619
        sb.append("null");
12620
      } else {
12621
        sb.append(this.ex);
12622
      }
12623
      first = false;
12624
      sb.append(")");
12625
      return sb.toString();
12626
    }
12627
 
12628
    public void validate() throws TException {
12629
      // check for required fields
12630
    }
12631
 
12632
  }
12633
 
495 rajveer 12634
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
12635
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
12636
 
12637
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12638
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 12639
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 12640
 
12641
    private long orderId;
12642
    private String invoice_number;
12643
    private String billed_by;
12644
 
12645
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12646
    public enum _Fields implements TFieldIdEnum {
12647
      ORDER_ID((short)1, "orderId"),
12648
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 12649
      BILLED_BY((short)3, "billed_by");
495 rajveer 12650
 
12651
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12652
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12653
 
12654
      static {
12655
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12656
          byId.put((int)field._thriftId, field);
12657
          byName.put(field.getFieldName(), field);
12658
        }
12659
      }
12660
 
12661
      /**
12662
       * Find the _Fields constant that matches fieldId, or null if its not found.
12663
       */
12664
      public static _Fields findByThriftId(int fieldId) {
12665
        return byId.get(fieldId);
12666
      }
12667
 
12668
      /**
12669
       * Find the _Fields constant that matches fieldId, throwing an exception
12670
       * if it is not found.
12671
       */
12672
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12673
        _Fields fields = findByThriftId(fieldId);
12674
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12675
        return fields;
12676
      }
12677
 
12678
      /**
12679
       * Find the _Fields constant that matches name, or null if its not found.
12680
       */
12681
      public static _Fields findByName(String name) {
12682
        return byName.get(name);
12683
      }
12684
 
12685
      private final short _thriftId;
12686
      private final String _fieldName;
12687
 
12688
      _Fields(short thriftId, String fieldName) {
12689
        _thriftId = thriftId;
12690
        _fieldName = fieldName;
12691
      }
12692
 
12693
      public short getThriftFieldId() {
12694
        return _thriftId;
12695
      }
12696
 
12697
      public String getFieldName() {
12698
        return _fieldName;
12699
      }
12700
    }
12701
 
12702
    // isset id assignments
12703
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12704
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12705
 
12706
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12707
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12708
          new FieldValueMetaData(TType.I64)));
12709
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12710
          new FieldValueMetaData(TType.STRING)));
12711
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12712
          new FieldValueMetaData(TType.STRING)));
12713
    }});
12714
 
12715
    static {
12716
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12717
    }
12718
 
12719
    public addBillingDetails_args() {
12720
    }
12721
 
12722
    public addBillingDetails_args(
12723
      long orderId,
12724
      String invoice_number,
12725
      String billed_by)
12726
    {
12727
      this();
12728
      this.orderId = orderId;
12729
      setOrderIdIsSet(true);
12730
      this.invoice_number = invoice_number;
12731
      this.billed_by = billed_by;
12732
    }
12733
 
12734
    /**
12735
     * Performs a deep copy on <i>other</i>.
12736
     */
12737
    public addBillingDetails_args(addBillingDetails_args other) {
12738
      __isset_bit_vector.clear();
12739
      __isset_bit_vector.or(other.__isset_bit_vector);
12740
      this.orderId = other.orderId;
12741
      if (other.isSetInvoice_number()) {
12742
        this.invoice_number = other.invoice_number;
12743
      }
12744
      if (other.isSetBilled_by()) {
12745
        this.billed_by = other.billed_by;
12746
      }
12747
    }
12748
 
12749
    public addBillingDetails_args deepCopy() {
12750
      return new addBillingDetails_args(this);
12751
    }
12752
 
12753
    @Deprecated
12754
    public addBillingDetails_args clone() {
12755
      return new addBillingDetails_args(this);
12756
    }
12757
 
12758
    public long getOrderId() {
12759
      return this.orderId;
12760
    }
12761
 
12762
    public addBillingDetails_args setOrderId(long orderId) {
12763
      this.orderId = orderId;
12764
      setOrderIdIsSet(true);
12765
      return this;
12766
    }
12767
 
12768
    public void unsetOrderId() {
12769
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12770
    }
12771
 
12772
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12773
    public boolean isSetOrderId() {
12774
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12775
    }
12776
 
12777
    public void setOrderIdIsSet(boolean value) {
12778
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12779
    }
12780
 
12781
    public String getInvoice_number() {
12782
      return this.invoice_number;
12783
    }
12784
 
12785
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12786
      this.invoice_number = invoice_number;
12787
      return this;
12788
    }
12789
 
12790
    public void unsetInvoice_number() {
12791
      this.invoice_number = null;
12792
    }
12793
 
12794
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12795
    public boolean isSetInvoice_number() {
12796
      return this.invoice_number != null;
12797
    }
12798
 
12799
    public void setInvoice_numberIsSet(boolean value) {
12800
      if (!value) {
12801
        this.invoice_number = null;
12802
      }
12803
    }
12804
 
12805
    public String getBilled_by() {
12806
      return this.billed_by;
12807
    }
12808
 
12809
    public addBillingDetails_args setBilled_by(String billed_by) {
12810
      this.billed_by = billed_by;
12811
      return this;
12812
    }
12813
 
12814
    public void unsetBilled_by() {
12815
      this.billed_by = null;
12816
    }
12817
 
12818
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12819
    public boolean isSetBilled_by() {
12820
      return this.billed_by != null;
12821
    }
12822
 
12823
    public void setBilled_byIsSet(boolean value) {
12824
      if (!value) {
12825
        this.billed_by = null;
12826
      }
12827
    }
12828
 
12829
    public void setFieldValue(_Fields field, Object value) {
12830
      switch (field) {
12831
      case ORDER_ID:
12832
        if (value == null) {
12833
          unsetOrderId();
12834
        } else {
12835
          setOrderId((Long)value);
12836
        }
12837
        break;
12838
 
12839
      case INVOICE_NUMBER:
12840
        if (value == null) {
12841
          unsetInvoice_number();
12842
        } else {
12843
          setInvoice_number((String)value);
12844
        }
12845
        break;
12846
 
12847
      case BILLED_BY:
12848
        if (value == null) {
12849
          unsetBilled_by();
12850
        } else {
12851
          setBilled_by((String)value);
12852
        }
12853
        break;
12854
 
12855
      }
12856
    }
12857
 
12858
    public void setFieldValue(int fieldID, Object value) {
12859
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12860
    }
12861
 
12862
    public Object getFieldValue(_Fields field) {
12863
      switch (field) {
12864
      case ORDER_ID:
12865
        return new Long(getOrderId());
12866
 
12867
      case INVOICE_NUMBER:
12868
        return getInvoice_number();
12869
 
12870
      case BILLED_BY:
12871
        return getBilled_by();
12872
 
12873
      }
12874
      throw new IllegalStateException();
12875
    }
12876
 
12877
    public Object getFieldValue(int fieldId) {
12878
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12879
    }
12880
 
12881
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12882
    public boolean isSet(_Fields field) {
12883
      switch (field) {
12884
      case ORDER_ID:
12885
        return isSetOrderId();
12886
      case INVOICE_NUMBER:
12887
        return isSetInvoice_number();
12888
      case BILLED_BY:
12889
        return isSetBilled_by();
12890
      }
12891
      throw new IllegalStateException();
12892
    }
12893
 
12894
    public boolean isSet(int fieldID) {
12895
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12896
    }
12897
 
12898
    @Override
12899
    public boolean equals(Object that) {
12900
      if (that == null)
12901
        return false;
12902
      if (that instanceof addBillingDetails_args)
12903
        return this.equals((addBillingDetails_args)that);
12904
      return false;
12905
    }
12906
 
12907
    public boolean equals(addBillingDetails_args that) {
12908
      if (that == null)
12909
        return false;
12910
 
12911
      boolean this_present_orderId = true;
12912
      boolean that_present_orderId = true;
12913
      if (this_present_orderId || that_present_orderId) {
12914
        if (!(this_present_orderId && that_present_orderId))
12915
          return false;
12916
        if (this.orderId != that.orderId)
12917
          return false;
12918
      }
12919
 
12920
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12921
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12922
      if (this_present_invoice_number || that_present_invoice_number) {
12923
        if (!(this_present_invoice_number && that_present_invoice_number))
12924
          return false;
12925
        if (!this.invoice_number.equals(that.invoice_number))
12926
          return false;
12927
      }
12928
 
12929
      boolean this_present_billed_by = true && this.isSetBilled_by();
12930
      boolean that_present_billed_by = true && that.isSetBilled_by();
12931
      if (this_present_billed_by || that_present_billed_by) {
12932
        if (!(this_present_billed_by && that_present_billed_by))
12933
          return false;
12934
        if (!this.billed_by.equals(that.billed_by))
12935
          return false;
12936
      }
12937
 
12938
      return true;
12939
    }
12940
 
12941
    @Override
12942
    public int hashCode() {
12943
      return 0;
12944
    }
12945
 
12946
    public int compareTo(addBillingDetails_args other) {
12947
      if (!getClass().equals(other.getClass())) {
12948
        return getClass().getName().compareTo(other.getClass().getName());
12949
      }
12950
 
12951
      int lastComparison = 0;
12952
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12953
 
12954
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12955
      if (lastComparison != 0) {
12956
        return lastComparison;
12957
      }
12958
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12959
      if (lastComparison != 0) {
12960
        return lastComparison;
12961
      }
12962
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12963
      if (lastComparison != 0) {
12964
        return lastComparison;
12965
      }
12966
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12967
      if (lastComparison != 0) {
12968
        return lastComparison;
12969
      }
12970
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12971
      if (lastComparison != 0) {
12972
        return lastComparison;
12973
      }
12974
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12975
      if (lastComparison != 0) {
12976
        return lastComparison;
12977
      }
12978
      return 0;
12979
    }
12980
 
12981
    public void read(TProtocol iprot) throws TException {
12982
      TField field;
12983
      iprot.readStructBegin();
12984
      while (true)
12985
      {
12986
        field = iprot.readFieldBegin();
12987
        if (field.type == TType.STOP) { 
12988
          break;
12989
        }
12990
        _Fields fieldId = _Fields.findByThriftId(field.id);
12991
        if (fieldId == null) {
12992
          TProtocolUtil.skip(iprot, field.type);
12993
        } else {
12994
          switch (fieldId) {
12995
            case ORDER_ID:
12996
              if (field.type == TType.I64) {
12997
                this.orderId = iprot.readI64();
12998
                setOrderIdIsSet(true);
12999
              } else { 
13000
                TProtocolUtil.skip(iprot, field.type);
13001
              }
13002
              break;
13003
            case INVOICE_NUMBER:
13004
              if (field.type == TType.STRING) {
13005
                this.invoice_number = iprot.readString();
13006
              } else { 
13007
                TProtocolUtil.skip(iprot, field.type);
13008
              }
13009
              break;
13010
            case BILLED_BY:
13011
              if (field.type == TType.STRING) {
13012
                this.billed_by = iprot.readString();
13013
              } else { 
13014
                TProtocolUtil.skip(iprot, field.type);
13015
              }
13016
              break;
13017
          }
13018
          iprot.readFieldEnd();
13019
        }
13020
      }
13021
      iprot.readStructEnd();
13022
      validate();
13023
    }
13024
 
13025
    public void write(TProtocol oprot) throws TException {
13026
      validate();
13027
 
13028
      oprot.writeStructBegin(STRUCT_DESC);
13029
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13030
      oprot.writeI64(this.orderId);
13031
      oprot.writeFieldEnd();
13032
      if (this.invoice_number != null) {
13033
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
13034
        oprot.writeString(this.invoice_number);
13035
        oprot.writeFieldEnd();
13036
      }
13037
      if (this.billed_by != null) {
13038
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
13039
        oprot.writeString(this.billed_by);
13040
        oprot.writeFieldEnd();
13041
      }
13042
      oprot.writeFieldStop();
13043
      oprot.writeStructEnd();
13044
    }
13045
 
13046
    @Override
13047
    public String toString() {
13048
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
13049
      boolean first = true;
13050
 
13051
      sb.append("orderId:");
13052
      sb.append(this.orderId);
13053
      first = false;
13054
      if (!first) sb.append(", ");
13055
      sb.append("invoice_number:");
13056
      if (this.invoice_number == null) {
13057
        sb.append("null");
13058
      } else {
13059
        sb.append(this.invoice_number);
13060
      }
13061
      first = false;
13062
      if (!first) sb.append(", ");
13063
      sb.append("billed_by:");
13064
      if (this.billed_by == null) {
13065
        sb.append("null");
13066
      } else {
13067
        sb.append(this.billed_by);
13068
      }
13069
      first = false;
13070
      sb.append(")");
13071
      return sb.toString();
13072
    }
13073
 
13074
    public void validate() throws TException {
13075
      // check for required fields
13076
    }
13077
 
13078
  }
13079
 
13080
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
13081
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
13082
 
13083
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13084
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13085
 
13086
    private boolean success;
13087
    private TransactionServiceException ex;
13088
 
13089
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13090
    public enum _Fields implements TFieldIdEnum {
13091
      SUCCESS((short)0, "success"),
13092
      EX((short)1, "ex");
13093
 
13094
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13095
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13096
 
13097
      static {
13098
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13099
          byId.put((int)field._thriftId, field);
13100
          byName.put(field.getFieldName(), field);
13101
        }
13102
      }
13103
 
13104
      /**
13105
       * Find the _Fields constant that matches fieldId, or null if its not found.
13106
       */
13107
      public static _Fields findByThriftId(int fieldId) {
13108
        return byId.get(fieldId);
13109
      }
13110
 
13111
      /**
13112
       * Find the _Fields constant that matches fieldId, throwing an exception
13113
       * if it is not found.
13114
       */
13115
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13116
        _Fields fields = findByThriftId(fieldId);
13117
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13118
        return fields;
13119
      }
13120
 
13121
      /**
13122
       * Find the _Fields constant that matches name, or null if its not found.
13123
       */
13124
      public static _Fields findByName(String name) {
13125
        return byName.get(name);
13126
      }
13127
 
13128
      private final short _thriftId;
13129
      private final String _fieldName;
13130
 
13131
      _Fields(short thriftId, String fieldName) {
13132
        _thriftId = thriftId;
13133
        _fieldName = fieldName;
13134
      }
13135
 
13136
      public short getThriftFieldId() {
13137
        return _thriftId;
13138
      }
13139
 
13140
      public String getFieldName() {
13141
        return _fieldName;
13142
      }
13143
    }
13144
 
13145
    // isset id assignments
13146
    private static final int __SUCCESS_ISSET_ID = 0;
13147
    private BitSet __isset_bit_vector = new BitSet(1);
13148
 
13149
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13150
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13151
          new FieldValueMetaData(TType.BOOL)));
13152
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13153
          new FieldValueMetaData(TType.STRUCT)));
13154
    }});
13155
 
13156
    static {
13157
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
13158
    }
13159
 
13160
    public addBillingDetails_result() {
13161
    }
13162
 
13163
    public addBillingDetails_result(
13164
      boolean success,
13165
      TransactionServiceException ex)
13166
    {
13167
      this();
13168
      this.success = success;
13169
      setSuccessIsSet(true);
13170
      this.ex = ex;
13171
    }
13172
 
13173
    /**
13174
     * Performs a deep copy on <i>other</i>.
13175
     */
13176
    public addBillingDetails_result(addBillingDetails_result other) {
13177
      __isset_bit_vector.clear();
13178
      __isset_bit_vector.or(other.__isset_bit_vector);
13179
      this.success = other.success;
13180
      if (other.isSetEx()) {
13181
        this.ex = new TransactionServiceException(other.ex);
13182
      }
13183
    }
13184
 
13185
    public addBillingDetails_result deepCopy() {
13186
      return new addBillingDetails_result(this);
13187
    }
13188
 
13189
    @Deprecated
13190
    public addBillingDetails_result clone() {
13191
      return new addBillingDetails_result(this);
13192
    }
13193
 
13194
    public boolean isSuccess() {
13195
      return this.success;
13196
    }
13197
 
13198
    public addBillingDetails_result setSuccess(boolean success) {
13199
      this.success = success;
13200
      setSuccessIsSet(true);
13201
      return this;
13202
    }
13203
 
13204
    public void unsetSuccess() {
13205
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13206
    }
13207
 
13208
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13209
    public boolean isSetSuccess() {
13210
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13211
    }
13212
 
13213
    public void setSuccessIsSet(boolean value) {
13214
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13215
    }
13216
 
13217
    public TransactionServiceException getEx() {
13218
      return this.ex;
13219
    }
13220
 
13221
    public addBillingDetails_result setEx(TransactionServiceException ex) {
13222
      this.ex = ex;
13223
      return this;
13224
    }
13225
 
13226
    public void unsetEx() {
13227
      this.ex = null;
13228
    }
13229
 
13230
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13231
    public boolean isSetEx() {
13232
      return this.ex != null;
13233
    }
13234
 
13235
    public void setExIsSet(boolean value) {
13236
      if (!value) {
13237
        this.ex = null;
13238
      }
13239
    }
13240
 
13241
    public void setFieldValue(_Fields field, Object value) {
13242
      switch (field) {
13243
      case SUCCESS:
13244
        if (value == null) {
13245
          unsetSuccess();
13246
        } else {
13247
          setSuccess((Boolean)value);
13248
        }
13249
        break;
13250
 
13251
      case EX:
13252
        if (value == null) {
13253
          unsetEx();
13254
        } else {
13255
          setEx((TransactionServiceException)value);
13256
        }
13257
        break;
13258
 
13259
      }
13260
    }
13261
 
13262
    public void setFieldValue(int fieldID, Object value) {
13263
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13264
    }
13265
 
13266
    public Object getFieldValue(_Fields field) {
13267
      switch (field) {
13268
      case SUCCESS:
13269
        return new Boolean(isSuccess());
13270
 
13271
      case EX:
13272
        return getEx();
13273
 
13274
      }
13275
      throw new IllegalStateException();
13276
    }
13277
 
13278
    public Object getFieldValue(int fieldId) {
13279
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13280
    }
13281
 
13282
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13283
    public boolean isSet(_Fields field) {
13284
      switch (field) {
13285
      case SUCCESS:
13286
        return isSetSuccess();
13287
      case EX:
13288
        return isSetEx();
13289
      }
13290
      throw new IllegalStateException();
13291
    }
13292
 
13293
    public boolean isSet(int fieldID) {
13294
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13295
    }
13296
 
13297
    @Override
13298
    public boolean equals(Object that) {
13299
      if (that == null)
13300
        return false;
13301
      if (that instanceof addBillingDetails_result)
13302
        return this.equals((addBillingDetails_result)that);
13303
      return false;
13304
    }
13305
 
13306
    public boolean equals(addBillingDetails_result that) {
13307
      if (that == null)
13308
        return false;
13309
 
13310
      boolean this_present_success = true;
13311
      boolean that_present_success = true;
13312
      if (this_present_success || that_present_success) {
13313
        if (!(this_present_success && that_present_success))
13314
          return false;
13315
        if (this.success != that.success)
13316
          return false;
13317
      }
13318
 
13319
      boolean this_present_ex = true && this.isSetEx();
13320
      boolean that_present_ex = true && that.isSetEx();
13321
      if (this_present_ex || that_present_ex) {
13322
        if (!(this_present_ex && that_present_ex))
13323
          return false;
13324
        if (!this.ex.equals(that.ex))
13325
          return false;
13326
      }
13327
 
13328
      return true;
13329
    }
13330
 
13331
    @Override
13332
    public int hashCode() {
13333
      return 0;
13334
    }
13335
 
13336
    public int compareTo(addBillingDetails_result other) {
13337
      if (!getClass().equals(other.getClass())) {
13338
        return getClass().getName().compareTo(other.getClass().getName());
13339
      }
13340
 
13341
      int lastComparison = 0;
13342
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
13343
 
13344
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13345
      if (lastComparison != 0) {
13346
        return lastComparison;
13347
      }
13348
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13349
      if (lastComparison != 0) {
13350
        return lastComparison;
13351
      }
13352
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13353
      if (lastComparison != 0) {
13354
        return lastComparison;
13355
      }
13356
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13357
      if (lastComparison != 0) {
13358
        return lastComparison;
13359
      }
13360
      return 0;
13361
    }
13362
 
13363
    public void read(TProtocol iprot) throws TException {
13364
      TField field;
13365
      iprot.readStructBegin();
13366
      while (true)
13367
      {
13368
        field = iprot.readFieldBegin();
13369
        if (field.type == TType.STOP) { 
13370
          break;
13371
        }
13372
        _Fields fieldId = _Fields.findByThriftId(field.id);
13373
        if (fieldId == null) {
13374
          TProtocolUtil.skip(iprot, field.type);
13375
        } else {
13376
          switch (fieldId) {
13377
            case SUCCESS:
13378
              if (field.type == TType.BOOL) {
13379
                this.success = iprot.readBool();
13380
                setSuccessIsSet(true);
13381
              } else { 
13382
                TProtocolUtil.skip(iprot, field.type);
13383
              }
13384
              break;
13385
            case EX:
13386
              if (field.type == TType.STRUCT) {
13387
                this.ex = new TransactionServiceException();
13388
                this.ex.read(iprot);
13389
              } else { 
13390
                TProtocolUtil.skip(iprot, field.type);
13391
              }
13392
              break;
13393
          }
13394
          iprot.readFieldEnd();
13395
        }
13396
      }
13397
      iprot.readStructEnd();
13398
      validate();
13399
    }
13400
 
13401
    public void write(TProtocol oprot) throws TException {
13402
      oprot.writeStructBegin(STRUCT_DESC);
13403
 
13404
      if (this.isSetSuccess()) {
13405
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13406
        oprot.writeBool(this.success);
13407
        oprot.writeFieldEnd();
13408
      } else if (this.isSetEx()) {
13409
        oprot.writeFieldBegin(EX_FIELD_DESC);
13410
        this.ex.write(oprot);
13411
        oprot.writeFieldEnd();
13412
      }
13413
      oprot.writeFieldStop();
13414
      oprot.writeStructEnd();
13415
    }
13416
 
13417
    @Override
13418
    public String toString() {
13419
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
13420
      boolean first = true;
13421
 
13422
      sb.append("success:");
13423
      sb.append(this.success);
13424
      first = false;
13425
      if (!first) sb.append(", ");
13426
      sb.append("ex:");
13427
      if (this.ex == null) {
13428
        sb.append("null");
13429
      } else {
13430
        sb.append(this.ex);
13431
      }
13432
      first = false;
13433
      sb.append(")");
13434
      return sb.toString();
13435
    }
13436
 
13437
    public void validate() throws TException {
13438
      // check for required fields
13439
    }
13440
 
13441
  }
13442
 
1148 chandransh 13443
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
13444
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
13445
 
13446
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13447
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
13448
 
13449
    private long orderId;
13450
    private long jacketNumber;
13451
 
13452
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13453
    public enum _Fields implements TFieldIdEnum {
13454
      ORDER_ID((short)1, "orderId"),
2383 rajveer 13455
      JACKET_NUMBER((short)2, "jacketNumber");
1148 chandransh 13456
 
13457
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13458
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13459
 
13460
      static {
13461
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13462
          byId.put((int)field._thriftId, field);
13463
          byName.put(field.getFieldName(), field);
13464
        }
13465
      }
13466
 
13467
      /**
13468
       * Find the _Fields constant that matches fieldId, or null if its not found.
13469
       */
13470
      public static _Fields findByThriftId(int fieldId) {
13471
        return byId.get(fieldId);
13472
      }
13473
 
13474
      /**
13475
       * Find the _Fields constant that matches fieldId, throwing an exception
13476
       * if it is not found.
13477
       */
13478
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13479
        _Fields fields = findByThriftId(fieldId);
13480
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13481
        return fields;
13482
      }
13483
 
13484
      /**
13485
       * Find the _Fields constant that matches name, or null if its not found.
13486
       */
13487
      public static _Fields findByName(String name) {
13488
        return byName.get(name);
13489
      }
13490
 
13491
      private final short _thriftId;
13492
      private final String _fieldName;
13493
 
13494
      _Fields(short thriftId, String fieldName) {
13495
        _thriftId = thriftId;
13496
        _fieldName = fieldName;
13497
      }
13498
 
13499
      public short getThriftFieldId() {
13500
        return _thriftId;
13501
      }
13502
 
13503
      public String getFieldName() {
13504
        return _fieldName;
13505
      }
13506
    }
13507
 
13508
    // isset id assignments
13509
    private static final int __ORDERID_ISSET_ID = 0;
13510
    private static final int __JACKETNUMBER_ISSET_ID = 1;
2383 rajveer 13511
    private BitSet __isset_bit_vector = new BitSet(2);
1148 chandransh 13512
 
13513
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13514
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13515
          new FieldValueMetaData(TType.I64)));
13516
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
13517
          new FieldValueMetaData(TType.I64)));
13518
    }});
13519
 
13520
    static {
13521
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
13522
    }
13523
 
13524
    public addJacketNumber_args() {
13525
    }
13526
 
13527
    public addJacketNumber_args(
13528
      long orderId,
2383 rajveer 13529
      long jacketNumber)
1148 chandransh 13530
    {
13531
      this();
13532
      this.orderId = orderId;
13533
      setOrderIdIsSet(true);
13534
      this.jacketNumber = jacketNumber;
13535
      setJacketNumberIsSet(true);
13536
    }
13537
 
13538
    /**
13539
     * Performs a deep copy on <i>other</i>.
13540
     */
13541
    public addJacketNumber_args(addJacketNumber_args other) {
13542
      __isset_bit_vector.clear();
13543
      __isset_bit_vector.or(other.__isset_bit_vector);
13544
      this.orderId = other.orderId;
13545
      this.jacketNumber = other.jacketNumber;
13546
    }
13547
 
13548
    public addJacketNumber_args deepCopy() {
13549
      return new addJacketNumber_args(this);
13550
    }
13551
 
13552
    @Deprecated
13553
    public addJacketNumber_args clone() {
13554
      return new addJacketNumber_args(this);
13555
    }
13556
 
13557
    public long getOrderId() {
13558
      return this.orderId;
13559
    }
13560
 
13561
    public addJacketNumber_args setOrderId(long orderId) {
13562
      this.orderId = orderId;
13563
      setOrderIdIsSet(true);
13564
      return this;
13565
    }
13566
 
13567
    public void unsetOrderId() {
13568
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13569
    }
13570
 
13571
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13572
    public boolean isSetOrderId() {
13573
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13574
    }
13575
 
13576
    public void setOrderIdIsSet(boolean value) {
13577
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13578
    }
13579
 
13580
    public long getJacketNumber() {
13581
      return this.jacketNumber;
13582
    }
13583
 
13584
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
13585
      this.jacketNumber = jacketNumber;
13586
      setJacketNumberIsSet(true);
13587
      return this;
13588
    }
13589
 
13590
    public void unsetJacketNumber() {
13591
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
13592
    }
13593
 
13594
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
13595
    public boolean isSetJacketNumber() {
13596
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
13597
    }
13598
 
13599
    public void setJacketNumberIsSet(boolean value) {
13600
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
13601
    }
13602
 
13603
    public void setFieldValue(_Fields field, Object value) {
13604
      switch (field) {
13605
      case ORDER_ID:
13606
        if (value == null) {
13607
          unsetOrderId();
13608
        } else {
13609
          setOrderId((Long)value);
13610
        }
13611
        break;
13612
 
13613
      case JACKET_NUMBER:
13614
        if (value == null) {
13615
          unsetJacketNumber();
13616
        } else {
13617
          setJacketNumber((Long)value);
13618
        }
13619
        break;
13620
 
13621
      }
13622
    }
13623
 
13624
    public void setFieldValue(int fieldID, Object value) {
13625
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13626
    }
13627
 
13628
    public Object getFieldValue(_Fields field) {
13629
      switch (field) {
13630
      case ORDER_ID:
13631
        return new Long(getOrderId());
13632
 
13633
      case JACKET_NUMBER:
13634
        return new Long(getJacketNumber());
13635
 
13636
      }
13637
      throw new IllegalStateException();
13638
    }
13639
 
13640
    public Object getFieldValue(int fieldId) {
13641
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13642
    }
13643
 
13644
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13645
    public boolean isSet(_Fields field) {
13646
      switch (field) {
13647
      case ORDER_ID:
13648
        return isSetOrderId();
13649
      case JACKET_NUMBER:
13650
        return isSetJacketNumber();
13651
      }
13652
      throw new IllegalStateException();
13653
    }
13654
 
13655
    public boolean isSet(int fieldID) {
13656
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13657
    }
13658
 
13659
    @Override
13660
    public boolean equals(Object that) {
13661
      if (that == null)
13662
        return false;
13663
      if (that instanceof addJacketNumber_args)
13664
        return this.equals((addJacketNumber_args)that);
13665
      return false;
13666
    }
13667
 
13668
    public boolean equals(addJacketNumber_args that) {
13669
      if (that == null)
13670
        return false;
13671
 
13672
      boolean this_present_orderId = true;
13673
      boolean that_present_orderId = true;
13674
      if (this_present_orderId || that_present_orderId) {
13675
        if (!(this_present_orderId && that_present_orderId))
13676
          return false;
13677
        if (this.orderId != that.orderId)
13678
          return false;
13679
      }
13680
 
13681
      boolean this_present_jacketNumber = true;
13682
      boolean that_present_jacketNumber = true;
13683
      if (this_present_jacketNumber || that_present_jacketNumber) {
13684
        if (!(this_present_jacketNumber && that_present_jacketNumber))
13685
          return false;
13686
        if (this.jacketNumber != that.jacketNumber)
13687
          return false;
13688
      }
13689
 
13690
      return true;
13691
    }
13692
 
13693
    @Override
13694
    public int hashCode() {
13695
      return 0;
13696
    }
13697
 
13698
    public int compareTo(addJacketNumber_args other) {
13699
      if (!getClass().equals(other.getClass())) {
13700
        return getClass().getName().compareTo(other.getClass().getName());
13701
      }
13702
 
13703
      int lastComparison = 0;
13704
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13705
 
13706
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13707
      if (lastComparison != 0) {
13708
        return lastComparison;
13709
      }
13710
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13711
      if (lastComparison != 0) {
13712
        return lastComparison;
13713
      }
13714
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13715
      if (lastComparison != 0) {
13716
        return lastComparison;
13717
      }
13718
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13719
      if (lastComparison != 0) {
13720
        return lastComparison;
13721
      }
13722
      return 0;
13723
    }
13724
 
13725
    public void read(TProtocol iprot) throws TException {
13726
      TField field;
13727
      iprot.readStructBegin();
13728
      while (true)
13729
      {
13730
        field = iprot.readFieldBegin();
13731
        if (field.type == TType.STOP) { 
13732
          break;
13733
        }
13734
        _Fields fieldId = _Fields.findByThriftId(field.id);
13735
        if (fieldId == null) {
13736
          TProtocolUtil.skip(iprot, field.type);
13737
        } else {
13738
          switch (fieldId) {
13739
            case ORDER_ID:
13740
              if (field.type == TType.I64) {
13741
                this.orderId = iprot.readI64();
13742
                setOrderIdIsSet(true);
13743
              } else { 
13744
                TProtocolUtil.skip(iprot, field.type);
13745
              }
13746
              break;
13747
            case JACKET_NUMBER:
13748
              if (field.type == TType.I64) {
13749
                this.jacketNumber = iprot.readI64();
13750
                setJacketNumberIsSet(true);
13751
              } else { 
13752
                TProtocolUtil.skip(iprot, field.type);
13753
              }
13754
              break;
13755
          }
13756
          iprot.readFieldEnd();
13757
        }
13758
      }
13759
      iprot.readStructEnd();
13760
      validate();
13761
    }
13762
 
13763
    public void write(TProtocol oprot) throws TException {
13764
      validate();
13765
 
13766
      oprot.writeStructBegin(STRUCT_DESC);
13767
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13768
      oprot.writeI64(this.orderId);
13769
      oprot.writeFieldEnd();
13770
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13771
      oprot.writeI64(this.jacketNumber);
13772
      oprot.writeFieldEnd();
13773
      oprot.writeFieldStop();
13774
      oprot.writeStructEnd();
13775
    }
13776
 
13777
    @Override
13778
    public String toString() {
13779
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13780
      boolean first = true;
13781
 
13782
      sb.append("orderId:");
13783
      sb.append(this.orderId);
13784
      first = false;
13785
      if (!first) sb.append(", ");
13786
      sb.append("jacketNumber:");
13787
      sb.append(this.jacketNumber);
13788
      first = false;
13789
      sb.append(")");
13790
      return sb.toString();
13791
    }
13792
 
13793
    public void validate() throws TException {
13794
      // check for required fields
13795
    }
13796
 
13797
  }
13798
 
13799
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13800
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13801
 
13802
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13803
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13804
 
13805
    private boolean success;
13806
    private TransactionServiceException ex;
13807
 
13808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13809
    public enum _Fields implements TFieldIdEnum {
13810
      SUCCESS((short)0, "success"),
13811
      EX((short)1, "ex");
13812
 
13813
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13814
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13815
 
13816
      static {
13817
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13818
          byId.put((int)field._thriftId, field);
13819
          byName.put(field.getFieldName(), field);
13820
        }
13821
      }
13822
 
13823
      /**
13824
       * Find the _Fields constant that matches fieldId, or null if its not found.
13825
       */
13826
      public static _Fields findByThriftId(int fieldId) {
13827
        return byId.get(fieldId);
13828
      }
13829
 
13830
      /**
13831
       * Find the _Fields constant that matches fieldId, throwing an exception
13832
       * if it is not found.
13833
       */
13834
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13835
        _Fields fields = findByThriftId(fieldId);
13836
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13837
        return fields;
13838
      }
13839
 
13840
      /**
13841
       * Find the _Fields constant that matches name, or null if its not found.
13842
       */
13843
      public static _Fields findByName(String name) {
13844
        return byName.get(name);
13845
      }
13846
 
13847
      private final short _thriftId;
13848
      private final String _fieldName;
13849
 
13850
      _Fields(short thriftId, String fieldName) {
13851
        _thriftId = thriftId;
13852
        _fieldName = fieldName;
13853
      }
13854
 
13855
      public short getThriftFieldId() {
13856
        return _thriftId;
13857
      }
13858
 
13859
      public String getFieldName() {
13860
        return _fieldName;
13861
      }
13862
    }
13863
 
13864
    // isset id assignments
13865
    private static final int __SUCCESS_ISSET_ID = 0;
13866
    private BitSet __isset_bit_vector = new BitSet(1);
13867
 
13868
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13869
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13870
          new FieldValueMetaData(TType.BOOL)));
13871
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13872
          new FieldValueMetaData(TType.STRUCT)));
13873
    }});
13874
 
13875
    static {
13876
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13877
    }
13878
 
13879
    public addJacketNumber_result() {
13880
    }
13881
 
13882
    public addJacketNumber_result(
13883
      boolean success,
13884
      TransactionServiceException ex)
13885
    {
13886
      this();
13887
      this.success = success;
13888
      setSuccessIsSet(true);
13889
      this.ex = ex;
13890
    }
13891
 
13892
    /**
13893
     * Performs a deep copy on <i>other</i>.
13894
     */
13895
    public addJacketNumber_result(addJacketNumber_result other) {
13896
      __isset_bit_vector.clear();
13897
      __isset_bit_vector.or(other.__isset_bit_vector);
13898
      this.success = other.success;
13899
      if (other.isSetEx()) {
13900
        this.ex = new TransactionServiceException(other.ex);
13901
      }
13902
    }
13903
 
13904
    public addJacketNumber_result deepCopy() {
13905
      return new addJacketNumber_result(this);
13906
    }
13907
 
13908
    @Deprecated
13909
    public addJacketNumber_result clone() {
13910
      return new addJacketNumber_result(this);
13911
    }
13912
 
13913
    public boolean isSuccess() {
13914
      return this.success;
13915
    }
13916
 
13917
    public addJacketNumber_result setSuccess(boolean success) {
13918
      this.success = success;
13919
      setSuccessIsSet(true);
13920
      return this;
13921
    }
13922
 
13923
    public void unsetSuccess() {
13924
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13925
    }
13926
 
13927
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13928
    public boolean isSetSuccess() {
13929
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13930
    }
13931
 
13932
    public void setSuccessIsSet(boolean value) {
13933
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13934
    }
13935
 
13936
    public TransactionServiceException getEx() {
13937
      return this.ex;
13938
    }
13939
 
13940
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13941
      this.ex = ex;
13942
      return this;
13943
    }
13944
 
13945
    public void unsetEx() {
13946
      this.ex = null;
13947
    }
13948
 
13949
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13950
    public boolean isSetEx() {
13951
      return this.ex != null;
13952
    }
13953
 
13954
    public void setExIsSet(boolean value) {
13955
      if (!value) {
13956
        this.ex = null;
13957
      }
13958
    }
13959
 
13960
    public void setFieldValue(_Fields field, Object value) {
13961
      switch (field) {
13962
      case SUCCESS:
13963
        if (value == null) {
13964
          unsetSuccess();
13965
        } else {
13966
          setSuccess((Boolean)value);
13967
        }
13968
        break;
13969
 
13970
      case EX:
13971
        if (value == null) {
13972
          unsetEx();
13973
        } else {
13974
          setEx((TransactionServiceException)value);
13975
        }
13976
        break;
13977
 
13978
      }
13979
    }
13980
 
13981
    public void setFieldValue(int fieldID, Object value) {
13982
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13983
    }
13984
 
13985
    public Object getFieldValue(_Fields field) {
13986
      switch (field) {
13987
      case SUCCESS:
13988
        return new Boolean(isSuccess());
13989
 
13990
      case EX:
13991
        return getEx();
13992
 
13993
      }
13994
      throw new IllegalStateException();
13995
    }
13996
 
13997
    public Object getFieldValue(int fieldId) {
13998
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13999
    }
14000
 
14001
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14002
    public boolean isSet(_Fields field) {
14003
      switch (field) {
14004
      case SUCCESS:
14005
        return isSetSuccess();
14006
      case EX:
14007
        return isSetEx();
14008
      }
14009
      throw new IllegalStateException();
14010
    }
14011
 
14012
    public boolean isSet(int fieldID) {
14013
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14014
    }
14015
 
14016
    @Override
14017
    public boolean equals(Object that) {
14018
      if (that == null)
14019
        return false;
14020
      if (that instanceof addJacketNumber_result)
14021
        return this.equals((addJacketNumber_result)that);
14022
      return false;
14023
    }
14024
 
14025
    public boolean equals(addJacketNumber_result that) {
14026
      if (that == null)
14027
        return false;
14028
 
14029
      boolean this_present_success = true;
14030
      boolean that_present_success = true;
14031
      if (this_present_success || that_present_success) {
14032
        if (!(this_present_success && that_present_success))
14033
          return false;
14034
        if (this.success != that.success)
14035
          return false;
14036
      }
14037
 
14038
      boolean this_present_ex = true && this.isSetEx();
14039
      boolean that_present_ex = true && that.isSetEx();
14040
      if (this_present_ex || that_present_ex) {
14041
        if (!(this_present_ex && that_present_ex))
14042
          return false;
14043
        if (!this.ex.equals(that.ex))
14044
          return false;
14045
      }
14046
 
14047
      return true;
14048
    }
14049
 
14050
    @Override
14051
    public int hashCode() {
14052
      return 0;
14053
    }
14054
 
14055
    public int compareTo(addJacketNumber_result other) {
14056
      if (!getClass().equals(other.getClass())) {
14057
        return getClass().getName().compareTo(other.getClass().getName());
14058
      }
14059
 
14060
      int lastComparison = 0;
14061
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
14062
 
14063
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14064
      if (lastComparison != 0) {
14065
        return lastComparison;
14066
      }
14067
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14068
      if (lastComparison != 0) {
14069
        return lastComparison;
14070
      }
14071
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14072
      if (lastComparison != 0) {
14073
        return lastComparison;
14074
      }
14075
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14076
      if (lastComparison != 0) {
14077
        return lastComparison;
14078
      }
14079
      return 0;
14080
    }
14081
 
14082
    public void read(TProtocol iprot) throws TException {
14083
      TField field;
14084
      iprot.readStructBegin();
14085
      while (true)
14086
      {
14087
        field = iprot.readFieldBegin();
14088
        if (field.type == TType.STOP) { 
14089
          break;
14090
        }
14091
        _Fields fieldId = _Fields.findByThriftId(field.id);
14092
        if (fieldId == null) {
14093
          TProtocolUtil.skip(iprot, field.type);
14094
        } else {
14095
          switch (fieldId) {
14096
            case SUCCESS:
14097
              if (field.type == TType.BOOL) {
14098
                this.success = iprot.readBool();
14099
                setSuccessIsSet(true);
14100
              } else { 
14101
                TProtocolUtil.skip(iprot, field.type);
14102
              }
14103
              break;
14104
            case EX:
14105
              if (field.type == TType.STRUCT) {
14106
                this.ex = new TransactionServiceException();
14107
                this.ex.read(iprot);
14108
              } else { 
14109
                TProtocolUtil.skip(iprot, field.type);
14110
              }
14111
              break;
14112
          }
14113
          iprot.readFieldEnd();
14114
        }
14115
      }
14116
      iprot.readStructEnd();
14117
      validate();
14118
    }
14119
 
14120
    public void write(TProtocol oprot) throws TException {
14121
      oprot.writeStructBegin(STRUCT_DESC);
14122
 
14123
      if (this.isSetSuccess()) {
14124
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14125
        oprot.writeBool(this.success);
14126
        oprot.writeFieldEnd();
14127
      } else if (this.isSetEx()) {
14128
        oprot.writeFieldBegin(EX_FIELD_DESC);
14129
        this.ex.write(oprot);
14130
        oprot.writeFieldEnd();
14131
      }
14132
      oprot.writeFieldStop();
14133
      oprot.writeStructEnd();
14134
    }
14135
 
14136
    @Override
14137
    public String toString() {
14138
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
14139
      boolean first = true;
14140
 
14141
      sb.append("success:");
14142
      sb.append(this.success);
14143
      first = false;
14144
      if (!first) sb.append(", ");
14145
      sb.append("ex:");
14146
      if (this.ex == null) {
14147
        sb.append("null");
14148
      } else {
14149
        sb.append(this.ex);
14150
      }
14151
      first = false;
14152
      sb.append(")");
14153
      return sb.toString();
14154
    }
14155
 
14156
    public void validate() throws TException {
14157
      // check for required fields
14158
    }
14159
 
14160
  }
14161
 
923 rajveer 14162
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
14163
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
14164
 
14165
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14166
 
14167
    private long orderId;
14168
 
14169
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14170
    public enum _Fields implements TFieldIdEnum {
14171
      ORDER_ID((short)1, "orderId");
14172
 
14173
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14174
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14175
 
14176
      static {
14177
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14178
          byId.put((int)field._thriftId, field);
14179
          byName.put(field.getFieldName(), field);
14180
        }
14181
      }
14182
 
14183
      /**
14184
       * Find the _Fields constant that matches fieldId, or null if its not found.
14185
       */
14186
      public static _Fields findByThriftId(int fieldId) {
14187
        return byId.get(fieldId);
14188
      }
14189
 
14190
      /**
14191
       * Find the _Fields constant that matches fieldId, throwing an exception
14192
       * if it is not found.
14193
       */
14194
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14195
        _Fields fields = findByThriftId(fieldId);
14196
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14197
        return fields;
14198
      }
14199
 
14200
      /**
14201
       * Find the _Fields constant that matches name, or null if its not found.
14202
       */
14203
      public static _Fields findByName(String name) {
14204
        return byName.get(name);
14205
      }
14206
 
14207
      private final short _thriftId;
14208
      private final String _fieldName;
14209
 
14210
      _Fields(short thriftId, String fieldName) {
14211
        _thriftId = thriftId;
14212
        _fieldName = fieldName;
14213
      }
14214
 
14215
      public short getThriftFieldId() {
14216
        return _thriftId;
14217
      }
14218
 
14219
      public String getFieldName() {
14220
        return _fieldName;
14221
      }
14222
    }
14223
 
14224
    // isset id assignments
14225
    private static final int __ORDERID_ISSET_ID = 0;
14226
    private BitSet __isset_bit_vector = new BitSet(1);
14227
 
14228
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14229
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14230
          new FieldValueMetaData(TType.I64)));
14231
    }});
14232
 
14233
    static {
14234
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
14235
    }
14236
 
14237
    public acceptOrder_args() {
14238
    }
14239
 
14240
    public acceptOrder_args(
14241
      long orderId)
14242
    {
14243
      this();
14244
      this.orderId = orderId;
14245
      setOrderIdIsSet(true);
14246
    }
14247
 
14248
    /**
14249
     * Performs a deep copy on <i>other</i>.
14250
     */
14251
    public acceptOrder_args(acceptOrder_args other) {
14252
      __isset_bit_vector.clear();
14253
      __isset_bit_vector.or(other.__isset_bit_vector);
14254
      this.orderId = other.orderId;
14255
    }
14256
 
14257
    public acceptOrder_args deepCopy() {
14258
      return new acceptOrder_args(this);
14259
    }
14260
 
14261
    @Deprecated
14262
    public acceptOrder_args clone() {
14263
      return new acceptOrder_args(this);
14264
    }
14265
 
14266
    public long getOrderId() {
14267
      return this.orderId;
14268
    }
14269
 
14270
    public acceptOrder_args setOrderId(long orderId) {
14271
      this.orderId = orderId;
14272
      setOrderIdIsSet(true);
14273
      return this;
14274
    }
14275
 
14276
    public void unsetOrderId() {
14277
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14278
    }
14279
 
14280
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14281
    public boolean isSetOrderId() {
14282
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14283
    }
14284
 
14285
    public void setOrderIdIsSet(boolean value) {
14286
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14287
    }
14288
 
14289
    public void setFieldValue(_Fields field, Object value) {
14290
      switch (field) {
14291
      case ORDER_ID:
14292
        if (value == null) {
14293
          unsetOrderId();
14294
        } else {
14295
          setOrderId((Long)value);
14296
        }
14297
        break;
14298
 
14299
      }
14300
    }
14301
 
14302
    public void setFieldValue(int fieldID, Object value) {
14303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14304
    }
14305
 
14306
    public Object getFieldValue(_Fields field) {
14307
      switch (field) {
14308
      case ORDER_ID:
14309
        return new Long(getOrderId());
14310
 
14311
      }
14312
      throw new IllegalStateException();
14313
    }
14314
 
14315
    public Object getFieldValue(int fieldId) {
14316
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14317
    }
14318
 
14319
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14320
    public boolean isSet(_Fields field) {
14321
      switch (field) {
14322
      case ORDER_ID:
14323
        return isSetOrderId();
14324
      }
14325
      throw new IllegalStateException();
14326
    }
14327
 
14328
    public boolean isSet(int fieldID) {
14329
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14330
    }
14331
 
14332
    @Override
14333
    public boolean equals(Object that) {
14334
      if (that == null)
14335
        return false;
14336
      if (that instanceof acceptOrder_args)
14337
        return this.equals((acceptOrder_args)that);
14338
      return false;
14339
    }
14340
 
14341
    public boolean equals(acceptOrder_args that) {
14342
      if (that == null)
14343
        return false;
14344
 
14345
      boolean this_present_orderId = true;
14346
      boolean that_present_orderId = true;
14347
      if (this_present_orderId || that_present_orderId) {
14348
        if (!(this_present_orderId && that_present_orderId))
14349
          return false;
14350
        if (this.orderId != that.orderId)
14351
          return false;
14352
      }
14353
 
14354
      return true;
14355
    }
14356
 
14357
    @Override
14358
    public int hashCode() {
14359
      return 0;
14360
    }
14361
 
14362
    public int compareTo(acceptOrder_args other) {
14363
      if (!getClass().equals(other.getClass())) {
14364
        return getClass().getName().compareTo(other.getClass().getName());
14365
      }
14366
 
14367
      int lastComparison = 0;
14368
      acceptOrder_args typedOther = (acceptOrder_args)other;
14369
 
14370
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14371
      if (lastComparison != 0) {
14372
        return lastComparison;
14373
      }
14374
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14375
      if (lastComparison != 0) {
14376
        return lastComparison;
14377
      }
14378
      return 0;
14379
    }
14380
 
14381
    public void read(TProtocol iprot) throws TException {
14382
      TField field;
14383
      iprot.readStructBegin();
14384
      while (true)
14385
      {
14386
        field = iprot.readFieldBegin();
14387
        if (field.type == TType.STOP) { 
14388
          break;
14389
        }
14390
        _Fields fieldId = _Fields.findByThriftId(field.id);
14391
        if (fieldId == null) {
14392
          TProtocolUtil.skip(iprot, field.type);
14393
        } else {
14394
          switch (fieldId) {
14395
            case ORDER_ID:
14396
              if (field.type == TType.I64) {
14397
                this.orderId = iprot.readI64();
14398
                setOrderIdIsSet(true);
14399
              } else { 
14400
                TProtocolUtil.skip(iprot, field.type);
14401
              }
14402
              break;
14403
          }
14404
          iprot.readFieldEnd();
14405
        }
14406
      }
14407
      iprot.readStructEnd();
14408
      validate();
14409
    }
14410
 
14411
    public void write(TProtocol oprot) throws TException {
14412
      validate();
14413
 
14414
      oprot.writeStructBegin(STRUCT_DESC);
14415
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14416
      oprot.writeI64(this.orderId);
14417
      oprot.writeFieldEnd();
14418
      oprot.writeFieldStop();
14419
      oprot.writeStructEnd();
14420
    }
14421
 
14422
    @Override
14423
    public String toString() {
14424
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
14425
      boolean first = true;
14426
 
14427
      sb.append("orderId:");
14428
      sb.append(this.orderId);
14429
      first = false;
14430
      sb.append(")");
14431
      return sb.toString();
14432
    }
14433
 
14434
    public void validate() throws TException {
14435
      // check for required fields
14436
    }
14437
 
14438
  }
14439
 
14440
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
14441
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
14442
 
14443
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14444
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14445
 
14446
    private boolean success;
14447
    private TransactionServiceException ex;
14448
 
14449
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14450
    public enum _Fields implements TFieldIdEnum {
14451
      SUCCESS((short)0, "success"),
14452
      EX((short)1, "ex");
14453
 
14454
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14455
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14456
 
14457
      static {
14458
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14459
          byId.put((int)field._thriftId, field);
14460
          byName.put(field.getFieldName(), field);
14461
        }
14462
      }
14463
 
14464
      /**
14465
       * Find the _Fields constant that matches fieldId, or null if its not found.
14466
       */
14467
      public static _Fields findByThriftId(int fieldId) {
14468
        return byId.get(fieldId);
14469
      }
14470
 
14471
      /**
14472
       * Find the _Fields constant that matches fieldId, throwing an exception
14473
       * if it is not found.
14474
       */
14475
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14476
        _Fields fields = findByThriftId(fieldId);
14477
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14478
        return fields;
14479
      }
14480
 
14481
      /**
14482
       * Find the _Fields constant that matches name, or null if its not found.
14483
       */
14484
      public static _Fields findByName(String name) {
14485
        return byName.get(name);
14486
      }
14487
 
14488
      private final short _thriftId;
14489
      private final String _fieldName;
14490
 
14491
      _Fields(short thriftId, String fieldName) {
14492
        _thriftId = thriftId;
14493
        _fieldName = fieldName;
14494
      }
14495
 
14496
      public short getThriftFieldId() {
14497
        return _thriftId;
14498
      }
14499
 
14500
      public String getFieldName() {
14501
        return _fieldName;
14502
      }
14503
    }
14504
 
14505
    // isset id assignments
14506
    private static final int __SUCCESS_ISSET_ID = 0;
14507
    private BitSet __isset_bit_vector = new BitSet(1);
14508
 
14509
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14510
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14511
          new FieldValueMetaData(TType.BOOL)));
14512
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14513
          new FieldValueMetaData(TType.STRUCT)));
14514
    }});
14515
 
14516
    static {
14517
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
14518
    }
14519
 
14520
    public acceptOrder_result() {
14521
    }
14522
 
14523
    public acceptOrder_result(
14524
      boolean success,
14525
      TransactionServiceException ex)
14526
    {
14527
      this();
14528
      this.success = success;
14529
      setSuccessIsSet(true);
14530
      this.ex = ex;
14531
    }
14532
 
14533
    /**
14534
     * Performs a deep copy on <i>other</i>.
14535
     */
14536
    public acceptOrder_result(acceptOrder_result other) {
14537
      __isset_bit_vector.clear();
14538
      __isset_bit_vector.or(other.__isset_bit_vector);
14539
      this.success = other.success;
14540
      if (other.isSetEx()) {
14541
        this.ex = new TransactionServiceException(other.ex);
14542
      }
14543
    }
14544
 
14545
    public acceptOrder_result deepCopy() {
14546
      return new acceptOrder_result(this);
14547
    }
14548
 
14549
    @Deprecated
14550
    public acceptOrder_result clone() {
14551
      return new acceptOrder_result(this);
14552
    }
14553
 
14554
    public boolean isSuccess() {
14555
      return this.success;
14556
    }
14557
 
14558
    public acceptOrder_result setSuccess(boolean success) {
14559
      this.success = success;
14560
      setSuccessIsSet(true);
14561
      return this;
14562
    }
14563
 
14564
    public void unsetSuccess() {
14565
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14566
    }
14567
 
14568
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14569
    public boolean isSetSuccess() {
14570
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14571
    }
14572
 
14573
    public void setSuccessIsSet(boolean value) {
14574
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14575
    }
14576
 
14577
    public TransactionServiceException getEx() {
14578
      return this.ex;
14579
    }
14580
 
14581
    public acceptOrder_result setEx(TransactionServiceException ex) {
14582
      this.ex = ex;
14583
      return this;
14584
    }
14585
 
14586
    public void unsetEx() {
14587
      this.ex = null;
14588
    }
14589
 
14590
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14591
    public boolean isSetEx() {
14592
      return this.ex != null;
14593
    }
14594
 
14595
    public void setExIsSet(boolean value) {
14596
      if (!value) {
14597
        this.ex = null;
14598
      }
14599
    }
14600
 
14601
    public void setFieldValue(_Fields field, Object value) {
14602
      switch (field) {
14603
      case SUCCESS:
14604
        if (value == null) {
14605
          unsetSuccess();
14606
        } else {
14607
          setSuccess((Boolean)value);
14608
        }
14609
        break;
14610
 
14611
      case EX:
14612
        if (value == null) {
14613
          unsetEx();
14614
        } else {
14615
          setEx((TransactionServiceException)value);
14616
        }
14617
        break;
14618
 
14619
      }
14620
    }
14621
 
14622
    public void setFieldValue(int fieldID, Object value) {
14623
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14624
    }
14625
 
14626
    public Object getFieldValue(_Fields field) {
14627
      switch (field) {
14628
      case SUCCESS:
14629
        return new Boolean(isSuccess());
14630
 
14631
      case EX:
14632
        return getEx();
14633
 
14634
      }
14635
      throw new IllegalStateException();
14636
    }
14637
 
14638
    public Object getFieldValue(int fieldId) {
14639
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14640
    }
14641
 
14642
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14643
    public boolean isSet(_Fields field) {
14644
      switch (field) {
14645
      case SUCCESS:
14646
        return isSetSuccess();
14647
      case EX:
14648
        return isSetEx();
14649
      }
14650
      throw new IllegalStateException();
14651
    }
14652
 
14653
    public boolean isSet(int fieldID) {
14654
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14655
    }
14656
 
14657
    @Override
14658
    public boolean equals(Object that) {
14659
      if (that == null)
14660
        return false;
14661
      if (that instanceof acceptOrder_result)
14662
        return this.equals((acceptOrder_result)that);
14663
      return false;
14664
    }
14665
 
14666
    public boolean equals(acceptOrder_result that) {
14667
      if (that == null)
14668
        return false;
14669
 
14670
      boolean this_present_success = true;
14671
      boolean that_present_success = true;
14672
      if (this_present_success || that_present_success) {
14673
        if (!(this_present_success && that_present_success))
14674
          return false;
14675
        if (this.success != that.success)
14676
          return false;
14677
      }
14678
 
14679
      boolean this_present_ex = true && this.isSetEx();
14680
      boolean that_present_ex = true && that.isSetEx();
14681
      if (this_present_ex || that_present_ex) {
14682
        if (!(this_present_ex && that_present_ex))
14683
          return false;
14684
        if (!this.ex.equals(that.ex))
14685
          return false;
14686
      }
14687
 
14688
      return true;
14689
    }
14690
 
14691
    @Override
14692
    public int hashCode() {
14693
      return 0;
14694
    }
14695
 
14696
    public int compareTo(acceptOrder_result other) {
14697
      if (!getClass().equals(other.getClass())) {
14698
        return getClass().getName().compareTo(other.getClass().getName());
14699
      }
14700
 
14701
      int lastComparison = 0;
14702
      acceptOrder_result typedOther = (acceptOrder_result)other;
14703
 
14704
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14705
      if (lastComparison != 0) {
14706
        return lastComparison;
14707
      }
14708
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14709
      if (lastComparison != 0) {
14710
        return lastComparison;
14711
      }
14712
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14713
      if (lastComparison != 0) {
14714
        return lastComparison;
14715
      }
14716
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14717
      if (lastComparison != 0) {
14718
        return lastComparison;
14719
      }
14720
      return 0;
14721
    }
14722
 
14723
    public void read(TProtocol iprot) throws TException {
14724
      TField field;
14725
      iprot.readStructBegin();
14726
      while (true)
14727
      {
14728
        field = iprot.readFieldBegin();
14729
        if (field.type == TType.STOP) { 
14730
          break;
14731
        }
14732
        _Fields fieldId = _Fields.findByThriftId(field.id);
14733
        if (fieldId == null) {
14734
          TProtocolUtil.skip(iprot, field.type);
14735
        } else {
14736
          switch (fieldId) {
14737
            case SUCCESS:
14738
              if (field.type == TType.BOOL) {
14739
                this.success = iprot.readBool();
14740
                setSuccessIsSet(true);
14741
              } else { 
14742
                TProtocolUtil.skip(iprot, field.type);
14743
              }
14744
              break;
14745
            case EX:
14746
              if (field.type == TType.STRUCT) {
14747
                this.ex = new TransactionServiceException();
14748
                this.ex.read(iprot);
14749
              } else { 
14750
                TProtocolUtil.skip(iprot, field.type);
14751
              }
14752
              break;
14753
          }
14754
          iprot.readFieldEnd();
14755
        }
14756
      }
14757
      iprot.readStructEnd();
14758
      validate();
14759
    }
14760
 
14761
    public void write(TProtocol oprot) throws TException {
14762
      oprot.writeStructBegin(STRUCT_DESC);
14763
 
14764
      if (this.isSetSuccess()) {
14765
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14766
        oprot.writeBool(this.success);
14767
        oprot.writeFieldEnd();
14768
      } else if (this.isSetEx()) {
14769
        oprot.writeFieldBegin(EX_FIELD_DESC);
14770
        this.ex.write(oprot);
14771
        oprot.writeFieldEnd();
14772
      }
14773
      oprot.writeFieldStop();
14774
      oprot.writeStructEnd();
14775
    }
14776
 
14777
    @Override
14778
    public String toString() {
14779
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14780
      boolean first = true;
14781
 
14782
      sb.append("success:");
14783
      sb.append(this.success);
14784
      first = false;
14785
      if (!first) sb.append(", ");
14786
      sb.append("ex:");
14787
      if (this.ex == null) {
14788
        sb.append("null");
14789
      } else {
14790
        sb.append(this.ex);
14791
      }
14792
      first = false;
14793
      sb.append(")");
14794
      return sb.toString();
14795
    }
14796
 
14797
    public void validate() throws TException {
14798
      // check for required fields
14799
    }
14800
 
14801
  }
14802
 
14803
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14804
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14805
 
14806
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14807
 
14808
    private long orderId;
14809
 
14810
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14811
    public enum _Fields implements TFieldIdEnum {
14812
      ORDER_ID((short)1, "orderId");
14813
 
14814
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14815
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14816
 
14817
      static {
14818
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14819
          byId.put((int)field._thriftId, field);
14820
          byName.put(field.getFieldName(), field);
14821
        }
14822
      }
14823
 
14824
      /**
14825
       * Find the _Fields constant that matches fieldId, or null if its not found.
14826
       */
14827
      public static _Fields findByThriftId(int fieldId) {
14828
        return byId.get(fieldId);
14829
      }
14830
 
14831
      /**
14832
       * Find the _Fields constant that matches fieldId, throwing an exception
14833
       * if it is not found.
14834
       */
14835
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14836
        _Fields fields = findByThriftId(fieldId);
14837
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14838
        return fields;
14839
      }
14840
 
14841
      /**
14842
       * Find the _Fields constant that matches name, or null if its not found.
14843
       */
14844
      public static _Fields findByName(String name) {
14845
        return byName.get(name);
14846
      }
14847
 
14848
      private final short _thriftId;
14849
      private final String _fieldName;
14850
 
14851
      _Fields(short thriftId, String fieldName) {
14852
        _thriftId = thriftId;
14853
        _fieldName = fieldName;
14854
      }
14855
 
14856
      public short getThriftFieldId() {
14857
        return _thriftId;
14858
      }
14859
 
14860
      public String getFieldName() {
14861
        return _fieldName;
14862
      }
14863
    }
14864
 
14865
    // isset id assignments
14866
    private static final int __ORDERID_ISSET_ID = 0;
14867
    private BitSet __isset_bit_vector = new BitSet(1);
14868
 
14869
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14870
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14871
          new FieldValueMetaData(TType.I64)));
14872
    }});
14873
 
14874
    static {
14875
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14876
    }
14877
 
14878
    public billOrder_args() {
14879
    }
14880
 
14881
    public billOrder_args(
14882
      long orderId)
14883
    {
14884
      this();
14885
      this.orderId = orderId;
14886
      setOrderIdIsSet(true);
14887
    }
14888
 
14889
    /**
14890
     * Performs a deep copy on <i>other</i>.
14891
     */
14892
    public billOrder_args(billOrder_args other) {
14893
      __isset_bit_vector.clear();
14894
      __isset_bit_vector.or(other.__isset_bit_vector);
14895
      this.orderId = other.orderId;
14896
    }
14897
 
14898
    public billOrder_args deepCopy() {
14899
      return new billOrder_args(this);
14900
    }
14901
 
14902
    @Deprecated
14903
    public billOrder_args clone() {
14904
      return new billOrder_args(this);
14905
    }
14906
 
14907
    public long getOrderId() {
14908
      return this.orderId;
14909
    }
14910
 
14911
    public billOrder_args setOrderId(long orderId) {
14912
      this.orderId = orderId;
14913
      setOrderIdIsSet(true);
14914
      return this;
14915
    }
14916
 
14917
    public void unsetOrderId() {
14918
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14919
    }
14920
 
14921
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14922
    public boolean isSetOrderId() {
14923
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14924
    }
14925
 
14926
    public void setOrderIdIsSet(boolean value) {
14927
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14928
    }
14929
 
14930
    public void setFieldValue(_Fields field, Object value) {
14931
      switch (field) {
14932
      case ORDER_ID:
14933
        if (value == null) {
14934
          unsetOrderId();
14935
        } else {
14936
          setOrderId((Long)value);
14937
        }
14938
        break;
14939
 
14940
      }
14941
    }
14942
 
14943
    public void setFieldValue(int fieldID, Object value) {
14944
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14945
    }
14946
 
14947
    public Object getFieldValue(_Fields field) {
14948
      switch (field) {
14949
      case ORDER_ID:
14950
        return new Long(getOrderId());
14951
 
14952
      }
14953
      throw new IllegalStateException();
14954
    }
14955
 
14956
    public Object getFieldValue(int fieldId) {
14957
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14958
    }
14959
 
14960
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14961
    public boolean isSet(_Fields field) {
14962
      switch (field) {
14963
      case ORDER_ID:
14964
        return isSetOrderId();
14965
      }
14966
      throw new IllegalStateException();
14967
    }
14968
 
14969
    public boolean isSet(int fieldID) {
14970
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14971
    }
14972
 
14973
    @Override
14974
    public boolean equals(Object that) {
14975
      if (that == null)
14976
        return false;
14977
      if (that instanceof billOrder_args)
14978
        return this.equals((billOrder_args)that);
14979
      return false;
14980
    }
14981
 
14982
    public boolean equals(billOrder_args that) {
14983
      if (that == null)
14984
        return false;
14985
 
14986
      boolean this_present_orderId = true;
14987
      boolean that_present_orderId = true;
14988
      if (this_present_orderId || that_present_orderId) {
14989
        if (!(this_present_orderId && that_present_orderId))
14990
          return false;
14991
        if (this.orderId != that.orderId)
14992
          return false;
14993
      }
14994
 
14995
      return true;
14996
    }
14997
 
14998
    @Override
14999
    public int hashCode() {
15000
      return 0;
15001
    }
15002
 
15003
    public int compareTo(billOrder_args other) {
15004
      if (!getClass().equals(other.getClass())) {
15005
        return getClass().getName().compareTo(other.getClass().getName());
15006
      }
15007
 
15008
      int lastComparison = 0;
15009
      billOrder_args typedOther = (billOrder_args)other;
15010
 
15011
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
15012
      if (lastComparison != 0) {
15013
        return lastComparison;
15014
      }
15015
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
15016
      if (lastComparison != 0) {
15017
        return lastComparison;
15018
      }
15019
      return 0;
15020
    }
15021
 
15022
    public void read(TProtocol iprot) throws TException {
15023
      TField field;
15024
      iprot.readStructBegin();
15025
      while (true)
15026
      {
15027
        field = iprot.readFieldBegin();
15028
        if (field.type == TType.STOP) { 
15029
          break;
15030
        }
15031
        _Fields fieldId = _Fields.findByThriftId(field.id);
15032
        if (fieldId == null) {
15033
          TProtocolUtil.skip(iprot, field.type);
15034
        } else {
15035
          switch (fieldId) {
15036
            case ORDER_ID:
15037
              if (field.type == TType.I64) {
15038
                this.orderId = iprot.readI64();
15039
                setOrderIdIsSet(true);
15040
              } else { 
15041
                TProtocolUtil.skip(iprot, field.type);
15042
              }
15043
              break;
15044
          }
15045
          iprot.readFieldEnd();
15046
        }
15047
      }
15048
      iprot.readStructEnd();
15049
      validate();
15050
    }
15051
 
15052
    public void write(TProtocol oprot) throws TException {
15053
      validate();
15054
 
15055
      oprot.writeStructBegin(STRUCT_DESC);
15056
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
15057
      oprot.writeI64(this.orderId);
15058
      oprot.writeFieldEnd();
15059
      oprot.writeFieldStop();
15060
      oprot.writeStructEnd();
15061
    }
15062
 
15063
    @Override
15064
    public String toString() {
15065
      StringBuilder sb = new StringBuilder("billOrder_args(");
15066
      boolean first = true;
15067
 
15068
      sb.append("orderId:");
15069
      sb.append(this.orderId);
15070
      first = false;
15071
      sb.append(")");
15072
      return sb.toString();
15073
    }
15074
 
15075
    public void validate() throws TException {
15076
      // check for required fields
15077
    }
15078
 
15079
  }
15080
 
15081
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
15082
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
15083
 
15084
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
15085
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15086
 
15087
    private boolean success;
15088
    private TransactionServiceException ex;
15089
 
15090
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15091
    public enum _Fields implements TFieldIdEnum {
15092
      SUCCESS((short)0, "success"),
15093
      EX((short)1, "ex");
15094
 
15095
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15097
 
15098
      static {
15099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15100
          byId.put((int)field._thriftId, field);
15101
          byName.put(field.getFieldName(), field);
15102
        }
15103
      }
15104
 
15105
      /**
15106
       * Find the _Fields constant that matches fieldId, or null if its not found.
15107
       */
15108
      public static _Fields findByThriftId(int fieldId) {
15109
        return byId.get(fieldId);
15110
      }
15111
 
15112
      /**
15113
       * Find the _Fields constant that matches fieldId, throwing an exception
15114
       * if it is not found.
15115
       */
15116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15117
        _Fields fields = findByThriftId(fieldId);
15118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15119
        return fields;
15120
      }
15121
 
15122
      /**
15123
       * Find the _Fields constant that matches name, or null if its not found.
15124
       */
15125
      public static _Fields findByName(String name) {
15126
        return byName.get(name);
15127
      }
15128
 
15129
      private final short _thriftId;
15130
      private final String _fieldName;
15131
 
15132
      _Fields(short thriftId, String fieldName) {
15133
        _thriftId = thriftId;
15134
        _fieldName = fieldName;
15135
      }
15136
 
15137
      public short getThriftFieldId() {
15138
        return _thriftId;
15139
      }
15140
 
15141
      public String getFieldName() {
15142
        return _fieldName;
15143
      }
15144
    }
15145
 
15146
    // isset id assignments
15147
    private static final int __SUCCESS_ISSET_ID = 0;
15148
    private BitSet __isset_bit_vector = new BitSet(1);
15149
 
15150
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15151
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
15152
          new FieldValueMetaData(TType.BOOL)));
15153
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15154
          new FieldValueMetaData(TType.STRUCT)));
15155
    }});
15156
 
15157
    static {
15158
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
15159
    }
15160
 
15161
    public billOrder_result() {
15162
    }
15163
 
15164
    public billOrder_result(
15165
      boolean success,
15166
      TransactionServiceException ex)
15167
    {
15168
      this();
15169
      this.success = success;
15170
      setSuccessIsSet(true);
15171
      this.ex = ex;
15172
    }
15173
 
15174
    /**
15175
     * Performs a deep copy on <i>other</i>.
15176
     */
15177
    public billOrder_result(billOrder_result other) {
15178
      __isset_bit_vector.clear();
15179
      __isset_bit_vector.or(other.__isset_bit_vector);
15180
      this.success = other.success;
15181
      if (other.isSetEx()) {
15182
        this.ex = new TransactionServiceException(other.ex);
15183
      }
15184
    }
15185
 
15186
    public billOrder_result deepCopy() {
15187
      return new billOrder_result(this);
15188
    }
15189
 
15190
    @Deprecated
15191
    public billOrder_result clone() {
15192
      return new billOrder_result(this);
15193
    }
15194
 
15195
    public boolean isSuccess() {
15196
      return this.success;
15197
    }
15198
 
15199
    public billOrder_result setSuccess(boolean success) {
15200
      this.success = success;
15201
      setSuccessIsSet(true);
15202
      return this;
15203
    }
15204
 
15205
    public void unsetSuccess() {
15206
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15207
    }
15208
 
15209
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15210
    public boolean isSetSuccess() {
15211
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15212
    }
15213
 
15214
    public void setSuccessIsSet(boolean value) {
15215
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15216
    }
15217
 
15218
    public TransactionServiceException getEx() {
15219
      return this.ex;
15220
    }
15221
 
15222
    public billOrder_result setEx(TransactionServiceException ex) {
15223
      this.ex = ex;
15224
      return this;
15225
    }
15226
 
15227
    public void unsetEx() {
15228
      this.ex = null;
15229
    }
15230
 
15231
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15232
    public boolean isSetEx() {
15233
      return this.ex != null;
15234
    }
15235
 
15236
    public void setExIsSet(boolean value) {
15237
      if (!value) {
15238
        this.ex = null;
15239
      }
15240
    }
15241
 
15242
    public void setFieldValue(_Fields field, Object value) {
15243
      switch (field) {
15244
      case SUCCESS:
15245
        if (value == null) {
15246
          unsetSuccess();
15247
        } else {
15248
          setSuccess((Boolean)value);
15249
        }
15250
        break;
15251
 
15252
      case EX:
15253
        if (value == null) {
15254
          unsetEx();
15255
        } else {
15256
          setEx((TransactionServiceException)value);
15257
        }
15258
        break;
15259
 
15260
      }
15261
    }
15262
 
15263
    public void setFieldValue(int fieldID, Object value) {
15264
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15265
    }
15266
 
15267
    public Object getFieldValue(_Fields field) {
15268
      switch (field) {
15269
      case SUCCESS:
15270
        return new Boolean(isSuccess());
15271
 
15272
      case EX:
15273
        return getEx();
15274
 
15275
      }
15276
      throw new IllegalStateException();
15277
    }
15278
 
15279
    public Object getFieldValue(int fieldId) {
15280
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15281
    }
15282
 
15283
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15284
    public boolean isSet(_Fields field) {
15285
      switch (field) {
15286
      case SUCCESS:
15287
        return isSetSuccess();
15288
      case EX:
15289
        return isSetEx();
15290
      }
15291
      throw new IllegalStateException();
15292
    }
15293
 
15294
    public boolean isSet(int fieldID) {
15295
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15296
    }
15297
 
15298
    @Override
15299
    public boolean equals(Object that) {
15300
      if (that == null)
15301
        return false;
15302
      if (that instanceof billOrder_result)
15303
        return this.equals((billOrder_result)that);
15304
      return false;
15305
    }
15306
 
15307
    public boolean equals(billOrder_result that) {
15308
      if (that == null)
15309
        return false;
15310
 
15311
      boolean this_present_success = true;
15312
      boolean that_present_success = true;
15313
      if (this_present_success || that_present_success) {
15314
        if (!(this_present_success && that_present_success))
15315
          return false;
15316
        if (this.success != that.success)
15317
          return false;
15318
      }
15319
 
15320
      boolean this_present_ex = true && this.isSetEx();
15321
      boolean that_present_ex = true && that.isSetEx();
15322
      if (this_present_ex || that_present_ex) {
15323
        if (!(this_present_ex && that_present_ex))
15324
          return false;
15325
        if (!this.ex.equals(that.ex))
15326
          return false;
15327
      }
15328
 
15329
      return true;
15330
    }
15331
 
15332
    @Override
15333
    public int hashCode() {
15334
      return 0;
15335
    }
15336
 
15337
    public int compareTo(billOrder_result other) {
15338
      if (!getClass().equals(other.getClass())) {
15339
        return getClass().getName().compareTo(other.getClass().getName());
15340
      }
15341
 
15342
      int lastComparison = 0;
15343
      billOrder_result typedOther = (billOrder_result)other;
15344
 
15345
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15346
      if (lastComparison != 0) {
15347
        return lastComparison;
15348
      }
15349
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15350
      if (lastComparison != 0) {
15351
        return lastComparison;
15352
      }
15353
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15354
      if (lastComparison != 0) {
15355
        return lastComparison;
15356
      }
15357
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15358
      if (lastComparison != 0) {
15359
        return lastComparison;
15360
      }
15361
      return 0;
15362
    }
15363
 
15364
    public void read(TProtocol iprot) throws TException {
15365
      TField field;
15366
      iprot.readStructBegin();
15367
      while (true)
15368
      {
15369
        field = iprot.readFieldBegin();
15370
        if (field.type == TType.STOP) { 
15371
          break;
15372
        }
15373
        _Fields fieldId = _Fields.findByThriftId(field.id);
15374
        if (fieldId == null) {
15375
          TProtocolUtil.skip(iprot, field.type);
15376
        } else {
15377
          switch (fieldId) {
15378
            case SUCCESS:
15379
              if (field.type == TType.BOOL) {
15380
                this.success = iprot.readBool();
15381
                setSuccessIsSet(true);
15382
              } else { 
15383
                TProtocolUtil.skip(iprot, field.type);
15384
              }
15385
              break;
15386
            case EX:
15387
              if (field.type == TType.STRUCT) {
15388
                this.ex = new TransactionServiceException();
15389
                this.ex.read(iprot);
15390
              } else { 
15391
                TProtocolUtil.skip(iprot, field.type);
15392
              }
15393
              break;
15394
          }
15395
          iprot.readFieldEnd();
15396
        }
15397
      }
15398
      iprot.readStructEnd();
15399
      validate();
15400
    }
15401
 
15402
    public void write(TProtocol oprot) throws TException {
15403
      oprot.writeStructBegin(STRUCT_DESC);
15404
 
15405
      if (this.isSetSuccess()) {
15406
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15407
        oprot.writeBool(this.success);
15408
        oprot.writeFieldEnd();
15409
      } else if (this.isSetEx()) {
15410
        oprot.writeFieldBegin(EX_FIELD_DESC);
15411
        this.ex.write(oprot);
15412
        oprot.writeFieldEnd();
15413
      }
15414
      oprot.writeFieldStop();
15415
      oprot.writeStructEnd();
15416
    }
15417
 
15418
    @Override
15419
    public String toString() {
15420
      StringBuilder sb = new StringBuilder("billOrder_result(");
15421
      boolean first = true;
15422
 
15423
      sb.append("success:");
15424
      sb.append(this.success);
15425
      first = false;
15426
      if (!first) sb.append(", ");
15427
      sb.append("ex:");
15428
      if (this.ex == null) {
15429
        sb.append("null");
15430
      } else {
15431
        sb.append(this.ex);
15432
      }
15433
      first = false;
15434
      sb.append(")");
15435
      return sb.toString();
15436
    }
15437
 
15438
    public void validate() throws TException {
15439
      // check for required fields
15440
    }
15441
 
15442
  }
15443
 
483 rajveer 15444
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
15445
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 15446
 
15447
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 15448
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 15449
 
15450
    private long transactionId;
1529 ankur.sing 15451
    private long customerId;
68 ashish 15452
 
15453
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15454
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 15455
      TRANSACTION_ID((short)1, "transactionId"),
15456
      CUSTOMER_ID((short)2, "customerId");
68 ashish 15457
 
15458
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15459
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15460
 
15461
      static {
15462
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15463
          byId.put((int)field._thriftId, field);
15464
          byName.put(field.getFieldName(), field);
15465
        }
15466
      }
15467
 
15468
      /**
15469
       * Find the _Fields constant that matches fieldId, or null if its not found.
15470
       */
15471
      public static _Fields findByThriftId(int fieldId) {
15472
        return byId.get(fieldId);
15473
      }
15474
 
15475
      /**
15476
       * Find the _Fields constant that matches fieldId, throwing an exception
15477
       * if it is not found.
15478
       */
15479
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15480
        _Fields fields = findByThriftId(fieldId);
15481
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15482
        return fields;
15483
      }
15484
 
15485
      /**
15486
       * Find the _Fields constant that matches name, or null if its not found.
15487
       */
15488
      public static _Fields findByName(String name) {
15489
        return byName.get(name);
15490
      }
15491
 
15492
      private final short _thriftId;
15493
      private final String _fieldName;
15494
 
15495
      _Fields(short thriftId, String fieldName) {
15496
        _thriftId = thriftId;
15497
        _fieldName = fieldName;
15498
      }
15499
 
15500
      public short getThriftFieldId() {
15501
        return _thriftId;
15502
      }
15503
 
15504
      public String getFieldName() {
15505
        return _fieldName;
15506
      }
15507
    }
15508
 
15509
    // isset id assignments
15510
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 15511
    private static final int __CUSTOMERID_ISSET_ID = 1;
15512
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 15513
 
15514
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15515
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15516
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 15517
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
15518
          new FieldValueMetaData(TType.I64)));
68 ashish 15519
    }});
15520
 
15521
    static {
483 rajveer 15522
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 15523
    }
15524
 
483 rajveer 15525
    public getOrdersForTransaction_args() {
68 ashish 15526
    }
15527
 
483 rajveer 15528
    public getOrdersForTransaction_args(
1529 ankur.sing 15529
      long transactionId,
15530
      long customerId)
68 ashish 15531
    {
15532
      this();
15533
      this.transactionId = transactionId;
15534
      setTransactionIdIsSet(true);
1529 ankur.sing 15535
      this.customerId = customerId;
15536
      setCustomerIdIsSet(true);
68 ashish 15537
    }
15538
 
15539
    /**
15540
     * Performs a deep copy on <i>other</i>.
15541
     */
483 rajveer 15542
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 15543
      __isset_bit_vector.clear();
15544
      __isset_bit_vector.or(other.__isset_bit_vector);
15545
      this.transactionId = other.transactionId;
1529 ankur.sing 15546
      this.customerId = other.customerId;
68 ashish 15547
    }
15548
 
483 rajveer 15549
    public getOrdersForTransaction_args deepCopy() {
15550
      return new getOrdersForTransaction_args(this);
68 ashish 15551
    }
15552
 
15553
    @Deprecated
483 rajveer 15554
    public getOrdersForTransaction_args clone() {
15555
      return new getOrdersForTransaction_args(this);
68 ashish 15556
    }
15557
 
15558
    public long getTransactionId() {
15559
      return this.transactionId;
15560
    }
15561
 
483 rajveer 15562
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 15563
      this.transactionId = transactionId;
15564
      setTransactionIdIsSet(true);
15565
      return this;
15566
    }
15567
 
15568
    public void unsetTransactionId() {
15569
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15570
    }
15571
 
15572
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15573
    public boolean isSetTransactionId() {
15574
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15575
    }
15576
 
15577
    public void setTransactionIdIsSet(boolean value) {
15578
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15579
    }
15580
 
1529 ankur.sing 15581
    public long getCustomerId() {
15582
      return this.customerId;
15583
    }
15584
 
15585
    public getOrdersForTransaction_args setCustomerId(long customerId) {
15586
      this.customerId = customerId;
15587
      setCustomerIdIsSet(true);
15588
      return this;
15589
    }
15590
 
15591
    public void unsetCustomerId() {
15592
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
15593
    }
15594
 
15595
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15596
    public boolean isSetCustomerId() {
15597
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
15598
    }
15599
 
15600
    public void setCustomerIdIsSet(boolean value) {
15601
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
15602
    }
15603
 
68 ashish 15604
    public void setFieldValue(_Fields field, Object value) {
15605
      switch (field) {
15606
      case TRANSACTION_ID:
15607
        if (value == null) {
15608
          unsetTransactionId();
15609
        } else {
15610
          setTransactionId((Long)value);
15611
        }
15612
        break;
15613
 
1529 ankur.sing 15614
      case CUSTOMER_ID:
15615
        if (value == null) {
15616
          unsetCustomerId();
15617
        } else {
15618
          setCustomerId((Long)value);
15619
        }
15620
        break;
15621
 
68 ashish 15622
      }
15623
    }
15624
 
15625
    public void setFieldValue(int fieldID, Object value) {
15626
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15627
    }
15628
 
15629
    public Object getFieldValue(_Fields field) {
15630
      switch (field) {
15631
      case TRANSACTION_ID:
15632
        return new Long(getTransactionId());
15633
 
1529 ankur.sing 15634
      case CUSTOMER_ID:
15635
        return new Long(getCustomerId());
15636
 
68 ashish 15637
      }
15638
      throw new IllegalStateException();
15639
    }
15640
 
15641
    public Object getFieldValue(int fieldId) {
15642
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15643
    }
15644
 
15645
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15646
    public boolean isSet(_Fields field) {
15647
      switch (field) {
15648
      case TRANSACTION_ID:
15649
        return isSetTransactionId();
1529 ankur.sing 15650
      case CUSTOMER_ID:
15651
        return isSetCustomerId();
68 ashish 15652
      }
15653
      throw new IllegalStateException();
15654
    }
15655
 
15656
    public boolean isSet(int fieldID) {
15657
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15658
    }
15659
 
15660
    @Override
15661
    public boolean equals(Object that) {
15662
      if (that == null)
15663
        return false;
483 rajveer 15664
      if (that instanceof getOrdersForTransaction_args)
15665
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 15666
      return false;
15667
    }
15668
 
483 rajveer 15669
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 15670
      if (that == null)
15671
        return false;
15672
 
15673
      boolean this_present_transactionId = true;
15674
      boolean that_present_transactionId = true;
15675
      if (this_present_transactionId || that_present_transactionId) {
15676
        if (!(this_present_transactionId && that_present_transactionId))
15677
          return false;
15678
        if (this.transactionId != that.transactionId)
15679
          return false;
15680
      }
15681
 
1529 ankur.sing 15682
      boolean this_present_customerId = true;
15683
      boolean that_present_customerId = true;
15684
      if (this_present_customerId || that_present_customerId) {
15685
        if (!(this_present_customerId && that_present_customerId))
15686
          return false;
15687
        if (this.customerId != that.customerId)
15688
          return false;
15689
      }
15690
 
68 ashish 15691
      return true;
15692
    }
15693
 
15694
    @Override
15695
    public int hashCode() {
15696
      return 0;
15697
    }
15698
 
483 rajveer 15699
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 15700
      if (!getClass().equals(other.getClass())) {
15701
        return getClass().getName().compareTo(other.getClass().getName());
15702
      }
15703
 
15704
      int lastComparison = 0;
483 rajveer 15705
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 15706
 
15707
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15708
      if (lastComparison != 0) {
15709
        return lastComparison;
15710
      }
15711
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15712
      if (lastComparison != 0) {
15713
        return lastComparison;
15714
      }
1529 ankur.sing 15715
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
15716
      if (lastComparison != 0) {
15717
        return lastComparison;
15718
      }
15719
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
15720
      if (lastComparison != 0) {
15721
        return lastComparison;
15722
      }
68 ashish 15723
      return 0;
15724
    }
15725
 
15726
    public void read(TProtocol iprot) throws TException {
15727
      TField field;
15728
      iprot.readStructBegin();
15729
      while (true)
15730
      {
15731
        field = iprot.readFieldBegin();
15732
        if (field.type == TType.STOP) { 
15733
          break;
15734
        }
15735
        _Fields fieldId = _Fields.findByThriftId(field.id);
15736
        if (fieldId == null) {
15737
          TProtocolUtil.skip(iprot, field.type);
15738
        } else {
15739
          switch (fieldId) {
15740
            case TRANSACTION_ID:
15741
              if (field.type == TType.I64) {
15742
                this.transactionId = iprot.readI64();
15743
                setTransactionIdIsSet(true);
15744
              } else { 
15745
                TProtocolUtil.skip(iprot, field.type);
15746
              }
15747
              break;
1529 ankur.sing 15748
            case CUSTOMER_ID:
15749
              if (field.type == TType.I64) {
15750
                this.customerId = iprot.readI64();
15751
                setCustomerIdIsSet(true);
15752
              } else { 
15753
                TProtocolUtil.skip(iprot, field.type);
15754
              }
15755
              break;
68 ashish 15756
          }
15757
          iprot.readFieldEnd();
15758
        }
15759
      }
15760
      iprot.readStructEnd();
15761
      validate();
15762
    }
15763
 
15764
    public void write(TProtocol oprot) throws TException {
15765
      validate();
15766
 
15767
      oprot.writeStructBegin(STRUCT_DESC);
15768
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15769
      oprot.writeI64(this.transactionId);
15770
      oprot.writeFieldEnd();
1529 ankur.sing 15771
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15772
      oprot.writeI64(this.customerId);
15773
      oprot.writeFieldEnd();
68 ashish 15774
      oprot.writeFieldStop();
15775
      oprot.writeStructEnd();
15776
    }
15777
 
15778
    @Override
15779
    public String toString() {
483 rajveer 15780
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15781
      boolean first = true;
15782
 
15783
      sb.append("transactionId:");
15784
      sb.append(this.transactionId);
15785
      first = false;
1529 ankur.sing 15786
      if (!first) sb.append(", ");
15787
      sb.append("customerId:");
15788
      sb.append(this.customerId);
15789
      first = false;
68 ashish 15790
      sb.append(")");
15791
      return sb.toString();
15792
    }
15793
 
15794
    public void validate() throws TException {
15795
      // check for required fields
15796
    }
15797
 
15798
  }
15799
 
483 rajveer 15800
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15801
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15802
 
483 rajveer 15803
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15804
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15805
 
483 rajveer 15806
    private List<Order> success;
68 ashish 15807
    private TransactionServiceException ex;
15808
 
15809
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15810
    public enum _Fields implements TFieldIdEnum {
15811
      SUCCESS((short)0, "success"),
15812
      EX((short)1, "ex");
15813
 
15814
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15815
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15816
 
15817
      static {
15818
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15819
          byId.put((int)field._thriftId, field);
15820
          byName.put(field.getFieldName(), field);
15821
        }
15822
      }
15823
 
15824
      /**
15825
       * Find the _Fields constant that matches fieldId, or null if its not found.
15826
       */
15827
      public static _Fields findByThriftId(int fieldId) {
15828
        return byId.get(fieldId);
15829
      }
15830
 
15831
      /**
15832
       * Find the _Fields constant that matches fieldId, throwing an exception
15833
       * if it is not found.
15834
       */
15835
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15836
        _Fields fields = findByThriftId(fieldId);
15837
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15838
        return fields;
15839
      }
15840
 
15841
      /**
15842
       * Find the _Fields constant that matches name, or null if its not found.
15843
       */
15844
      public static _Fields findByName(String name) {
15845
        return byName.get(name);
15846
      }
15847
 
15848
      private final short _thriftId;
15849
      private final String _fieldName;
15850
 
15851
      _Fields(short thriftId, String fieldName) {
15852
        _thriftId = thriftId;
15853
        _fieldName = fieldName;
15854
      }
15855
 
15856
      public short getThriftFieldId() {
15857
        return _thriftId;
15858
      }
15859
 
15860
      public String getFieldName() {
15861
        return _fieldName;
15862
      }
15863
    }
15864
 
15865
    // isset id assignments
15866
 
15867
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15868
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15869
          new ListMetaData(TType.LIST, 
15870
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15871
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15872
          new FieldValueMetaData(TType.STRUCT)));
15873
    }});
15874
 
15875
    static {
483 rajveer 15876
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15877
    }
15878
 
483 rajveer 15879
    public getOrdersForTransaction_result() {
68 ashish 15880
    }
15881
 
483 rajveer 15882
    public getOrdersForTransaction_result(
15883
      List<Order> success,
68 ashish 15884
      TransactionServiceException ex)
15885
    {
15886
      this();
15887
      this.success = success;
15888
      this.ex = ex;
15889
    }
15890
 
15891
    /**
15892
     * Performs a deep copy on <i>other</i>.
15893
     */
483 rajveer 15894
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15895
      if (other.isSetSuccess()) {
15896
        List<Order> __this__success = new ArrayList<Order>();
15897
        for (Order other_element : other.success) {
15898
          __this__success.add(new Order(other_element));
15899
        }
15900
        this.success = __this__success;
15901
      }
68 ashish 15902
      if (other.isSetEx()) {
15903
        this.ex = new TransactionServiceException(other.ex);
15904
      }
15905
    }
15906
 
483 rajveer 15907
    public getOrdersForTransaction_result deepCopy() {
15908
      return new getOrdersForTransaction_result(this);
68 ashish 15909
    }
15910
 
15911
    @Deprecated
483 rajveer 15912
    public getOrdersForTransaction_result clone() {
15913
      return new getOrdersForTransaction_result(this);
68 ashish 15914
    }
15915
 
483 rajveer 15916
    public int getSuccessSize() {
15917
      return (this.success == null) ? 0 : this.success.size();
15918
    }
15919
 
15920
    public java.util.Iterator<Order> getSuccessIterator() {
15921
      return (this.success == null) ? null : this.success.iterator();
15922
    }
15923
 
15924
    public void addToSuccess(Order elem) {
15925
      if (this.success == null) {
15926
        this.success = new ArrayList<Order>();
15927
      }
15928
      this.success.add(elem);
15929
    }
15930
 
15931
    public List<Order> getSuccess() {
68 ashish 15932
      return this.success;
15933
    }
15934
 
483 rajveer 15935
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15936
      this.success = success;
15937
      return this;
15938
    }
15939
 
15940
    public void unsetSuccess() {
483 rajveer 15941
      this.success = null;
68 ashish 15942
    }
15943
 
15944
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15945
    public boolean isSetSuccess() {
483 rajveer 15946
      return this.success != null;
68 ashish 15947
    }
15948
 
15949
    public void setSuccessIsSet(boolean value) {
483 rajveer 15950
      if (!value) {
15951
        this.success = null;
15952
      }
68 ashish 15953
    }
15954
 
15955
    public TransactionServiceException getEx() {
15956
      return this.ex;
15957
    }
15958
 
483 rajveer 15959
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15960
      this.ex = ex;
15961
      return this;
15962
    }
15963
 
15964
    public void unsetEx() {
15965
      this.ex = null;
15966
    }
15967
 
15968
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15969
    public boolean isSetEx() {
15970
      return this.ex != null;
15971
    }
15972
 
15973
    public void setExIsSet(boolean value) {
15974
      if (!value) {
15975
        this.ex = null;
15976
      }
15977
    }
15978
 
15979
    public void setFieldValue(_Fields field, Object value) {
15980
      switch (field) {
15981
      case SUCCESS:
15982
        if (value == null) {
15983
          unsetSuccess();
15984
        } else {
483 rajveer 15985
          setSuccess((List<Order>)value);
68 ashish 15986
        }
15987
        break;
15988
 
15989
      case EX:
15990
        if (value == null) {
15991
          unsetEx();
15992
        } else {
15993
          setEx((TransactionServiceException)value);
15994
        }
15995
        break;
15996
 
15997
      }
15998
    }
15999
 
16000
    public void setFieldValue(int fieldID, Object value) {
16001
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16002
    }
16003
 
16004
    public Object getFieldValue(_Fields field) {
16005
      switch (field) {
16006
      case SUCCESS:
483 rajveer 16007
        return getSuccess();
68 ashish 16008
 
16009
      case EX:
16010
        return getEx();
16011
 
16012
      }
16013
      throw new IllegalStateException();
16014
    }
16015
 
16016
    public Object getFieldValue(int fieldId) {
16017
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16018
    }
16019
 
16020
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16021
    public boolean isSet(_Fields field) {
16022
      switch (field) {
16023
      case SUCCESS:
16024
        return isSetSuccess();
16025
      case EX:
16026
        return isSetEx();
16027
      }
16028
      throw new IllegalStateException();
16029
    }
16030
 
16031
    public boolean isSet(int fieldID) {
16032
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16033
    }
16034
 
16035
    @Override
16036
    public boolean equals(Object that) {
16037
      if (that == null)
16038
        return false;
483 rajveer 16039
      if (that instanceof getOrdersForTransaction_result)
16040
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 16041
      return false;
16042
    }
16043
 
483 rajveer 16044
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 16045
      if (that == null)
16046
        return false;
16047
 
483 rajveer 16048
      boolean this_present_success = true && this.isSetSuccess();
16049
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16050
      if (this_present_success || that_present_success) {
16051
        if (!(this_present_success && that_present_success))
16052
          return false;
483 rajveer 16053
        if (!this.success.equals(that.success))
68 ashish 16054
          return false;
16055
      }
16056
 
16057
      boolean this_present_ex = true && this.isSetEx();
16058
      boolean that_present_ex = true && that.isSetEx();
16059
      if (this_present_ex || that_present_ex) {
16060
        if (!(this_present_ex && that_present_ex))
16061
          return false;
16062
        if (!this.ex.equals(that.ex))
16063
          return false;
16064
      }
16065
 
16066
      return true;
16067
    }
16068
 
16069
    @Override
16070
    public int hashCode() {
16071
      return 0;
16072
    }
16073
 
483 rajveer 16074
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 16075
      if (!getClass().equals(other.getClass())) {
16076
        return getClass().getName().compareTo(other.getClass().getName());
16077
      }
16078
 
16079
      int lastComparison = 0;
483 rajveer 16080
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 16081
 
16082
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16083
      if (lastComparison != 0) {
16084
        return lastComparison;
16085
      }
16086
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16087
      if (lastComparison != 0) {
16088
        return lastComparison;
16089
      }
16090
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16091
      if (lastComparison != 0) {
16092
        return lastComparison;
16093
      }
16094
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16095
      if (lastComparison != 0) {
16096
        return lastComparison;
16097
      }
16098
      return 0;
16099
    }
16100
 
16101
    public void read(TProtocol iprot) throws TException {
16102
      TField field;
16103
      iprot.readStructBegin();
16104
      while (true)
16105
      {
16106
        field = iprot.readFieldBegin();
16107
        if (field.type == TType.STOP) { 
16108
          break;
16109
        }
16110
        _Fields fieldId = _Fields.findByThriftId(field.id);
16111
        if (fieldId == null) {
16112
          TProtocolUtil.skip(iprot, field.type);
16113
        } else {
16114
          switch (fieldId) {
16115
            case SUCCESS:
483 rajveer 16116
              if (field.type == TType.LIST) {
16117
                {
1382 varun.gupt 16118
                  TList _list32 = iprot.readListBegin();
16119
                  this.success = new ArrayList<Order>(_list32.size);
16120
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 16121
                  {
1382 varun.gupt 16122
                    Order _elem34;
16123
                    _elem34 = new Order();
16124
                    _elem34.read(iprot);
16125
                    this.success.add(_elem34);
483 rajveer 16126
                  }
16127
                  iprot.readListEnd();
16128
                }
68 ashish 16129
              } else { 
16130
                TProtocolUtil.skip(iprot, field.type);
16131
              }
16132
              break;
16133
            case EX:
16134
              if (field.type == TType.STRUCT) {
16135
                this.ex = new TransactionServiceException();
16136
                this.ex.read(iprot);
16137
              } else { 
16138
                TProtocolUtil.skip(iprot, field.type);
16139
              }
16140
              break;
16141
          }
16142
          iprot.readFieldEnd();
16143
        }
16144
      }
16145
      iprot.readStructEnd();
16146
      validate();
16147
    }
16148
 
16149
    public void write(TProtocol oprot) throws TException {
16150
      oprot.writeStructBegin(STRUCT_DESC);
16151
 
16152
      if (this.isSetSuccess()) {
16153
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16154
        {
16155
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16156
          for (Order _iter35 : this.success)
483 rajveer 16157
          {
1382 varun.gupt 16158
            _iter35.write(oprot);
483 rajveer 16159
          }
16160
          oprot.writeListEnd();
16161
        }
68 ashish 16162
        oprot.writeFieldEnd();
16163
      } else if (this.isSetEx()) {
16164
        oprot.writeFieldBegin(EX_FIELD_DESC);
16165
        this.ex.write(oprot);
16166
        oprot.writeFieldEnd();
16167
      }
16168
      oprot.writeFieldStop();
16169
      oprot.writeStructEnd();
16170
    }
16171
 
16172
    @Override
16173
    public String toString() {
483 rajveer 16174
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 16175
      boolean first = true;
16176
 
16177
      sb.append("success:");
483 rajveer 16178
      if (this.success == null) {
16179
        sb.append("null");
16180
      } else {
16181
        sb.append(this.success);
16182
      }
68 ashish 16183
      first = false;
16184
      if (!first) sb.append(", ");
16185
      sb.append("ex:");
16186
      if (this.ex == null) {
16187
        sb.append("null");
16188
      } else {
16189
        sb.append(this.ex);
16190
      }
16191
      first = false;
16192
      sb.append(")");
16193
      return sb.toString();
16194
    }
16195
 
16196
    public void validate() throws TException {
16197
      // check for required fields
16198
    }
16199
 
16200
  }
16201
 
483 rajveer 16202
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
16203
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 16204
 
483 rajveer 16205
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
16206
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
16207
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
16208
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 16209
 
483 rajveer 16210
    private long customerId;
16211
    private long from_date;
16212
    private long to_date;
16213
    private OrderStatus status;
68 ashish 16214
 
16215
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16216
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16217
      CUSTOMER_ID((short)1, "customerId"),
16218
      FROM_DATE((short)2, "from_date"),
16219
      TO_DATE((short)3, "to_date"),
16220
      /**
16221
       * 
16222
       * @see OrderStatus
16223
       */
16224
      STATUS((short)4, "status");
68 ashish 16225
 
16226
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16227
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16228
 
16229
      static {
16230
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16231
          byId.put((int)field._thriftId, field);
16232
          byName.put(field.getFieldName(), field);
16233
        }
16234
      }
16235
 
16236
      /**
16237
       * Find the _Fields constant that matches fieldId, or null if its not found.
16238
       */
16239
      public static _Fields findByThriftId(int fieldId) {
16240
        return byId.get(fieldId);
16241
      }
16242
 
16243
      /**
16244
       * Find the _Fields constant that matches fieldId, throwing an exception
16245
       * if it is not found.
16246
       */
16247
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16248
        _Fields fields = findByThriftId(fieldId);
16249
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16250
        return fields;
16251
      }
16252
 
16253
      /**
16254
       * Find the _Fields constant that matches name, or null if its not found.
16255
       */
16256
      public static _Fields findByName(String name) {
16257
        return byName.get(name);
16258
      }
16259
 
16260
      private final short _thriftId;
16261
      private final String _fieldName;
16262
 
16263
      _Fields(short thriftId, String fieldName) {
16264
        _thriftId = thriftId;
16265
        _fieldName = fieldName;
16266
      }
16267
 
16268
      public short getThriftFieldId() {
16269
        return _thriftId;
16270
      }
16271
 
16272
      public String getFieldName() {
16273
        return _fieldName;
16274
      }
16275
    }
16276
 
16277
    // isset id assignments
483 rajveer 16278
    private static final int __CUSTOMERID_ISSET_ID = 0;
16279
    private static final int __FROM_DATE_ISSET_ID = 1;
16280
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 16281
    private BitSet __isset_bit_vector = new BitSet(3);
16282
 
16283
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16284
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 16285
          new FieldValueMetaData(TType.I64)));
483 rajveer 16286
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 16287
          new FieldValueMetaData(TType.I64)));
483 rajveer 16288
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 16289
          new FieldValueMetaData(TType.I64)));
483 rajveer 16290
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16291
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 16292
    }});
16293
 
16294
    static {
483 rajveer 16295
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 16296
    }
16297
 
483 rajveer 16298
    public getOrdersForCustomer_args() {
68 ashish 16299
    }
16300
 
483 rajveer 16301
    public getOrdersForCustomer_args(
16302
      long customerId,
16303
      long from_date,
16304
      long to_date,
16305
      OrderStatus status)
68 ashish 16306
    {
16307
      this();
483 rajveer 16308
      this.customerId = customerId;
16309
      setCustomerIdIsSet(true);
16310
      this.from_date = from_date;
16311
      setFrom_dateIsSet(true);
16312
      this.to_date = to_date;
16313
      setTo_dateIsSet(true);
16314
      this.status = status;
68 ashish 16315
    }
16316
 
16317
    /**
16318
     * Performs a deep copy on <i>other</i>.
16319
     */
483 rajveer 16320
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 16321
      __isset_bit_vector.clear();
16322
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 16323
      this.customerId = other.customerId;
16324
      this.from_date = other.from_date;
16325
      this.to_date = other.to_date;
16326
      if (other.isSetStatus()) {
16327
        this.status = other.status;
16328
      }
68 ashish 16329
    }
16330
 
483 rajveer 16331
    public getOrdersForCustomer_args deepCopy() {
16332
      return new getOrdersForCustomer_args(this);
68 ashish 16333
    }
16334
 
16335
    @Deprecated
483 rajveer 16336
    public getOrdersForCustomer_args clone() {
16337
      return new getOrdersForCustomer_args(this);
68 ashish 16338
    }
16339
 
483 rajveer 16340
    public long getCustomerId() {
16341
      return this.customerId;
68 ashish 16342
    }
16343
 
483 rajveer 16344
    public getOrdersForCustomer_args setCustomerId(long customerId) {
16345
      this.customerId = customerId;
16346
      setCustomerIdIsSet(true);
68 ashish 16347
      return this;
16348
    }
16349
 
483 rajveer 16350
    public void unsetCustomerId() {
16351
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 16352
    }
16353
 
483 rajveer 16354
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
16355
    public boolean isSetCustomerId() {
16356
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 16357
    }
16358
 
483 rajveer 16359
    public void setCustomerIdIsSet(boolean value) {
16360
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 16361
    }
16362
 
483 rajveer 16363
    public long getFrom_date() {
16364
      return this.from_date;
68 ashish 16365
    }
16366
 
483 rajveer 16367
    public getOrdersForCustomer_args setFrom_date(long from_date) {
16368
      this.from_date = from_date;
16369
      setFrom_dateIsSet(true);
68 ashish 16370
      return this;
16371
    }
16372
 
483 rajveer 16373
    public void unsetFrom_date() {
16374
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 16375
    }
16376
 
483 rajveer 16377
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
16378
    public boolean isSetFrom_date() {
16379
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 16380
    }
16381
 
483 rajveer 16382
    public void setFrom_dateIsSet(boolean value) {
16383
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 16384
    }
16385
 
483 rajveer 16386
    public long getTo_date() {
16387
      return this.to_date;
68 ashish 16388
    }
16389
 
483 rajveer 16390
    public getOrdersForCustomer_args setTo_date(long to_date) {
16391
      this.to_date = to_date;
16392
      setTo_dateIsSet(true);
68 ashish 16393
      return this;
16394
    }
16395
 
483 rajveer 16396
    public void unsetTo_date() {
16397
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 16398
    }
16399
 
483 rajveer 16400
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
16401
    public boolean isSetTo_date() {
16402
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 16403
    }
16404
 
483 rajveer 16405
    public void setTo_dateIsSet(boolean value) {
16406
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 16407
    }
16408
 
483 rajveer 16409
    /**
16410
     * 
16411
     * @see OrderStatus
16412
     */
16413
    public OrderStatus getStatus() {
16414
      return this.status;
16415
    }
16416
 
16417
    /**
16418
     * 
16419
     * @see OrderStatus
16420
     */
16421
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
16422
      this.status = status;
16423
      return this;
16424
    }
16425
 
16426
    public void unsetStatus() {
16427
      this.status = null;
16428
    }
16429
 
16430
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16431
    public boolean isSetStatus() {
16432
      return this.status != null;
16433
    }
16434
 
16435
    public void setStatusIsSet(boolean value) {
16436
      if (!value) {
16437
        this.status = null;
16438
      }
16439
    }
16440
 
68 ashish 16441
    public void setFieldValue(_Fields field, Object value) {
16442
      switch (field) {
483 rajveer 16443
      case CUSTOMER_ID:
68 ashish 16444
        if (value == null) {
483 rajveer 16445
          unsetCustomerId();
68 ashish 16446
        } else {
483 rajveer 16447
          setCustomerId((Long)value);
68 ashish 16448
        }
16449
        break;
16450
 
483 rajveer 16451
      case FROM_DATE:
68 ashish 16452
        if (value == null) {
483 rajveer 16453
          unsetFrom_date();
68 ashish 16454
        } else {
483 rajveer 16455
          setFrom_date((Long)value);
68 ashish 16456
        }
16457
        break;
16458
 
483 rajveer 16459
      case TO_DATE:
68 ashish 16460
        if (value == null) {
483 rajveer 16461
          unsetTo_date();
68 ashish 16462
        } else {
483 rajveer 16463
          setTo_date((Long)value);
68 ashish 16464
        }
16465
        break;
16466
 
483 rajveer 16467
      case STATUS:
16468
        if (value == null) {
16469
          unsetStatus();
16470
        } else {
16471
          setStatus((OrderStatus)value);
16472
        }
16473
        break;
16474
 
68 ashish 16475
      }
16476
    }
16477
 
16478
    public void setFieldValue(int fieldID, Object value) {
16479
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16480
    }
16481
 
16482
    public Object getFieldValue(_Fields field) {
16483
      switch (field) {
483 rajveer 16484
      case CUSTOMER_ID:
16485
        return new Long(getCustomerId());
68 ashish 16486
 
483 rajveer 16487
      case FROM_DATE:
16488
        return new Long(getFrom_date());
68 ashish 16489
 
483 rajveer 16490
      case TO_DATE:
16491
        return new Long(getTo_date());
68 ashish 16492
 
483 rajveer 16493
      case STATUS:
16494
        return getStatus();
16495
 
68 ashish 16496
      }
16497
      throw new IllegalStateException();
16498
    }
16499
 
16500
    public Object getFieldValue(int fieldId) {
16501
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16502
    }
16503
 
16504
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16505
    public boolean isSet(_Fields field) {
16506
      switch (field) {
483 rajveer 16507
      case CUSTOMER_ID:
16508
        return isSetCustomerId();
16509
      case FROM_DATE:
16510
        return isSetFrom_date();
16511
      case TO_DATE:
16512
        return isSetTo_date();
16513
      case STATUS:
16514
        return isSetStatus();
68 ashish 16515
      }
16516
      throw new IllegalStateException();
16517
    }
16518
 
16519
    public boolean isSet(int fieldID) {
16520
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16521
    }
16522
 
16523
    @Override
16524
    public boolean equals(Object that) {
16525
      if (that == null)
16526
        return false;
483 rajveer 16527
      if (that instanceof getOrdersForCustomer_args)
16528
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 16529
      return false;
16530
    }
16531
 
483 rajveer 16532
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 16533
      if (that == null)
16534
        return false;
16535
 
483 rajveer 16536
      boolean this_present_customerId = true;
16537
      boolean that_present_customerId = true;
16538
      if (this_present_customerId || that_present_customerId) {
16539
        if (!(this_present_customerId && that_present_customerId))
68 ashish 16540
          return false;
483 rajveer 16541
        if (this.customerId != that.customerId)
68 ashish 16542
          return false;
16543
      }
16544
 
483 rajveer 16545
      boolean this_present_from_date = true;
16546
      boolean that_present_from_date = true;
16547
      if (this_present_from_date || that_present_from_date) {
16548
        if (!(this_present_from_date && that_present_from_date))
68 ashish 16549
          return false;
483 rajveer 16550
        if (this.from_date != that.from_date)
68 ashish 16551
          return false;
16552
      }
16553
 
483 rajveer 16554
      boolean this_present_to_date = true;
16555
      boolean that_present_to_date = true;
16556
      if (this_present_to_date || that_present_to_date) {
16557
        if (!(this_present_to_date && that_present_to_date))
68 ashish 16558
          return false;
483 rajveer 16559
        if (this.to_date != that.to_date)
68 ashish 16560
          return false;
16561
      }
16562
 
483 rajveer 16563
      boolean this_present_status = true && this.isSetStatus();
16564
      boolean that_present_status = true && that.isSetStatus();
16565
      if (this_present_status || that_present_status) {
16566
        if (!(this_present_status && that_present_status))
16567
          return false;
16568
        if (!this.status.equals(that.status))
16569
          return false;
16570
      }
16571
 
68 ashish 16572
      return true;
16573
    }
16574
 
16575
    @Override
16576
    public int hashCode() {
16577
      return 0;
16578
    }
16579
 
483 rajveer 16580
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 16581
      if (!getClass().equals(other.getClass())) {
16582
        return getClass().getName().compareTo(other.getClass().getName());
16583
      }
16584
 
16585
      int lastComparison = 0;
483 rajveer 16586
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 16587
 
483 rajveer 16588
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 16589
      if (lastComparison != 0) {
16590
        return lastComparison;
16591
      }
483 rajveer 16592
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 16593
      if (lastComparison != 0) {
16594
        return lastComparison;
16595
      }
483 rajveer 16596
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 16597
      if (lastComparison != 0) {
16598
        return lastComparison;
16599
      }
483 rajveer 16600
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 16601
      if (lastComparison != 0) {
16602
        return lastComparison;
16603
      }
483 rajveer 16604
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 16605
      if (lastComparison != 0) {
16606
        return lastComparison;
16607
      }
483 rajveer 16608
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 16609
      if (lastComparison != 0) {
16610
        return lastComparison;
16611
      }
483 rajveer 16612
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16613
      if (lastComparison != 0) {
16614
        return lastComparison;
16615
      }
16616
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16617
      if (lastComparison != 0) {
16618
        return lastComparison;
16619
      }
68 ashish 16620
      return 0;
16621
    }
16622
 
16623
    public void read(TProtocol iprot) throws TException {
16624
      TField field;
16625
      iprot.readStructBegin();
16626
      while (true)
16627
      {
16628
        field = iprot.readFieldBegin();
16629
        if (field.type == TType.STOP) { 
16630
          break;
16631
        }
16632
        _Fields fieldId = _Fields.findByThriftId(field.id);
16633
        if (fieldId == null) {
16634
          TProtocolUtil.skip(iprot, field.type);
16635
        } else {
16636
          switch (fieldId) {
483 rajveer 16637
            case CUSTOMER_ID:
68 ashish 16638
              if (field.type == TType.I64) {
483 rajveer 16639
                this.customerId = iprot.readI64();
16640
                setCustomerIdIsSet(true);
68 ashish 16641
              } else { 
16642
                TProtocolUtil.skip(iprot, field.type);
16643
              }
16644
              break;
483 rajveer 16645
            case FROM_DATE:
68 ashish 16646
              if (field.type == TType.I64) {
483 rajveer 16647
                this.from_date = iprot.readI64();
16648
                setFrom_dateIsSet(true);
68 ashish 16649
              } else { 
16650
                TProtocolUtil.skip(iprot, field.type);
16651
              }
16652
              break;
483 rajveer 16653
            case TO_DATE:
68 ashish 16654
              if (field.type == TType.I64) {
483 rajveer 16655
                this.to_date = iprot.readI64();
16656
                setTo_dateIsSet(true);
68 ashish 16657
              } else { 
16658
                TProtocolUtil.skip(iprot, field.type);
16659
              }
16660
              break;
483 rajveer 16661
            case STATUS:
16662
              if (field.type == TType.I32) {
16663
                this.status = OrderStatus.findByValue(iprot.readI32());
16664
              } else { 
16665
                TProtocolUtil.skip(iprot, field.type);
16666
              }
16667
              break;
68 ashish 16668
          }
16669
          iprot.readFieldEnd();
16670
        }
16671
      }
16672
      iprot.readStructEnd();
16673
      validate();
16674
    }
16675
 
16676
    public void write(TProtocol oprot) throws TException {
16677
      validate();
16678
 
16679
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16680
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16681
      oprot.writeI64(this.customerId);
68 ashish 16682
      oprot.writeFieldEnd();
483 rajveer 16683
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
16684
      oprot.writeI64(this.from_date);
68 ashish 16685
      oprot.writeFieldEnd();
483 rajveer 16686
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
16687
      oprot.writeI64(this.to_date);
68 ashish 16688
      oprot.writeFieldEnd();
483 rajveer 16689
      if (this.status != null) {
16690
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16691
        oprot.writeI32(this.status.getValue());
16692
        oprot.writeFieldEnd();
16693
      }
68 ashish 16694
      oprot.writeFieldStop();
16695
      oprot.writeStructEnd();
16696
    }
16697
 
16698
    @Override
16699
    public String toString() {
483 rajveer 16700
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 16701
      boolean first = true;
16702
 
483 rajveer 16703
      sb.append("customerId:");
16704
      sb.append(this.customerId);
68 ashish 16705
      first = false;
16706
      if (!first) sb.append(", ");
483 rajveer 16707
      sb.append("from_date:");
16708
      sb.append(this.from_date);
68 ashish 16709
      first = false;
16710
      if (!first) sb.append(", ");
483 rajveer 16711
      sb.append("to_date:");
16712
      sb.append(this.to_date);
68 ashish 16713
      first = false;
483 rajveer 16714
      if (!first) sb.append(", ");
16715
      sb.append("status:");
16716
      if (this.status == null) {
16717
        sb.append("null");
16718
      } else {
16719
        String status_name = status.name();
16720
        if (status_name != null) {
16721
          sb.append(status_name);
16722
          sb.append(" (");
16723
        }
16724
        sb.append(this.status);
16725
        if (status_name != null) {
16726
          sb.append(")");
16727
        }
16728
      }
16729
      first = false;
68 ashish 16730
      sb.append(")");
16731
      return sb.toString();
16732
    }
16733
 
16734
    public void validate() throws TException {
16735
      // check for required fields
16736
    }
16737
 
16738
  }
16739
 
483 rajveer 16740
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
16741
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 16742
 
483 rajveer 16743
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16744
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16745
 
483 rajveer 16746
    private List<Order> success;
68 ashish 16747
    private TransactionServiceException ex;
16748
 
16749
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16750
    public enum _Fields implements TFieldIdEnum {
16751
      SUCCESS((short)0, "success"),
16752
      EX((short)1, "ex");
16753
 
16754
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16755
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16756
 
16757
      static {
16758
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16759
          byId.put((int)field._thriftId, field);
16760
          byName.put(field.getFieldName(), field);
16761
        }
16762
      }
16763
 
16764
      /**
16765
       * Find the _Fields constant that matches fieldId, or null if its not found.
16766
       */
16767
      public static _Fields findByThriftId(int fieldId) {
16768
        return byId.get(fieldId);
16769
      }
16770
 
16771
      /**
16772
       * Find the _Fields constant that matches fieldId, throwing an exception
16773
       * if it is not found.
16774
       */
16775
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16776
        _Fields fields = findByThriftId(fieldId);
16777
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16778
        return fields;
16779
      }
16780
 
16781
      /**
16782
       * Find the _Fields constant that matches name, or null if its not found.
16783
       */
16784
      public static _Fields findByName(String name) {
16785
        return byName.get(name);
16786
      }
16787
 
16788
      private final short _thriftId;
16789
      private final String _fieldName;
16790
 
16791
      _Fields(short thriftId, String fieldName) {
16792
        _thriftId = thriftId;
16793
        _fieldName = fieldName;
16794
      }
16795
 
16796
      public short getThriftFieldId() {
16797
        return _thriftId;
16798
      }
16799
 
16800
      public String getFieldName() {
16801
        return _fieldName;
16802
      }
16803
    }
16804
 
16805
    // isset id assignments
16806
 
16807
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16808
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16809
          new ListMetaData(TType.LIST, 
16810
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16811
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16812
          new FieldValueMetaData(TType.STRUCT)));
16813
    }});
16814
 
16815
    static {
483 rajveer 16816
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16817
    }
16818
 
483 rajveer 16819
    public getOrdersForCustomer_result() {
68 ashish 16820
    }
16821
 
483 rajveer 16822
    public getOrdersForCustomer_result(
16823
      List<Order> success,
68 ashish 16824
      TransactionServiceException ex)
16825
    {
16826
      this();
16827
      this.success = success;
16828
      this.ex = ex;
16829
    }
16830
 
16831
    /**
16832
     * Performs a deep copy on <i>other</i>.
16833
     */
483 rajveer 16834
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16835
      if (other.isSetSuccess()) {
16836
        List<Order> __this__success = new ArrayList<Order>();
16837
        for (Order other_element : other.success) {
16838
          __this__success.add(new Order(other_element));
16839
        }
16840
        this.success = __this__success;
16841
      }
68 ashish 16842
      if (other.isSetEx()) {
16843
        this.ex = new TransactionServiceException(other.ex);
16844
      }
16845
    }
16846
 
483 rajveer 16847
    public getOrdersForCustomer_result deepCopy() {
16848
      return new getOrdersForCustomer_result(this);
68 ashish 16849
    }
16850
 
16851
    @Deprecated
483 rajveer 16852
    public getOrdersForCustomer_result clone() {
16853
      return new getOrdersForCustomer_result(this);
68 ashish 16854
    }
16855
 
483 rajveer 16856
    public int getSuccessSize() {
16857
      return (this.success == null) ? 0 : this.success.size();
16858
    }
16859
 
16860
    public java.util.Iterator<Order> getSuccessIterator() {
16861
      return (this.success == null) ? null : this.success.iterator();
16862
    }
16863
 
16864
    public void addToSuccess(Order elem) {
16865
      if (this.success == null) {
16866
        this.success = new ArrayList<Order>();
16867
      }
16868
      this.success.add(elem);
16869
    }
16870
 
16871
    public List<Order> getSuccess() {
68 ashish 16872
      return this.success;
16873
    }
16874
 
483 rajveer 16875
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16876
      this.success = success;
16877
      return this;
16878
    }
16879
 
16880
    public void unsetSuccess() {
483 rajveer 16881
      this.success = null;
68 ashish 16882
    }
16883
 
16884
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16885
    public boolean isSetSuccess() {
483 rajveer 16886
      return this.success != null;
68 ashish 16887
    }
16888
 
16889
    public void setSuccessIsSet(boolean value) {
483 rajveer 16890
      if (!value) {
16891
        this.success = null;
16892
      }
68 ashish 16893
    }
16894
 
16895
    public TransactionServiceException getEx() {
16896
      return this.ex;
16897
    }
16898
 
483 rajveer 16899
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16900
      this.ex = ex;
16901
      return this;
16902
    }
16903
 
16904
    public void unsetEx() {
16905
      this.ex = null;
16906
    }
16907
 
16908
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16909
    public boolean isSetEx() {
16910
      return this.ex != null;
16911
    }
16912
 
16913
    public void setExIsSet(boolean value) {
16914
      if (!value) {
16915
        this.ex = null;
16916
      }
16917
    }
16918
 
16919
    public void setFieldValue(_Fields field, Object value) {
16920
      switch (field) {
16921
      case SUCCESS:
16922
        if (value == null) {
16923
          unsetSuccess();
16924
        } else {
483 rajveer 16925
          setSuccess((List<Order>)value);
68 ashish 16926
        }
16927
        break;
16928
 
16929
      case EX:
16930
        if (value == null) {
16931
          unsetEx();
16932
        } else {
16933
          setEx((TransactionServiceException)value);
16934
        }
16935
        break;
16936
 
16937
      }
16938
    }
16939
 
16940
    public void setFieldValue(int fieldID, Object value) {
16941
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16942
    }
16943
 
16944
    public Object getFieldValue(_Fields field) {
16945
      switch (field) {
16946
      case SUCCESS:
483 rajveer 16947
        return getSuccess();
68 ashish 16948
 
16949
      case EX:
16950
        return getEx();
16951
 
16952
      }
16953
      throw new IllegalStateException();
16954
    }
16955
 
16956
    public Object getFieldValue(int fieldId) {
16957
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16958
    }
16959
 
16960
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16961
    public boolean isSet(_Fields field) {
16962
      switch (field) {
16963
      case SUCCESS:
16964
        return isSetSuccess();
16965
      case EX:
16966
        return isSetEx();
16967
      }
16968
      throw new IllegalStateException();
16969
    }
16970
 
16971
    public boolean isSet(int fieldID) {
16972
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16973
    }
16974
 
16975
    @Override
16976
    public boolean equals(Object that) {
16977
      if (that == null)
16978
        return false;
483 rajveer 16979
      if (that instanceof getOrdersForCustomer_result)
16980
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16981
      return false;
16982
    }
16983
 
483 rajveer 16984
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16985
      if (that == null)
16986
        return false;
16987
 
483 rajveer 16988
      boolean this_present_success = true && this.isSetSuccess();
16989
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16990
      if (this_present_success || that_present_success) {
16991
        if (!(this_present_success && that_present_success))
16992
          return false;
483 rajveer 16993
        if (!this.success.equals(that.success))
68 ashish 16994
          return false;
16995
      }
16996
 
16997
      boolean this_present_ex = true && this.isSetEx();
16998
      boolean that_present_ex = true && that.isSetEx();
16999
      if (this_present_ex || that_present_ex) {
17000
        if (!(this_present_ex && that_present_ex))
17001
          return false;
17002
        if (!this.ex.equals(that.ex))
17003
          return false;
17004
      }
17005
 
17006
      return true;
17007
    }
17008
 
17009
    @Override
17010
    public int hashCode() {
17011
      return 0;
17012
    }
17013
 
483 rajveer 17014
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 17015
      if (!getClass().equals(other.getClass())) {
17016
        return getClass().getName().compareTo(other.getClass().getName());
17017
      }
17018
 
17019
      int lastComparison = 0;
483 rajveer 17020
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 17021
 
17022
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17023
      if (lastComparison != 0) {
17024
        return lastComparison;
17025
      }
17026
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17027
      if (lastComparison != 0) {
17028
        return lastComparison;
17029
      }
17030
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17031
      if (lastComparison != 0) {
17032
        return lastComparison;
17033
      }
17034
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17035
      if (lastComparison != 0) {
17036
        return lastComparison;
17037
      }
17038
      return 0;
17039
    }
17040
 
17041
    public void read(TProtocol iprot) throws TException {
17042
      TField field;
17043
      iprot.readStructBegin();
17044
      while (true)
17045
      {
17046
        field = iprot.readFieldBegin();
17047
        if (field.type == TType.STOP) { 
17048
          break;
17049
        }
17050
        _Fields fieldId = _Fields.findByThriftId(field.id);
17051
        if (fieldId == null) {
17052
          TProtocolUtil.skip(iprot, field.type);
17053
        } else {
17054
          switch (fieldId) {
17055
            case SUCCESS:
483 rajveer 17056
              if (field.type == TType.LIST) {
17057
                {
1382 varun.gupt 17058
                  TList _list36 = iprot.readListBegin();
17059
                  this.success = new ArrayList<Order>(_list36.size);
17060
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 17061
                  {
1382 varun.gupt 17062
                    Order _elem38;
17063
                    _elem38 = new Order();
17064
                    _elem38.read(iprot);
17065
                    this.success.add(_elem38);
483 rajveer 17066
                  }
17067
                  iprot.readListEnd();
17068
                }
68 ashish 17069
              } else { 
17070
                TProtocolUtil.skip(iprot, field.type);
17071
              }
17072
              break;
17073
            case EX:
17074
              if (field.type == TType.STRUCT) {
17075
                this.ex = new TransactionServiceException();
17076
                this.ex.read(iprot);
17077
              } else { 
17078
                TProtocolUtil.skip(iprot, field.type);
17079
              }
17080
              break;
17081
          }
17082
          iprot.readFieldEnd();
17083
        }
17084
      }
17085
      iprot.readStructEnd();
17086
      validate();
17087
    }
17088
 
17089
    public void write(TProtocol oprot) throws TException {
17090
      oprot.writeStructBegin(STRUCT_DESC);
17091
 
17092
      if (this.isSetSuccess()) {
17093
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17094
        {
17095
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 17096
          for (Order _iter39 : this.success)
483 rajveer 17097
          {
1382 varun.gupt 17098
            _iter39.write(oprot);
483 rajveer 17099
          }
17100
          oprot.writeListEnd();
17101
        }
68 ashish 17102
        oprot.writeFieldEnd();
17103
      } else if (this.isSetEx()) {
17104
        oprot.writeFieldBegin(EX_FIELD_DESC);
17105
        this.ex.write(oprot);
17106
        oprot.writeFieldEnd();
17107
      }
17108
      oprot.writeFieldStop();
17109
      oprot.writeStructEnd();
17110
    }
17111
 
17112
    @Override
17113
    public String toString() {
483 rajveer 17114
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 17115
      boolean first = true;
17116
 
17117
      sb.append("success:");
483 rajveer 17118
      if (this.success == null) {
17119
        sb.append("null");
17120
      } else {
17121
        sb.append(this.success);
17122
      }
68 ashish 17123
      first = false;
17124
      if (!first) sb.append(", ");
17125
      sb.append("ex:");
17126
      if (this.ex == null) {
17127
        sb.append("null");
17128
      } else {
17129
        sb.append(this.ex);
17130
      }
17131
      first = false;
17132
      sb.append(")");
17133
      return sb.toString();
17134
    }
17135
 
17136
    public void validate() throws TException {
17137
      // check for required fields
17138
    }
17139
 
17140
  }
17141
 
483 rajveer 17142
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
17143
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 17144
 
483 rajveer 17145
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 17146
 
483 rajveer 17147
    private Order order;
68 ashish 17148
 
17149
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17150
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17151
      ORDER((short)1, "order");
68 ashish 17152
 
17153
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17154
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17155
 
17156
      static {
17157
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17158
          byId.put((int)field._thriftId, field);
17159
          byName.put(field.getFieldName(), field);
17160
        }
17161
      }
17162
 
17163
      /**
17164
       * Find the _Fields constant that matches fieldId, or null if its not found.
17165
       */
17166
      public static _Fields findByThriftId(int fieldId) {
17167
        return byId.get(fieldId);
17168
      }
17169
 
17170
      /**
17171
       * Find the _Fields constant that matches fieldId, throwing an exception
17172
       * if it is not found.
17173
       */
17174
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17175
        _Fields fields = findByThriftId(fieldId);
17176
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17177
        return fields;
17178
      }
17179
 
17180
      /**
17181
       * Find the _Fields constant that matches name, or null if its not found.
17182
       */
17183
      public static _Fields findByName(String name) {
17184
        return byName.get(name);
17185
      }
17186
 
17187
      private final short _thriftId;
17188
      private final String _fieldName;
17189
 
17190
      _Fields(short thriftId, String fieldName) {
17191
        _thriftId = thriftId;
17192
        _fieldName = fieldName;
17193
      }
17194
 
17195
      public short getThriftFieldId() {
17196
        return _thriftId;
17197
      }
17198
 
17199
      public String getFieldName() {
17200
        return _fieldName;
17201
      }
17202
    }
17203
 
17204
    // isset id assignments
17205
 
17206
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17207
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
17208
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17209
    }});
17210
 
17211
    static {
483 rajveer 17212
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 17213
    }
17214
 
483 rajveer 17215
    public createOrder_args() {
68 ashish 17216
    }
17217
 
483 rajveer 17218
    public createOrder_args(
17219
      Order order)
68 ashish 17220
    {
17221
      this();
483 rajveer 17222
      this.order = order;
68 ashish 17223
    }
17224
 
17225
    /**
17226
     * Performs a deep copy on <i>other</i>.
17227
     */
483 rajveer 17228
    public createOrder_args(createOrder_args other) {
17229
      if (other.isSetOrder()) {
17230
        this.order = new Order(other.order);
17231
      }
68 ashish 17232
    }
17233
 
483 rajveer 17234
    public createOrder_args deepCopy() {
17235
      return new createOrder_args(this);
68 ashish 17236
    }
17237
 
17238
    @Deprecated
483 rajveer 17239
    public createOrder_args clone() {
17240
      return new createOrder_args(this);
68 ashish 17241
    }
17242
 
483 rajveer 17243
    public Order getOrder() {
17244
      return this.order;
68 ashish 17245
    }
17246
 
483 rajveer 17247
    public createOrder_args setOrder(Order order) {
17248
      this.order = order;
68 ashish 17249
      return this;
17250
    }
17251
 
483 rajveer 17252
    public void unsetOrder() {
17253
      this.order = null;
68 ashish 17254
    }
17255
 
483 rajveer 17256
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
17257
    public boolean isSetOrder() {
17258
      return this.order != null;
68 ashish 17259
    }
17260
 
483 rajveer 17261
    public void setOrderIsSet(boolean value) {
17262
      if (!value) {
17263
        this.order = null;
17264
      }
68 ashish 17265
    }
17266
 
17267
    public void setFieldValue(_Fields field, Object value) {
17268
      switch (field) {
483 rajveer 17269
      case ORDER:
68 ashish 17270
        if (value == null) {
483 rajveer 17271
          unsetOrder();
68 ashish 17272
        } else {
483 rajveer 17273
          setOrder((Order)value);
68 ashish 17274
        }
17275
        break;
17276
 
17277
      }
17278
    }
17279
 
17280
    public void setFieldValue(int fieldID, Object value) {
17281
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17282
    }
17283
 
17284
    public Object getFieldValue(_Fields field) {
17285
      switch (field) {
483 rajveer 17286
      case ORDER:
17287
        return getOrder();
68 ashish 17288
 
17289
      }
17290
      throw new IllegalStateException();
17291
    }
17292
 
17293
    public Object getFieldValue(int fieldId) {
17294
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17295
    }
17296
 
17297
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17298
    public boolean isSet(_Fields field) {
17299
      switch (field) {
483 rajveer 17300
      case ORDER:
17301
        return isSetOrder();
68 ashish 17302
      }
17303
      throw new IllegalStateException();
17304
    }
17305
 
17306
    public boolean isSet(int fieldID) {
17307
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17308
    }
17309
 
17310
    @Override
17311
    public boolean equals(Object that) {
17312
      if (that == null)
17313
        return false;
483 rajveer 17314
      if (that instanceof createOrder_args)
17315
        return this.equals((createOrder_args)that);
68 ashish 17316
      return false;
17317
    }
17318
 
483 rajveer 17319
    public boolean equals(createOrder_args that) {
68 ashish 17320
      if (that == null)
17321
        return false;
17322
 
483 rajveer 17323
      boolean this_present_order = true && this.isSetOrder();
17324
      boolean that_present_order = true && that.isSetOrder();
17325
      if (this_present_order || that_present_order) {
17326
        if (!(this_present_order && that_present_order))
68 ashish 17327
          return false;
483 rajveer 17328
        if (!this.order.equals(that.order))
68 ashish 17329
          return false;
17330
      }
17331
 
17332
      return true;
17333
    }
17334
 
17335
    @Override
17336
    public int hashCode() {
17337
      return 0;
17338
    }
17339
 
483 rajveer 17340
    public int compareTo(createOrder_args other) {
68 ashish 17341
      if (!getClass().equals(other.getClass())) {
17342
        return getClass().getName().compareTo(other.getClass().getName());
17343
      }
17344
 
17345
      int lastComparison = 0;
483 rajveer 17346
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 17347
 
483 rajveer 17348
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 17349
      if (lastComparison != 0) {
17350
        return lastComparison;
17351
      }
483 rajveer 17352
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 17353
      if (lastComparison != 0) {
17354
        return lastComparison;
17355
      }
17356
      return 0;
17357
    }
17358
 
17359
    public void read(TProtocol iprot) throws TException {
17360
      TField field;
17361
      iprot.readStructBegin();
17362
      while (true)
17363
      {
17364
        field = iprot.readFieldBegin();
17365
        if (field.type == TType.STOP) { 
17366
          break;
17367
        }
17368
        _Fields fieldId = _Fields.findByThriftId(field.id);
17369
        if (fieldId == null) {
17370
          TProtocolUtil.skip(iprot, field.type);
17371
        } else {
17372
          switch (fieldId) {
483 rajveer 17373
            case ORDER:
17374
              if (field.type == TType.STRUCT) {
17375
                this.order = new Order();
17376
                this.order.read(iprot);
68 ashish 17377
              } else { 
17378
                TProtocolUtil.skip(iprot, field.type);
17379
              }
17380
              break;
17381
          }
17382
          iprot.readFieldEnd();
17383
        }
17384
      }
17385
      iprot.readStructEnd();
17386
      validate();
17387
    }
17388
 
17389
    public void write(TProtocol oprot) throws TException {
17390
      validate();
17391
 
17392
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17393
      if (this.order != null) {
17394
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
17395
        this.order.write(oprot);
17396
        oprot.writeFieldEnd();
17397
      }
68 ashish 17398
      oprot.writeFieldStop();
17399
      oprot.writeStructEnd();
17400
    }
17401
 
17402
    @Override
17403
    public String toString() {
483 rajveer 17404
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 17405
      boolean first = true;
17406
 
483 rajveer 17407
      sb.append("order:");
17408
      if (this.order == null) {
17409
        sb.append("null");
17410
      } else {
17411
        sb.append(this.order);
17412
      }
68 ashish 17413
      first = false;
17414
      sb.append(")");
17415
      return sb.toString();
17416
    }
17417
 
17418
    public void validate() throws TException {
17419
      // check for required fields
17420
    }
17421
 
17422
  }
17423
 
483 rajveer 17424
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
17425
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 17426
 
483 rajveer 17427
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 17428
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17429
 
483 rajveer 17430
    private long success;
68 ashish 17431
    private TransactionServiceException ex;
17432
 
17433
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17434
    public enum _Fields implements TFieldIdEnum {
17435
      SUCCESS((short)0, "success"),
17436
      EX((short)1, "ex");
17437
 
17438
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17439
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17440
 
17441
      static {
17442
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17443
          byId.put((int)field._thriftId, field);
17444
          byName.put(field.getFieldName(), field);
17445
        }
17446
      }
17447
 
17448
      /**
17449
       * Find the _Fields constant that matches fieldId, or null if its not found.
17450
       */
17451
      public static _Fields findByThriftId(int fieldId) {
17452
        return byId.get(fieldId);
17453
      }
17454
 
17455
      /**
17456
       * Find the _Fields constant that matches fieldId, throwing an exception
17457
       * if it is not found.
17458
       */
17459
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17460
        _Fields fields = findByThriftId(fieldId);
17461
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17462
        return fields;
17463
      }
17464
 
17465
      /**
17466
       * Find the _Fields constant that matches name, or null if its not found.
17467
       */
17468
      public static _Fields findByName(String name) {
17469
        return byName.get(name);
17470
      }
17471
 
17472
      private final short _thriftId;
17473
      private final String _fieldName;
17474
 
17475
      _Fields(short thriftId, String fieldName) {
17476
        _thriftId = thriftId;
17477
        _fieldName = fieldName;
17478
      }
17479
 
17480
      public short getThriftFieldId() {
17481
        return _thriftId;
17482
      }
17483
 
17484
      public String getFieldName() {
17485
        return _fieldName;
17486
      }
17487
    }
17488
 
17489
    // isset id assignments
17490
    private static final int __SUCCESS_ISSET_ID = 0;
17491
    private BitSet __isset_bit_vector = new BitSet(1);
17492
 
17493
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17494
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17495
          new FieldValueMetaData(TType.I64)));
68 ashish 17496
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17497
          new FieldValueMetaData(TType.STRUCT)));
17498
    }});
17499
 
17500
    static {
483 rajveer 17501
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 17502
    }
17503
 
483 rajveer 17504
    public createOrder_result() {
68 ashish 17505
    }
17506
 
483 rajveer 17507
    public createOrder_result(
17508
      long success,
68 ashish 17509
      TransactionServiceException ex)
17510
    {
17511
      this();
17512
      this.success = success;
17513
      setSuccessIsSet(true);
17514
      this.ex = ex;
17515
    }
17516
 
17517
    /**
17518
     * Performs a deep copy on <i>other</i>.
17519
     */
483 rajveer 17520
    public createOrder_result(createOrder_result other) {
68 ashish 17521
      __isset_bit_vector.clear();
17522
      __isset_bit_vector.or(other.__isset_bit_vector);
17523
      this.success = other.success;
17524
      if (other.isSetEx()) {
17525
        this.ex = new TransactionServiceException(other.ex);
17526
      }
17527
    }
17528
 
483 rajveer 17529
    public createOrder_result deepCopy() {
17530
      return new createOrder_result(this);
68 ashish 17531
    }
17532
 
17533
    @Deprecated
483 rajveer 17534
    public createOrder_result clone() {
17535
      return new createOrder_result(this);
68 ashish 17536
    }
17537
 
483 rajveer 17538
    public long getSuccess() {
68 ashish 17539
      return this.success;
17540
    }
17541
 
483 rajveer 17542
    public createOrder_result setSuccess(long success) {
68 ashish 17543
      this.success = success;
17544
      setSuccessIsSet(true);
17545
      return this;
17546
    }
17547
 
17548
    public void unsetSuccess() {
17549
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17550
    }
17551
 
17552
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17553
    public boolean isSetSuccess() {
17554
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17555
    }
17556
 
17557
    public void setSuccessIsSet(boolean value) {
17558
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17559
    }
17560
 
17561
    public TransactionServiceException getEx() {
17562
      return this.ex;
17563
    }
17564
 
483 rajveer 17565
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 17566
      this.ex = ex;
17567
      return this;
17568
    }
17569
 
17570
    public void unsetEx() {
17571
      this.ex = null;
17572
    }
17573
 
17574
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17575
    public boolean isSetEx() {
17576
      return this.ex != null;
17577
    }
17578
 
17579
    public void setExIsSet(boolean value) {
17580
      if (!value) {
17581
        this.ex = null;
17582
      }
17583
    }
17584
 
17585
    public void setFieldValue(_Fields field, Object value) {
17586
      switch (field) {
17587
      case SUCCESS:
17588
        if (value == null) {
17589
          unsetSuccess();
17590
        } else {
483 rajveer 17591
          setSuccess((Long)value);
68 ashish 17592
        }
17593
        break;
17594
 
17595
      case EX:
17596
        if (value == null) {
17597
          unsetEx();
17598
        } else {
17599
          setEx((TransactionServiceException)value);
17600
        }
17601
        break;
17602
 
17603
      }
17604
    }
17605
 
17606
    public void setFieldValue(int fieldID, Object value) {
17607
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17608
    }
17609
 
17610
    public Object getFieldValue(_Fields field) {
17611
      switch (field) {
17612
      case SUCCESS:
483 rajveer 17613
        return new Long(getSuccess());
68 ashish 17614
 
17615
      case EX:
17616
        return getEx();
17617
 
17618
      }
17619
      throw new IllegalStateException();
17620
    }
17621
 
17622
    public Object getFieldValue(int fieldId) {
17623
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17624
    }
17625
 
17626
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17627
    public boolean isSet(_Fields field) {
17628
      switch (field) {
17629
      case SUCCESS:
17630
        return isSetSuccess();
17631
      case EX:
17632
        return isSetEx();
17633
      }
17634
      throw new IllegalStateException();
17635
    }
17636
 
17637
    public boolean isSet(int fieldID) {
17638
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17639
    }
17640
 
17641
    @Override
17642
    public boolean equals(Object that) {
17643
      if (that == null)
17644
        return false;
483 rajveer 17645
      if (that instanceof createOrder_result)
17646
        return this.equals((createOrder_result)that);
68 ashish 17647
      return false;
17648
    }
17649
 
483 rajveer 17650
    public boolean equals(createOrder_result that) {
68 ashish 17651
      if (that == null)
17652
        return false;
17653
 
17654
      boolean this_present_success = true;
17655
      boolean that_present_success = true;
17656
      if (this_present_success || that_present_success) {
17657
        if (!(this_present_success && that_present_success))
17658
          return false;
17659
        if (this.success != that.success)
17660
          return false;
17661
      }
17662
 
17663
      boolean this_present_ex = true && this.isSetEx();
17664
      boolean that_present_ex = true && that.isSetEx();
17665
      if (this_present_ex || that_present_ex) {
17666
        if (!(this_present_ex && that_present_ex))
17667
          return false;
17668
        if (!this.ex.equals(that.ex))
17669
          return false;
17670
      }
17671
 
17672
      return true;
17673
    }
17674
 
17675
    @Override
17676
    public int hashCode() {
17677
      return 0;
17678
    }
17679
 
483 rajveer 17680
    public int compareTo(createOrder_result other) {
68 ashish 17681
      if (!getClass().equals(other.getClass())) {
17682
        return getClass().getName().compareTo(other.getClass().getName());
17683
      }
17684
 
17685
      int lastComparison = 0;
483 rajveer 17686
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 17687
 
17688
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17689
      if (lastComparison != 0) {
17690
        return lastComparison;
17691
      }
17692
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17693
      if (lastComparison != 0) {
17694
        return lastComparison;
17695
      }
17696
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17697
      if (lastComparison != 0) {
17698
        return lastComparison;
17699
      }
17700
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17701
      if (lastComparison != 0) {
17702
        return lastComparison;
17703
      }
17704
      return 0;
17705
    }
17706
 
17707
    public void read(TProtocol iprot) throws TException {
17708
      TField field;
17709
      iprot.readStructBegin();
17710
      while (true)
17711
      {
17712
        field = iprot.readFieldBegin();
17713
        if (field.type == TType.STOP) { 
17714
          break;
17715
        }
17716
        _Fields fieldId = _Fields.findByThriftId(field.id);
17717
        if (fieldId == null) {
17718
          TProtocolUtil.skip(iprot, field.type);
17719
        } else {
17720
          switch (fieldId) {
17721
            case SUCCESS:
483 rajveer 17722
              if (field.type == TType.I64) {
17723
                this.success = iprot.readI64();
68 ashish 17724
                setSuccessIsSet(true);
17725
              } else { 
17726
                TProtocolUtil.skip(iprot, field.type);
17727
              }
17728
              break;
17729
            case EX:
17730
              if (field.type == TType.STRUCT) {
17731
                this.ex = new TransactionServiceException();
17732
                this.ex.read(iprot);
17733
              } else { 
17734
                TProtocolUtil.skip(iprot, field.type);
17735
              }
17736
              break;
17737
          }
17738
          iprot.readFieldEnd();
17739
        }
17740
      }
17741
      iprot.readStructEnd();
17742
      validate();
17743
    }
17744
 
17745
    public void write(TProtocol oprot) throws TException {
17746
      oprot.writeStructBegin(STRUCT_DESC);
17747
 
17748
      if (this.isSetSuccess()) {
17749
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17750
        oprot.writeI64(this.success);
68 ashish 17751
        oprot.writeFieldEnd();
17752
      } else if (this.isSetEx()) {
17753
        oprot.writeFieldBegin(EX_FIELD_DESC);
17754
        this.ex.write(oprot);
17755
        oprot.writeFieldEnd();
17756
      }
17757
      oprot.writeFieldStop();
17758
      oprot.writeStructEnd();
17759
    }
17760
 
17761
    @Override
17762
    public String toString() {
483 rajveer 17763
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 17764
      boolean first = true;
17765
 
17766
      sb.append("success:");
17767
      sb.append(this.success);
17768
      first = false;
17769
      if (!first) sb.append(", ");
17770
      sb.append("ex:");
17771
      if (this.ex == null) {
17772
        sb.append("null");
17773
      } else {
17774
        sb.append(this.ex);
17775
      }
17776
      first = false;
17777
      sb.append(")");
17778
      return sb.toString();
17779
    }
17780
 
17781
    public void validate() throws TException {
17782
      // check for required fields
17783
    }
17784
 
17785
  }
17786
 
483 rajveer 17787
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17788
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17789
 
483 rajveer 17790
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17791
 
483 rajveer 17792
    private long id;
68 ashish 17793
 
17794
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17795
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17796
      ID((short)1, "id");
68 ashish 17797
 
17798
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17799
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17800
 
17801
      static {
17802
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17803
          byId.put((int)field._thriftId, field);
17804
          byName.put(field.getFieldName(), field);
17805
        }
17806
      }
17807
 
17808
      /**
17809
       * Find the _Fields constant that matches fieldId, or null if its not found.
17810
       */
17811
      public static _Fields findByThriftId(int fieldId) {
17812
        return byId.get(fieldId);
17813
      }
17814
 
17815
      /**
17816
       * Find the _Fields constant that matches fieldId, throwing an exception
17817
       * if it is not found.
17818
       */
17819
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17820
        _Fields fields = findByThriftId(fieldId);
17821
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17822
        return fields;
17823
      }
17824
 
17825
      /**
17826
       * Find the _Fields constant that matches name, or null if its not found.
17827
       */
17828
      public static _Fields findByName(String name) {
17829
        return byName.get(name);
17830
      }
17831
 
17832
      private final short _thriftId;
17833
      private final String _fieldName;
17834
 
17835
      _Fields(short thriftId, String fieldName) {
17836
        _thriftId = thriftId;
17837
        _fieldName = fieldName;
17838
      }
17839
 
17840
      public short getThriftFieldId() {
17841
        return _thriftId;
17842
      }
17843
 
17844
      public String getFieldName() {
17845
        return _fieldName;
17846
      }
17847
    }
17848
 
17849
    // isset id assignments
483 rajveer 17850
    private static final int __ID_ISSET_ID = 0;
17851
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17852
 
17853
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17854
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17855
          new FieldValueMetaData(TType.I64)));
17856
    }});
17857
 
17858
    static {
483 rajveer 17859
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17860
    }
17861
 
483 rajveer 17862
    public getOrder_args() {
68 ashish 17863
    }
17864
 
483 rajveer 17865
    public getOrder_args(
17866
      long id)
68 ashish 17867
    {
17868
      this();
483 rajveer 17869
      this.id = id;
17870
      setIdIsSet(true);
68 ashish 17871
    }
17872
 
17873
    /**
17874
     * Performs a deep copy on <i>other</i>.
17875
     */
483 rajveer 17876
    public getOrder_args(getOrder_args other) {
68 ashish 17877
      __isset_bit_vector.clear();
17878
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17879
      this.id = other.id;
68 ashish 17880
    }
17881
 
483 rajveer 17882
    public getOrder_args deepCopy() {
17883
      return new getOrder_args(this);
68 ashish 17884
    }
17885
 
17886
    @Deprecated
483 rajveer 17887
    public getOrder_args clone() {
17888
      return new getOrder_args(this);
68 ashish 17889
    }
17890
 
483 rajveer 17891
    public long getId() {
17892
      return this.id;
68 ashish 17893
    }
17894
 
483 rajveer 17895
    public getOrder_args setId(long id) {
17896
      this.id = id;
17897
      setIdIsSet(true);
68 ashish 17898
      return this;
17899
    }
17900
 
483 rajveer 17901
    public void unsetId() {
17902
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17903
    }
17904
 
483 rajveer 17905
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17906
    public boolean isSetId() {
17907
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17908
    }
17909
 
483 rajveer 17910
    public void setIdIsSet(boolean value) {
17911
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17912
    }
17913
 
17914
    public void setFieldValue(_Fields field, Object value) {
17915
      switch (field) {
483 rajveer 17916
      case ID:
68 ashish 17917
        if (value == null) {
483 rajveer 17918
          unsetId();
68 ashish 17919
        } else {
483 rajveer 17920
          setId((Long)value);
68 ashish 17921
        }
17922
        break;
17923
 
17924
      }
17925
    }
17926
 
17927
    public void setFieldValue(int fieldID, Object value) {
17928
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17929
    }
17930
 
17931
    public Object getFieldValue(_Fields field) {
17932
      switch (field) {
483 rajveer 17933
      case ID:
17934
        return new Long(getId());
68 ashish 17935
 
17936
      }
17937
      throw new IllegalStateException();
17938
    }
17939
 
17940
    public Object getFieldValue(int fieldId) {
17941
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17942
    }
17943
 
17944
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17945
    public boolean isSet(_Fields field) {
17946
      switch (field) {
483 rajveer 17947
      case ID:
17948
        return isSetId();
68 ashish 17949
      }
17950
      throw new IllegalStateException();
17951
    }
17952
 
17953
    public boolean isSet(int fieldID) {
17954
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17955
    }
17956
 
17957
    @Override
17958
    public boolean equals(Object that) {
17959
      if (that == null)
17960
        return false;
483 rajveer 17961
      if (that instanceof getOrder_args)
17962
        return this.equals((getOrder_args)that);
68 ashish 17963
      return false;
17964
    }
17965
 
483 rajveer 17966
    public boolean equals(getOrder_args that) {
68 ashish 17967
      if (that == null)
17968
        return false;
17969
 
483 rajveer 17970
      boolean this_present_id = true;
17971
      boolean that_present_id = true;
17972
      if (this_present_id || that_present_id) {
17973
        if (!(this_present_id && that_present_id))
68 ashish 17974
          return false;
483 rajveer 17975
        if (this.id != that.id)
68 ashish 17976
          return false;
17977
      }
17978
 
17979
      return true;
17980
    }
17981
 
17982
    @Override
17983
    public int hashCode() {
17984
      return 0;
17985
    }
17986
 
483 rajveer 17987
    public int compareTo(getOrder_args other) {
68 ashish 17988
      if (!getClass().equals(other.getClass())) {
17989
        return getClass().getName().compareTo(other.getClass().getName());
17990
      }
17991
 
17992
      int lastComparison = 0;
483 rajveer 17993
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17994
 
483 rajveer 17995
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17996
      if (lastComparison != 0) {
17997
        return lastComparison;
17998
      }
483 rajveer 17999
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 18000
      if (lastComparison != 0) {
18001
        return lastComparison;
18002
      }
18003
      return 0;
18004
    }
18005
 
18006
    public void read(TProtocol iprot) throws TException {
18007
      TField field;
18008
      iprot.readStructBegin();
18009
      while (true)
18010
      {
18011
        field = iprot.readFieldBegin();
18012
        if (field.type == TType.STOP) { 
18013
          break;
18014
        }
18015
        _Fields fieldId = _Fields.findByThriftId(field.id);
18016
        if (fieldId == null) {
18017
          TProtocolUtil.skip(iprot, field.type);
18018
        } else {
18019
          switch (fieldId) {
483 rajveer 18020
            case ID:
68 ashish 18021
              if (field.type == TType.I64) {
483 rajveer 18022
                this.id = iprot.readI64();
18023
                setIdIsSet(true);
68 ashish 18024
              } else { 
18025
                TProtocolUtil.skip(iprot, field.type);
18026
              }
18027
              break;
18028
          }
18029
          iprot.readFieldEnd();
18030
        }
18031
      }
18032
      iprot.readStructEnd();
18033
      validate();
18034
    }
18035
 
18036
    public void write(TProtocol oprot) throws TException {
18037
      validate();
18038
 
18039
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18040
      oprot.writeFieldBegin(ID_FIELD_DESC);
18041
      oprot.writeI64(this.id);
68 ashish 18042
      oprot.writeFieldEnd();
18043
      oprot.writeFieldStop();
18044
      oprot.writeStructEnd();
18045
    }
18046
 
18047
    @Override
18048
    public String toString() {
483 rajveer 18049
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 18050
      boolean first = true;
18051
 
483 rajveer 18052
      sb.append("id:");
18053
      sb.append(this.id);
68 ashish 18054
      first = false;
18055
      sb.append(")");
18056
      return sb.toString();
18057
    }
18058
 
18059
    public void validate() throws TException {
18060
      // check for required fields
18061
    }
18062
 
18063
  }
18064
 
483 rajveer 18065
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
18066
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 18067
 
483 rajveer 18068
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 18069
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18070
 
483 rajveer 18071
    private Order success;
68 ashish 18072
    private TransactionServiceException ex;
18073
 
18074
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18075
    public enum _Fields implements TFieldIdEnum {
18076
      SUCCESS((short)0, "success"),
18077
      EX((short)1, "ex");
18078
 
18079
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18080
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18081
 
18082
      static {
18083
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18084
          byId.put((int)field._thriftId, field);
18085
          byName.put(field.getFieldName(), field);
18086
        }
18087
      }
18088
 
18089
      /**
18090
       * Find the _Fields constant that matches fieldId, or null if its not found.
18091
       */
18092
      public static _Fields findByThriftId(int fieldId) {
18093
        return byId.get(fieldId);
18094
      }
18095
 
18096
      /**
18097
       * Find the _Fields constant that matches fieldId, throwing an exception
18098
       * if it is not found.
18099
       */
18100
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18101
        _Fields fields = findByThriftId(fieldId);
18102
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18103
        return fields;
18104
      }
18105
 
18106
      /**
18107
       * Find the _Fields constant that matches name, or null if its not found.
18108
       */
18109
      public static _Fields findByName(String name) {
18110
        return byName.get(name);
18111
      }
18112
 
18113
      private final short _thriftId;
18114
      private final String _fieldName;
18115
 
18116
      _Fields(short thriftId, String fieldName) {
18117
        _thriftId = thriftId;
18118
        _fieldName = fieldName;
18119
      }
18120
 
18121
      public short getThriftFieldId() {
18122
        return _thriftId;
18123
      }
18124
 
18125
      public String getFieldName() {
18126
        return _fieldName;
18127
      }
18128
    }
18129
 
18130
    // isset id assignments
18131
 
18132
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18133
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18134
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 18135
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18136
          new FieldValueMetaData(TType.STRUCT)));
18137
    }});
18138
 
18139
    static {
483 rajveer 18140
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 18141
    }
18142
 
483 rajveer 18143
    public getOrder_result() {
68 ashish 18144
    }
18145
 
483 rajveer 18146
    public getOrder_result(
18147
      Order success,
68 ashish 18148
      TransactionServiceException ex)
18149
    {
18150
      this();
18151
      this.success = success;
18152
      this.ex = ex;
18153
    }
18154
 
18155
    /**
18156
     * Performs a deep copy on <i>other</i>.
18157
     */
483 rajveer 18158
    public getOrder_result(getOrder_result other) {
18159
      if (other.isSetSuccess()) {
18160
        this.success = new Order(other.success);
18161
      }
68 ashish 18162
      if (other.isSetEx()) {
18163
        this.ex = new TransactionServiceException(other.ex);
18164
      }
18165
    }
18166
 
483 rajveer 18167
    public getOrder_result deepCopy() {
18168
      return new getOrder_result(this);
68 ashish 18169
    }
18170
 
18171
    @Deprecated
483 rajveer 18172
    public getOrder_result clone() {
18173
      return new getOrder_result(this);
68 ashish 18174
    }
18175
 
483 rajveer 18176
    public Order getSuccess() {
68 ashish 18177
      return this.success;
18178
    }
18179
 
483 rajveer 18180
    public getOrder_result setSuccess(Order success) {
68 ashish 18181
      this.success = success;
18182
      return this;
18183
    }
18184
 
18185
    public void unsetSuccess() {
483 rajveer 18186
      this.success = null;
68 ashish 18187
    }
18188
 
18189
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18190
    public boolean isSetSuccess() {
483 rajveer 18191
      return this.success != null;
68 ashish 18192
    }
18193
 
18194
    public void setSuccessIsSet(boolean value) {
483 rajveer 18195
      if (!value) {
18196
        this.success = null;
18197
      }
68 ashish 18198
    }
18199
 
18200
    public TransactionServiceException getEx() {
18201
      return this.ex;
18202
    }
18203
 
483 rajveer 18204
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 18205
      this.ex = ex;
18206
      return this;
18207
    }
18208
 
18209
    public void unsetEx() {
18210
      this.ex = null;
18211
    }
18212
 
18213
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18214
    public boolean isSetEx() {
18215
      return this.ex != null;
18216
    }
18217
 
18218
    public void setExIsSet(boolean value) {
18219
      if (!value) {
18220
        this.ex = null;
18221
      }
18222
    }
18223
 
18224
    public void setFieldValue(_Fields field, Object value) {
18225
      switch (field) {
18226
      case SUCCESS:
18227
        if (value == null) {
18228
          unsetSuccess();
18229
        } else {
483 rajveer 18230
          setSuccess((Order)value);
68 ashish 18231
        }
18232
        break;
18233
 
18234
      case EX:
18235
        if (value == null) {
18236
          unsetEx();
18237
        } else {
18238
          setEx((TransactionServiceException)value);
18239
        }
18240
        break;
18241
 
18242
      }
18243
    }
18244
 
18245
    public void setFieldValue(int fieldID, Object value) {
18246
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18247
    }
18248
 
18249
    public Object getFieldValue(_Fields field) {
18250
      switch (field) {
18251
      case SUCCESS:
483 rajveer 18252
        return getSuccess();
68 ashish 18253
 
18254
      case EX:
18255
        return getEx();
18256
 
18257
      }
18258
      throw new IllegalStateException();
18259
    }
18260
 
18261
    public Object getFieldValue(int fieldId) {
18262
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18263
    }
18264
 
18265
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18266
    public boolean isSet(_Fields field) {
18267
      switch (field) {
18268
      case SUCCESS:
18269
        return isSetSuccess();
18270
      case EX:
18271
        return isSetEx();
18272
      }
18273
      throw new IllegalStateException();
18274
    }
18275
 
18276
    public boolean isSet(int fieldID) {
18277
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18278
    }
18279
 
18280
    @Override
18281
    public boolean equals(Object that) {
18282
      if (that == null)
18283
        return false;
483 rajveer 18284
      if (that instanceof getOrder_result)
18285
        return this.equals((getOrder_result)that);
68 ashish 18286
      return false;
18287
    }
18288
 
483 rajveer 18289
    public boolean equals(getOrder_result that) {
68 ashish 18290
      if (that == null)
18291
        return false;
18292
 
483 rajveer 18293
      boolean this_present_success = true && this.isSetSuccess();
18294
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18295
      if (this_present_success || that_present_success) {
18296
        if (!(this_present_success && that_present_success))
18297
          return false;
483 rajveer 18298
        if (!this.success.equals(that.success))
68 ashish 18299
          return false;
18300
      }
18301
 
18302
      boolean this_present_ex = true && this.isSetEx();
18303
      boolean that_present_ex = true && that.isSetEx();
18304
      if (this_present_ex || that_present_ex) {
18305
        if (!(this_present_ex && that_present_ex))
18306
          return false;
18307
        if (!this.ex.equals(that.ex))
18308
          return false;
18309
      }
18310
 
18311
      return true;
18312
    }
18313
 
18314
    @Override
18315
    public int hashCode() {
18316
      return 0;
18317
    }
18318
 
483 rajveer 18319
    public int compareTo(getOrder_result other) {
68 ashish 18320
      if (!getClass().equals(other.getClass())) {
18321
        return getClass().getName().compareTo(other.getClass().getName());
18322
      }
18323
 
18324
      int lastComparison = 0;
483 rajveer 18325
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 18326
 
18327
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18328
      if (lastComparison != 0) {
18329
        return lastComparison;
18330
      }
18331
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18332
      if (lastComparison != 0) {
18333
        return lastComparison;
18334
      }
18335
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18336
      if (lastComparison != 0) {
18337
        return lastComparison;
18338
      }
18339
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18340
      if (lastComparison != 0) {
18341
        return lastComparison;
18342
      }
18343
      return 0;
18344
    }
18345
 
18346
    public void read(TProtocol iprot) throws TException {
18347
      TField field;
18348
      iprot.readStructBegin();
18349
      while (true)
18350
      {
18351
        field = iprot.readFieldBegin();
18352
        if (field.type == TType.STOP) { 
18353
          break;
18354
        }
18355
        _Fields fieldId = _Fields.findByThriftId(field.id);
18356
        if (fieldId == null) {
18357
          TProtocolUtil.skip(iprot, field.type);
18358
        } else {
18359
          switch (fieldId) {
18360
            case SUCCESS:
483 rajveer 18361
              if (field.type == TType.STRUCT) {
18362
                this.success = new Order();
18363
                this.success.read(iprot);
68 ashish 18364
              } else { 
18365
                TProtocolUtil.skip(iprot, field.type);
18366
              }
18367
              break;
18368
            case EX:
18369
              if (field.type == TType.STRUCT) {
18370
                this.ex = new TransactionServiceException();
18371
                this.ex.read(iprot);
18372
              } else { 
18373
                TProtocolUtil.skip(iprot, field.type);
18374
              }
18375
              break;
18376
          }
18377
          iprot.readFieldEnd();
18378
        }
18379
      }
18380
      iprot.readStructEnd();
18381
      validate();
18382
    }
18383
 
18384
    public void write(TProtocol oprot) throws TException {
18385
      oprot.writeStructBegin(STRUCT_DESC);
18386
 
18387
      if (this.isSetSuccess()) {
18388
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18389
        this.success.write(oprot);
68 ashish 18390
        oprot.writeFieldEnd();
18391
      } else if (this.isSetEx()) {
18392
        oprot.writeFieldBegin(EX_FIELD_DESC);
18393
        this.ex.write(oprot);
18394
        oprot.writeFieldEnd();
18395
      }
18396
      oprot.writeFieldStop();
18397
      oprot.writeStructEnd();
18398
    }
18399
 
18400
    @Override
18401
    public String toString() {
483 rajveer 18402
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 18403
      boolean first = true;
18404
 
18405
      sb.append("success:");
483 rajveer 18406
      if (this.success == null) {
18407
        sb.append("null");
18408
      } else {
18409
        sb.append(this.success);
18410
      }
68 ashish 18411
      first = false;
18412
      if (!first) sb.append(", ");
18413
      sb.append("ex:");
18414
      if (this.ex == null) {
18415
        sb.append("null");
18416
      } else {
18417
        sb.append(this.ex);
18418
      }
18419
      first = false;
18420
      sb.append(")");
18421
      return sb.toString();
18422
    }
18423
 
18424
    public void validate() throws TException {
18425
      // check for required fields
18426
    }
18427
 
18428
  }
18429
 
483 rajveer 18430
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
18431
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 18432
 
483 rajveer 18433
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 18434
 
483 rajveer 18435
    private long orderId;
68 ashish 18436
 
18437
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18438
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18439
      ORDER_ID((short)1, "orderId");
68 ashish 18440
 
18441
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18442
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18443
 
18444
      static {
18445
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18446
          byId.put((int)field._thriftId, field);
18447
          byName.put(field.getFieldName(), field);
18448
        }
18449
      }
18450
 
18451
      /**
18452
       * Find the _Fields constant that matches fieldId, or null if its not found.
18453
       */
18454
      public static _Fields findByThriftId(int fieldId) {
18455
        return byId.get(fieldId);
18456
      }
18457
 
18458
      /**
18459
       * Find the _Fields constant that matches fieldId, throwing an exception
18460
       * if it is not found.
18461
       */
18462
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18463
        _Fields fields = findByThriftId(fieldId);
18464
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18465
        return fields;
18466
      }
18467
 
18468
      /**
18469
       * Find the _Fields constant that matches name, or null if its not found.
18470
       */
18471
      public static _Fields findByName(String name) {
18472
        return byName.get(name);
18473
      }
18474
 
18475
      private final short _thriftId;
18476
      private final String _fieldName;
18477
 
18478
      _Fields(short thriftId, String fieldName) {
18479
        _thriftId = thriftId;
18480
        _fieldName = fieldName;
18481
      }
18482
 
18483
      public short getThriftFieldId() {
18484
        return _thriftId;
18485
      }
18486
 
18487
      public String getFieldName() {
18488
        return _fieldName;
18489
      }
18490
    }
18491
 
18492
    // isset id assignments
483 rajveer 18493
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 18494
    private BitSet __isset_bit_vector = new BitSet(1);
18495
 
18496
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18497
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 18498
          new FieldValueMetaData(TType.I64)));
18499
    }});
18500
 
18501
    static {
483 rajveer 18502
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 18503
    }
18504
 
483 rajveer 18505
    public getLineItemsForOrder_args() {
68 ashish 18506
    }
18507
 
483 rajveer 18508
    public getLineItemsForOrder_args(
18509
      long orderId)
68 ashish 18510
    {
18511
      this();
483 rajveer 18512
      this.orderId = orderId;
18513
      setOrderIdIsSet(true);
68 ashish 18514
    }
18515
 
18516
    /**
18517
     * Performs a deep copy on <i>other</i>.
18518
     */
483 rajveer 18519
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 18520
      __isset_bit_vector.clear();
18521
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18522
      this.orderId = other.orderId;
68 ashish 18523
    }
18524
 
483 rajveer 18525
    public getLineItemsForOrder_args deepCopy() {
18526
      return new getLineItemsForOrder_args(this);
68 ashish 18527
    }
18528
 
18529
    @Deprecated
483 rajveer 18530
    public getLineItemsForOrder_args clone() {
18531
      return new getLineItemsForOrder_args(this);
68 ashish 18532
    }
18533
 
483 rajveer 18534
    public long getOrderId() {
18535
      return this.orderId;
68 ashish 18536
    }
18537
 
483 rajveer 18538
    public getLineItemsForOrder_args setOrderId(long orderId) {
18539
      this.orderId = orderId;
18540
      setOrderIdIsSet(true);
68 ashish 18541
      return this;
18542
    }
18543
 
483 rajveer 18544
    public void unsetOrderId() {
18545
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 18546
    }
18547
 
483 rajveer 18548
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18549
    public boolean isSetOrderId() {
18550
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 18551
    }
18552
 
483 rajveer 18553
    public void setOrderIdIsSet(boolean value) {
18554
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 18555
    }
18556
 
18557
    public void setFieldValue(_Fields field, Object value) {
18558
      switch (field) {
483 rajveer 18559
      case ORDER_ID:
68 ashish 18560
        if (value == null) {
483 rajveer 18561
          unsetOrderId();
68 ashish 18562
        } else {
483 rajveer 18563
          setOrderId((Long)value);
68 ashish 18564
        }
18565
        break;
18566
 
18567
      }
18568
    }
18569
 
18570
    public void setFieldValue(int fieldID, Object value) {
18571
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18572
    }
18573
 
18574
    public Object getFieldValue(_Fields field) {
18575
      switch (field) {
483 rajveer 18576
      case ORDER_ID:
18577
        return new Long(getOrderId());
68 ashish 18578
 
18579
      }
18580
      throw new IllegalStateException();
18581
    }
18582
 
18583
    public Object getFieldValue(int fieldId) {
18584
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18585
    }
18586
 
18587
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18588
    public boolean isSet(_Fields field) {
18589
      switch (field) {
483 rajveer 18590
      case ORDER_ID:
18591
        return isSetOrderId();
68 ashish 18592
      }
18593
      throw new IllegalStateException();
18594
    }
18595
 
18596
    public boolean isSet(int fieldID) {
18597
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18598
    }
18599
 
18600
    @Override
18601
    public boolean equals(Object that) {
18602
      if (that == null)
18603
        return false;
483 rajveer 18604
      if (that instanceof getLineItemsForOrder_args)
18605
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 18606
      return false;
18607
    }
18608
 
483 rajveer 18609
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 18610
      if (that == null)
18611
        return false;
18612
 
483 rajveer 18613
      boolean this_present_orderId = true;
18614
      boolean that_present_orderId = true;
18615
      if (this_present_orderId || that_present_orderId) {
18616
        if (!(this_present_orderId && that_present_orderId))
68 ashish 18617
          return false;
483 rajveer 18618
        if (this.orderId != that.orderId)
68 ashish 18619
          return false;
18620
      }
18621
 
18622
      return true;
18623
    }
18624
 
18625
    @Override
18626
    public int hashCode() {
18627
      return 0;
18628
    }
18629
 
483 rajveer 18630
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 18631
      if (!getClass().equals(other.getClass())) {
18632
        return getClass().getName().compareTo(other.getClass().getName());
18633
      }
18634
 
18635
      int lastComparison = 0;
483 rajveer 18636
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 18637
 
483 rajveer 18638
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 18639
      if (lastComparison != 0) {
18640
        return lastComparison;
18641
      }
483 rajveer 18642
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 18643
      if (lastComparison != 0) {
18644
        return lastComparison;
18645
      }
18646
      return 0;
18647
    }
18648
 
18649
    public void read(TProtocol iprot) throws TException {
18650
      TField field;
18651
      iprot.readStructBegin();
18652
      while (true)
18653
      {
18654
        field = iprot.readFieldBegin();
18655
        if (field.type == TType.STOP) { 
18656
          break;
18657
        }
18658
        _Fields fieldId = _Fields.findByThriftId(field.id);
18659
        if (fieldId == null) {
18660
          TProtocolUtil.skip(iprot, field.type);
18661
        } else {
18662
          switch (fieldId) {
483 rajveer 18663
            case ORDER_ID:
68 ashish 18664
              if (field.type == TType.I64) {
483 rajveer 18665
                this.orderId = iprot.readI64();
18666
                setOrderIdIsSet(true);
68 ashish 18667
              } else { 
18668
                TProtocolUtil.skip(iprot, field.type);
18669
              }
18670
              break;
18671
          }
18672
          iprot.readFieldEnd();
18673
        }
18674
      }
18675
      iprot.readStructEnd();
18676
      validate();
18677
    }
18678
 
18679
    public void write(TProtocol oprot) throws TException {
18680
      validate();
18681
 
18682
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18683
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18684
      oprot.writeI64(this.orderId);
68 ashish 18685
      oprot.writeFieldEnd();
18686
      oprot.writeFieldStop();
18687
      oprot.writeStructEnd();
18688
    }
18689
 
18690
    @Override
18691
    public String toString() {
483 rajveer 18692
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 18693
      boolean first = true;
18694
 
483 rajveer 18695
      sb.append("orderId:");
18696
      sb.append(this.orderId);
68 ashish 18697
      first = false;
18698
      sb.append(")");
18699
      return sb.toString();
18700
    }
18701
 
18702
    public void validate() throws TException {
18703
      // check for required fields
18704
    }
18705
 
18706
  }
18707
 
483 rajveer 18708
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
18709
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 18710
 
483 rajveer 18711
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 18712
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18713
 
483 rajveer 18714
    private List<LineItem> success;
68 ashish 18715
    private TransactionServiceException ex;
18716
 
18717
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18718
    public enum _Fields implements TFieldIdEnum {
18719
      SUCCESS((short)0, "success"),
18720
      EX((short)1, "ex");
18721
 
18722
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18723
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18724
 
18725
      static {
18726
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18727
          byId.put((int)field._thriftId, field);
18728
          byName.put(field.getFieldName(), field);
18729
        }
18730
      }
18731
 
18732
      /**
18733
       * Find the _Fields constant that matches fieldId, or null if its not found.
18734
       */
18735
      public static _Fields findByThriftId(int fieldId) {
18736
        return byId.get(fieldId);
18737
      }
18738
 
18739
      /**
18740
       * Find the _Fields constant that matches fieldId, throwing an exception
18741
       * if it is not found.
18742
       */
18743
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18744
        _Fields fields = findByThriftId(fieldId);
18745
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18746
        return fields;
18747
      }
18748
 
18749
      /**
18750
       * Find the _Fields constant that matches name, or null if its not found.
18751
       */
18752
      public static _Fields findByName(String name) {
18753
        return byName.get(name);
18754
      }
18755
 
18756
      private final short _thriftId;
18757
      private final String _fieldName;
18758
 
18759
      _Fields(short thriftId, String fieldName) {
18760
        _thriftId = thriftId;
18761
        _fieldName = fieldName;
18762
      }
18763
 
18764
      public short getThriftFieldId() {
18765
        return _thriftId;
18766
      }
18767
 
18768
      public String getFieldName() {
18769
        return _fieldName;
18770
      }
18771
    }
18772
 
18773
    // isset id assignments
18774
 
18775
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18776
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18777
          new ListMetaData(TType.LIST, 
18778
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18779
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18780
          new FieldValueMetaData(TType.STRUCT)));
18781
    }});
18782
 
18783
    static {
483 rajveer 18784
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18785
    }
18786
 
483 rajveer 18787
    public getLineItemsForOrder_result() {
68 ashish 18788
    }
18789
 
483 rajveer 18790
    public getLineItemsForOrder_result(
18791
      List<LineItem> success,
68 ashish 18792
      TransactionServiceException ex)
18793
    {
18794
      this();
18795
      this.success = success;
18796
      this.ex = ex;
18797
    }
18798
 
18799
    /**
18800
     * Performs a deep copy on <i>other</i>.
18801
     */
483 rajveer 18802
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18803
      if (other.isSetSuccess()) {
18804
        List<LineItem> __this__success = new ArrayList<LineItem>();
18805
        for (LineItem other_element : other.success) {
18806
          __this__success.add(new LineItem(other_element));
18807
        }
18808
        this.success = __this__success;
18809
      }
68 ashish 18810
      if (other.isSetEx()) {
18811
        this.ex = new TransactionServiceException(other.ex);
18812
      }
18813
    }
18814
 
483 rajveer 18815
    public getLineItemsForOrder_result deepCopy() {
18816
      return new getLineItemsForOrder_result(this);
68 ashish 18817
    }
18818
 
18819
    @Deprecated
483 rajveer 18820
    public getLineItemsForOrder_result clone() {
18821
      return new getLineItemsForOrder_result(this);
68 ashish 18822
    }
18823
 
483 rajveer 18824
    public int getSuccessSize() {
18825
      return (this.success == null) ? 0 : this.success.size();
18826
    }
18827
 
18828
    public java.util.Iterator<LineItem> getSuccessIterator() {
18829
      return (this.success == null) ? null : this.success.iterator();
18830
    }
18831
 
18832
    public void addToSuccess(LineItem elem) {
18833
      if (this.success == null) {
18834
        this.success = new ArrayList<LineItem>();
18835
      }
18836
      this.success.add(elem);
18837
    }
18838
 
18839
    public List<LineItem> getSuccess() {
68 ashish 18840
      return this.success;
18841
    }
18842
 
483 rajveer 18843
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18844
      this.success = success;
18845
      return this;
18846
    }
18847
 
18848
    public void unsetSuccess() {
483 rajveer 18849
      this.success = null;
68 ashish 18850
    }
18851
 
18852
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18853
    public boolean isSetSuccess() {
483 rajveer 18854
      return this.success != null;
68 ashish 18855
    }
18856
 
18857
    public void setSuccessIsSet(boolean value) {
483 rajveer 18858
      if (!value) {
18859
        this.success = null;
18860
      }
68 ashish 18861
    }
18862
 
18863
    public TransactionServiceException getEx() {
18864
      return this.ex;
18865
    }
18866
 
483 rajveer 18867
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18868
      this.ex = ex;
18869
      return this;
18870
    }
18871
 
18872
    public void unsetEx() {
18873
      this.ex = null;
18874
    }
18875
 
18876
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18877
    public boolean isSetEx() {
18878
      return this.ex != null;
18879
    }
18880
 
18881
    public void setExIsSet(boolean value) {
18882
      if (!value) {
18883
        this.ex = null;
18884
      }
18885
    }
18886
 
18887
    public void setFieldValue(_Fields field, Object value) {
18888
      switch (field) {
18889
      case SUCCESS:
18890
        if (value == null) {
18891
          unsetSuccess();
18892
        } else {
483 rajveer 18893
          setSuccess((List<LineItem>)value);
68 ashish 18894
        }
18895
        break;
18896
 
18897
      case EX:
18898
        if (value == null) {
18899
          unsetEx();
18900
        } else {
18901
          setEx((TransactionServiceException)value);
18902
        }
18903
        break;
18904
 
18905
      }
18906
    }
18907
 
18908
    public void setFieldValue(int fieldID, Object value) {
18909
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18910
    }
18911
 
18912
    public Object getFieldValue(_Fields field) {
18913
      switch (field) {
18914
      case SUCCESS:
483 rajveer 18915
        return getSuccess();
68 ashish 18916
 
18917
      case EX:
18918
        return getEx();
18919
 
18920
      }
18921
      throw new IllegalStateException();
18922
    }
18923
 
18924
    public Object getFieldValue(int fieldId) {
18925
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18926
    }
18927
 
18928
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18929
    public boolean isSet(_Fields field) {
18930
      switch (field) {
18931
      case SUCCESS:
18932
        return isSetSuccess();
18933
      case EX:
18934
        return isSetEx();
18935
      }
18936
      throw new IllegalStateException();
18937
    }
18938
 
18939
    public boolean isSet(int fieldID) {
18940
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18941
    }
18942
 
18943
    @Override
18944
    public boolean equals(Object that) {
18945
      if (that == null)
18946
        return false;
483 rajveer 18947
      if (that instanceof getLineItemsForOrder_result)
18948
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18949
      return false;
18950
    }
18951
 
483 rajveer 18952
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18953
      if (that == null)
18954
        return false;
18955
 
483 rajveer 18956
      boolean this_present_success = true && this.isSetSuccess();
18957
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18958
      if (this_present_success || that_present_success) {
18959
        if (!(this_present_success && that_present_success))
18960
          return false;
483 rajveer 18961
        if (!this.success.equals(that.success))
68 ashish 18962
          return false;
18963
      }
18964
 
18965
      boolean this_present_ex = true && this.isSetEx();
18966
      boolean that_present_ex = true && that.isSetEx();
18967
      if (this_present_ex || that_present_ex) {
18968
        if (!(this_present_ex && that_present_ex))
18969
          return false;
18970
        if (!this.ex.equals(that.ex))
18971
          return false;
18972
      }
18973
 
18974
      return true;
18975
    }
18976
 
18977
    @Override
18978
    public int hashCode() {
18979
      return 0;
18980
    }
18981
 
483 rajveer 18982
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18983
      if (!getClass().equals(other.getClass())) {
18984
        return getClass().getName().compareTo(other.getClass().getName());
18985
      }
18986
 
18987
      int lastComparison = 0;
483 rajveer 18988
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18989
 
18990
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18991
      if (lastComparison != 0) {
18992
        return lastComparison;
18993
      }
18994
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18995
      if (lastComparison != 0) {
18996
        return lastComparison;
18997
      }
18998
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18999
      if (lastComparison != 0) {
19000
        return lastComparison;
19001
      }
19002
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19003
      if (lastComparison != 0) {
19004
        return lastComparison;
19005
      }
19006
      return 0;
19007
    }
19008
 
19009
    public void read(TProtocol iprot) throws TException {
19010
      TField field;
19011
      iprot.readStructBegin();
19012
      while (true)
19013
      {
19014
        field = iprot.readFieldBegin();
19015
        if (field.type == TType.STOP) { 
19016
          break;
19017
        }
19018
        _Fields fieldId = _Fields.findByThriftId(field.id);
19019
        if (fieldId == null) {
19020
          TProtocolUtil.skip(iprot, field.type);
19021
        } else {
19022
          switch (fieldId) {
19023
            case SUCCESS:
483 rajveer 19024
              if (field.type == TType.LIST) {
19025
                {
1382 varun.gupt 19026
                  TList _list40 = iprot.readListBegin();
19027
                  this.success = new ArrayList<LineItem>(_list40.size);
19028
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 19029
                  {
1382 varun.gupt 19030
                    LineItem _elem42;
19031
                    _elem42 = new LineItem();
19032
                    _elem42.read(iprot);
19033
                    this.success.add(_elem42);
483 rajveer 19034
                  }
19035
                  iprot.readListEnd();
19036
                }
68 ashish 19037
              } else { 
19038
                TProtocolUtil.skip(iprot, field.type);
19039
              }
19040
              break;
19041
            case EX:
19042
              if (field.type == TType.STRUCT) {
19043
                this.ex = new TransactionServiceException();
19044
                this.ex.read(iprot);
19045
              } else { 
19046
                TProtocolUtil.skip(iprot, field.type);
19047
              }
19048
              break;
19049
          }
19050
          iprot.readFieldEnd();
19051
        }
19052
      }
19053
      iprot.readStructEnd();
19054
      validate();
19055
    }
19056
 
19057
    public void write(TProtocol oprot) throws TException {
19058
      oprot.writeStructBegin(STRUCT_DESC);
19059
 
19060
      if (this.isSetSuccess()) {
19061
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 19062
        {
19063
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 19064
          for (LineItem _iter43 : this.success)
483 rajveer 19065
          {
1382 varun.gupt 19066
            _iter43.write(oprot);
483 rajveer 19067
          }
19068
          oprot.writeListEnd();
19069
        }
68 ashish 19070
        oprot.writeFieldEnd();
19071
      } else if (this.isSetEx()) {
19072
        oprot.writeFieldBegin(EX_FIELD_DESC);
19073
        this.ex.write(oprot);
19074
        oprot.writeFieldEnd();
19075
      }
19076
      oprot.writeFieldStop();
19077
      oprot.writeStructEnd();
19078
    }
19079
 
19080
    @Override
19081
    public String toString() {
483 rajveer 19082
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 19083
      boolean first = true;
19084
 
19085
      sb.append("success:");
483 rajveer 19086
      if (this.success == null) {
19087
        sb.append("null");
19088
      } else {
19089
        sb.append(this.success);
19090
      }
68 ashish 19091
      first = false;
19092
      if (!first) sb.append(", ");
19093
      sb.append("ex:");
19094
      if (this.ex == null) {
19095
        sb.append("null");
19096
      } else {
19097
        sb.append(this.ex);
19098
      }
19099
      first = false;
19100
      sb.append(")");
19101
      return sb.toString();
19102
    }
19103
 
19104
    public void validate() throws TException {
19105
      // check for required fields
19106
    }
19107
 
19108
  }
19109
 
1529 ankur.sing 19110
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
19111
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
19112
 
19113
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
19114
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
19115
 
19116
    private long orderId;
19117
    private long customerId;
19118
 
19119
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19120
    public enum _Fields implements TFieldIdEnum {
19121
      ORDER_ID((short)1, "orderId"),
19122
      CUSTOMER_ID((short)2, "customerId");
19123
 
19124
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19125
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19126
 
19127
      static {
19128
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19129
          byId.put((int)field._thriftId, field);
19130
          byName.put(field.getFieldName(), field);
19131
        }
19132
      }
19133
 
19134
      /**
19135
       * Find the _Fields constant that matches fieldId, or null if its not found.
19136
       */
19137
      public static _Fields findByThriftId(int fieldId) {
19138
        return byId.get(fieldId);
19139
      }
19140
 
19141
      /**
19142
       * Find the _Fields constant that matches fieldId, throwing an exception
19143
       * if it is not found.
19144
       */
19145
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19146
        _Fields fields = findByThriftId(fieldId);
19147
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19148
        return fields;
19149
      }
19150
 
19151
      /**
19152
       * Find the _Fields constant that matches name, or null if its not found.
19153
       */
19154
      public static _Fields findByName(String name) {
19155
        return byName.get(name);
19156
      }
19157
 
19158
      private final short _thriftId;
19159
      private final String _fieldName;
19160
 
19161
      _Fields(short thriftId, String fieldName) {
19162
        _thriftId = thriftId;
19163
        _fieldName = fieldName;
19164
      }
19165
 
19166
      public short getThriftFieldId() {
19167
        return _thriftId;
19168
      }
19169
 
19170
      public String getFieldName() {
19171
        return _fieldName;
19172
      }
19173
    }
19174
 
19175
    // isset id assignments
19176
    private static final int __ORDERID_ISSET_ID = 0;
19177
    private static final int __CUSTOMERID_ISSET_ID = 1;
19178
    private BitSet __isset_bit_vector = new BitSet(2);
19179
 
19180
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19181
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
19182
          new FieldValueMetaData(TType.I64)));
19183
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
19184
          new FieldValueMetaData(TType.I64)));
19185
    }});
19186
 
19187
    static {
19188
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
19189
    }
19190
 
19191
    public getOrderForCustomer_args() {
19192
    }
19193
 
19194
    public getOrderForCustomer_args(
19195
      long orderId,
19196
      long customerId)
19197
    {
19198
      this();
19199
      this.orderId = orderId;
19200
      setOrderIdIsSet(true);
19201
      this.customerId = customerId;
19202
      setCustomerIdIsSet(true);
19203
    }
19204
 
19205
    /**
19206
     * Performs a deep copy on <i>other</i>.
19207
     */
19208
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
19209
      __isset_bit_vector.clear();
19210
      __isset_bit_vector.or(other.__isset_bit_vector);
19211
      this.orderId = other.orderId;
19212
      this.customerId = other.customerId;
19213
    }
19214
 
19215
    public getOrderForCustomer_args deepCopy() {
19216
      return new getOrderForCustomer_args(this);
19217
    }
19218
 
19219
    @Deprecated
19220
    public getOrderForCustomer_args clone() {
19221
      return new getOrderForCustomer_args(this);
19222
    }
19223
 
19224
    public long getOrderId() {
19225
      return this.orderId;
19226
    }
19227
 
19228
    public getOrderForCustomer_args setOrderId(long orderId) {
19229
      this.orderId = orderId;
19230
      setOrderIdIsSet(true);
19231
      return this;
19232
    }
19233
 
19234
    public void unsetOrderId() {
19235
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19236
    }
19237
 
19238
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19239
    public boolean isSetOrderId() {
19240
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19241
    }
19242
 
19243
    public void setOrderIdIsSet(boolean value) {
19244
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19245
    }
19246
 
19247
    public long getCustomerId() {
19248
      return this.customerId;
19249
    }
19250
 
19251
    public getOrderForCustomer_args setCustomerId(long customerId) {
19252
      this.customerId = customerId;
19253
      setCustomerIdIsSet(true);
19254
      return this;
19255
    }
19256
 
19257
    public void unsetCustomerId() {
19258
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
19259
    }
19260
 
19261
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
19262
    public boolean isSetCustomerId() {
19263
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
19264
    }
19265
 
19266
    public void setCustomerIdIsSet(boolean value) {
19267
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
19268
    }
19269
 
19270
    public void setFieldValue(_Fields field, Object value) {
19271
      switch (field) {
19272
      case ORDER_ID:
19273
        if (value == null) {
19274
          unsetOrderId();
19275
        } else {
19276
          setOrderId((Long)value);
19277
        }
19278
        break;
19279
 
19280
      case CUSTOMER_ID:
19281
        if (value == null) {
19282
          unsetCustomerId();
19283
        } else {
19284
          setCustomerId((Long)value);
19285
        }
19286
        break;
19287
 
19288
      }
19289
    }
19290
 
19291
    public void setFieldValue(int fieldID, Object value) {
19292
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19293
    }
19294
 
19295
    public Object getFieldValue(_Fields field) {
19296
      switch (field) {
19297
      case ORDER_ID:
19298
        return new Long(getOrderId());
19299
 
19300
      case CUSTOMER_ID:
19301
        return new Long(getCustomerId());
19302
 
19303
      }
19304
      throw new IllegalStateException();
19305
    }
19306
 
19307
    public Object getFieldValue(int fieldId) {
19308
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19309
    }
19310
 
19311
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19312
    public boolean isSet(_Fields field) {
19313
      switch (field) {
19314
      case ORDER_ID:
19315
        return isSetOrderId();
19316
      case CUSTOMER_ID:
19317
        return isSetCustomerId();
19318
      }
19319
      throw new IllegalStateException();
19320
    }
19321
 
19322
    public boolean isSet(int fieldID) {
19323
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19324
    }
19325
 
19326
    @Override
19327
    public boolean equals(Object that) {
19328
      if (that == null)
19329
        return false;
19330
      if (that instanceof getOrderForCustomer_args)
19331
        return this.equals((getOrderForCustomer_args)that);
19332
      return false;
19333
    }
19334
 
19335
    public boolean equals(getOrderForCustomer_args that) {
19336
      if (that == null)
19337
        return false;
19338
 
19339
      boolean this_present_orderId = true;
19340
      boolean that_present_orderId = true;
19341
      if (this_present_orderId || that_present_orderId) {
19342
        if (!(this_present_orderId && that_present_orderId))
19343
          return false;
19344
        if (this.orderId != that.orderId)
19345
          return false;
19346
      }
19347
 
19348
      boolean this_present_customerId = true;
19349
      boolean that_present_customerId = true;
19350
      if (this_present_customerId || that_present_customerId) {
19351
        if (!(this_present_customerId && that_present_customerId))
19352
          return false;
19353
        if (this.customerId != that.customerId)
19354
          return false;
19355
      }
19356
 
19357
      return true;
19358
    }
19359
 
19360
    @Override
19361
    public int hashCode() {
19362
      return 0;
19363
    }
19364
 
19365
    public int compareTo(getOrderForCustomer_args other) {
19366
      if (!getClass().equals(other.getClass())) {
19367
        return getClass().getName().compareTo(other.getClass().getName());
19368
      }
19369
 
19370
      int lastComparison = 0;
19371
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
19372
 
19373
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
19374
      if (lastComparison != 0) {
19375
        return lastComparison;
19376
      }
19377
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
19378
      if (lastComparison != 0) {
19379
        return lastComparison;
19380
      }
19381
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
19382
      if (lastComparison != 0) {
19383
        return lastComparison;
19384
      }
19385
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
19386
      if (lastComparison != 0) {
19387
        return lastComparison;
19388
      }
19389
      return 0;
19390
    }
19391
 
19392
    public void read(TProtocol iprot) throws TException {
19393
      TField field;
19394
      iprot.readStructBegin();
19395
      while (true)
19396
      {
19397
        field = iprot.readFieldBegin();
19398
        if (field.type == TType.STOP) { 
19399
          break;
19400
        }
19401
        _Fields fieldId = _Fields.findByThriftId(field.id);
19402
        if (fieldId == null) {
19403
          TProtocolUtil.skip(iprot, field.type);
19404
        } else {
19405
          switch (fieldId) {
19406
            case ORDER_ID:
19407
              if (field.type == TType.I64) {
19408
                this.orderId = iprot.readI64();
19409
                setOrderIdIsSet(true);
19410
              } else { 
19411
                TProtocolUtil.skip(iprot, field.type);
19412
              }
19413
              break;
19414
            case CUSTOMER_ID:
19415
              if (field.type == TType.I64) {
19416
                this.customerId = iprot.readI64();
19417
                setCustomerIdIsSet(true);
19418
              } else { 
19419
                TProtocolUtil.skip(iprot, field.type);
19420
              }
19421
              break;
19422
          }
19423
          iprot.readFieldEnd();
19424
        }
19425
      }
19426
      iprot.readStructEnd();
19427
      validate();
19428
    }
19429
 
19430
    public void write(TProtocol oprot) throws TException {
19431
      validate();
19432
 
19433
      oprot.writeStructBegin(STRUCT_DESC);
19434
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19435
      oprot.writeI64(this.orderId);
19436
      oprot.writeFieldEnd();
19437
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
19438
      oprot.writeI64(this.customerId);
19439
      oprot.writeFieldEnd();
19440
      oprot.writeFieldStop();
19441
      oprot.writeStructEnd();
19442
    }
19443
 
19444
    @Override
19445
    public String toString() {
19446
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
19447
      boolean first = true;
19448
 
19449
      sb.append("orderId:");
19450
      sb.append(this.orderId);
19451
      first = false;
19452
      if (!first) sb.append(", ");
19453
      sb.append("customerId:");
19454
      sb.append(this.customerId);
19455
      first = false;
19456
      sb.append(")");
19457
      return sb.toString();
19458
    }
19459
 
19460
    public void validate() throws TException {
19461
      // check for required fields
19462
    }
19463
 
19464
  }
19465
 
19466
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
19467
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
19468
 
19469
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
19470
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19471
 
19472
    private Order success;
19473
    private TransactionServiceException ex;
19474
 
19475
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19476
    public enum _Fields implements TFieldIdEnum {
19477
      SUCCESS((short)0, "success"),
19478
      EX((short)1, "ex");
19479
 
19480
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19481
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19482
 
19483
      static {
19484
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19485
          byId.put((int)field._thriftId, field);
19486
          byName.put(field.getFieldName(), field);
19487
        }
19488
      }
19489
 
19490
      /**
19491
       * Find the _Fields constant that matches fieldId, or null if its not found.
19492
       */
19493
      public static _Fields findByThriftId(int fieldId) {
19494
        return byId.get(fieldId);
19495
      }
19496
 
19497
      /**
19498
       * Find the _Fields constant that matches fieldId, throwing an exception
19499
       * if it is not found.
19500
       */
19501
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19502
        _Fields fields = findByThriftId(fieldId);
19503
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19504
        return fields;
19505
      }
19506
 
19507
      /**
19508
       * Find the _Fields constant that matches name, or null if its not found.
19509
       */
19510
      public static _Fields findByName(String name) {
19511
        return byName.get(name);
19512
      }
19513
 
19514
      private final short _thriftId;
19515
      private final String _fieldName;
19516
 
19517
      _Fields(short thriftId, String fieldName) {
19518
        _thriftId = thriftId;
19519
        _fieldName = fieldName;
19520
      }
19521
 
19522
      public short getThriftFieldId() {
19523
        return _thriftId;
19524
      }
19525
 
19526
      public String getFieldName() {
19527
        return _fieldName;
19528
      }
19529
    }
19530
 
19531
    // isset id assignments
19532
 
19533
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19534
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19535
          new StructMetaData(TType.STRUCT, Order.class)));
19536
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19537
          new FieldValueMetaData(TType.STRUCT)));
19538
    }});
19539
 
19540
    static {
19541
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
19542
    }
19543
 
19544
    public getOrderForCustomer_result() {
19545
    }
19546
 
19547
    public getOrderForCustomer_result(
19548
      Order success,
19549
      TransactionServiceException ex)
19550
    {
19551
      this();
19552
      this.success = success;
19553
      this.ex = ex;
19554
    }
19555
 
19556
    /**
19557
     * Performs a deep copy on <i>other</i>.
19558
     */
19559
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
19560
      if (other.isSetSuccess()) {
19561
        this.success = new Order(other.success);
19562
      }
19563
      if (other.isSetEx()) {
19564
        this.ex = new TransactionServiceException(other.ex);
19565
      }
19566
    }
19567
 
19568
    public getOrderForCustomer_result deepCopy() {
19569
      return new getOrderForCustomer_result(this);
19570
    }
19571
 
19572
    @Deprecated
19573
    public getOrderForCustomer_result clone() {
19574
      return new getOrderForCustomer_result(this);
19575
    }
19576
 
19577
    public Order getSuccess() {
19578
      return this.success;
19579
    }
19580
 
19581
    public getOrderForCustomer_result setSuccess(Order success) {
19582
      this.success = success;
19583
      return this;
19584
    }
19585
 
19586
    public void unsetSuccess() {
19587
      this.success = null;
19588
    }
19589
 
19590
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19591
    public boolean isSetSuccess() {
19592
      return this.success != null;
19593
    }
19594
 
19595
    public void setSuccessIsSet(boolean value) {
19596
      if (!value) {
19597
        this.success = null;
19598
      }
19599
    }
19600
 
19601
    public TransactionServiceException getEx() {
19602
      return this.ex;
19603
    }
19604
 
19605
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
19606
      this.ex = ex;
19607
      return this;
19608
    }
19609
 
19610
    public void unsetEx() {
19611
      this.ex = null;
19612
    }
19613
 
19614
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19615
    public boolean isSetEx() {
19616
      return this.ex != null;
19617
    }
19618
 
19619
    public void setExIsSet(boolean value) {
19620
      if (!value) {
19621
        this.ex = null;
19622
      }
19623
    }
19624
 
19625
    public void setFieldValue(_Fields field, Object value) {
19626
      switch (field) {
19627
      case SUCCESS:
19628
        if (value == null) {
19629
          unsetSuccess();
19630
        } else {
19631
          setSuccess((Order)value);
19632
        }
19633
        break;
19634
 
19635
      case EX:
19636
        if (value == null) {
19637
          unsetEx();
19638
        } else {
19639
          setEx((TransactionServiceException)value);
19640
        }
19641
        break;
19642
 
19643
      }
19644
    }
19645
 
19646
    public void setFieldValue(int fieldID, Object value) {
19647
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19648
    }
19649
 
19650
    public Object getFieldValue(_Fields field) {
19651
      switch (field) {
19652
      case SUCCESS:
19653
        return getSuccess();
19654
 
19655
      case EX:
19656
        return getEx();
19657
 
19658
      }
19659
      throw new IllegalStateException();
19660
    }
19661
 
19662
    public Object getFieldValue(int fieldId) {
19663
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19664
    }
19665
 
19666
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19667
    public boolean isSet(_Fields field) {
19668
      switch (field) {
19669
      case SUCCESS:
19670
        return isSetSuccess();
19671
      case EX:
19672
        return isSetEx();
19673
      }
19674
      throw new IllegalStateException();
19675
    }
19676
 
19677
    public boolean isSet(int fieldID) {
19678
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19679
    }
19680
 
19681
    @Override
19682
    public boolean equals(Object that) {
19683
      if (that == null)
19684
        return false;
19685
      if (that instanceof getOrderForCustomer_result)
19686
        return this.equals((getOrderForCustomer_result)that);
19687
      return false;
19688
    }
19689
 
19690
    public boolean equals(getOrderForCustomer_result that) {
19691
      if (that == null)
19692
        return false;
19693
 
19694
      boolean this_present_success = true && this.isSetSuccess();
19695
      boolean that_present_success = true && that.isSetSuccess();
19696
      if (this_present_success || that_present_success) {
19697
        if (!(this_present_success && that_present_success))
19698
          return false;
19699
        if (!this.success.equals(that.success))
19700
          return false;
19701
      }
19702
 
19703
      boolean this_present_ex = true && this.isSetEx();
19704
      boolean that_present_ex = true && that.isSetEx();
19705
      if (this_present_ex || that_present_ex) {
19706
        if (!(this_present_ex && that_present_ex))
19707
          return false;
19708
        if (!this.ex.equals(that.ex))
19709
          return false;
19710
      }
19711
 
19712
      return true;
19713
    }
19714
 
19715
    @Override
19716
    public int hashCode() {
19717
      return 0;
19718
    }
19719
 
19720
    public int compareTo(getOrderForCustomer_result other) {
19721
      if (!getClass().equals(other.getClass())) {
19722
        return getClass().getName().compareTo(other.getClass().getName());
19723
      }
19724
 
19725
      int lastComparison = 0;
19726
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
19727
 
19728
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19729
      if (lastComparison != 0) {
19730
        return lastComparison;
19731
      }
19732
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19733
      if (lastComparison != 0) {
19734
        return lastComparison;
19735
      }
19736
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19737
      if (lastComparison != 0) {
19738
        return lastComparison;
19739
      }
19740
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19741
      if (lastComparison != 0) {
19742
        return lastComparison;
19743
      }
19744
      return 0;
19745
    }
19746
 
19747
    public void read(TProtocol iprot) throws TException {
19748
      TField field;
19749
      iprot.readStructBegin();
19750
      while (true)
19751
      {
19752
        field = iprot.readFieldBegin();
19753
        if (field.type == TType.STOP) { 
19754
          break;
19755
        }
19756
        _Fields fieldId = _Fields.findByThriftId(field.id);
19757
        if (fieldId == null) {
19758
          TProtocolUtil.skip(iprot, field.type);
19759
        } else {
19760
          switch (fieldId) {
19761
            case SUCCESS:
19762
              if (field.type == TType.STRUCT) {
19763
                this.success = new Order();
19764
                this.success.read(iprot);
19765
              } else { 
19766
                TProtocolUtil.skip(iprot, field.type);
19767
              }
19768
              break;
19769
            case EX:
19770
              if (field.type == TType.STRUCT) {
19771
                this.ex = new TransactionServiceException();
19772
                this.ex.read(iprot);
19773
              } else { 
19774
                TProtocolUtil.skip(iprot, field.type);
19775
              }
19776
              break;
19777
          }
19778
          iprot.readFieldEnd();
19779
        }
19780
      }
19781
      iprot.readStructEnd();
19782
      validate();
19783
    }
19784
 
19785
    public void write(TProtocol oprot) throws TException {
19786
      oprot.writeStructBegin(STRUCT_DESC);
19787
 
19788
      if (this.isSetSuccess()) {
19789
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19790
        this.success.write(oprot);
19791
        oprot.writeFieldEnd();
19792
      } else if (this.isSetEx()) {
19793
        oprot.writeFieldBegin(EX_FIELD_DESC);
19794
        this.ex.write(oprot);
19795
        oprot.writeFieldEnd();
19796
      }
19797
      oprot.writeFieldStop();
19798
      oprot.writeStructEnd();
19799
    }
19800
 
19801
    @Override
19802
    public String toString() {
19803
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
19804
      boolean first = true;
19805
 
19806
      sb.append("success:");
19807
      if (this.success == null) {
19808
        sb.append("null");
19809
      } else {
19810
        sb.append(this.success);
19811
      }
19812
      first = false;
19813
      if (!first) sb.append(", ");
19814
      sb.append("ex:");
19815
      if (this.ex == null) {
19816
        sb.append("null");
19817
      } else {
19818
        sb.append(this.ex);
19819
      }
19820
      first = false;
19821
      sb.append(")");
19822
      return sb.toString();
19823
    }
19824
 
19825
    public void validate() throws TException {
19826
      // check for required fields
19827
    }
19828
 
19829
  }
19830
 
1221 chandransh 19831
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
19832
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
19833
 
19834
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19835
 
19836
    private long warehouseId;
19837
 
19838
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19839
    public enum _Fields implements TFieldIdEnum {
19840
      WAREHOUSE_ID((short)1, "warehouseId");
19841
 
19842
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19843
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19844
 
19845
      static {
19846
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19847
          byId.put((int)field._thriftId, field);
19848
          byName.put(field.getFieldName(), field);
19849
        }
19850
      }
19851
 
19852
      /**
19853
       * Find the _Fields constant that matches fieldId, or null if its not found.
19854
       */
19855
      public static _Fields findByThriftId(int fieldId) {
19856
        return byId.get(fieldId);
19857
      }
19858
 
19859
      /**
19860
       * Find the _Fields constant that matches fieldId, throwing an exception
19861
       * if it is not found.
19862
       */
19863
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19864
        _Fields fields = findByThriftId(fieldId);
19865
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19866
        return fields;
19867
      }
19868
 
19869
      /**
19870
       * Find the _Fields constant that matches name, or null if its not found.
19871
       */
19872
      public static _Fields findByName(String name) {
19873
        return byName.get(name);
19874
      }
19875
 
19876
      private final short _thriftId;
19877
      private final String _fieldName;
19878
 
19879
      _Fields(short thriftId, String fieldName) {
19880
        _thriftId = thriftId;
19881
        _fieldName = fieldName;
19882
      }
19883
 
19884
      public short getThriftFieldId() {
19885
        return _thriftId;
19886
      }
19887
 
19888
      public String getFieldName() {
19889
        return _fieldName;
19890
      }
19891
    }
19892
 
19893
    // isset id assignments
19894
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19895
    private BitSet __isset_bit_vector = new BitSet(1);
19896
 
19897
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19898
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19899
          new FieldValueMetaData(TType.I64)));
19900
    }});
19901
 
19902
    static {
19903
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
19904
    }
19905
 
19906
    public batchOrders_args() {
19907
    }
19908
 
19909
    public batchOrders_args(
19910
      long warehouseId)
19911
    {
19912
      this();
19913
      this.warehouseId = warehouseId;
19914
      setWarehouseIdIsSet(true);
19915
    }
19916
 
19917
    /**
19918
     * Performs a deep copy on <i>other</i>.
19919
     */
19920
    public batchOrders_args(batchOrders_args other) {
19921
      __isset_bit_vector.clear();
19922
      __isset_bit_vector.or(other.__isset_bit_vector);
19923
      this.warehouseId = other.warehouseId;
19924
    }
19925
 
19926
    public batchOrders_args deepCopy() {
19927
      return new batchOrders_args(this);
19928
    }
19929
 
19930
    @Deprecated
19931
    public batchOrders_args clone() {
19932
      return new batchOrders_args(this);
19933
    }
19934
 
19935
    public long getWarehouseId() {
19936
      return this.warehouseId;
19937
    }
19938
 
19939
    public batchOrders_args setWarehouseId(long warehouseId) {
19940
      this.warehouseId = warehouseId;
19941
      setWarehouseIdIsSet(true);
19942
      return this;
19943
    }
19944
 
19945
    public void unsetWarehouseId() {
19946
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19947
    }
19948
 
19949
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19950
    public boolean isSetWarehouseId() {
19951
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19952
    }
19953
 
19954
    public void setWarehouseIdIsSet(boolean value) {
19955
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19956
    }
19957
 
19958
    public void setFieldValue(_Fields field, Object value) {
19959
      switch (field) {
19960
      case WAREHOUSE_ID:
19961
        if (value == null) {
19962
          unsetWarehouseId();
19963
        } else {
19964
          setWarehouseId((Long)value);
19965
        }
19966
        break;
19967
 
19968
      }
19969
    }
19970
 
19971
    public void setFieldValue(int fieldID, Object value) {
19972
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19973
    }
19974
 
19975
    public Object getFieldValue(_Fields field) {
19976
      switch (field) {
19977
      case WAREHOUSE_ID:
19978
        return new Long(getWarehouseId());
19979
 
19980
      }
19981
      throw new IllegalStateException();
19982
    }
19983
 
19984
    public Object getFieldValue(int fieldId) {
19985
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19986
    }
19987
 
19988
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19989
    public boolean isSet(_Fields field) {
19990
      switch (field) {
19991
      case WAREHOUSE_ID:
19992
        return isSetWarehouseId();
19993
      }
19994
      throw new IllegalStateException();
19995
    }
19996
 
19997
    public boolean isSet(int fieldID) {
19998
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19999
    }
20000
 
20001
    @Override
20002
    public boolean equals(Object that) {
20003
      if (that == null)
20004
        return false;
20005
      if (that instanceof batchOrders_args)
20006
        return this.equals((batchOrders_args)that);
20007
      return false;
20008
    }
20009
 
20010
    public boolean equals(batchOrders_args that) {
20011
      if (that == null)
20012
        return false;
20013
 
20014
      boolean this_present_warehouseId = true;
20015
      boolean that_present_warehouseId = true;
20016
      if (this_present_warehouseId || that_present_warehouseId) {
20017
        if (!(this_present_warehouseId && that_present_warehouseId))
20018
          return false;
20019
        if (this.warehouseId != that.warehouseId)
20020
          return false;
20021
      }
20022
 
20023
      return true;
20024
    }
20025
 
20026
    @Override
20027
    public int hashCode() {
20028
      return 0;
20029
    }
20030
 
20031
    public int compareTo(batchOrders_args other) {
20032
      if (!getClass().equals(other.getClass())) {
20033
        return getClass().getName().compareTo(other.getClass().getName());
20034
      }
20035
 
20036
      int lastComparison = 0;
20037
      batchOrders_args typedOther = (batchOrders_args)other;
20038
 
20039
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
20040
      if (lastComparison != 0) {
20041
        return lastComparison;
20042
      }
20043
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
20044
      if (lastComparison != 0) {
20045
        return lastComparison;
20046
      }
20047
      return 0;
20048
    }
20049
 
20050
    public void read(TProtocol iprot) throws TException {
20051
      TField field;
20052
      iprot.readStructBegin();
20053
      while (true)
20054
      {
20055
        field = iprot.readFieldBegin();
20056
        if (field.type == TType.STOP) { 
20057
          break;
20058
        }
20059
        _Fields fieldId = _Fields.findByThriftId(field.id);
20060
        if (fieldId == null) {
20061
          TProtocolUtil.skip(iprot, field.type);
20062
        } else {
20063
          switch (fieldId) {
20064
            case WAREHOUSE_ID:
20065
              if (field.type == TType.I64) {
20066
                this.warehouseId = iprot.readI64();
20067
                setWarehouseIdIsSet(true);
20068
              } else { 
20069
                TProtocolUtil.skip(iprot, field.type);
20070
              }
20071
              break;
20072
          }
20073
          iprot.readFieldEnd();
20074
        }
20075
      }
20076
      iprot.readStructEnd();
20077
      validate();
20078
    }
20079
 
20080
    public void write(TProtocol oprot) throws TException {
20081
      validate();
20082
 
20083
      oprot.writeStructBegin(STRUCT_DESC);
20084
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20085
      oprot.writeI64(this.warehouseId);
20086
      oprot.writeFieldEnd();
20087
      oprot.writeFieldStop();
20088
      oprot.writeStructEnd();
20089
    }
20090
 
20091
    @Override
20092
    public String toString() {
20093
      StringBuilder sb = new StringBuilder("batchOrders_args(");
20094
      boolean first = true;
20095
 
20096
      sb.append("warehouseId:");
20097
      sb.append(this.warehouseId);
20098
      first = false;
20099
      sb.append(")");
20100
      return sb.toString();
20101
    }
20102
 
20103
    public void validate() throws TException {
20104
      // check for required fields
20105
    }
20106
 
20107
  }
20108
 
20109
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
20110
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
20111
 
20112
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
20113
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20114
 
20115
    private List<Order> success;
20116
    private TransactionServiceException ex;
20117
 
20118
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20119
    public enum _Fields implements TFieldIdEnum {
20120
      SUCCESS((short)0, "success"),
20121
      EX((short)1, "ex");
20122
 
20123
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20124
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20125
 
20126
      static {
20127
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20128
          byId.put((int)field._thriftId, field);
20129
          byName.put(field.getFieldName(), field);
20130
        }
20131
      }
20132
 
20133
      /**
20134
       * Find the _Fields constant that matches fieldId, or null if its not found.
20135
       */
20136
      public static _Fields findByThriftId(int fieldId) {
20137
        return byId.get(fieldId);
20138
      }
20139
 
20140
      /**
20141
       * Find the _Fields constant that matches fieldId, throwing an exception
20142
       * if it is not found.
20143
       */
20144
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20145
        _Fields fields = findByThriftId(fieldId);
20146
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20147
        return fields;
20148
      }
20149
 
20150
      /**
20151
       * Find the _Fields constant that matches name, or null if its not found.
20152
       */
20153
      public static _Fields findByName(String name) {
20154
        return byName.get(name);
20155
      }
20156
 
20157
      private final short _thriftId;
20158
      private final String _fieldName;
20159
 
20160
      _Fields(short thriftId, String fieldName) {
20161
        _thriftId = thriftId;
20162
        _fieldName = fieldName;
20163
      }
20164
 
20165
      public short getThriftFieldId() {
20166
        return _thriftId;
20167
      }
20168
 
20169
      public String getFieldName() {
20170
        return _fieldName;
20171
      }
20172
    }
20173
 
20174
    // isset id assignments
20175
 
20176
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20177
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20178
          new ListMetaData(TType.LIST, 
20179
              new StructMetaData(TType.STRUCT, Order.class))));
20180
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20181
          new FieldValueMetaData(TType.STRUCT)));
20182
    }});
20183
 
20184
    static {
20185
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
20186
    }
20187
 
20188
    public batchOrders_result() {
20189
    }
20190
 
20191
    public batchOrders_result(
20192
      List<Order> success,
20193
      TransactionServiceException ex)
20194
    {
20195
      this();
20196
      this.success = success;
20197
      this.ex = ex;
20198
    }
20199
 
20200
    /**
20201
     * Performs a deep copy on <i>other</i>.
20202
     */
20203
    public batchOrders_result(batchOrders_result other) {
20204
      if (other.isSetSuccess()) {
20205
        List<Order> __this__success = new ArrayList<Order>();
20206
        for (Order other_element : other.success) {
20207
          __this__success.add(new Order(other_element));
20208
        }
20209
        this.success = __this__success;
20210
      }
20211
      if (other.isSetEx()) {
20212
        this.ex = new TransactionServiceException(other.ex);
20213
      }
20214
    }
20215
 
20216
    public batchOrders_result deepCopy() {
20217
      return new batchOrders_result(this);
20218
    }
20219
 
20220
    @Deprecated
20221
    public batchOrders_result clone() {
20222
      return new batchOrders_result(this);
20223
    }
20224
 
20225
    public int getSuccessSize() {
20226
      return (this.success == null) ? 0 : this.success.size();
20227
    }
20228
 
20229
    public java.util.Iterator<Order> getSuccessIterator() {
20230
      return (this.success == null) ? null : this.success.iterator();
20231
    }
20232
 
20233
    public void addToSuccess(Order elem) {
20234
      if (this.success == null) {
20235
        this.success = new ArrayList<Order>();
20236
      }
20237
      this.success.add(elem);
20238
    }
20239
 
20240
    public List<Order> getSuccess() {
20241
      return this.success;
20242
    }
20243
 
20244
    public batchOrders_result setSuccess(List<Order> success) {
20245
      this.success = success;
20246
      return this;
20247
    }
20248
 
20249
    public void unsetSuccess() {
20250
      this.success = null;
20251
    }
20252
 
20253
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20254
    public boolean isSetSuccess() {
20255
      return this.success != null;
20256
    }
20257
 
20258
    public void setSuccessIsSet(boolean value) {
20259
      if (!value) {
20260
        this.success = null;
20261
      }
20262
    }
20263
 
20264
    public TransactionServiceException getEx() {
20265
      return this.ex;
20266
    }
20267
 
20268
    public batchOrders_result setEx(TransactionServiceException ex) {
20269
      this.ex = ex;
20270
      return this;
20271
    }
20272
 
20273
    public void unsetEx() {
20274
      this.ex = null;
20275
    }
20276
 
20277
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20278
    public boolean isSetEx() {
20279
      return this.ex != null;
20280
    }
20281
 
20282
    public void setExIsSet(boolean value) {
20283
      if (!value) {
20284
        this.ex = null;
20285
      }
20286
    }
20287
 
20288
    public void setFieldValue(_Fields field, Object value) {
20289
      switch (field) {
20290
      case SUCCESS:
20291
        if (value == null) {
20292
          unsetSuccess();
20293
        } else {
20294
          setSuccess((List<Order>)value);
20295
        }
20296
        break;
20297
 
20298
      case EX:
20299
        if (value == null) {
20300
          unsetEx();
20301
        } else {
20302
          setEx((TransactionServiceException)value);
20303
        }
20304
        break;
20305
 
20306
      }
20307
    }
20308
 
20309
    public void setFieldValue(int fieldID, Object value) {
20310
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20311
    }
20312
 
20313
    public Object getFieldValue(_Fields field) {
20314
      switch (field) {
20315
      case SUCCESS:
20316
        return getSuccess();
20317
 
20318
      case EX:
20319
        return getEx();
20320
 
20321
      }
20322
      throw new IllegalStateException();
20323
    }
20324
 
20325
    public Object getFieldValue(int fieldId) {
20326
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20327
    }
20328
 
20329
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20330
    public boolean isSet(_Fields field) {
20331
      switch (field) {
20332
      case SUCCESS:
20333
        return isSetSuccess();
20334
      case EX:
20335
        return isSetEx();
20336
      }
20337
      throw new IllegalStateException();
20338
    }
20339
 
20340
    public boolean isSet(int fieldID) {
20341
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20342
    }
20343
 
20344
    @Override
20345
    public boolean equals(Object that) {
20346
      if (that == null)
20347
        return false;
20348
      if (that instanceof batchOrders_result)
20349
        return this.equals((batchOrders_result)that);
20350
      return false;
20351
    }
20352
 
20353
    public boolean equals(batchOrders_result that) {
20354
      if (that == null)
20355
        return false;
20356
 
20357
      boolean this_present_success = true && this.isSetSuccess();
20358
      boolean that_present_success = true && that.isSetSuccess();
20359
      if (this_present_success || that_present_success) {
20360
        if (!(this_present_success && that_present_success))
20361
          return false;
20362
        if (!this.success.equals(that.success))
20363
          return false;
20364
      }
20365
 
20366
      boolean this_present_ex = true && this.isSetEx();
20367
      boolean that_present_ex = true && that.isSetEx();
20368
      if (this_present_ex || that_present_ex) {
20369
        if (!(this_present_ex && that_present_ex))
20370
          return false;
20371
        if (!this.ex.equals(that.ex))
20372
          return false;
20373
      }
20374
 
20375
      return true;
20376
    }
20377
 
20378
    @Override
20379
    public int hashCode() {
20380
      return 0;
20381
    }
20382
 
20383
    public int compareTo(batchOrders_result other) {
20384
      if (!getClass().equals(other.getClass())) {
20385
        return getClass().getName().compareTo(other.getClass().getName());
20386
      }
20387
 
20388
      int lastComparison = 0;
20389
      batchOrders_result typedOther = (batchOrders_result)other;
20390
 
20391
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20392
      if (lastComparison != 0) {
20393
        return lastComparison;
20394
      }
20395
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20396
      if (lastComparison != 0) {
20397
        return lastComparison;
20398
      }
20399
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20400
      if (lastComparison != 0) {
20401
        return lastComparison;
20402
      }
20403
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20404
      if (lastComparison != 0) {
20405
        return lastComparison;
20406
      }
20407
      return 0;
20408
    }
20409
 
20410
    public void read(TProtocol iprot) throws TException {
20411
      TField field;
20412
      iprot.readStructBegin();
20413
      while (true)
20414
      {
20415
        field = iprot.readFieldBegin();
20416
        if (field.type == TType.STOP) { 
20417
          break;
20418
        }
20419
        _Fields fieldId = _Fields.findByThriftId(field.id);
20420
        if (fieldId == null) {
20421
          TProtocolUtil.skip(iprot, field.type);
20422
        } else {
20423
          switch (fieldId) {
20424
            case SUCCESS:
20425
              if (field.type == TType.LIST) {
20426
                {
1382 varun.gupt 20427
                  TList _list44 = iprot.readListBegin();
20428
                  this.success = new ArrayList<Order>(_list44.size);
20429
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 20430
                  {
1382 varun.gupt 20431
                    Order _elem46;
20432
                    _elem46 = new Order();
20433
                    _elem46.read(iprot);
20434
                    this.success.add(_elem46);
1221 chandransh 20435
                  }
20436
                  iprot.readListEnd();
20437
                }
20438
              } else { 
20439
                TProtocolUtil.skip(iprot, field.type);
20440
              }
20441
              break;
20442
            case EX:
20443
              if (field.type == TType.STRUCT) {
20444
                this.ex = new TransactionServiceException();
20445
                this.ex.read(iprot);
20446
              } else { 
20447
                TProtocolUtil.skip(iprot, field.type);
20448
              }
20449
              break;
20450
          }
20451
          iprot.readFieldEnd();
20452
        }
20453
      }
20454
      iprot.readStructEnd();
20455
      validate();
20456
    }
20457
 
20458
    public void write(TProtocol oprot) throws TException {
20459
      oprot.writeStructBegin(STRUCT_DESC);
20460
 
20461
      if (this.isSetSuccess()) {
20462
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20463
        {
20464
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 20465
          for (Order _iter47 : this.success)
1221 chandransh 20466
          {
1382 varun.gupt 20467
            _iter47.write(oprot);
1221 chandransh 20468
          }
20469
          oprot.writeListEnd();
20470
        }
20471
        oprot.writeFieldEnd();
20472
      } else if (this.isSetEx()) {
20473
        oprot.writeFieldBegin(EX_FIELD_DESC);
20474
        this.ex.write(oprot);
20475
        oprot.writeFieldEnd();
20476
      }
20477
      oprot.writeFieldStop();
20478
      oprot.writeStructEnd();
20479
    }
20480
 
20481
    @Override
20482
    public String toString() {
20483
      StringBuilder sb = new StringBuilder("batchOrders_result(");
20484
      boolean first = true;
20485
 
20486
      sb.append("success:");
20487
      if (this.success == null) {
20488
        sb.append("null");
20489
      } else {
20490
        sb.append(this.success);
20491
      }
20492
      first = false;
20493
      if (!first) sb.append(", ");
20494
      sb.append("ex:");
20495
      if (this.ex == null) {
20496
        sb.append("null");
20497
      } else {
20498
        sb.append(this.ex);
20499
      }
20500
      first = false;
20501
      sb.append(")");
20502
      return sb.toString();
20503
    }
20504
 
20505
    public void validate() throws TException {
20506
      // check for required fields
20507
    }
20508
 
20509
  }
20510
 
1209 chandransh 20511
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
20512
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
20513
 
20514
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
20515
 
20516
    private long orderId;
20517
 
20518
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20519
    public enum _Fields implements TFieldIdEnum {
20520
      ORDER_ID((short)1, "orderId");
20521
 
20522
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20523
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20524
 
20525
      static {
20526
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20527
          byId.put((int)field._thriftId, field);
20528
          byName.put(field.getFieldName(), field);
20529
        }
20530
      }
20531
 
20532
      /**
20533
       * Find the _Fields constant that matches fieldId, or null if its not found.
20534
       */
20535
      public static _Fields findByThriftId(int fieldId) {
20536
        return byId.get(fieldId);
20537
      }
20538
 
20539
      /**
20540
       * Find the _Fields constant that matches fieldId, throwing an exception
20541
       * if it is not found.
20542
       */
20543
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20544
        _Fields fields = findByThriftId(fieldId);
20545
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20546
        return fields;
20547
      }
20548
 
20549
      /**
20550
       * Find the _Fields constant that matches name, or null if its not found.
20551
       */
20552
      public static _Fields findByName(String name) {
20553
        return byName.get(name);
20554
      }
20555
 
20556
      private final short _thriftId;
20557
      private final String _fieldName;
20558
 
20559
      _Fields(short thriftId, String fieldName) {
20560
        _thriftId = thriftId;
20561
        _fieldName = fieldName;
20562
      }
20563
 
20564
      public short getThriftFieldId() {
20565
        return _thriftId;
20566
      }
20567
 
20568
      public String getFieldName() {
20569
        return _fieldName;
20570
      }
20571
    }
20572
 
20573
    // isset id assignments
20574
    private static final int __ORDERID_ISSET_ID = 0;
20575
    private BitSet __isset_bit_vector = new BitSet(1);
20576
 
20577
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20578
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
20579
          new FieldValueMetaData(TType.I64)));
20580
    }});
20581
 
20582
    static {
20583
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
20584
    }
20585
 
20586
    public markOrderAsOutOfStock_args() {
20587
    }
20588
 
20589
    public markOrderAsOutOfStock_args(
20590
      long orderId)
20591
    {
20592
      this();
20593
      this.orderId = orderId;
20594
      setOrderIdIsSet(true);
20595
    }
20596
 
20597
    /**
20598
     * Performs a deep copy on <i>other</i>.
20599
     */
20600
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
20601
      __isset_bit_vector.clear();
20602
      __isset_bit_vector.or(other.__isset_bit_vector);
20603
      this.orderId = other.orderId;
20604
    }
20605
 
20606
    public markOrderAsOutOfStock_args deepCopy() {
20607
      return new markOrderAsOutOfStock_args(this);
20608
    }
20609
 
20610
    @Deprecated
20611
    public markOrderAsOutOfStock_args clone() {
20612
      return new markOrderAsOutOfStock_args(this);
20613
    }
20614
 
20615
    public long getOrderId() {
20616
      return this.orderId;
20617
    }
20618
 
20619
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
20620
      this.orderId = orderId;
20621
      setOrderIdIsSet(true);
20622
      return this;
20623
    }
20624
 
20625
    public void unsetOrderId() {
20626
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20627
    }
20628
 
20629
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20630
    public boolean isSetOrderId() {
20631
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20632
    }
20633
 
20634
    public void setOrderIdIsSet(boolean value) {
20635
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20636
    }
20637
 
20638
    public void setFieldValue(_Fields field, Object value) {
20639
      switch (field) {
20640
      case ORDER_ID:
20641
        if (value == null) {
20642
          unsetOrderId();
20643
        } else {
20644
          setOrderId((Long)value);
20645
        }
20646
        break;
20647
 
20648
      }
20649
    }
20650
 
20651
    public void setFieldValue(int fieldID, Object value) {
20652
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20653
    }
20654
 
20655
    public Object getFieldValue(_Fields field) {
20656
      switch (field) {
20657
      case ORDER_ID:
20658
        return new Long(getOrderId());
20659
 
20660
      }
20661
      throw new IllegalStateException();
20662
    }
20663
 
20664
    public Object getFieldValue(int fieldId) {
20665
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20666
    }
20667
 
20668
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20669
    public boolean isSet(_Fields field) {
20670
      switch (field) {
20671
      case ORDER_ID:
20672
        return isSetOrderId();
20673
      }
20674
      throw new IllegalStateException();
20675
    }
20676
 
20677
    public boolean isSet(int fieldID) {
20678
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20679
    }
20680
 
20681
    @Override
20682
    public boolean equals(Object that) {
20683
      if (that == null)
20684
        return false;
20685
      if (that instanceof markOrderAsOutOfStock_args)
20686
        return this.equals((markOrderAsOutOfStock_args)that);
20687
      return false;
20688
    }
20689
 
20690
    public boolean equals(markOrderAsOutOfStock_args that) {
20691
      if (that == null)
20692
        return false;
20693
 
20694
      boolean this_present_orderId = true;
20695
      boolean that_present_orderId = true;
20696
      if (this_present_orderId || that_present_orderId) {
20697
        if (!(this_present_orderId && that_present_orderId))
20698
          return false;
20699
        if (this.orderId != that.orderId)
20700
          return false;
20701
      }
20702
 
20703
      return true;
20704
    }
20705
 
20706
    @Override
20707
    public int hashCode() {
20708
      return 0;
20709
    }
20710
 
20711
    public int compareTo(markOrderAsOutOfStock_args other) {
20712
      if (!getClass().equals(other.getClass())) {
20713
        return getClass().getName().compareTo(other.getClass().getName());
20714
      }
20715
 
20716
      int lastComparison = 0;
20717
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
20718
 
20719
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20720
      if (lastComparison != 0) {
20721
        return lastComparison;
20722
      }
20723
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20724
      if (lastComparison != 0) {
20725
        return lastComparison;
20726
      }
20727
      return 0;
20728
    }
20729
 
20730
    public void read(TProtocol iprot) throws TException {
20731
      TField field;
20732
      iprot.readStructBegin();
20733
      while (true)
20734
      {
20735
        field = iprot.readFieldBegin();
20736
        if (field.type == TType.STOP) { 
20737
          break;
20738
        }
20739
        _Fields fieldId = _Fields.findByThriftId(field.id);
20740
        if (fieldId == null) {
20741
          TProtocolUtil.skip(iprot, field.type);
20742
        } else {
20743
          switch (fieldId) {
20744
            case ORDER_ID:
20745
              if (field.type == TType.I64) {
20746
                this.orderId = iprot.readI64();
20747
                setOrderIdIsSet(true);
20748
              } else { 
20749
                TProtocolUtil.skip(iprot, field.type);
20750
              }
20751
              break;
20752
          }
20753
          iprot.readFieldEnd();
20754
        }
20755
      }
20756
      iprot.readStructEnd();
20757
      validate();
20758
    }
20759
 
20760
    public void write(TProtocol oprot) throws TException {
20761
      validate();
20762
 
20763
      oprot.writeStructBegin(STRUCT_DESC);
20764
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20765
      oprot.writeI64(this.orderId);
20766
      oprot.writeFieldEnd();
20767
      oprot.writeFieldStop();
20768
      oprot.writeStructEnd();
20769
    }
20770
 
20771
    @Override
20772
    public String toString() {
20773
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
20774
      boolean first = true;
20775
 
20776
      sb.append("orderId:");
20777
      sb.append(this.orderId);
20778
      first = false;
20779
      sb.append(")");
20780
      return sb.toString();
20781
    }
20782
 
20783
    public void validate() throws TException {
20784
      // check for required fields
20785
    }
20786
 
20787
  }
20788
 
20789
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
20790
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
20791
 
20792
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20793
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20794
 
20795
    private boolean success;
20796
    private TransactionServiceException ex;
20797
 
20798
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20799
    public enum _Fields implements TFieldIdEnum {
20800
      SUCCESS((short)0, "success"),
20801
      EX((short)1, "ex");
20802
 
20803
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20804
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20805
 
20806
      static {
20807
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20808
          byId.put((int)field._thriftId, field);
20809
          byName.put(field.getFieldName(), field);
20810
        }
20811
      }
20812
 
20813
      /**
20814
       * Find the _Fields constant that matches fieldId, or null if its not found.
20815
       */
20816
      public static _Fields findByThriftId(int fieldId) {
20817
        return byId.get(fieldId);
20818
      }
20819
 
20820
      /**
20821
       * Find the _Fields constant that matches fieldId, throwing an exception
20822
       * if it is not found.
20823
       */
20824
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20825
        _Fields fields = findByThriftId(fieldId);
20826
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20827
        return fields;
20828
      }
20829
 
20830
      /**
20831
       * Find the _Fields constant that matches name, or null if its not found.
20832
       */
20833
      public static _Fields findByName(String name) {
20834
        return byName.get(name);
20835
      }
20836
 
20837
      private final short _thriftId;
20838
      private final String _fieldName;
20839
 
20840
      _Fields(short thriftId, String fieldName) {
20841
        _thriftId = thriftId;
20842
        _fieldName = fieldName;
20843
      }
20844
 
20845
      public short getThriftFieldId() {
20846
        return _thriftId;
20847
      }
20848
 
20849
      public String getFieldName() {
20850
        return _fieldName;
20851
      }
20852
    }
20853
 
20854
    // isset id assignments
20855
    private static final int __SUCCESS_ISSET_ID = 0;
20856
    private BitSet __isset_bit_vector = new BitSet(1);
20857
 
20858
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20859
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20860
          new FieldValueMetaData(TType.BOOL)));
20861
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20862
          new FieldValueMetaData(TType.STRUCT)));
20863
    }});
20864
 
20865
    static {
20866
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
20867
    }
20868
 
20869
    public markOrderAsOutOfStock_result() {
20870
    }
20871
 
20872
    public markOrderAsOutOfStock_result(
20873
      boolean success,
20874
      TransactionServiceException ex)
20875
    {
20876
      this();
20877
      this.success = success;
20878
      setSuccessIsSet(true);
20879
      this.ex = ex;
20880
    }
20881
 
20882
    /**
20883
     * Performs a deep copy on <i>other</i>.
20884
     */
20885
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
20886
      __isset_bit_vector.clear();
20887
      __isset_bit_vector.or(other.__isset_bit_vector);
20888
      this.success = other.success;
20889
      if (other.isSetEx()) {
20890
        this.ex = new TransactionServiceException(other.ex);
20891
      }
20892
    }
20893
 
20894
    public markOrderAsOutOfStock_result deepCopy() {
20895
      return new markOrderAsOutOfStock_result(this);
20896
    }
20897
 
20898
    @Deprecated
20899
    public markOrderAsOutOfStock_result clone() {
20900
      return new markOrderAsOutOfStock_result(this);
20901
    }
20902
 
20903
    public boolean isSuccess() {
20904
      return this.success;
20905
    }
20906
 
20907
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
20908
      this.success = success;
20909
      setSuccessIsSet(true);
20910
      return this;
20911
    }
20912
 
20913
    public void unsetSuccess() {
20914
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20915
    }
20916
 
20917
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20918
    public boolean isSetSuccess() {
20919
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20920
    }
20921
 
20922
    public void setSuccessIsSet(boolean value) {
20923
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20924
    }
20925
 
20926
    public TransactionServiceException getEx() {
20927
      return this.ex;
20928
    }
20929
 
20930
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
20931
      this.ex = ex;
20932
      return this;
20933
    }
20934
 
20935
    public void unsetEx() {
20936
      this.ex = null;
20937
    }
20938
 
20939
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20940
    public boolean isSetEx() {
20941
      return this.ex != null;
20942
    }
20943
 
20944
    public void setExIsSet(boolean value) {
20945
      if (!value) {
20946
        this.ex = null;
20947
      }
20948
    }
20949
 
20950
    public void setFieldValue(_Fields field, Object value) {
20951
      switch (field) {
20952
      case SUCCESS:
20953
        if (value == null) {
20954
          unsetSuccess();
20955
        } else {
20956
          setSuccess((Boolean)value);
20957
        }
20958
        break;
20959
 
20960
      case EX:
20961
        if (value == null) {
20962
          unsetEx();
20963
        } else {
20964
          setEx((TransactionServiceException)value);
20965
        }
20966
        break;
20967
 
20968
      }
20969
    }
20970
 
20971
    public void setFieldValue(int fieldID, Object value) {
20972
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20973
    }
20974
 
20975
    public Object getFieldValue(_Fields field) {
20976
      switch (field) {
20977
      case SUCCESS:
20978
        return new Boolean(isSuccess());
20979
 
20980
      case EX:
20981
        return getEx();
20982
 
20983
      }
20984
      throw new IllegalStateException();
20985
    }
20986
 
20987
    public Object getFieldValue(int fieldId) {
20988
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20989
    }
20990
 
20991
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20992
    public boolean isSet(_Fields field) {
20993
      switch (field) {
20994
      case SUCCESS:
20995
        return isSetSuccess();
20996
      case EX:
20997
        return isSetEx();
20998
      }
20999
      throw new IllegalStateException();
21000
    }
21001
 
21002
    public boolean isSet(int fieldID) {
21003
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21004
    }
21005
 
21006
    @Override
21007
    public boolean equals(Object that) {
21008
      if (that == null)
21009
        return false;
21010
      if (that instanceof markOrderAsOutOfStock_result)
21011
        return this.equals((markOrderAsOutOfStock_result)that);
21012
      return false;
21013
    }
21014
 
21015
    public boolean equals(markOrderAsOutOfStock_result that) {
21016
      if (that == null)
21017
        return false;
21018
 
21019
      boolean this_present_success = true;
21020
      boolean that_present_success = true;
21021
      if (this_present_success || that_present_success) {
21022
        if (!(this_present_success && that_present_success))
21023
          return false;
21024
        if (this.success != that.success)
21025
          return false;
21026
      }
21027
 
21028
      boolean this_present_ex = true && this.isSetEx();
21029
      boolean that_present_ex = true && that.isSetEx();
21030
      if (this_present_ex || that_present_ex) {
21031
        if (!(this_present_ex && that_present_ex))
21032
          return false;
21033
        if (!this.ex.equals(that.ex))
21034
          return false;
21035
      }
21036
 
21037
      return true;
21038
    }
21039
 
21040
    @Override
21041
    public int hashCode() {
21042
      return 0;
21043
    }
21044
 
21045
    public int compareTo(markOrderAsOutOfStock_result other) {
21046
      if (!getClass().equals(other.getClass())) {
21047
        return getClass().getName().compareTo(other.getClass().getName());
21048
      }
21049
 
21050
      int lastComparison = 0;
21051
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
21052
 
21053
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21054
      if (lastComparison != 0) {
21055
        return lastComparison;
21056
      }
21057
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21058
      if (lastComparison != 0) {
21059
        return lastComparison;
21060
      }
21061
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21062
      if (lastComparison != 0) {
21063
        return lastComparison;
21064
      }
21065
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21066
      if (lastComparison != 0) {
21067
        return lastComparison;
21068
      }
21069
      return 0;
21070
    }
21071
 
21072
    public void read(TProtocol iprot) throws TException {
21073
      TField field;
21074
      iprot.readStructBegin();
21075
      while (true)
21076
      {
21077
        field = iprot.readFieldBegin();
21078
        if (field.type == TType.STOP) { 
21079
          break;
21080
        }
21081
        _Fields fieldId = _Fields.findByThriftId(field.id);
21082
        if (fieldId == null) {
21083
          TProtocolUtil.skip(iprot, field.type);
21084
        } else {
21085
          switch (fieldId) {
21086
            case SUCCESS:
21087
              if (field.type == TType.BOOL) {
21088
                this.success = iprot.readBool();
21089
                setSuccessIsSet(true);
21090
              } else { 
21091
                TProtocolUtil.skip(iprot, field.type);
21092
              }
21093
              break;
21094
            case EX:
21095
              if (field.type == TType.STRUCT) {
21096
                this.ex = new TransactionServiceException();
21097
                this.ex.read(iprot);
21098
              } else { 
21099
                TProtocolUtil.skip(iprot, field.type);
21100
              }
21101
              break;
21102
          }
21103
          iprot.readFieldEnd();
21104
        }
21105
      }
21106
      iprot.readStructEnd();
21107
      validate();
21108
    }
21109
 
21110
    public void write(TProtocol oprot) throws TException {
21111
      oprot.writeStructBegin(STRUCT_DESC);
21112
 
21113
      if (this.isSetSuccess()) {
21114
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21115
        oprot.writeBool(this.success);
21116
        oprot.writeFieldEnd();
21117
      } else if (this.isSetEx()) {
21118
        oprot.writeFieldBegin(EX_FIELD_DESC);
21119
        this.ex.write(oprot);
21120
        oprot.writeFieldEnd();
21121
      }
21122
      oprot.writeFieldStop();
21123
      oprot.writeStructEnd();
21124
    }
21125
 
21126
    @Override
21127
    public String toString() {
21128
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
21129
      boolean first = true;
21130
 
21131
      sb.append("success:");
21132
      sb.append(this.success);
21133
      first = false;
21134
      if (!first) sb.append(", ");
21135
      sb.append("ex:");
21136
      if (this.ex == null) {
21137
        sb.append("null");
21138
      } else {
21139
        sb.append(this.ex);
21140
      }
21141
      first = false;
21142
      sb.append(")");
21143
      return sb.toString();
21144
    }
21145
 
21146
    public void validate() throws TException {
21147
      // check for required fields
21148
    }
21149
 
21150
  }
21151
 
758 chandransh 21152
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
21153
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
21154
 
21155
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
21156
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
21157
 
21158
    private long warehouseId;
21159
    private long providerId;
21160
 
21161
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21162
    public enum _Fields implements TFieldIdEnum {
21163
      WAREHOUSE_ID((short)1, "warehouseId"),
21164
      PROVIDER_ID((short)2, "providerId");
21165
 
21166
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21167
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21168
 
21169
      static {
21170
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21171
          byId.put((int)field._thriftId, field);
21172
          byName.put(field.getFieldName(), field);
21173
        }
21174
      }
21175
 
21176
      /**
21177
       * Find the _Fields constant that matches fieldId, or null if its not found.
21178
       */
21179
      public static _Fields findByThriftId(int fieldId) {
21180
        return byId.get(fieldId);
21181
      }
21182
 
21183
      /**
21184
       * Find the _Fields constant that matches fieldId, throwing an exception
21185
       * if it is not found.
21186
       */
21187
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21188
        _Fields fields = findByThriftId(fieldId);
21189
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21190
        return fields;
21191
      }
21192
 
21193
      /**
21194
       * Find the _Fields constant that matches name, or null if its not found.
21195
       */
21196
      public static _Fields findByName(String name) {
21197
        return byName.get(name);
21198
      }
21199
 
21200
      private final short _thriftId;
21201
      private final String _fieldName;
21202
 
21203
      _Fields(short thriftId, String fieldName) {
21204
        _thriftId = thriftId;
21205
        _fieldName = fieldName;
21206
      }
21207
 
21208
      public short getThriftFieldId() {
21209
        return _thriftId;
21210
      }
21211
 
21212
      public String getFieldName() {
21213
        return _fieldName;
21214
      }
21215
    }
21216
 
21217
    // isset id assignments
21218
    private static final int __WAREHOUSEID_ISSET_ID = 0;
21219
    private static final int __PROVIDERID_ISSET_ID = 1;
21220
    private BitSet __isset_bit_vector = new BitSet(2);
21221
 
21222
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21223
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
21224
          new FieldValueMetaData(TType.I64)));
21225
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21226
          new FieldValueMetaData(TType.I64)));
21227
    }});
21228
 
21229
    static {
21230
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
21231
    }
21232
 
21233
    public markOrdersAsManifested_args() {
21234
    }
21235
 
21236
    public markOrdersAsManifested_args(
21237
      long warehouseId,
21238
      long providerId)
21239
    {
21240
      this();
21241
      this.warehouseId = warehouseId;
21242
      setWarehouseIdIsSet(true);
21243
      this.providerId = providerId;
21244
      setProviderIdIsSet(true);
21245
    }
21246
 
21247
    /**
21248
     * Performs a deep copy on <i>other</i>.
21249
     */
21250
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
21251
      __isset_bit_vector.clear();
21252
      __isset_bit_vector.or(other.__isset_bit_vector);
21253
      this.warehouseId = other.warehouseId;
21254
      this.providerId = other.providerId;
21255
    }
21256
 
21257
    public markOrdersAsManifested_args deepCopy() {
21258
      return new markOrdersAsManifested_args(this);
21259
    }
21260
 
21261
    @Deprecated
21262
    public markOrdersAsManifested_args clone() {
21263
      return new markOrdersAsManifested_args(this);
21264
    }
21265
 
21266
    public long getWarehouseId() {
21267
      return this.warehouseId;
21268
    }
21269
 
21270
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
21271
      this.warehouseId = warehouseId;
21272
      setWarehouseIdIsSet(true);
21273
      return this;
21274
    }
21275
 
21276
    public void unsetWarehouseId() {
21277
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
21278
    }
21279
 
21280
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
21281
    public boolean isSetWarehouseId() {
21282
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
21283
    }
21284
 
21285
    public void setWarehouseIdIsSet(boolean value) {
21286
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
21287
    }
21288
 
21289
    public long getProviderId() {
21290
      return this.providerId;
21291
    }
21292
 
21293
    public markOrdersAsManifested_args setProviderId(long providerId) {
21294
      this.providerId = providerId;
21295
      setProviderIdIsSet(true);
21296
      return this;
21297
    }
21298
 
21299
    public void unsetProviderId() {
21300
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21301
    }
21302
 
21303
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21304
    public boolean isSetProviderId() {
21305
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21306
    }
21307
 
21308
    public void setProviderIdIsSet(boolean value) {
21309
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21310
    }
21311
 
21312
    public void setFieldValue(_Fields field, Object value) {
21313
      switch (field) {
21314
      case WAREHOUSE_ID:
21315
        if (value == null) {
21316
          unsetWarehouseId();
21317
        } else {
21318
          setWarehouseId((Long)value);
21319
        }
21320
        break;
21321
 
21322
      case PROVIDER_ID:
21323
        if (value == null) {
21324
          unsetProviderId();
21325
        } else {
21326
          setProviderId((Long)value);
21327
        }
21328
        break;
21329
 
21330
      }
21331
    }
21332
 
21333
    public void setFieldValue(int fieldID, Object value) {
21334
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21335
    }
21336
 
21337
    public Object getFieldValue(_Fields field) {
21338
      switch (field) {
21339
      case WAREHOUSE_ID:
21340
        return new Long(getWarehouseId());
21341
 
21342
      case PROVIDER_ID:
21343
        return new Long(getProviderId());
21344
 
21345
      }
21346
      throw new IllegalStateException();
21347
    }
21348
 
21349
    public Object getFieldValue(int fieldId) {
21350
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21351
    }
21352
 
21353
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21354
    public boolean isSet(_Fields field) {
21355
      switch (field) {
21356
      case WAREHOUSE_ID:
21357
        return isSetWarehouseId();
21358
      case PROVIDER_ID:
21359
        return isSetProviderId();
21360
      }
21361
      throw new IllegalStateException();
21362
    }
21363
 
21364
    public boolean isSet(int fieldID) {
21365
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21366
    }
21367
 
21368
    @Override
21369
    public boolean equals(Object that) {
21370
      if (that == null)
21371
        return false;
21372
      if (that instanceof markOrdersAsManifested_args)
21373
        return this.equals((markOrdersAsManifested_args)that);
21374
      return false;
21375
    }
21376
 
21377
    public boolean equals(markOrdersAsManifested_args that) {
21378
      if (that == null)
21379
        return false;
21380
 
21381
      boolean this_present_warehouseId = true;
21382
      boolean that_present_warehouseId = true;
21383
      if (this_present_warehouseId || that_present_warehouseId) {
21384
        if (!(this_present_warehouseId && that_present_warehouseId))
21385
          return false;
21386
        if (this.warehouseId != that.warehouseId)
21387
          return false;
21388
      }
21389
 
21390
      boolean this_present_providerId = true;
21391
      boolean that_present_providerId = true;
21392
      if (this_present_providerId || that_present_providerId) {
21393
        if (!(this_present_providerId && that_present_providerId))
21394
          return false;
21395
        if (this.providerId != that.providerId)
21396
          return false;
21397
      }
21398
 
21399
      return true;
21400
    }
21401
 
21402
    @Override
21403
    public int hashCode() {
21404
      return 0;
21405
    }
21406
 
21407
    public int compareTo(markOrdersAsManifested_args other) {
21408
      if (!getClass().equals(other.getClass())) {
21409
        return getClass().getName().compareTo(other.getClass().getName());
21410
      }
21411
 
21412
      int lastComparison = 0;
21413
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
21414
 
21415
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
21416
      if (lastComparison != 0) {
21417
        return lastComparison;
21418
      }
21419
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
21420
      if (lastComparison != 0) {
21421
        return lastComparison;
21422
      }
21423
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
21424
      if (lastComparison != 0) {
21425
        return lastComparison;
21426
      }
21427
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
21428
      if (lastComparison != 0) {
21429
        return lastComparison;
21430
      }
21431
      return 0;
21432
    }
21433
 
21434
    public void read(TProtocol iprot) throws TException {
21435
      TField field;
21436
      iprot.readStructBegin();
21437
      while (true)
21438
      {
21439
        field = iprot.readFieldBegin();
21440
        if (field.type == TType.STOP) { 
21441
          break;
21442
        }
21443
        _Fields fieldId = _Fields.findByThriftId(field.id);
21444
        if (fieldId == null) {
21445
          TProtocolUtil.skip(iprot, field.type);
21446
        } else {
21447
          switch (fieldId) {
21448
            case WAREHOUSE_ID:
21449
              if (field.type == TType.I64) {
21450
                this.warehouseId = iprot.readI64();
21451
                setWarehouseIdIsSet(true);
21452
              } else { 
21453
                TProtocolUtil.skip(iprot, field.type);
21454
              }
21455
              break;
21456
            case PROVIDER_ID:
21457
              if (field.type == TType.I64) {
21458
                this.providerId = iprot.readI64();
21459
                setProviderIdIsSet(true);
21460
              } else { 
21461
                TProtocolUtil.skip(iprot, field.type);
21462
              }
21463
              break;
21464
          }
21465
          iprot.readFieldEnd();
21466
        }
21467
      }
21468
      iprot.readStructEnd();
21469
      validate();
21470
    }
21471
 
21472
    public void write(TProtocol oprot) throws TException {
21473
      validate();
21474
 
21475
      oprot.writeStructBegin(STRUCT_DESC);
21476
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21477
      oprot.writeI64(this.warehouseId);
21478
      oprot.writeFieldEnd();
21479
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21480
      oprot.writeI64(this.providerId);
21481
      oprot.writeFieldEnd();
21482
      oprot.writeFieldStop();
21483
      oprot.writeStructEnd();
21484
    }
21485
 
21486
    @Override
21487
    public String toString() {
21488
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
21489
      boolean first = true;
21490
 
21491
      sb.append("warehouseId:");
21492
      sb.append(this.warehouseId);
21493
      first = false;
21494
      if (!first) sb.append(", ");
21495
      sb.append("providerId:");
21496
      sb.append(this.providerId);
21497
      first = false;
21498
      sb.append(")");
21499
      return sb.toString();
21500
    }
21501
 
21502
    public void validate() throws TException {
21503
      // check for required fields
21504
    }
21505
 
21506
  }
21507
 
21508
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
21509
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
21510
 
21511
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21512
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21513
 
21514
    private boolean success;
21515
    private TransactionServiceException ex;
21516
 
21517
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21518
    public enum _Fields implements TFieldIdEnum {
21519
      SUCCESS((short)0, "success"),
21520
      EX((short)1, "ex");
21521
 
21522
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21523
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21524
 
21525
      static {
21526
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21527
          byId.put((int)field._thriftId, field);
21528
          byName.put(field.getFieldName(), field);
21529
        }
21530
      }
21531
 
21532
      /**
21533
       * Find the _Fields constant that matches fieldId, or null if its not found.
21534
       */
21535
      public static _Fields findByThriftId(int fieldId) {
21536
        return byId.get(fieldId);
21537
      }
21538
 
21539
      /**
21540
       * Find the _Fields constant that matches fieldId, throwing an exception
21541
       * if it is not found.
21542
       */
21543
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21544
        _Fields fields = findByThriftId(fieldId);
21545
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21546
        return fields;
21547
      }
21548
 
21549
      /**
21550
       * Find the _Fields constant that matches name, or null if its not found.
21551
       */
21552
      public static _Fields findByName(String name) {
21553
        return byName.get(name);
21554
      }
21555
 
21556
      private final short _thriftId;
21557
      private final String _fieldName;
21558
 
21559
      _Fields(short thriftId, String fieldName) {
21560
        _thriftId = thriftId;
21561
        _fieldName = fieldName;
21562
      }
21563
 
21564
      public short getThriftFieldId() {
21565
        return _thriftId;
21566
      }
21567
 
21568
      public String getFieldName() {
21569
        return _fieldName;
21570
      }
21571
    }
21572
 
21573
    // isset id assignments
21574
    private static final int __SUCCESS_ISSET_ID = 0;
21575
    private BitSet __isset_bit_vector = new BitSet(1);
21576
 
21577
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21578
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21579
          new FieldValueMetaData(TType.BOOL)));
21580
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21581
          new FieldValueMetaData(TType.STRUCT)));
21582
    }});
21583
 
21584
    static {
21585
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
21586
    }
21587
 
21588
    public markOrdersAsManifested_result() {
21589
    }
21590
 
21591
    public markOrdersAsManifested_result(
21592
      boolean success,
21593
      TransactionServiceException ex)
21594
    {
21595
      this();
21596
      this.success = success;
21597
      setSuccessIsSet(true);
21598
      this.ex = ex;
21599
    }
21600
 
21601
    /**
21602
     * Performs a deep copy on <i>other</i>.
21603
     */
21604
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
21605
      __isset_bit_vector.clear();
21606
      __isset_bit_vector.or(other.__isset_bit_vector);
21607
      this.success = other.success;
21608
      if (other.isSetEx()) {
21609
        this.ex = new TransactionServiceException(other.ex);
21610
      }
21611
    }
21612
 
21613
    public markOrdersAsManifested_result deepCopy() {
21614
      return new markOrdersAsManifested_result(this);
21615
    }
21616
 
21617
    @Deprecated
21618
    public markOrdersAsManifested_result clone() {
21619
      return new markOrdersAsManifested_result(this);
21620
    }
21621
 
21622
    public boolean isSuccess() {
21623
      return this.success;
21624
    }
21625
 
21626
    public markOrdersAsManifested_result setSuccess(boolean success) {
21627
      this.success = success;
21628
      setSuccessIsSet(true);
21629
      return this;
21630
    }
21631
 
21632
    public void unsetSuccess() {
21633
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21634
    }
21635
 
21636
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21637
    public boolean isSetSuccess() {
21638
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21639
    }
21640
 
21641
    public void setSuccessIsSet(boolean value) {
21642
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21643
    }
21644
 
21645
    public TransactionServiceException getEx() {
21646
      return this.ex;
21647
    }
21648
 
21649
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
21650
      this.ex = ex;
21651
      return this;
21652
    }
21653
 
21654
    public void unsetEx() {
21655
      this.ex = null;
21656
    }
21657
 
21658
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21659
    public boolean isSetEx() {
21660
      return this.ex != null;
21661
    }
21662
 
21663
    public void setExIsSet(boolean value) {
21664
      if (!value) {
21665
        this.ex = null;
21666
      }
21667
    }
21668
 
21669
    public void setFieldValue(_Fields field, Object value) {
21670
      switch (field) {
21671
      case SUCCESS:
21672
        if (value == null) {
21673
          unsetSuccess();
21674
        } else {
21675
          setSuccess((Boolean)value);
21676
        }
21677
        break;
21678
 
21679
      case EX:
21680
        if (value == null) {
21681
          unsetEx();
21682
        } else {
21683
          setEx((TransactionServiceException)value);
21684
        }
21685
        break;
21686
 
21687
      }
21688
    }
21689
 
21690
    public void setFieldValue(int fieldID, Object value) {
21691
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21692
    }
21693
 
21694
    public Object getFieldValue(_Fields field) {
21695
      switch (field) {
21696
      case SUCCESS:
21697
        return new Boolean(isSuccess());
21698
 
21699
      case EX:
21700
        return getEx();
21701
 
21702
      }
21703
      throw new IllegalStateException();
21704
    }
21705
 
21706
    public Object getFieldValue(int fieldId) {
21707
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21708
    }
21709
 
21710
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21711
    public boolean isSet(_Fields field) {
21712
      switch (field) {
21713
      case SUCCESS:
21714
        return isSetSuccess();
21715
      case EX:
21716
        return isSetEx();
21717
      }
21718
      throw new IllegalStateException();
21719
    }
21720
 
21721
    public boolean isSet(int fieldID) {
21722
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21723
    }
21724
 
21725
    @Override
21726
    public boolean equals(Object that) {
21727
      if (that == null)
21728
        return false;
21729
      if (that instanceof markOrdersAsManifested_result)
21730
        return this.equals((markOrdersAsManifested_result)that);
21731
      return false;
21732
    }
21733
 
21734
    public boolean equals(markOrdersAsManifested_result that) {
21735
      if (that == null)
21736
        return false;
21737
 
21738
      boolean this_present_success = true;
21739
      boolean that_present_success = true;
21740
      if (this_present_success || that_present_success) {
21741
        if (!(this_present_success && that_present_success))
21742
          return false;
21743
        if (this.success != that.success)
21744
          return false;
21745
      }
21746
 
21747
      boolean this_present_ex = true && this.isSetEx();
21748
      boolean that_present_ex = true && that.isSetEx();
21749
      if (this_present_ex || that_present_ex) {
21750
        if (!(this_present_ex && that_present_ex))
21751
          return false;
21752
        if (!this.ex.equals(that.ex))
21753
          return false;
21754
      }
21755
 
21756
      return true;
21757
    }
21758
 
21759
    @Override
21760
    public int hashCode() {
21761
      return 0;
21762
    }
21763
 
21764
    public int compareTo(markOrdersAsManifested_result other) {
21765
      if (!getClass().equals(other.getClass())) {
21766
        return getClass().getName().compareTo(other.getClass().getName());
21767
      }
21768
 
21769
      int lastComparison = 0;
21770
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
21771
 
21772
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21773
      if (lastComparison != 0) {
21774
        return lastComparison;
21775
      }
21776
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21777
      if (lastComparison != 0) {
21778
        return lastComparison;
21779
      }
21780
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21781
      if (lastComparison != 0) {
21782
        return lastComparison;
21783
      }
21784
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21785
      if (lastComparison != 0) {
21786
        return lastComparison;
21787
      }
21788
      return 0;
21789
    }
21790
 
21791
    public void read(TProtocol iprot) throws TException {
21792
      TField field;
21793
      iprot.readStructBegin();
21794
      while (true)
21795
      {
21796
        field = iprot.readFieldBegin();
21797
        if (field.type == TType.STOP) { 
21798
          break;
21799
        }
21800
        _Fields fieldId = _Fields.findByThriftId(field.id);
21801
        if (fieldId == null) {
21802
          TProtocolUtil.skip(iprot, field.type);
21803
        } else {
21804
          switch (fieldId) {
21805
            case SUCCESS:
21806
              if (field.type == TType.BOOL) {
21807
                this.success = iprot.readBool();
21808
                setSuccessIsSet(true);
21809
              } else { 
21810
                TProtocolUtil.skip(iprot, field.type);
21811
              }
21812
              break;
21813
            case EX:
21814
              if (field.type == TType.STRUCT) {
21815
                this.ex = new TransactionServiceException();
21816
                this.ex.read(iprot);
21817
              } else { 
21818
                TProtocolUtil.skip(iprot, field.type);
21819
              }
21820
              break;
21821
          }
21822
          iprot.readFieldEnd();
21823
        }
21824
      }
21825
      iprot.readStructEnd();
21826
      validate();
21827
    }
21828
 
21829
    public void write(TProtocol oprot) throws TException {
21830
      oprot.writeStructBegin(STRUCT_DESC);
21831
 
21832
      if (this.isSetSuccess()) {
21833
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21834
        oprot.writeBool(this.success);
21835
        oprot.writeFieldEnd();
21836
      } else if (this.isSetEx()) {
21837
        oprot.writeFieldBegin(EX_FIELD_DESC);
21838
        this.ex.write(oprot);
21839
        oprot.writeFieldEnd();
21840
      }
21841
      oprot.writeFieldStop();
21842
      oprot.writeStructEnd();
21843
    }
21844
 
21845
    @Override
21846
    public String toString() {
21847
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
21848
      boolean first = true;
21849
 
21850
      sb.append("success:");
21851
      sb.append(this.success);
21852
      first = false;
21853
      if (!first) sb.append(", ");
21854
      sb.append("ex:");
21855
      if (this.ex == null) {
21856
        sb.append("null");
21857
      } else {
21858
        sb.append(this.ex);
21859
      }
21860
      first = false;
21861
      sb.append(")");
21862
      return sb.toString();
21863
    }
21864
 
21865
    public void validate() throws TException {
21866
      // check for required fields
21867
    }
21868
 
21869
  }
21870
 
1114 chandransh 21871
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
21872
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
21873
 
21874
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21875
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
21876
 
21877
    private long providerId;
1245 chandransh 21878
    private Map<String,String> pickupDetails;
1114 chandransh 21879
 
21880
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21881
    public enum _Fields implements TFieldIdEnum {
21882
      PROVIDER_ID((short)1, "providerId"),
21883
      PICKUP_DETAILS((short)2, "pickupDetails");
21884
 
21885
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21886
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21887
 
21888
      static {
21889
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21890
          byId.put((int)field._thriftId, field);
21891
          byName.put(field.getFieldName(), field);
21892
        }
21893
      }
21894
 
21895
      /**
21896
       * Find the _Fields constant that matches fieldId, or null if its not found.
21897
       */
21898
      public static _Fields findByThriftId(int fieldId) {
21899
        return byId.get(fieldId);
21900
      }
21901
 
21902
      /**
21903
       * Find the _Fields constant that matches fieldId, throwing an exception
21904
       * if it is not found.
21905
       */
21906
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21907
        _Fields fields = findByThriftId(fieldId);
21908
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21909
        return fields;
21910
      }
21911
 
21912
      /**
21913
       * Find the _Fields constant that matches name, or null if its not found.
21914
       */
21915
      public static _Fields findByName(String name) {
21916
        return byName.get(name);
21917
      }
21918
 
21919
      private final short _thriftId;
21920
      private final String _fieldName;
21921
 
21922
      _Fields(short thriftId, String fieldName) {
21923
        _thriftId = thriftId;
21924
        _fieldName = fieldName;
21925
      }
21926
 
21927
      public short getThriftFieldId() {
21928
        return _thriftId;
21929
      }
21930
 
21931
      public String getFieldName() {
21932
        return _fieldName;
21933
      }
21934
    }
21935
 
21936
    // isset id assignments
21937
    private static final int __PROVIDERID_ISSET_ID = 0;
21938
    private BitSet __isset_bit_vector = new BitSet(1);
21939
 
21940
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21941
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21942
          new FieldValueMetaData(TType.I64)));
21943
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
21944
          new MapMetaData(TType.MAP, 
21945
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 21946
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 21947
    }});
21948
 
21949
    static {
21950
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
21951
    }
21952
 
21953
    public markOrdersAsPickedUp_args() {
21954
    }
21955
 
21956
    public markOrdersAsPickedUp_args(
21957
      long providerId,
1245 chandransh 21958
      Map<String,String> pickupDetails)
1114 chandransh 21959
    {
21960
      this();
21961
      this.providerId = providerId;
21962
      setProviderIdIsSet(true);
21963
      this.pickupDetails = pickupDetails;
21964
    }
21965
 
21966
    /**
21967
     * Performs a deep copy on <i>other</i>.
21968
     */
21969
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
21970
      __isset_bit_vector.clear();
21971
      __isset_bit_vector.or(other.__isset_bit_vector);
21972
      this.providerId = other.providerId;
21973
      if (other.isSetPickupDetails()) {
1245 chandransh 21974
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
21975
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 21976
 
21977
          String other_element_key = other_element.getKey();
1245 chandransh 21978
          String other_element_value = other_element.getValue();
1114 chandransh 21979
 
21980
          String __this__pickupDetails_copy_key = other_element_key;
21981
 
1245 chandransh 21982
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 21983
 
21984
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
21985
        }
21986
        this.pickupDetails = __this__pickupDetails;
21987
      }
21988
    }
21989
 
21990
    public markOrdersAsPickedUp_args deepCopy() {
21991
      return new markOrdersAsPickedUp_args(this);
21992
    }
21993
 
21994
    @Deprecated
21995
    public markOrdersAsPickedUp_args clone() {
21996
      return new markOrdersAsPickedUp_args(this);
21997
    }
21998
 
21999
    public long getProviderId() {
22000
      return this.providerId;
22001
    }
22002
 
22003
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
22004
      this.providerId = providerId;
22005
      setProviderIdIsSet(true);
22006
      return this;
22007
    }
22008
 
22009
    public void unsetProviderId() {
22010
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22011
    }
22012
 
22013
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22014
    public boolean isSetProviderId() {
22015
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22016
    }
22017
 
22018
    public void setProviderIdIsSet(boolean value) {
22019
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22020
    }
22021
 
22022
    public int getPickupDetailsSize() {
22023
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
22024
    }
22025
 
1245 chandransh 22026
    public void putToPickupDetails(String key, String val) {
1114 chandransh 22027
      if (this.pickupDetails == null) {
1245 chandransh 22028
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 22029
      }
22030
      this.pickupDetails.put(key, val);
22031
    }
22032
 
1245 chandransh 22033
    public Map<String,String> getPickupDetails() {
1114 chandransh 22034
      return this.pickupDetails;
22035
    }
22036
 
1245 chandransh 22037
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 22038
      this.pickupDetails = pickupDetails;
22039
      return this;
22040
    }
22041
 
22042
    public void unsetPickupDetails() {
22043
      this.pickupDetails = null;
22044
    }
22045
 
22046
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
22047
    public boolean isSetPickupDetails() {
22048
      return this.pickupDetails != null;
22049
    }
22050
 
22051
    public void setPickupDetailsIsSet(boolean value) {
22052
      if (!value) {
22053
        this.pickupDetails = null;
22054
      }
22055
    }
22056
 
22057
    public void setFieldValue(_Fields field, Object value) {
22058
      switch (field) {
22059
      case PROVIDER_ID:
22060
        if (value == null) {
22061
          unsetProviderId();
22062
        } else {
22063
          setProviderId((Long)value);
22064
        }
22065
        break;
22066
 
22067
      case PICKUP_DETAILS:
22068
        if (value == null) {
22069
          unsetPickupDetails();
22070
        } else {
1245 chandransh 22071
          setPickupDetails((Map<String,String>)value);
1114 chandransh 22072
        }
22073
        break;
22074
 
22075
      }
22076
    }
22077
 
22078
    public void setFieldValue(int fieldID, Object value) {
22079
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22080
    }
22081
 
22082
    public Object getFieldValue(_Fields field) {
22083
      switch (field) {
22084
      case PROVIDER_ID:
22085
        return new Long(getProviderId());
22086
 
22087
      case PICKUP_DETAILS:
22088
        return getPickupDetails();
22089
 
22090
      }
22091
      throw new IllegalStateException();
22092
    }
22093
 
22094
    public Object getFieldValue(int fieldId) {
22095
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22096
    }
22097
 
22098
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22099
    public boolean isSet(_Fields field) {
22100
      switch (field) {
22101
      case PROVIDER_ID:
22102
        return isSetProviderId();
22103
      case PICKUP_DETAILS:
22104
        return isSetPickupDetails();
22105
      }
22106
      throw new IllegalStateException();
22107
    }
22108
 
22109
    public boolean isSet(int fieldID) {
22110
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22111
    }
22112
 
22113
    @Override
22114
    public boolean equals(Object that) {
22115
      if (that == null)
22116
        return false;
22117
      if (that instanceof markOrdersAsPickedUp_args)
22118
        return this.equals((markOrdersAsPickedUp_args)that);
22119
      return false;
22120
    }
22121
 
22122
    public boolean equals(markOrdersAsPickedUp_args that) {
22123
      if (that == null)
22124
        return false;
22125
 
22126
      boolean this_present_providerId = true;
22127
      boolean that_present_providerId = true;
22128
      if (this_present_providerId || that_present_providerId) {
22129
        if (!(this_present_providerId && that_present_providerId))
22130
          return false;
22131
        if (this.providerId != that.providerId)
22132
          return false;
22133
      }
22134
 
22135
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
22136
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
22137
      if (this_present_pickupDetails || that_present_pickupDetails) {
22138
        if (!(this_present_pickupDetails && that_present_pickupDetails))
22139
          return false;
22140
        if (!this.pickupDetails.equals(that.pickupDetails))
22141
          return false;
22142
      }
22143
 
22144
      return true;
22145
    }
22146
 
22147
    @Override
22148
    public int hashCode() {
22149
      return 0;
22150
    }
22151
 
22152
    public void read(TProtocol iprot) throws TException {
22153
      TField field;
22154
      iprot.readStructBegin();
22155
      while (true)
22156
      {
22157
        field = iprot.readFieldBegin();
22158
        if (field.type == TType.STOP) { 
22159
          break;
22160
        }
22161
        _Fields fieldId = _Fields.findByThriftId(field.id);
22162
        if (fieldId == null) {
22163
          TProtocolUtil.skip(iprot, field.type);
22164
        } else {
22165
          switch (fieldId) {
22166
            case PROVIDER_ID:
22167
              if (field.type == TType.I64) {
22168
                this.providerId = iprot.readI64();
22169
                setProviderIdIsSet(true);
22170
              } else { 
22171
                TProtocolUtil.skip(iprot, field.type);
22172
              }
22173
              break;
22174
            case PICKUP_DETAILS:
22175
              if (field.type == TType.MAP) {
22176
                {
1382 varun.gupt 22177
                  TMap _map48 = iprot.readMapBegin();
22178
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
22179
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 22180
                  {
1382 varun.gupt 22181
                    String _key50;
22182
                    String _val51;
22183
                    _key50 = iprot.readString();
22184
                    _val51 = iprot.readString();
22185
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 22186
                  }
22187
                  iprot.readMapEnd();
22188
                }
22189
              } else { 
22190
                TProtocolUtil.skip(iprot, field.type);
22191
              }
22192
              break;
22193
          }
22194
          iprot.readFieldEnd();
22195
        }
22196
      }
22197
      iprot.readStructEnd();
22198
      validate();
22199
    }
22200
 
22201
    public void write(TProtocol oprot) throws TException {
22202
      validate();
22203
 
22204
      oprot.writeStructBegin(STRUCT_DESC);
22205
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22206
      oprot.writeI64(this.providerId);
22207
      oprot.writeFieldEnd();
22208
      if (this.pickupDetails != null) {
22209
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
22210
        {
1245 chandransh 22211
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 22212
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 22213
          {
1382 varun.gupt 22214
            oprot.writeString(_iter52.getKey());
22215
            oprot.writeString(_iter52.getValue());
1114 chandransh 22216
          }
22217
          oprot.writeMapEnd();
22218
        }
22219
        oprot.writeFieldEnd();
22220
      }
22221
      oprot.writeFieldStop();
22222
      oprot.writeStructEnd();
22223
    }
22224
 
22225
    @Override
22226
    public String toString() {
22227
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
22228
      boolean first = true;
22229
 
22230
      sb.append("providerId:");
22231
      sb.append(this.providerId);
22232
      first = false;
22233
      if (!first) sb.append(", ");
22234
      sb.append("pickupDetails:");
22235
      if (this.pickupDetails == null) {
22236
        sb.append("null");
22237
      } else {
22238
        sb.append(this.pickupDetails);
22239
      }
22240
      first = false;
22241
      sb.append(")");
22242
      return sb.toString();
22243
    }
22244
 
22245
    public void validate() throws TException {
22246
      // check for required fields
22247
    }
22248
 
22249
  }
22250
 
22251
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
22252
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
22253
 
22254
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
22255
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22256
 
22257
    private List<Order> success;
22258
    private TransactionServiceException ex;
22259
 
22260
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22261
    public enum _Fields implements TFieldIdEnum {
22262
      SUCCESS((short)0, "success"),
22263
      EX((short)1, "ex");
22264
 
22265
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22266
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22267
 
22268
      static {
22269
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22270
          byId.put((int)field._thriftId, field);
22271
          byName.put(field.getFieldName(), field);
22272
        }
22273
      }
22274
 
22275
      /**
22276
       * Find the _Fields constant that matches fieldId, or null if its not found.
22277
       */
22278
      public static _Fields findByThriftId(int fieldId) {
22279
        return byId.get(fieldId);
22280
      }
22281
 
22282
      /**
22283
       * Find the _Fields constant that matches fieldId, throwing an exception
22284
       * if it is not found.
22285
       */
22286
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22287
        _Fields fields = findByThriftId(fieldId);
22288
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22289
        return fields;
22290
      }
22291
 
22292
      /**
22293
       * Find the _Fields constant that matches name, or null if its not found.
22294
       */
22295
      public static _Fields findByName(String name) {
22296
        return byName.get(name);
22297
      }
22298
 
22299
      private final short _thriftId;
22300
      private final String _fieldName;
22301
 
22302
      _Fields(short thriftId, String fieldName) {
22303
        _thriftId = thriftId;
22304
        _fieldName = fieldName;
22305
      }
22306
 
22307
      public short getThriftFieldId() {
22308
        return _thriftId;
22309
      }
22310
 
22311
      public String getFieldName() {
22312
        return _fieldName;
22313
      }
22314
    }
22315
 
22316
    // isset id assignments
22317
 
22318
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22319
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
22320
          new ListMetaData(TType.LIST, 
22321
              new StructMetaData(TType.STRUCT, Order.class))));
22322
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22323
          new FieldValueMetaData(TType.STRUCT)));
22324
    }});
22325
 
22326
    static {
22327
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
22328
    }
22329
 
22330
    public markOrdersAsPickedUp_result() {
22331
    }
22332
 
22333
    public markOrdersAsPickedUp_result(
22334
      List<Order> success,
22335
      TransactionServiceException ex)
22336
    {
22337
      this();
22338
      this.success = success;
22339
      this.ex = ex;
22340
    }
22341
 
22342
    /**
22343
     * Performs a deep copy on <i>other</i>.
22344
     */
22345
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
22346
      if (other.isSetSuccess()) {
22347
        List<Order> __this__success = new ArrayList<Order>();
22348
        for (Order other_element : other.success) {
22349
          __this__success.add(new Order(other_element));
22350
        }
22351
        this.success = __this__success;
22352
      }
22353
      if (other.isSetEx()) {
22354
        this.ex = new TransactionServiceException(other.ex);
22355
      }
22356
    }
22357
 
22358
    public markOrdersAsPickedUp_result deepCopy() {
22359
      return new markOrdersAsPickedUp_result(this);
22360
    }
22361
 
22362
    @Deprecated
22363
    public markOrdersAsPickedUp_result clone() {
22364
      return new markOrdersAsPickedUp_result(this);
22365
    }
22366
 
22367
    public int getSuccessSize() {
22368
      return (this.success == null) ? 0 : this.success.size();
22369
    }
22370
 
22371
    public java.util.Iterator<Order> getSuccessIterator() {
22372
      return (this.success == null) ? null : this.success.iterator();
22373
    }
22374
 
22375
    public void addToSuccess(Order elem) {
22376
      if (this.success == null) {
22377
        this.success = new ArrayList<Order>();
22378
      }
22379
      this.success.add(elem);
22380
    }
22381
 
22382
    public List<Order> getSuccess() {
22383
      return this.success;
22384
    }
22385
 
22386
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
22387
      this.success = success;
22388
      return this;
22389
    }
22390
 
22391
    public void unsetSuccess() {
22392
      this.success = null;
22393
    }
22394
 
22395
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22396
    public boolean isSetSuccess() {
22397
      return this.success != null;
22398
    }
22399
 
22400
    public void setSuccessIsSet(boolean value) {
22401
      if (!value) {
22402
        this.success = null;
22403
      }
22404
    }
22405
 
22406
    public TransactionServiceException getEx() {
22407
      return this.ex;
22408
    }
22409
 
22410
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
22411
      this.ex = ex;
22412
      return this;
22413
    }
22414
 
22415
    public void unsetEx() {
22416
      this.ex = null;
22417
    }
22418
 
22419
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22420
    public boolean isSetEx() {
22421
      return this.ex != null;
22422
    }
22423
 
22424
    public void setExIsSet(boolean value) {
22425
      if (!value) {
22426
        this.ex = null;
22427
      }
22428
    }
22429
 
22430
    public void setFieldValue(_Fields field, Object value) {
22431
      switch (field) {
22432
      case SUCCESS:
22433
        if (value == null) {
22434
          unsetSuccess();
22435
        } else {
22436
          setSuccess((List<Order>)value);
22437
        }
22438
        break;
22439
 
22440
      case EX:
22441
        if (value == null) {
22442
          unsetEx();
22443
        } else {
22444
          setEx((TransactionServiceException)value);
22445
        }
22446
        break;
22447
 
22448
      }
22449
    }
22450
 
22451
    public void setFieldValue(int fieldID, Object value) {
22452
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22453
    }
22454
 
22455
    public Object getFieldValue(_Fields field) {
22456
      switch (field) {
22457
      case SUCCESS:
22458
        return getSuccess();
22459
 
22460
      case EX:
22461
        return getEx();
22462
 
22463
      }
22464
      throw new IllegalStateException();
22465
    }
22466
 
22467
    public Object getFieldValue(int fieldId) {
22468
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22469
    }
22470
 
22471
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22472
    public boolean isSet(_Fields field) {
22473
      switch (field) {
22474
      case SUCCESS:
22475
        return isSetSuccess();
22476
      case EX:
22477
        return isSetEx();
22478
      }
22479
      throw new IllegalStateException();
22480
    }
22481
 
22482
    public boolean isSet(int fieldID) {
22483
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22484
    }
22485
 
22486
    @Override
22487
    public boolean equals(Object that) {
22488
      if (that == null)
22489
        return false;
22490
      if (that instanceof markOrdersAsPickedUp_result)
22491
        return this.equals((markOrdersAsPickedUp_result)that);
22492
      return false;
22493
    }
22494
 
22495
    public boolean equals(markOrdersAsPickedUp_result that) {
22496
      if (that == null)
22497
        return false;
22498
 
22499
      boolean this_present_success = true && this.isSetSuccess();
22500
      boolean that_present_success = true && that.isSetSuccess();
22501
      if (this_present_success || that_present_success) {
22502
        if (!(this_present_success && that_present_success))
22503
          return false;
22504
        if (!this.success.equals(that.success))
22505
          return false;
22506
      }
22507
 
22508
      boolean this_present_ex = true && this.isSetEx();
22509
      boolean that_present_ex = true && that.isSetEx();
22510
      if (this_present_ex || that_present_ex) {
22511
        if (!(this_present_ex && that_present_ex))
22512
          return false;
22513
        if (!this.ex.equals(that.ex))
22514
          return false;
22515
      }
22516
 
22517
      return true;
22518
    }
22519
 
22520
    @Override
22521
    public int hashCode() {
22522
      return 0;
22523
    }
22524
 
22525
    public int compareTo(markOrdersAsPickedUp_result other) {
22526
      if (!getClass().equals(other.getClass())) {
22527
        return getClass().getName().compareTo(other.getClass().getName());
22528
      }
22529
 
22530
      int lastComparison = 0;
22531
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
22532
 
22533
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22534
      if (lastComparison != 0) {
22535
        return lastComparison;
22536
      }
22537
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22538
      if (lastComparison != 0) {
22539
        return lastComparison;
22540
      }
22541
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22542
      if (lastComparison != 0) {
22543
        return lastComparison;
22544
      }
22545
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22546
      if (lastComparison != 0) {
22547
        return lastComparison;
22548
      }
22549
      return 0;
22550
    }
22551
 
22552
    public void read(TProtocol iprot) throws TException {
22553
      TField field;
22554
      iprot.readStructBegin();
22555
      while (true)
22556
      {
22557
        field = iprot.readFieldBegin();
22558
        if (field.type == TType.STOP) { 
22559
          break;
22560
        }
22561
        _Fields fieldId = _Fields.findByThriftId(field.id);
22562
        if (fieldId == null) {
22563
          TProtocolUtil.skip(iprot, field.type);
22564
        } else {
22565
          switch (fieldId) {
22566
            case SUCCESS:
22567
              if (field.type == TType.LIST) {
22568
                {
1382 varun.gupt 22569
                  TList _list53 = iprot.readListBegin();
22570
                  this.success = new ArrayList<Order>(_list53.size);
22571
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 22572
                  {
1382 varun.gupt 22573
                    Order _elem55;
22574
                    _elem55 = new Order();
22575
                    _elem55.read(iprot);
22576
                    this.success.add(_elem55);
1114 chandransh 22577
                  }
22578
                  iprot.readListEnd();
22579
                }
22580
              } else { 
22581
                TProtocolUtil.skip(iprot, field.type);
22582
              }
22583
              break;
22584
            case EX:
22585
              if (field.type == TType.STRUCT) {
22586
                this.ex = new TransactionServiceException();
22587
                this.ex.read(iprot);
22588
              } else { 
22589
                TProtocolUtil.skip(iprot, field.type);
22590
              }
22591
              break;
22592
          }
22593
          iprot.readFieldEnd();
22594
        }
22595
      }
22596
      iprot.readStructEnd();
22597
      validate();
22598
    }
22599
 
22600
    public void write(TProtocol oprot) throws TException {
22601
      oprot.writeStructBegin(STRUCT_DESC);
22602
 
22603
      if (this.isSetSuccess()) {
22604
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22605
        {
22606
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 22607
          for (Order _iter56 : this.success)
1114 chandransh 22608
          {
1382 varun.gupt 22609
            _iter56.write(oprot);
1114 chandransh 22610
          }
22611
          oprot.writeListEnd();
22612
        }
22613
        oprot.writeFieldEnd();
22614
      } else if (this.isSetEx()) {
22615
        oprot.writeFieldBegin(EX_FIELD_DESC);
22616
        this.ex.write(oprot);
22617
        oprot.writeFieldEnd();
22618
      }
22619
      oprot.writeFieldStop();
22620
      oprot.writeStructEnd();
22621
    }
22622
 
22623
    @Override
22624
    public String toString() {
22625
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
22626
      boolean first = true;
22627
 
22628
      sb.append("success:");
22629
      if (this.success == null) {
22630
        sb.append("null");
22631
      } else {
22632
        sb.append(this.success);
22633
      }
22634
      first = false;
22635
      if (!first) sb.append(", ");
22636
      sb.append("ex:");
22637
      if (this.ex == null) {
22638
        sb.append("null");
22639
      } else {
22640
        sb.append(this.ex);
22641
      }
22642
      first = false;
22643
      sb.append(")");
22644
      return sb.toString();
22645
    }
22646
 
22647
    public void validate() throws TException {
22648
      // check for required fields
22649
    }
22650
 
22651
  }
22652
 
1133 chandransh 22653
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
22654
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
22655
 
22656
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22657
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
22658
 
22659
    private long providerId;
22660
    private Map<String,String> deliveredOrders;
22661
 
22662
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22663
    public enum _Fields implements TFieldIdEnum {
22664
      PROVIDER_ID((short)1, "providerId"),
22665
      DELIVERED_ORDERS((short)2, "deliveredOrders");
22666
 
22667
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22668
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22669
 
22670
      static {
22671
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22672
          byId.put((int)field._thriftId, field);
22673
          byName.put(field.getFieldName(), field);
22674
        }
22675
      }
22676
 
22677
      /**
22678
       * Find the _Fields constant that matches fieldId, or null if its not found.
22679
       */
22680
      public static _Fields findByThriftId(int fieldId) {
22681
        return byId.get(fieldId);
22682
      }
22683
 
22684
      /**
22685
       * Find the _Fields constant that matches fieldId, throwing an exception
22686
       * if it is not found.
22687
       */
22688
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22689
        _Fields fields = findByThriftId(fieldId);
22690
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22691
        return fields;
22692
      }
22693
 
22694
      /**
22695
       * Find the _Fields constant that matches name, or null if its not found.
22696
       */
22697
      public static _Fields findByName(String name) {
22698
        return byName.get(name);
22699
      }
22700
 
22701
      private final short _thriftId;
22702
      private final String _fieldName;
22703
 
22704
      _Fields(short thriftId, String fieldName) {
22705
        _thriftId = thriftId;
22706
        _fieldName = fieldName;
22707
      }
22708
 
22709
      public short getThriftFieldId() {
22710
        return _thriftId;
22711
      }
22712
 
22713
      public String getFieldName() {
22714
        return _fieldName;
22715
      }
22716
    }
22717
 
22718
    // isset id assignments
22719
    private static final int __PROVIDERID_ISSET_ID = 0;
22720
    private BitSet __isset_bit_vector = new BitSet(1);
22721
 
22722
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22723
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22724
          new FieldValueMetaData(TType.I64)));
22725
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
22726
          new MapMetaData(TType.MAP, 
22727
              new FieldValueMetaData(TType.STRING), 
22728
              new FieldValueMetaData(TType.STRING))));
22729
    }});
22730
 
22731
    static {
22732
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
22733
    }
22734
 
22735
    public markOrdersAsDelivered_args() {
22736
    }
22737
 
22738
    public markOrdersAsDelivered_args(
22739
      long providerId,
22740
      Map<String,String> deliveredOrders)
22741
    {
22742
      this();
22743
      this.providerId = providerId;
22744
      setProviderIdIsSet(true);
22745
      this.deliveredOrders = deliveredOrders;
22746
    }
22747
 
22748
    /**
22749
     * Performs a deep copy on <i>other</i>.
22750
     */
22751
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
22752
      __isset_bit_vector.clear();
22753
      __isset_bit_vector.or(other.__isset_bit_vector);
22754
      this.providerId = other.providerId;
22755
      if (other.isSetDeliveredOrders()) {
22756
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
22757
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
22758
 
22759
          String other_element_key = other_element.getKey();
22760
          String other_element_value = other_element.getValue();
22761
 
22762
          String __this__deliveredOrders_copy_key = other_element_key;
22763
 
22764
          String __this__deliveredOrders_copy_value = other_element_value;
22765
 
22766
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
22767
        }
22768
        this.deliveredOrders = __this__deliveredOrders;
22769
      }
22770
    }
22771
 
22772
    public markOrdersAsDelivered_args deepCopy() {
22773
      return new markOrdersAsDelivered_args(this);
22774
    }
22775
 
22776
    @Deprecated
22777
    public markOrdersAsDelivered_args clone() {
22778
      return new markOrdersAsDelivered_args(this);
22779
    }
22780
 
22781
    public long getProviderId() {
22782
      return this.providerId;
22783
    }
22784
 
22785
    public markOrdersAsDelivered_args setProviderId(long providerId) {
22786
      this.providerId = providerId;
22787
      setProviderIdIsSet(true);
22788
      return this;
22789
    }
22790
 
22791
    public void unsetProviderId() {
22792
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22793
    }
22794
 
22795
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22796
    public boolean isSetProviderId() {
22797
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22798
    }
22799
 
22800
    public void setProviderIdIsSet(boolean value) {
22801
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22802
    }
22803
 
22804
    public int getDeliveredOrdersSize() {
22805
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
22806
    }
22807
 
22808
    public void putToDeliveredOrders(String key, String val) {
22809
      if (this.deliveredOrders == null) {
22810
        this.deliveredOrders = new HashMap<String,String>();
22811
      }
22812
      this.deliveredOrders.put(key, val);
22813
    }
22814
 
22815
    public Map<String,String> getDeliveredOrders() {
22816
      return this.deliveredOrders;
22817
    }
22818
 
22819
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
22820
      this.deliveredOrders = deliveredOrders;
22821
      return this;
22822
    }
22823
 
22824
    public void unsetDeliveredOrders() {
22825
      this.deliveredOrders = null;
22826
    }
22827
 
22828
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
22829
    public boolean isSetDeliveredOrders() {
22830
      return this.deliveredOrders != null;
22831
    }
22832
 
22833
    public void setDeliveredOrdersIsSet(boolean value) {
22834
      if (!value) {
22835
        this.deliveredOrders = null;
22836
      }
22837
    }
22838
 
22839
    public void setFieldValue(_Fields field, Object value) {
22840
      switch (field) {
22841
      case PROVIDER_ID:
22842
        if (value == null) {
22843
          unsetProviderId();
22844
        } else {
22845
          setProviderId((Long)value);
22846
        }
22847
        break;
22848
 
22849
      case DELIVERED_ORDERS:
22850
        if (value == null) {
22851
          unsetDeliveredOrders();
22852
        } else {
22853
          setDeliveredOrders((Map<String,String>)value);
22854
        }
22855
        break;
22856
 
22857
      }
22858
    }
22859
 
22860
    public void setFieldValue(int fieldID, Object value) {
22861
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22862
    }
22863
 
22864
    public Object getFieldValue(_Fields field) {
22865
      switch (field) {
22866
      case PROVIDER_ID:
22867
        return new Long(getProviderId());
22868
 
22869
      case DELIVERED_ORDERS:
22870
        return getDeliveredOrders();
22871
 
22872
      }
22873
      throw new IllegalStateException();
22874
    }
22875
 
22876
    public Object getFieldValue(int fieldId) {
22877
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22878
    }
22879
 
22880
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22881
    public boolean isSet(_Fields field) {
22882
      switch (field) {
22883
      case PROVIDER_ID:
22884
        return isSetProviderId();
22885
      case DELIVERED_ORDERS:
22886
        return isSetDeliveredOrders();
22887
      }
22888
      throw new IllegalStateException();
22889
    }
22890
 
22891
    public boolean isSet(int fieldID) {
22892
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22893
    }
22894
 
22895
    @Override
22896
    public boolean equals(Object that) {
22897
      if (that == null)
22898
        return false;
22899
      if (that instanceof markOrdersAsDelivered_args)
22900
        return this.equals((markOrdersAsDelivered_args)that);
22901
      return false;
22902
    }
22903
 
22904
    public boolean equals(markOrdersAsDelivered_args that) {
22905
      if (that == null)
22906
        return false;
22907
 
22908
      boolean this_present_providerId = true;
22909
      boolean that_present_providerId = true;
22910
      if (this_present_providerId || that_present_providerId) {
22911
        if (!(this_present_providerId && that_present_providerId))
22912
          return false;
22913
        if (this.providerId != that.providerId)
22914
          return false;
22915
      }
22916
 
22917
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
22918
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
22919
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
22920
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
22921
          return false;
22922
        if (!this.deliveredOrders.equals(that.deliveredOrders))
22923
          return false;
22924
      }
22925
 
22926
      return true;
22927
    }
22928
 
22929
    @Override
22930
    public int hashCode() {
22931
      return 0;
22932
    }
22933
 
22934
    public void read(TProtocol iprot) throws TException {
22935
      TField field;
22936
      iprot.readStructBegin();
22937
      while (true)
22938
      {
22939
        field = iprot.readFieldBegin();
22940
        if (field.type == TType.STOP) { 
22941
          break;
22942
        }
22943
        _Fields fieldId = _Fields.findByThriftId(field.id);
22944
        if (fieldId == null) {
22945
          TProtocolUtil.skip(iprot, field.type);
22946
        } else {
22947
          switch (fieldId) {
22948
            case PROVIDER_ID:
22949
              if (field.type == TType.I64) {
22950
                this.providerId = iprot.readI64();
22951
                setProviderIdIsSet(true);
22952
              } else { 
22953
                TProtocolUtil.skip(iprot, field.type);
22954
              }
22955
              break;
22956
            case DELIVERED_ORDERS:
22957
              if (field.type == TType.MAP) {
22958
                {
1382 varun.gupt 22959
                  TMap _map57 = iprot.readMapBegin();
22960
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
22961
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 22962
                  {
1382 varun.gupt 22963
                    String _key59;
22964
                    String _val60;
22965
                    _key59 = iprot.readString();
22966
                    _val60 = iprot.readString();
22967
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 22968
                  }
22969
                  iprot.readMapEnd();
22970
                }
22971
              } else { 
22972
                TProtocolUtil.skip(iprot, field.type);
22973
              }
22974
              break;
22975
          }
22976
          iprot.readFieldEnd();
22977
        }
22978
      }
22979
      iprot.readStructEnd();
22980
      validate();
22981
    }
22982
 
22983
    public void write(TProtocol oprot) throws TException {
22984
      validate();
22985
 
22986
      oprot.writeStructBegin(STRUCT_DESC);
22987
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22988
      oprot.writeI64(this.providerId);
22989
      oprot.writeFieldEnd();
22990
      if (this.deliveredOrders != null) {
22991
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
22992
        {
22993
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 22994
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 22995
          {
1382 varun.gupt 22996
            oprot.writeString(_iter61.getKey());
22997
            oprot.writeString(_iter61.getValue());
1133 chandransh 22998
          }
22999
          oprot.writeMapEnd();
23000
        }
23001
        oprot.writeFieldEnd();
23002
      }
23003
      oprot.writeFieldStop();
23004
      oprot.writeStructEnd();
23005
    }
23006
 
23007
    @Override
23008
    public String toString() {
23009
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
23010
      boolean first = true;
23011
 
23012
      sb.append("providerId:");
23013
      sb.append(this.providerId);
23014
      first = false;
23015
      if (!first) sb.append(", ");
23016
      sb.append("deliveredOrders:");
23017
      if (this.deliveredOrders == null) {
23018
        sb.append("null");
23019
      } else {
23020
        sb.append(this.deliveredOrders);
23021
      }
23022
      first = false;
23023
      sb.append(")");
23024
      return sb.toString();
23025
    }
23026
 
23027
    public void validate() throws TException {
23028
      // check for required fields
23029
    }
23030
 
23031
  }
23032
 
23033
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
23034
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
23035
 
23036
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23037
 
23038
    private TransactionServiceException ex;
23039
 
23040
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23041
    public enum _Fields implements TFieldIdEnum {
23042
      EX((short)1, "ex");
23043
 
23044
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23045
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23046
 
23047
      static {
23048
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23049
          byId.put((int)field._thriftId, field);
23050
          byName.put(field.getFieldName(), field);
23051
        }
23052
      }
23053
 
23054
      /**
23055
       * Find the _Fields constant that matches fieldId, or null if its not found.
23056
       */
23057
      public static _Fields findByThriftId(int fieldId) {
23058
        return byId.get(fieldId);
23059
      }
23060
 
23061
      /**
23062
       * Find the _Fields constant that matches fieldId, throwing an exception
23063
       * if it is not found.
23064
       */
23065
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23066
        _Fields fields = findByThriftId(fieldId);
23067
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23068
        return fields;
23069
      }
23070
 
23071
      /**
23072
       * Find the _Fields constant that matches name, or null if its not found.
23073
       */
23074
      public static _Fields findByName(String name) {
23075
        return byName.get(name);
23076
      }
23077
 
23078
      private final short _thriftId;
23079
      private final String _fieldName;
23080
 
23081
      _Fields(short thriftId, String fieldName) {
23082
        _thriftId = thriftId;
23083
        _fieldName = fieldName;
23084
      }
23085
 
23086
      public short getThriftFieldId() {
23087
        return _thriftId;
23088
      }
23089
 
23090
      public String getFieldName() {
23091
        return _fieldName;
23092
      }
23093
    }
23094
 
23095
    // isset id assignments
23096
 
23097
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23098
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23099
          new FieldValueMetaData(TType.STRUCT)));
23100
    }});
23101
 
23102
    static {
23103
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
23104
    }
23105
 
23106
    public markOrdersAsDelivered_result() {
23107
    }
23108
 
23109
    public markOrdersAsDelivered_result(
23110
      TransactionServiceException ex)
23111
    {
23112
      this();
23113
      this.ex = ex;
23114
    }
23115
 
23116
    /**
23117
     * Performs a deep copy on <i>other</i>.
23118
     */
23119
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
23120
      if (other.isSetEx()) {
23121
        this.ex = new TransactionServiceException(other.ex);
23122
      }
23123
    }
23124
 
23125
    public markOrdersAsDelivered_result deepCopy() {
23126
      return new markOrdersAsDelivered_result(this);
23127
    }
23128
 
23129
    @Deprecated
23130
    public markOrdersAsDelivered_result clone() {
23131
      return new markOrdersAsDelivered_result(this);
23132
    }
23133
 
23134
    public TransactionServiceException getEx() {
23135
      return this.ex;
23136
    }
23137
 
23138
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
23139
      this.ex = ex;
23140
      return this;
23141
    }
23142
 
23143
    public void unsetEx() {
23144
      this.ex = null;
23145
    }
23146
 
23147
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23148
    public boolean isSetEx() {
23149
      return this.ex != null;
23150
    }
23151
 
23152
    public void setExIsSet(boolean value) {
23153
      if (!value) {
23154
        this.ex = null;
23155
      }
23156
    }
23157
 
23158
    public void setFieldValue(_Fields field, Object value) {
23159
      switch (field) {
23160
      case EX:
23161
        if (value == null) {
23162
          unsetEx();
23163
        } else {
23164
          setEx((TransactionServiceException)value);
23165
        }
23166
        break;
23167
 
23168
      }
23169
    }
23170
 
23171
    public void setFieldValue(int fieldID, Object value) {
23172
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23173
    }
23174
 
23175
    public Object getFieldValue(_Fields field) {
23176
      switch (field) {
23177
      case EX:
23178
        return getEx();
23179
 
23180
      }
23181
      throw new IllegalStateException();
23182
    }
23183
 
23184
    public Object getFieldValue(int fieldId) {
23185
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23186
    }
23187
 
23188
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23189
    public boolean isSet(_Fields field) {
23190
      switch (field) {
23191
      case EX:
23192
        return isSetEx();
23193
      }
23194
      throw new IllegalStateException();
23195
    }
23196
 
23197
    public boolean isSet(int fieldID) {
23198
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23199
    }
23200
 
23201
    @Override
23202
    public boolean equals(Object that) {
23203
      if (that == null)
23204
        return false;
23205
      if (that instanceof markOrdersAsDelivered_result)
23206
        return this.equals((markOrdersAsDelivered_result)that);
23207
      return false;
23208
    }
23209
 
23210
    public boolean equals(markOrdersAsDelivered_result that) {
23211
      if (that == null)
23212
        return false;
23213
 
23214
      boolean this_present_ex = true && this.isSetEx();
23215
      boolean that_present_ex = true && that.isSetEx();
23216
      if (this_present_ex || that_present_ex) {
23217
        if (!(this_present_ex && that_present_ex))
23218
          return false;
23219
        if (!this.ex.equals(that.ex))
23220
          return false;
23221
      }
23222
 
23223
      return true;
23224
    }
23225
 
23226
    @Override
23227
    public int hashCode() {
23228
      return 0;
23229
    }
23230
 
23231
    public int compareTo(markOrdersAsDelivered_result other) {
23232
      if (!getClass().equals(other.getClass())) {
23233
        return getClass().getName().compareTo(other.getClass().getName());
23234
      }
23235
 
23236
      int lastComparison = 0;
23237
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
23238
 
23239
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23240
      if (lastComparison != 0) {
23241
        return lastComparison;
23242
      }
23243
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23244
      if (lastComparison != 0) {
23245
        return lastComparison;
23246
      }
23247
      return 0;
23248
    }
23249
 
23250
    public void read(TProtocol iprot) throws TException {
23251
      TField field;
23252
      iprot.readStructBegin();
23253
      while (true)
23254
      {
23255
        field = iprot.readFieldBegin();
23256
        if (field.type == TType.STOP) { 
23257
          break;
23258
        }
23259
        _Fields fieldId = _Fields.findByThriftId(field.id);
23260
        if (fieldId == null) {
23261
          TProtocolUtil.skip(iprot, field.type);
23262
        } else {
23263
          switch (fieldId) {
23264
            case EX:
23265
              if (field.type == TType.STRUCT) {
23266
                this.ex = new TransactionServiceException();
23267
                this.ex.read(iprot);
23268
              } else { 
23269
                TProtocolUtil.skip(iprot, field.type);
23270
              }
23271
              break;
23272
          }
23273
          iprot.readFieldEnd();
23274
        }
23275
      }
23276
      iprot.readStructEnd();
23277
      validate();
23278
    }
23279
 
23280
    public void write(TProtocol oprot) throws TException {
23281
      oprot.writeStructBegin(STRUCT_DESC);
23282
 
23283
      if (this.isSetEx()) {
23284
        oprot.writeFieldBegin(EX_FIELD_DESC);
23285
        this.ex.write(oprot);
23286
        oprot.writeFieldEnd();
23287
      }
23288
      oprot.writeFieldStop();
23289
      oprot.writeStructEnd();
23290
    }
23291
 
23292
    @Override
23293
    public String toString() {
23294
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
23295
      boolean first = true;
23296
 
23297
      sb.append("ex:");
23298
      if (this.ex == null) {
23299
        sb.append("null");
23300
      } else {
23301
        sb.append(this.ex);
23302
      }
23303
      first = false;
23304
      sb.append(")");
23305
      return sb.toString();
23306
    }
23307
 
23308
    public void validate() throws TException {
23309
      // check for required fields
23310
    }
23311
 
23312
  }
23313
 
23314
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
23315
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
23316
 
23317
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23318
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
23319
 
23320
    private long providerId;
23321
    private Map<String,String> returnedOrders;
23322
 
23323
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23324
    public enum _Fields implements TFieldIdEnum {
23325
      PROVIDER_ID((short)1, "providerId"),
23326
      RETURNED_ORDERS((short)2, "returnedOrders");
23327
 
23328
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23329
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23330
 
23331
      static {
23332
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23333
          byId.put((int)field._thriftId, field);
23334
          byName.put(field.getFieldName(), field);
23335
        }
23336
      }
23337
 
23338
      /**
23339
       * Find the _Fields constant that matches fieldId, or null if its not found.
23340
       */
23341
      public static _Fields findByThriftId(int fieldId) {
23342
        return byId.get(fieldId);
23343
      }
23344
 
23345
      /**
23346
       * Find the _Fields constant that matches fieldId, throwing an exception
23347
       * if it is not found.
23348
       */
23349
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23350
        _Fields fields = findByThriftId(fieldId);
23351
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23352
        return fields;
23353
      }
23354
 
23355
      /**
23356
       * Find the _Fields constant that matches name, or null if its not found.
23357
       */
23358
      public static _Fields findByName(String name) {
23359
        return byName.get(name);
23360
      }
23361
 
23362
      private final short _thriftId;
23363
      private final String _fieldName;
23364
 
23365
      _Fields(short thriftId, String fieldName) {
23366
        _thriftId = thriftId;
23367
        _fieldName = fieldName;
23368
      }
23369
 
23370
      public short getThriftFieldId() {
23371
        return _thriftId;
23372
      }
23373
 
23374
      public String getFieldName() {
23375
        return _fieldName;
23376
      }
23377
    }
23378
 
23379
    // isset id assignments
23380
    private static final int __PROVIDERID_ISSET_ID = 0;
23381
    private BitSet __isset_bit_vector = new BitSet(1);
23382
 
23383
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23384
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23385
          new FieldValueMetaData(TType.I64)));
23386
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
23387
          new MapMetaData(TType.MAP, 
23388
              new FieldValueMetaData(TType.STRING), 
23389
              new FieldValueMetaData(TType.STRING))));
23390
    }});
23391
 
23392
    static {
23393
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
23394
    }
23395
 
23396
    public markOrdersAsFailed_args() {
23397
    }
23398
 
23399
    public markOrdersAsFailed_args(
23400
      long providerId,
23401
      Map<String,String> returnedOrders)
23402
    {
23403
      this();
23404
      this.providerId = providerId;
23405
      setProviderIdIsSet(true);
23406
      this.returnedOrders = returnedOrders;
23407
    }
23408
 
23409
    /**
23410
     * Performs a deep copy on <i>other</i>.
23411
     */
23412
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
23413
      __isset_bit_vector.clear();
23414
      __isset_bit_vector.or(other.__isset_bit_vector);
23415
      this.providerId = other.providerId;
23416
      if (other.isSetReturnedOrders()) {
23417
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
23418
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
23419
 
23420
          String other_element_key = other_element.getKey();
23421
          String other_element_value = other_element.getValue();
23422
 
23423
          String __this__returnedOrders_copy_key = other_element_key;
23424
 
23425
          String __this__returnedOrders_copy_value = other_element_value;
23426
 
23427
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
23428
        }
23429
        this.returnedOrders = __this__returnedOrders;
23430
      }
23431
    }
23432
 
23433
    public markOrdersAsFailed_args deepCopy() {
23434
      return new markOrdersAsFailed_args(this);
23435
    }
23436
 
23437
    @Deprecated
23438
    public markOrdersAsFailed_args clone() {
23439
      return new markOrdersAsFailed_args(this);
23440
    }
23441
 
23442
    public long getProviderId() {
23443
      return this.providerId;
23444
    }
23445
 
23446
    public markOrdersAsFailed_args setProviderId(long providerId) {
23447
      this.providerId = providerId;
23448
      setProviderIdIsSet(true);
23449
      return this;
23450
    }
23451
 
23452
    public void unsetProviderId() {
23453
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23454
    }
23455
 
23456
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23457
    public boolean isSetProviderId() {
23458
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23459
    }
23460
 
23461
    public void setProviderIdIsSet(boolean value) {
23462
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23463
    }
23464
 
23465
    public int getReturnedOrdersSize() {
23466
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
23467
    }
23468
 
23469
    public void putToReturnedOrders(String key, String val) {
23470
      if (this.returnedOrders == null) {
23471
        this.returnedOrders = new HashMap<String,String>();
23472
      }
23473
      this.returnedOrders.put(key, val);
23474
    }
23475
 
23476
    public Map<String,String> getReturnedOrders() {
23477
      return this.returnedOrders;
23478
    }
23479
 
23480
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
23481
      this.returnedOrders = returnedOrders;
23482
      return this;
23483
    }
23484
 
23485
    public void unsetReturnedOrders() {
23486
      this.returnedOrders = null;
23487
    }
23488
 
23489
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
23490
    public boolean isSetReturnedOrders() {
23491
      return this.returnedOrders != null;
23492
    }
23493
 
23494
    public void setReturnedOrdersIsSet(boolean value) {
23495
      if (!value) {
23496
        this.returnedOrders = null;
23497
      }
23498
    }
23499
 
23500
    public void setFieldValue(_Fields field, Object value) {
23501
      switch (field) {
23502
      case PROVIDER_ID:
23503
        if (value == null) {
23504
          unsetProviderId();
23505
        } else {
23506
          setProviderId((Long)value);
23507
        }
23508
        break;
23509
 
23510
      case RETURNED_ORDERS:
23511
        if (value == null) {
23512
          unsetReturnedOrders();
23513
        } else {
23514
          setReturnedOrders((Map<String,String>)value);
23515
        }
23516
        break;
23517
 
23518
      }
23519
    }
23520
 
23521
    public void setFieldValue(int fieldID, Object value) {
23522
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23523
    }
23524
 
23525
    public Object getFieldValue(_Fields field) {
23526
      switch (field) {
23527
      case PROVIDER_ID:
23528
        return new Long(getProviderId());
23529
 
23530
      case RETURNED_ORDERS:
23531
        return getReturnedOrders();
23532
 
23533
      }
23534
      throw new IllegalStateException();
23535
    }
23536
 
23537
    public Object getFieldValue(int fieldId) {
23538
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23539
    }
23540
 
23541
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23542
    public boolean isSet(_Fields field) {
23543
      switch (field) {
23544
      case PROVIDER_ID:
23545
        return isSetProviderId();
23546
      case RETURNED_ORDERS:
23547
        return isSetReturnedOrders();
23548
      }
23549
      throw new IllegalStateException();
23550
    }
23551
 
23552
    public boolean isSet(int fieldID) {
23553
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23554
    }
23555
 
23556
    @Override
23557
    public boolean equals(Object that) {
23558
      if (that == null)
23559
        return false;
23560
      if (that instanceof markOrdersAsFailed_args)
23561
        return this.equals((markOrdersAsFailed_args)that);
23562
      return false;
23563
    }
23564
 
23565
    public boolean equals(markOrdersAsFailed_args that) {
23566
      if (that == null)
23567
        return false;
23568
 
23569
      boolean this_present_providerId = true;
23570
      boolean that_present_providerId = true;
23571
      if (this_present_providerId || that_present_providerId) {
23572
        if (!(this_present_providerId && that_present_providerId))
23573
          return false;
23574
        if (this.providerId != that.providerId)
23575
          return false;
23576
      }
23577
 
23578
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
23579
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
23580
      if (this_present_returnedOrders || that_present_returnedOrders) {
23581
        if (!(this_present_returnedOrders && that_present_returnedOrders))
23582
          return false;
23583
        if (!this.returnedOrders.equals(that.returnedOrders))
23584
          return false;
23585
      }
23586
 
23587
      return true;
23588
    }
23589
 
23590
    @Override
23591
    public int hashCode() {
23592
      return 0;
23593
    }
23594
 
23595
    public void read(TProtocol iprot) throws TException {
23596
      TField field;
23597
      iprot.readStructBegin();
23598
      while (true)
23599
      {
23600
        field = iprot.readFieldBegin();
23601
        if (field.type == TType.STOP) { 
23602
          break;
23603
        }
23604
        _Fields fieldId = _Fields.findByThriftId(field.id);
23605
        if (fieldId == null) {
23606
          TProtocolUtil.skip(iprot, field.type);
23607
        } else {
23608
          switch (fieldId) {
23609
            case PROVIDER_ID:
23610
              if (field.type == TType.I64) {
23611
                this.providerId = iprot.readI64();
23612
                setProviderIdIsSet(true);
23613
              } else { 
23614
                TProtocolUtil.skip(iprot, field.type);
23615
              }
23616
              break;
23617
            case RETURNED_ORDERS:
23618
              if (field.type == TType.MAP) {
23619
                {
1382 varun.gupt 23620
                  TMap _map62 = iprot.readMapBegin();
23621
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
23622
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 23623
                  {
1382 varun.gupt 23624
                    String _key64;
23625
                    String _val65;
23626
                    _key64 = iprot.readString();
23627
                    _val65 = iprot.readString();
23628
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 23629
                  }
23630
                  iprot.readMapEnd();
23631
                }
23632
              } else { 
23633
                TProtocolUtil.skip(iprot, field.type);
23634
              }
23635
              break;
23636
          }
23637
          iprot.readFieldEnd();
23638
        }
23639
      }
23640
      iprot.readStructEnd();
23641
      validate();
23642
    }
23643
 
23644
    public void write(TProtocol oprot) throws TException {
23645
      validate();
23646
 
23647
      oprot.writeStructBegin(STRUCT_DESC);
23648
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23649
      oprot.writeI64(this.providerId);
23650
      oprot.writeFieldEnd();
23651
      if (this.returnedOrders != null) {
23652
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
23653
        {
23654
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 23655
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 23656
          {
1382 varun.gupt 23657
            oprot.writeString(_iter66.getKey());
23658
            oprot.writeString(_iter66.getValue());
1133 chandransh 23659
          }
23660
          oprot.writeMapEnd();
23661
        }
23662
        oprot.writeFieldEnd();
23663
      }
23664
      oprot.writeFieldStop();
23665
      oprot.writeStructEnd();
23666
    }
23667
 
23668
    @Override
23669
    public String toString() {
23670
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
23671
      boolean first = true;
23672
 
23673
      sb.append("providerId:");
23674
      sb.append(this.providerId);
23675
      first = false;
23676
      if (!first) sb.append(", ");
23677
      sb.append("returnedOrders:");
23678
      if (this.returnedOrders == null) {
23679
        sb.append("null");
23680
      } else {
23681
        sb.append(this.returnedOrders);
23682
      }
23683
      first = false;
23684
      sb.append(")");
23685
      return sb.toString();
23686
    }
23687
 
23688
    public void validate() throws TException {
23689
      // check for required fields
23690
    }
23691
 
23692
  }
23693
 
23694
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
23695
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
23696
 
23697
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23698
 
23699
    private TransactionServiceException ex;
23700
 
23701
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23702
    public enum _Fields implements TFieldIdEnum {
23703
      EX((short)1, "ex");
23704
 
23705
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23706
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23707
 
23708
      static {
23709
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23710
          byId.put((int)field._thriftId, field);
23711
          byName.put(field.getFieldName(), field);
23712
        }
23713
      }
23714
 
23715
      /**
23716
       * Find the _Fields constant that matches fieldId, or null if its not found.
23717
       */
23718
      public static _Fields findByThriftId(int fieldId) {
23719
        return byId.get(fieldId);
23720
      }
23721
 
23722
      /**
23723
       * Find the _Fields constant that matches fieldId, throwing an exception
23724
       * if it is not found.
23725
       */
23726
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23727
        _Fields fields = findByThriftId(fieldId);
23728
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23729
        return fields;
23730
      }
23731
 
23732
      /**
23733
       * Find the _Fields constant that matches name, or null if its not found.
23734
       */
23735
      public static _Fields findByName(String name) {
23736
        return byName.get(name);
23737
      }
23738
 
23739
      private final short _thriftId;
23740
      private final String _fieldName;
23741
 
23742
      _Fields(short thriftId, String fieldName) {
23743
        _thriftId = thriftId;
23744
        _fieldName = fieldName;
23745
      }
23746
 
23747
      public short getThriftFieldId() {
23748
        return _thriftId;
23749
      }
23750
 
23751
      public String getFieldName() {
23752
        return _fieldName;
23753
      }
23754
    }
23755
 
23756
    // isset id assignments
23757
 
23758
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23759
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23760
          new FieldValueMetaData(TType.STRUCT)));
23761
    }});
23762
 
23763
    static {
23764
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
23765
    }
23766
 
23767
    public markOrdersAsFailed_result() {
23768
    }
23769
 
23770
    public markOrdersAsFailed_result(
23771
      TransactionServiceException ex)
23772
    {
23773
      this();
23774
      this.ex = ex;
23775
    }
23776
 
23777
    /**
23778
     * Performs a deep copy on <i>other</i>.
23779
     */
23780
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
23781
      if (other.isSetEx()) {
23782
        this.ex = new TransactionServiceException(other.ex);
23783
      }
23784
    }
23785
 
23786
    public markOrdersAsFailed_result deepCopy() {
23787
      return new markOrdersAsFailed_result(this);
23788
    }
23789
 
23790
    @Deprecated
23791
    public markOrdersAsFailed_result clone() {
23792
      return new markOrdersAsFailed_result(this);
23793
    }
23794
 
23795
    public TransactionServiceException getEx() {
23796
      return this.ex;
23797
    }
23798
 
23799
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
23800
      this.ex = ex;
23801
      return this;
23802
    }
23803
 
23804
    public void unsetEx() {
23805
      this.ex = null;
23806
    }
23807
 
23808
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23809
    public boolean isSetEx() {
23810
      return this.ex != null;
23811
    }
23812
 
23813
    public void setExIsSet(boolean value) {
23814
      if (!value) {
23815
        this.ex = null;
23816
      }
23817
    }
23818
 
23819
    public void setFieldValue(_Fields field, Object value) {
23820
      switch (field) {
23821
      case EX:
23822
        if (value == null) {
23823
          unsetEx();
23824
        } else {
23825
          setEx((TransactionServiceException)value);
23826
        }
23827
        break;
23828
 
23829
      }
23830
    }
23831
 
23832
    public void setFieldValue(int fieldID, Object value) {
23833
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23834
    }
23835
 
23836
    public Object getFieldValue(_Fields field) {
23837
      switch (field) {
23838
      case EX:
23839
        return getEx();
23840
 
23841
      }
23842
      throw new IllegalStateException();
23843
    }
23844
 
23845
    public Object getFieldValue(int fieldId) {
23846
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23847
    }
23848
 
23849
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23850
    public boolean isSet(_Fields field) {
23851
      switch (field) {
23852
      case EX:
23853
        return isSetEx();
23854
      }
23855
      throw new IllegalStateException();
23856
    }
23857
 
23858
    public boolean isSet(int fieldID) {
23859
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23860
    }
23861
 
23862
    @Override
23863
    public boolean equals(Object that) {
23864
      if (that == null)
23865
        return false;
23866
      if (that instanceof markOrdersAsFailed_result)
23867
        return this.equals((markOrdersAsFailed_result)that);
23868
      return false;
23869
    }
23870
 
23871
    public boolean equals(markOrdersAsFailed_result that) {
23872
      if (that == null)
23873
        return false;
23874
 
23875
      boolean this_present_ex = true && this.isSetEx();
23876
      boolean that_present_ex = true && that.isSetEx();
23877
      if (this_present_ex || that_present_ex) {
23878
        if (!(this_present_ex && that_present_ex))
23879
          return false;
23880
        if (!this.ex.equals(that.ex))
23881
          return false;
23882
      }
23883
 
23884
      return true;
23885
    }
23886
 
23887
    @Override
23888
    public int hashCode() {
23889
      return 0;
23890
    }
23891
 
23892
    public int compareTo(markOrdersAsFailed_result other) {
23893
      if (!getClass().equals(other.getClass())) {
23894
        return getClass().getName().compareTo(other.getClass().getName());
23895
      }
23896
 
23897
      int lastComparison = 0;
23898
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
23899
 
23900
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23901
      if (lastComparison != 0) {
23902
        return lastComparison;
23903
      }
23904
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23905
      if (lastComparison != 0) {
23906
        return lastComparison;
23907
      }
23908
      return 0;
23909
    }
23910
 
23911
    public void read(TProtocol iprot) throws TException {
23912
      TField field;
23913
      iprot.readStructBegin();
23914
      while (true)
23915
      {
23916
        field = iprot.readFieldBegin();
23917
        if (field.type == TType.STOP) { 
23918
          break;
23919
        }
23920
        _Fields fieldId = _Fields.findByThriftId(field.id);
23921
        if (fieldId == null) {
23922
          TProtocolUtil.skip(iprot, field.type);
23923
        } else {
23924
          switch (fieldId) {
23925
            case EX:
23926
              if (field.type == TType.STRUCT) {
23927
                this.ex = new TransactionServiceException();
23928
                this.ex.read(iprot);
23929
              } else { 
23930
                TProtocolUtil.skip(iprot, field.type);
23931
              }
23932
              break;
23933
          }
23934
          iprot.readFieldEnd();
23935
        }
23936
      }
23937
      iprot.readStructEnd();
23938
      validate();
23939
    }
23940
 
23941
    public void write(TProtocol oprot) throws TException {
23942
      oprot.writeStructBegin(STRUCT_DESC);
23943
 
23944
      if (this.isSetEx()) {
23945
        oprot.writeFieldBegin(EX_FIELD_DESC);
23946
        this.ex.write(oprot);
23947
        oprot.writeFieldEnd();
23948
      }
23949
      oprot.writeFieldStop();
23950
      oprot.writeStructEnd();
23951
    }
23952
 
23953
    @Override
23954
    public String toString() {
23955
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
23956
      boolean first = true;
23957
 
23958
      sb.append("ex:");
23959
      if (this.ex == null) {
23960
        sb.append("null");
23961
      } else {
23962
        sb.append(this.ex);
23963
      }
23964
      first = false;
23965
      sb.append(")");
23966
      return sb.toString();
23967
    }
23968
 
23969
    public void validate() throws TException {
23970
      // check for required fields
23971
    }
23972
 
23973
  }
23974
 
1245 chandransh 23975
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
23976
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
23977
 
23978
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23979
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
23980
 
23981
    private long providerId;
23982
    private Map<String,String> undeliveredOrders;
23983
 
23984
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23985
    public enum _Fields implements TFieldIdEnum {
23986
      PROVIDER_ID((short)1, "providerId"),
23987
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
23988
 
23989
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23990
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23991
 
23992
      static {
23993
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23994
          byId.put((int)field._thriftId, field);
23995
          byName.put(field.getFieldName(), field);
23996
        }
23997
      }
23998
 
23999
      /**
24000
       * Find the _Fields constant that matches fieldId, or null if its not found.
24001
       */
24002
      public static _Fields findByThriftId(int fieldId) {
24003
        return byId.get(fieldId);
24004
      }
24005
 
24006
      /**
24007
       * Find the _Fields constant that matches fieldId, throwing an exception
24008
       * if it is not found.
24009
       */
24010
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24011
        _Fields fields = findByThriftId(fieldId);
24012
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24013
        return fields;
24014
      }
24015
 
24016
      /**
24017
       * Find the _Fields constant that matches name, or null if its not found.
24018
       */
24019
      public static _Fields findByName(String name) {
24020
        return byName.get(name);
24021
      }
24022
 
24023
      private final short _thriftId;
24024
      private final String _fieldName;
24025
 
24026
      _Fields(short thriftId, String fieldName) {
24027
        _thriftId = thriftId;
24028
        _fieldName = fieldName;
24029
      }
24030
 
24031
      public short getThriftFieldId() {
24032
        return _thriftId;
24033
      }
24034
 
24035
      public String getFieldName() {
24036
        return _fieldName;
24037
      }
24038
    }
24039
 
24040
    // isset id assignments
24041
    private static final int __PROVIDERID_ISSET_ID = 0;
24042
    private BitSet __isset_bit_vector = new BitSet(1);
24043
 
24044
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24045
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24046
          new FieldValueMetaData(TType.I64)));
24047
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
24048
          new MapMetaData(TType.MAP, 
24049
              new FieldValueMetaData(TType.STRING), 
24050
              new FieldValueMetaData(TType.STRING))));
24051
    }});
24052
 
24053
    static {
24054
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
24055
    }
24056
 
24057
    public updateNonDeliveryReason_args() {
24058
    }
24059
 
24060
    public updateNonDeliveryReason_args(
24061
      long providerId,
24062
      Map<String,String> undeliveredOrders)
24063
    {
24064
      this();
24065
      this.providerId = providerId;
24066
      setProviderIdIsSet(true);
24067
      this.undeliveredOrders = undeliveredOrders;
24068
    }
24069
 
24070
    /**
24071
     * Performs a deep copy on <i>other</i>.
24072
     */
24073
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
24074
      __isset_bit_vector.clear();
24075
      __isset_bit_vector.or(other.__isset_bit_vector);
24076
      this.providerId = other.providerId;
24077
      if (other.isSetUndeliveredOrders()) {
24078
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
24079
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
24080
 
24081
          String other_element_key = other_element.getKey();
24082
          String other_element_value = other_element.getValue();
24083
 
24084
          String __this__undeliveredOrders_copy_key = other_element_key;
24085
 
24086
          String __this__undeliveredOrders_copy_value = other_element_value;
24087
 
24088
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
24089
        }
24090
        this.undeliveredOrders = __this__undeliveredOrders;
24091
      }
24092
    }
24093
 
24094
    public updateNonDeliveryReason_args deepCopy() {
24095
      return new updateNonDeliveryReason_args(this);
24096
    }
24097
 
24098
    @Deprecated
24099
    public updateNonDeliveryReason_args clone() {
24100
      return new updateNonDeliveryReason_args(this);
24101
    }
24102
 
24103
    public long getProviderId() {
24104
      return this.providerId;
24105
    }
24106
 
24107
    public updateNonDeliveryReason_args setProviderId(long providerId) {
24108
      this.providerId = providerId;
24109
      setProviderIdIsSet(true);
24110
      return this;
24111
    }
24112
 
24113
    public void unsetProviderId() {
24114
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24115
    }
24116
 
24117
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24118
    public boolean isSetProviderId() {
24119
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24120
    }
24121
 
24122
    public void setProviderIdIsSet(boolean value) {
24123
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24124
    }
24125
 
24126
    public int getUndeliveredOrdersSize() {
24127
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
24128
    }
24129
 
24130
    public void putToUndeliveredOrders(String key, String val) {
24131
      if (this.undeliveredOrders == null) {
24132
        this.undeliveredOrders = new HashMap<String,String>();
24133
      }
24134
      this.undeliveredOrders.put(key, val);
24135
    }
24136
 
24137
    public Map<String,String> getUndeliveredOrders() {
24138
      return this.undeliveredOrders;
24139
    }
24140
 
24141
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
24142
      this.undeliveredOrders = undeliveredOrders;
24143
      return this;
24144
    }
24145
 
24146
    public void unsetUndeliveredOrders() {
24147
      this.undeliveredOrders = null;
24148
    }
24149
 
24150
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
24151
    public boolean isSetUndeliveredOrders() {
24152
      return this.undeliveredOrders != null;
24153
    }
24154
 
24155
    public void setUndeliveredOrdersIsSet(boolean value) {
24156
      if (!value) {
24157
        this.undeliveredOrders = null;
24158
      }
24159
    }
24160
 
24161
    public void setFieldValue(_Fields field, Object value) {
24162
      switch (field) {
24163
      case PROVIDER_ID:
24164
        if (value == null) {
24165
          unsetProviderId();
24166
        } else {
24167
          setProviderId((Long)value);
24168
        }
24169
        break;
24170
 
24171
      case UNDELIVERED_ORDERS:
24172
        if (value == null) {
24173
          unsetUndeliveredOrders();
24174
        } else {
24175
          setUndeliveredOrders((Map<String,String>)value);
24176
        }
24177
        break;
24178
 
24179
      }
24180
    }
24181
 
24182
    public void setFieldValue(int fieldID, Object value) {
24183
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24184
    }
24185
 
24186
    public Object getFieldValue(_Fields field) {
24187
      switch (field) {
24188
      case PROVIDER_ID:
24189
        return new Long(getProviderId());
24190
 
24191
      case UNDELIVERED_ORDERS:
24192
        return getUndeliveredOrders();
24193
 
24194
      }
24195
      throw new IllegalStateException();
24196
    }
24197
 
24198
    public Object getFieldValue(int fieldId) {
24199
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24200
    }
24201
 
24202
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24203
    public boolean isSet(_Fields field) {
24204
      switch (field) {
24205
      case PROVIDER_ID:
24206
        return isSetProviderId();
24207
      case UNDELIVERED_ORDERS:
24208
        return isSetUndeliveredOrders();
24209
      }
24210
      throw new IllegalStateException();
24211
    }
24212
 
24213
    public boolean isSet(int fieldID) {
24214
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24215
    }
24216
 
24217
    @Override
24218
    public boolean equals(Object that) {
24219
      if (that == null)
24220
        return false;
24221
      if (that instanceof updateNonDeliveryReason_args)
24222
        return this.equals((updateNonDeliveryReason_args)that);
24223
      return false;
24224
    }
24225
 
24226
    public boolean equals(updateNonDeliveryReason_args that) {
24227
      if (that == null)
24228
        return false;
24229
 
24230
      boolean this_present_providerId = true;
24231
      boolean that_present_providerId = true;
24232
      if (this_present_providerId || that_present_providerId) {
24233
        if (!(this_present_providerId && that_present_providerId))
24234
          return false;
24235
        if (this.providerId != that.providerId)
24236
          return false;
24237
      }
24238
 
24239
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
24240
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
24241
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
24242
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
24243
          return false;
24244
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
24245
          return false;
24246
      }
24247
 
24248
      return true;
24249
    }
24250
 
24251
    @Override
24252
    public int hashCode() {
24253
      return 0;
24254
    }
24255
 
24256
    public void read(TProtocol iprot) throws TException {
24257
      TField field;
24258
      iprot.readStructBegin();
24259
      while (true)
24260
      {
24261
        field = iprot.readFieldBegin();
24262
        if (field.type == TType.STOP) { 
24263
          break;
24264
        }
24265
        _Fields fieldId = _Fields.findByThriftId(field.id);
24266
        if (fieldId == null) {
24267
          TProtocolUtil.skip(iprot, field.type);
24268
        } else {
24269
          switch (fieldId) {
24270
            case PROVIDER_ID:
24271
              if (field.type == TType.I64) {
24272
                this.providerId = iprot.readI64();
24273
                setProviderIdIsSet(true);
24274
              } else { 
24275
                TProtocolUtil.skip(iprot, field.type);
24276
              }
24277
              break;
24278
            case UNDELIVERED_ORDERS:
24279
              if (field.type == TType.MAP) {
24280
                {
1382 varun.gupt 24281
                  TMap _map67 = iprot.readMapBegin();
24282
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
24283
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 24284
                  {
1382 varun.gupt 24285
                    String _key69;
24286
                    String _val70;
24287
                    _key69 = iprot.readString();
24288
                    _val70 = iprot.readString();
24289
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 24290
                  }
24291
                  iprot.readMapEnd();
24292
                }
24293
              } else { 
24294
                TProtocolUtil.skip(iprot, field.type);
24295
              }
24296
              break;
24297
          }
24298
          iprot.readFieldEnd();
24299
        }
24300
      }
24301
      iprot.readStructEnd();
24302
      validate();
24303
    }
24304
 
24305
    public void write(TProtocol oprot) throws TException {
24306
      validate();
24307
 
24308
      oprot.writeStructBegin(STRUCT_DESC);
24309
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24310
      oprot.writeI64(this.providerId);
24311
      oprot.writeFieldEnd();
24312
      if (this.undeliveredOrders != null) {
24313
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
24314
        {
24315
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 24316
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 24317
          {
1382 varun.gupt 24318
            oprot.writeString(_iter71.getKey());
24319
            oprot.writeString(_iter71.getValue());
1245 chandransh 24320
          }
24321
          oprot.writeMapEnd();
24322
        }
24323
        oprot.writeFieldEnd();
24324
      }
24325
      oprot.writeFieldStop();
24326
      oprot.writeStructEnd();
24327
    }
24328
 
24329
    @Override
24330
    public String toString() {
24331
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
24332
      boolean first = true;
24333
 
24334
      sb.append("providerId:");
24335
      sb.append(this.providerId);
24336
      first = false;
24337
      if (!first) sb.append(", ");
24338
      sb.append("undeliveredOrders:");
24339
      if (this.undeliveredOrders == null) {
24340
        sb.append("null");
24341
      } else {
24342
        sb.append(this.undeliveredOrders);
24343
      }
24344
      first = false;
24345
      sb.append(")");
24346
      return sb.toString();
24347
    }
24348
 
24349
    public void validate() throws TException {
24350
      // check for required fields
24351
    }
24352
 
24353
  }
24354
 
24355
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
24356
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
24357
 
24358
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
24359
 
24360
    private TransactionServiceException ex;
24361
 
24362
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24363
    public enum _Fields implements TFieldIdEnum {
24364
      EX((short)1, "ex");
24365
 
24366
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24367
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24368
 
24369
      static {
24370
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24371
          byId.put((int)field._thriftId, field);
24372
          byName.put(field.getFieldName(), field);
24373
        }
24374
      }
24375
 
24376
      /**
24377
       * Find the _Fields constant that matches fieldId, or null if its not found.
24378
       */
24379
      public static _Fields findByThriftId(int fieldId) {
24380
        return byId.get(fieldId);
24381
      }
24382
 
24383
      /**
24384
       * Find the _Fields constant that matches fieldId, throwing an exception
24385
       * if it is not found.
24386
       */
24387
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24388
        _Fields fields = findByThriftId(fieldId);
24389
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24390
        return fields;
24391
      }
24392
 
24393
      /**
24394
       * Find the _Fields constant that matches name, or null if its not found.
24395
       */
24396
      public static _Fields findByName(String name) {
24397
        return byName.get(name);
24398
      }
24399
 
24400
      private final short _thriftId;
24401
      private final String _fieldName;
24402
 
24403
      _Fields(short thriftId, String fieldName) {
24404
        _thriftId = thriftId;
24405
        _fieldName = fieldName;
24406
      }
24407
 
24408
      public short getThriftFieldId() {
24409
        return _thriftId;
24410
      }
24411
 
24412
      public String getFieldName() {
24413
        return _fieldName;
24414
      }
24415
    }
24416
 
24417
    // isset id assignments
24418
 
24419
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24420
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
24421
          new FieldValueMetaData(TType.STRUCT)));
24422
    }});
24423
 
24424
    static {
24425
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
24426
    }
24427
 
24428
    public updateNonDeliveryReason_result() {
24429
    }
24430
 
24431
    public updateNonDeliveryReason_result(
24432
      TransactionServiceException ex)
24433
    {
24434
      this();
24435
      this.ex = ex;
24436
    }
24437
 
24438
    /**
24439
     * Performs a deep copy on <i>other</i>.
24440
     */
24441
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
24442
      if (other.isSetEx()) {
24443
        this.ex = new TransactionServiceException(other.ex);
24444
      }
24445
    }
24446
 
24447
    public updateNonDeliveryReason_result deepCopy() {
24448
      return new updateNonDeliveryReason_result(this);
24449
    }
24450
 
24451
    @Deprecated
24452
    public updateNonDeliveryReason_result clone() {
24453
      return new updateNonDeliveryReason_result(this);
24454
    }
24455
 
24456
    public TransactionServiceException getEx() {
24457
      return this.ex;
24458
    }
24459
 
24460
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
24461
      this.ex = ex;
24462
      return this;
24463
    }
24464
 
24465
    public void unsetEx() {
24466
      this.ex = null;
24467
    }
24468
 
24469
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
24470
    public boolean isSetEx() {
24471
      return this.ex != null;
24472
    }
24473
 
24474
    public void setExIsSet(boolean value) {
24475
      if (!value) {
24476
        this.ex = null;
24477
      }
24478
    }
24479
 
24480
    public void setFieldValue(_Fields field, Object value) {
24481
      switch (field) {
24482
      case EX:
24483
        if (value == null) {
24484
          unsetEx();
24485
        } else {
24486
          setEx((TransactionServiceException)value);
24487
        }
24488
        break;
24489
 
24490
      }
24491
    }
24492
 
24493
    public void setFieldValue(int fieldID, Object value) {
24494
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24495
    }
24496
 
24497
    public Object getFieldValue(_Fields field) {
24498
      switch (field) {
24499
      case EX:
24500
        return getEx();
24501
 
24502
      }
24503
      throw new IllegalStateException();
24504
    }
24505
 
24506
    public Object getFieldValue(int fieldId) {
24507
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24508
    }
24509
 
24510
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24511
    public boolean isSet(_Fields field) {
24512
      switch (field) {
24513
      case EX:
24514
        return isSetEx();
24515
      }
24516
      throw new IllegalStateException();
24517
    }
24518
 
24519
    public boolean isSet(int fieldID) {
24520
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24521
    }
24522
 
24523
    @Override
24524
    public boolean equals(Object that) {
24525
      if (that == null)
24526
        return false;
24527
      if (that instanceof updateNonDeliveryReason_result)
24528
        return this.equals((updateNonDeliveryReason_result)that);
24529
      return false;
24530
    }
24531
 
24532
    public boolean equals(updateNonDeliveryReason_result that) {
24533
      if (that == null)
24534
        return false;
24535
 
24536
      boolean this_present_ex = true && this.isSetEx();
24537
      boolean that_present_ex = true && that.isSetEx();
24538
      if (this_present_ex || that_present_ex) {
24539
        if (!(this_present_ex && that_present_ex))
24540
          return false;
24541
        if (!this.ex.equals(that.ex))
24542
          return false;
24543
      }
24544
 
24545
      return true;
24546
    }
24547
 
24548
    @Override
24549
    public int hashCode() {
24550
      return 0;
24551
    }
24552
 
24553
    public int compareTo(updateNonDeliveryReason_result other) {
24554
      if (!getClass().equals(other.getClass())) {
24555
        return getClass().getName().compareTo(other.getClass().getName());
24556
      }
24557
 
24558
      int lastComparison = 0;
24559
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
24560
 
24561
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24562
      if (lastComparison != 0) {
24563
        return lastComparison;
24564
      }
24565
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24566
      if (lastComparison != 0) {
24567
        return lastComparison;
24568
      }
24569
      return 0;
24570
    }
24571
 
24572
    public void read(TProtocol iprot) throws TException {
24573
      TField field;
24574
      iprot.readStructBegin();
24575
      while (true)
24576
      {
24577
        field = iprot.readFieldBegin();
24578
        if (field.type == TType.STOP) { 
24579
          break;
24580
        }
24581
        _Fields fieldId = _Fields.findByThriftId(field.id);
24582
        if (fieldId == null) {
24583
          TProtocolUtil.skip(iprot, field.type);
24584
        } else {
24585
          switch (fieldId) {
24586
            case EX:
24587
              if (field.type == TType.STRUCT) {
24588
                this.ex = new TransactionServiceException();
24589
                this.ex.read(iprot);
24590
              } else { 
24591
                TProtocolUtil.skip(iprot, field.type);
24592
              }
24593
              break;
24594
          }
24595
          iprot.readFieldEnd();
24596
        }
24597
      }
24598
      iprot.readStructEnd();
24599
      validate();
24600
    }
24601
 
24602
    public void write(TProtocol oprot) throws TException {
24603
      oprot.writeStructBegin(STRUCT_DESC);
24604
 
24605
      if (this.isSetEx()) {
24606
        oprot.writeFieldBegin(EX_FIELD_DESC);
24607
        this.ex.write(oprot);
24608
        oprot.writeFieldEnd();
24609
      }
24610
      oprot.writeFieldStop();
24611
      oprot.writeStructEnd();
24612
    }
24613
 
24614
    @Override
24615
    public String toString() {
24616
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
24617
      boolean first = true;
24618
 
24619
      sb.append("ex:");
24620
      if (this.ex == null) {
24621
        sb.append("null");
24622
      } else {
24623
        sb.append(this.ex);
24624
      }
24625
      first = false;
24626
      sb.append(")");
24627
      return sb.toString();
24628
    }
24629
 
24630
    public void validate() throws TException {
24631
      // check for required fields
24632
    }
24633
 
24634
  }
24635
 
1406 ankur.sing 24636
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
24637
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
24638
 
24639
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24640
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
24641
 
24642
    private long providerId;
24643
    private long warehouseId;
24644
 
24645
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24646
    public enum _Fields implements TFieldIdEnum {
24647
      PROVIDER_ID((short)1, "providerId"),
24648
      WAREHOUSE_ID((short)2, "warehouseId");
24649
 
24650
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24651
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24652
 
24653
      static {
24654
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24655
          byId.put((int)field._thriftId, field);
24656
          byName.put(field.getFieldName(), field);
24657
        }
24658
      }
24659
 
24660
      /**
24661
       * Find the _Fields constant that matches fieldId, or null if its not found.
24662
       */
24663
      public static _Fields findByThriftId(int fieldId) {
24664
        return byId.get(fieldId);
24665
      }
24666
 
24667
      /**
24668
       * Find the _Fields constant that matches fieldId, throwing an exception
24669
       * if it is not found.
24670
       */
24671
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24672
        _Fields fields = findByThriftId(fieldId);
24673
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24674
        return fields;
24675
      }
24676
 
24677
      /**
24678
       * Find the _Fields constant that matches name, or null if its not found.
24679
       */
24680
      public static _Fields findByName(String name) {
24681
        return byName.get(name);
24682
      }
24683
 
24684
      private final short _thriftId;
24685
      private final String _fieldName;
24686
 
24687
      _Fields(short thriftId, String fieldName) {
24688
        _thriftId = thriftId;
24689
        _fieldName = fieldName;
24690
      }
24691
 
24692
      public short getThriftFieldId() {
24693
        return _thriftId;
24694
      }
24695
 
24696
      public String getFieldName() {
24697
        return _fieldName;
24698
      }
24699
    }
24700
 
24701
    // isset id assignments
24702
    private static final int __PROVIDERID_ISSET_ID = 0;
24703
    private static final int __WAREHOUSEID_ISSET_ID = 1;
24704
    private BitSet __isset_bit_vector = new BitSet(2);
24705
 
24706
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24707
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24708
          new FieldValueMetaData(TType.I64)));
24709
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
24710
          new FieldValueMetaData(TType.I64)));
24711
    }});
24712
 
24713
    static {
24714
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
24715
    }
24716
 
24717
    public getUndeliveredOrders_args() {
24718
    }
24719
 
24720
    public getUndeliveredOrders_args(
24721
      long providerId,
24722
      long warehouseId)
24723
    {
24724
      this();
24725
      this.providerId = providerId;
24726
      setProviderIdIsSet(true);
24727
      this.warehouseId = warehouseId;
24728
      setWarehouseIdIsSet(true);
24729
    }
24730
 
24731
    /**
24732
     * Performs a deep copy on <i>other</i>.
24733
     */
24734
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
24735
      __isset_bit_vector.clear();
24736
      __isset_bit_vector.or(other.__isset_bit_vector);
24737
      this.providerId = other.providerId;
24738
      this.warehouseId = other.warehouseId;
24739
    }
24740
 
24741
    public getUndeliveredOrders_args deepCopy() {
24742
      return new getUndeliveredOrders_args(this);
24743
    }
24744
 
24745
    @Deprecated
24746
    public getUndeliveredOrders_args clone() {
24747
      return new getUndeliveredOrders_args(this);
24748
    }
24749
 
24750
    public long getProviderId() {
24751
      return this.providerId;
24752
    }
24753
 
24754
    public getUndeliveredOrders_args setProviderId(long providerId) {
24755
      this.providerId = providerId;
24756
      setProviderIdIsSet(true);
24757
      return this;
24758
    }
24759
 
24760
    public void unsetProviderId() {
24761
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24762
    }
24763
 
24764
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24765
    public boolean isSetProviderId() {
24766
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24767
    }
24768
 
24769
    public void setProviderIdIsSet(boolean value) {
24770
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24771
    }
24772
 
24773
    public long getWarehouseId() {
24774
      return this.warehouseId;
24775
    }
24776
 
24777
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
24778
      this.warehouseId = warehouseId;
24779
      setWarehouseIdIsSet(true);
24780
      return this;
24781
    }
24782
 
24783
    public void unsetWarehouseId() {
24784
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
24785
    }
24786
 
24787
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
24788
    public boolean isSetWarehouseId() {
24789
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
24790
    }
24791
 
24792
    public void setWarehouseIdIsSet(boolean value) {
24793
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
24794
    }
24795
 
24796
    public void setFieldValue(_Fields field, Object value) {
24797
      switch (field) {
24798
      case PROVIDER_ID:
24799
        if (value == null) {
24800
          unsetProviderId();
24801
        } else {
24802
          setProviderId((Long)value);
24803
        }
24804
        break;
24805
 
24806
      case WAREHOUSE_ID:
24807
        if (value == null) {
24808
          unsetWarehouseId();
24809
        } else {
24810
          setWarehouseId((Long)value);
24811
        }
24812
        break;
24813
 
24814
      }
24815
    }
24816
 
24817
    public void setFieldValue(int fieldID, Object value) {
24818
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24819
    }
24820
 
24821
    public Object getFieldValue(_Fields field) {
24822
      switch (field) {
24823
      case PROVIDER_ID:
24824
        return new Long(getProviderId());
24825
 
24826
      case WAREHOUSE_ID:
24827
        return new Long(getWarehouseId());
24828
 
24829
      }
24830
      throw new IllegalStateException();
24831
    }
24832
 
24833
    public Object getFieldValue(int fieldId) {
24834
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24835
    }
24836
 
24837
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24838
    public boolean isSet(_Fields field) {
24839
      switch (field) {
24840
      case PROVIDER_ID:
24841
        return isSetProviderId();
24842
      case WAREHOUSE_ID:
24843
        return isSetWarehouseId();
24844
      }
24845
      throw new IllegalStateException();
24846
    }
24847
 
24848
    public boolean isSet(int fieldID) {
24849
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24850
    }
24851
 
24852
    @Override
24853
    public boolean equals(Object that) {
24854
      if (that == null)
24855
        return false;
24856
      if (that instanceof getUndeliveredOrders_args)
24857
        return this.equals((getUndeliveredOrders_args)that);
24858
      return false;
24859
    }
24860
 
24861
    public boolean equals(getUndeliveredOrders_args that) {
24862
      if (that == null)
24863
        return false;
24864
 
24865
      boolean this_present_providerId = true;
24866
      boolean that_present_providerId = true;
24867
      if (this_present_providerId || that_present_providerId) {
24868
        if (!(this_present_providerId && that_present_providerId))
24869
          return false;
24870
        if (this.providerId != that.providerId)
24871
          return false;
24872
      }
24873
 
24874
      boolean this_present_warehouseId = true;
24875
      boolean that_present_warehouseId = true;
24876
      if (this_present_warehouseId || that_present_warehouseId) {
24877
        if (!(this_present_warehouseId && that_present_warehouseId))
24878
          return false;
24879
        if (this.warehouseId != that.warehouseId)
24880
          return false;
24881
      }
24882
 
24883
      return true;
24884
    }
24885
 
24886
    @Override
24887
    public int hashCode() {
24888
      return 0;
24889
    }
24890
 
24891
    public int compareTo(getUndeliveredOrders_args other) {
24892
      if (!getClass().equals(other.getClass())) {
24893
        return getClass().getName().compareTo(other.getClass().getName());
24894
      }
24895
 
24896
      int lastComparison = 0;
24897
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
24898
 
24899
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
24900
      if (lastComparison != 0) {
24901
        return lastComparison;
24902
      }
24903
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
24904
      if (lastComparison != 0) {
24905
        return lastComparison;
24906
      }
24907
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
24908
      if (lastComparison != 0) {
24909
        return lastComparison;
24910
      }
24911
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
24912
      if (lastComparison != 0) {
24913
        return lastComparison;
24914
      }
24915
      return 0;
24916
    }
24917
 
24918
    public void read(TProtocol iprot) throws TException {
24919
      TField field;
24920
      iprot.readStructBegin();
24921
      while (true)
24922
      {
24923
        field = iprot.readFieldBegin();
24924
        if (field.type == TType.STOP) { 
24925
          break;
24926
        }
24927
        _Fields fieldId = _Fields.findByThriftId(field.id);
24928
        if (fieldId == null) {
24929
          TProtocolUtil.skip(iprot, field.type);
24930
        } else {
24931
          switch (fieldId) {
24932
            case PROVIDER_ID:
24933
              if (field.type == TType.I64) {
24934
                this.providerId = iprot.readI64();
24935
                setProviderIdIsSet(true);
24936
              } else { 
24937
                TProtocolUtil.skip(iprot, field.type);
24938
              }
24939
              break;
24940
            case WAREHOUSE_ID:
24941
              if (field.type == TType.I64) {
24942
                this.warehouseId = iprot.readI64();
24943
                setWarehouseIdIsSet(true);
24944
              } else { 
24945
                TProtocolUtil.skip(iprot, field.type);
24946
              }
24947
              break;
24948
          }
24949
          iprot.readFieldEnd();
24950
        }
24951
      }
24952
      iprot.readStructEnd();
24953
      validate();
24954
    }
24955
 
24956
    public void write(TProtocol oprot) throws TException {
24957
      validate();
24958
 
24959
      oprot.writeStructBegin(STRUCT_DESC);
24960
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24961
      oprot.writeI64(this.providerId);
24962
      oprot.writeFieldEnd();
24963
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
24964
      oprot.writeI64(this.warehouseId);
24965
      oprot.writeFieldEnd();
24966
      oprot.writeFieldStop();
24967
      oprot.writeStructEnd();
24968
    }
24969
 
24970
    @Override
24971
    public String toString() {
24972
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
24973
      boolean first = true;
24974
 
24975
      sb.append("providerId:");
24976
      sb.append(this.providerId);
24977
      first = false;
24978
      if (!first) sb.append(", ");
24979
      sb.append("warehouseId:");
24980
      sb.append(this.warehouseId);
24981
      first = false;
24982
      sb.append(")");
24983
      return sb.toString();
24984
    }
24985
 
24986
    public void validate() throws TException {
24987
      // check for required fields
24988
    }
24989
 
24990
  }
24991
 
24992
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
24993
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
24994
 
24995
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
24996
 
24997
    private List<Order> success;
24998
 
24999
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25000
    public enum _Fields implements TFieldIdEnum {
25001
      SUCCESS((short)0, "success");
25002
 
25003
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25004
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25005
 
25006
      static {
25007
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25008
          byId.put((int)field._thriftId, field);
25009
          byName.put(field.getFieldName(), field);
25010
        }
25011
      }
25012
 
25013
      /**
25014
       * Find the _Fields constant that matches fieldId, or null if its not found.
25015
       */
25016
      public static _Fields findByThriftId(int fieldId) {
25017
        return byId.get(fieldId);
25018
      }
25019
 
25020
      /**
25021
       * Find the _Fields constant that matches fieldId, throwing an exception
25022
       * if it is not found.
25023
       */
25024
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25025
        _Fields fields = findByThriftId(fieldId);
25026
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25027
        return fields;
25028
      }
25029
 
25030
      /**
25031
       * Find the _Fields constant that matches name, or null if its not found.
25032
       */
25033
      public static _Fields findByName(String name) {
25034
        return byName.get(name);
25035
      }
25036
 
25037
      private final short _thriftId;
25038
      private final String _fieldName;
25039
 
25040
      _Fields(short thriftId, String fieldName) {
25041
        _thriftId = thriftId;
25042
        _fieldName = fieldName;
25043
      }
25044
 
25045
      public short getThriftFieldId() {
25046
        return _thriftId;
25047
      }
25048
 
25049
      public String getFieldName() {
25050
        return _fieldName;
25051
      }
25052
    }
25053
 
25054
    // isset id assignments
25055
 
25056
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25057
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25058
          new ListMetaData(TType.LIST, 
25059
              new StructMetaData(TType.STRUCT, Order.class))));
25060
    }});
25061
 
25062
    static {
25063
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
25064
    }
25065
 
25066
    public getUndeliveredOrders_result() {
25067
    }
25068
 
25069
    public getUndeliveredOrders_result(
25070
      List<Order> success)
25071
    {
25072
      this();
25073
      this.success = success;
25074
    }
25075
 
25076
    /**
25077
     * Performs a deep copy on <i>other</i>.
25078
     */
25079
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
25080
      if (other.isSetSuccess()) {
25081
        List<Order> __this__success = new ArrayList<Order>();
25082
        for (Order other_element : other.success) {
25083
          __this__success.add(new Order(other_element));
25084
        }
25085
        this.success = __this__success;
25086
      }
25087
    }
25088
 
25089
    public getUndeliveredOrders_result deepCopy() {
25090
      return new getUndeliveredOrders_result(this);
25091
    }
25092
 
25093
    @Deprecated
25094
    public getUndeliveredOrders_result clone() {
25095
      return new getUndeliveredOrders_result(this);
25096
    }
25097
 
25098
    public int getSuccessSize() {
25099
      return (this.success == null) ? 0 : this.success.size();
25100
    }
25101
 
25102
    public java.util.Iterator<Order> getSuccessIterator() {
25103
      return (this.success == null) ? null : this.success.iterator();
25104
    }
25105
 
25106
    public void addToSuccess(Order elem) {
25107
      if (this.success == null) {
25108
        this.success = new ArrayList<Order>();
25109
      }
25110
      this.success.add(elem);
25111
    }
25112
 
25113
    public List<Order> getSuccess() {
25114
      return this.success;
25115
    }
25116
 
25117
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
25118
      this.success = success;
25119
      return this;
25120
    }
25121
 
25122
    public void unsetSuccess() {
25123
      this.success = null;
25124
    }
25125
 
25126
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25127
    public boolean isSetSuccess() {
25128
      return this.success != null;
25129
    }
25130
 
25131
    public void setSuccessIsSet(boolean value) {
25132
      if (!value) {
25133
        this.success = null;
25134
      }
25135
    }
25136
 
25137
    public void setFieldValue(_Fields field, Object value) {
25138
      switch (field) {
25139
      case SUCCESS:
25140
        if (value == null) {
25141
          unsetSuccess();
25142
        } else {
25143
          setSuccess((List<Order>)value);
25144
        }
25145
        break;
25146
 
25147
      }
25148
    }
25149
 
25150
    public void setFieldValue(int fieldID, Object value) {
25151
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25152
    }
25153
 
25154
    public Object getFieldValue(_Fields field) {
25155
      switch (field) {
25156
      case SUCCESS:
25157
        return getSuccess();
25158
 
25159
      }
25160
      throw new IllegalStateException();
25161
    }
25162
 
25163
    public Object getFieldValue(int fieldId) {
25164
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25165
    }
25166
 
25167
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25168
    public boolean isSet(_Fields field) {
25169
      switch (field) {
25170
      case SUCCESS:
25171
        return isSetSuccess();
25172
      }
25173
      throw new IllegalStateException();
25174
    }
25175
 
25176
    public boolean isSet(int fieldID) {
25177
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25178
    }
25179
 
25180
    @Override
25181
    public boolean equals(Object that) {
25182
      if (that == null)
25183
        return false;
25184
      if (that instanceof getUndeliveredOrders_result)
25185
        return this.equals((getUndeliveredOrders_result)that);
25186
      return false;
25187
    }
25188
 
25189
    public boolean equals(getUndeliveredOrders_result that) {
25190
      if (that == null)
25191
        return false;
25192
 
25193
      boolean this_present_success = true && this.isSetSuccess();
25194
      boolean that_present_success = true && that.isSetSuccess();
25195
      if (this_present_success || that_present_success) {
25196
        if (!(this_present_success && that_present_success))
25197
          return false;
25198
        if (!this.success.equals(that.success))
25199
          return false;
25200
      }
25201
 
25202
      return true;
25203
    }
25204
 
25205
    @Override
25206
    public int hashCode() {
25207
      return 0;
25208
    }
25209
 
25210
    public int compareTo(getUndeliveredOrders_result other) {
25211
      if (!getClass().equals(other.getClass())) {
25212
        return getClass().getName().compareTo(other.getClass().getName());
25213
      }
25214
 
25215
      int lastComparison = 0;
25216
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
25217
 
25218
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25219
      if (lastComparison != 0) {
25220
        return lastComparison;
25221
      }
25222
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25223
      if (lastComparison != 0) {
25224
        return lastComparison;
25225
      }
25226
      return 0;
25227
    }
25228
 
25229
    public void read(TProtocol iprot) throws TException {
25230
      TField field;
25231
      iprot.readStructBegin();
25232
      while (true)
25233
      {
25234
        field = iprot.readFieldBegin();
25235
        if (field.type == TType.STOP) { 
25236
          break;
25237
        }
25238
        _Fields fieldId = _Fields.findByThriftId(field.id);
25239
        if (fieldId == null) {
25240
          TProtocolUtil.skip(iprot, field.type);
25241
        } else {
25242
          switch (fieldId) {
25243
            case SUCCESS:
25244
              if (field.type == TType.LIST) {
25245
                {
25246
                  TList _list72 = iprot.readListBegin();
25247
                  this.success = new ArrayList<Order>(_list72.size);
25248
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
25249
                  {
25250
                    Order _elem74;
25251
                    _elem74 = new Order();
25252
                    _elem74.read(iprot);
25253
                    this.success.add(_elem74);
25254
                  }
25255
                  iprot.readListEnd();
25256
                }
25257
              } else { 
25258
                TProtocolUtil.skip(iprot, field.type);
25259
              }
25260
              break;
25261
          }
25262
          iprot.readFieldEnd();
25263
        }
25264
      }
25265
      iprot.readStructEnd();
25266
      validate();
25267
    }
25268
 
25269
    public void write(TProtocol oprot) throws TException {
25270
      oprot.writeStructBegin(STRUCT_DESC);
25271
 
25272
      if (this.isSetSuccess()) {
25273
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25274
        {
25275
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
25276
          for (Order _iter75 : this.success)
25277
          {
25278
            _iter75.write(oprot);
25279
          }
25280
          oprot.writeListEnd();
25281
        }
25282
        oprot.writeFieldEnd();
25283
      }
25284
      oprot.writeFieldStop();
25285
      oprot.writeStructEnd();
25286
    }
25287
 
25288
    @Override
25289
    public String toString() {
25290
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
25291
      boolean first = true;
25292
 
25293
      sb.append("success:");
25294
      if (this.success == null) {
25295
        sb.append("null");
25296
      } else {
25297
        sb.append(this.success);
25298
      }
25299
      first = false;
25300
      sb.append(")");
25301
      return sb.toString();
25302
    }
25303
 
25304
    public void validate() throws TException {
25305
      // check for required fields
25306
    }
25307
 
25308
  }
25309
 
305 ashish 25310
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
25311
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
25312
 
483 rajveer 25313
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25314
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
25315
 
483 rajveer 25316
    private long orderId;
305 ashish 25317
    private boolean valid;
25318
 
25319
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25320
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25321
      ORDER_ID((short)1, "orderId"),
305 ashish 25322
      VALID((short)2, "valid");
25323
 
25324
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25325
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25326
 
25327
      static {
25328
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25329
          byId.put((int)field._thriftId, field);
25330
          byName.put(field.getFieldName(), field);
25331
        }
25332
      }
25333
 
25334
      /**
25335
       * Find the _Fields constant that matches fieldId, or null if its not found.
25336
       */
25337
      public static _Fields findByThriftId(int fieldId) {
25338
        return byId.get(fieldId);
25339
      }
25340
 
25341
      /**
25342
       * Find the _Fields constant that matches fieldId, throwing an exception
25343
       * if it is not found.
25344
       */
25345
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25346
        _Fields fields = findByThriftId(fieldId);
25347
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25348
        return fields;
25349
      }
25350
 
25351
      /**
25352
       * Find the _Fields constant that matches name, or null if its not found.
25353
       */
25354
      public static _Fields findByName(String name) {
25355
        return byName.get(name);
25356
      }
25357
 
25358
      private final short _thriftId;
25359
      private final String _fieldName;
25360
 
25361
      _Fields(short thriftId, String fieldName) {
25362
        _thriftId = thriftId;
25363
        _fieldName = fieldName;
25364
      }
25365
 
25366
      public short getThriftFieldId() {
25367
        return _thriftId;
25368
      }
25369
 
25370
      public String getFieldName() {
25371
        return _fieldName;
25372
      }
25373
    }
25374
 
25375
    // isset id assignments
483 rajveer 25376
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25377
    private static final int __VALID_ISSET_ID = 1;
25378
    private BitSet __isset_bit_vector = new BitSet(2);
25379
 
25380
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25381
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25382
          new FieldValueMetaData(TType.I64)));
25383
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
25384
          new FieldValueMetaData(TType.BOOL)));
25385
    }});
25386
 
25387
    static {
25388
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
25389
    }
25390
 
25391
    public getAlerts_args() {
25392
    }
25393
 
25394
    public getAlerts_args(
483 rajveer 25395
      long orderId,
305 ashish 25396
      boolean valid)
25397
    {
25398
      this();
483 rajveer 25399
      this.orderId = orderId;
25400
      setOrderIdIsSet(true);
305 ashish 25401
      this.valid = valid;
25402
      setValidIsSet(true);
25403
    }
25404
 
25405
    /**
25406
     * Performs a deep copy on <i>other</i>.
25407
     */
25408
    public getAlerts_args(getAlerts_args other) {
25409
      __isset_bit_vector.clear();
25410
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25411
      this.orderId = other.orderId;
305 ashish 25412
      this.valid = other.valid;
25413
    }
25414
 
25415
    public getAlerts_args deepCopy() {
25416
      return new getAlerts_args(this);
25417
    }
25418
 
25419
    @Deprecated
25420
    public getAlerts_args clone() {
25421
      return new getAlerts_args(this);
25422
    }
25423
 
483 rajveer 25424
    public long getOrderId() {
25425
      return this.orderId;
305 ashish 25426
    }
25427
 
483 rajveer 25428
    public getAlerts_args setOrderId(long orderId) {
25429
      this.orderId = orderId;
25430
      setOrderIdIsSet(true);
305 ashish 25431
      return this;
25432
    }
25433
 
483 rajveer 25434
    public void unsetOrderId() {
25435
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25436
    }
25437
 
483 rajveer 25438
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25439
    public boolean isSetOrderId() {
25440
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25441
    }
25442
 
483 rajveer 25443
    public void setOrderIdIsSet(boolean value) {
25444
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25445
    }
25446
 
25447
    public boolean isValid() {
25448
      return this.valid;
25449
    }
25450
 
25451
    public getAlerts_args setValid(boolean valid) {
25452
      this.valid = valid;
25453
      setValidIsSet(true);
25454
      return this;
25455
    }
25456
 
25457
    public void unsetValid() {
25458
      __isset_bit_vector.clear(__VALID_ISSET_ID);
25459
    }
25460
 
25461
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
25462
    public boolean isSetValid() {
25463
      return __isset_bit_vector.get(__VALID_ISSET_ID);
25464
    }
25465
 
25466
    public void setValidIsSet(boolean value) {
25467
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
25468
    }
25469
 
25470
    public void setFieldValue(_Fields field, Object value) {
25471
      switch (field) {
483 rajveer 25472
      case ORDER_ID:
305 ashish 25473
        if (value == null) {
483 rajveer 25474
          unsetOrderId();
305 ashish 25475
        } else {
483 rajveer 25476
          setOrderId((Long)value);
305 ashish 25477
        }
25478
        break;
25479
 
25480
      case VALID:
25481
        if (value == null) {
25482
          unsetValid();
25483
        } else {
25484
          setValid((Boolean)value);
25485
        }
25486
        break;
25487
 
25488
      }
25489
    }
25490
 
25491
    public void setFieldValue(int fieldID, Object value) {
25492
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25493
    }
25494
 
25495
    public Object getFieldValue(_Fields field) {
25496
      switch (field) {
483 rajveer 25497
      case ORDER_ID:
25498
        return new Long(getOrderId());
305 ashish 25499
 
25500
      case VALID:
25501
        return new Boolean(isValid());
25502
 
25503
      }
25504
      throw new IllegalStateException();
25505
    }
25506
 
25507
    public Object getFieldValue(int fieldId) {
25508
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25509
    }
25510
 
25511
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25512
    public boolean isSet(_Fields field) {
25513
      switch (field) {
483 rajveer 25514
      case ORDER_ID:
25515
        return isSetOrderId();
305 ashish 25516
      case VALID:
25517
        return isSetValid();
25518
      }
25519
      throw new IllegalStateException();
25520
    }
25521
 
25522
    public boolean isSet(int fieldID) {
25523
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25524
    }
25525
 
25526
    @Override
25527
    public boolean equals(Object that) {
25528
      if (that == null)
25529
        return false;
25530
      if (that instanceof getAlerts_args)
25531
        return this.equals((getAlerts_args)that);
25532
      return false;
25533
    }
25534
 
25535
    public boolean equals(getAlerts_args that) {
25536
      if (that == null)
25537
        return false;
25538
 
483 rajveer 25539
      boolean this_present_orderId = true;
25540
      boolean that_present_orderId = true;
25541
      if (this_present_orderId || that_present_orderId) {
25542
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25543
          return false;
483 rajveer 25544
        if (this.orderId != that.orderId)
305 ashish 25545
          return false;
25546
      }
25547
 
25548
      boolean this_present_valid = true;
25549
      boolean that_present_valid = true;
25550
      if (this_present_valid || that_present_valid) {
25551
        if (!(this_present_valid && that_present_valid))
25552
          return false;
25553
        if (this.valid != that.valid)
25554
          return false;
25555
      }
25556
 
25557
      return true;
25558
    }
25559
 
25560
    @Override
25561
    public int hashCode() {
25562
      return 0;
25563
    }
25564
 
25565
    public int compareTo(getAlerts_args other) {
25566
      if (!getClass().equals(other.getClass())) {
25567
        return getClass().getName().compareTo(other.getClass().getName());
25568
      }
25569
 
25570
      int lastComparison = 0;
25571
      getAlerts_args typedOther = (getAlerts_args)other;
25572
 
483 rajveer 25573
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25574
      if (lastComparison != 0) {
25575
        return lastComparison;
25576
      }
483 rajveer 25577
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25578
      if (lastComparison != 0) {
25579
        return lastComparison;
25580
      }
25581
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
25582
      if (lastComparison != 0) {
25583
        return lastComparison;
25584
      }
25585
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
25586
      if (lastComparison != 0) {
25587
        return lastComparison;
25588
      }
25589
      return 0;
25590
    }
25591
 
25592
    public void read(TProtocol iprot) throws TException {
25593
      TField field;
25594
      iprot.readStructBegin();
25595
      while (true)
25596
      {
25597
        field = iprot.readFieldBegin();
25598
        if (field.type == TType.STOP) { 
25599
          break;
25600
        }
25601
        _Fields fieldId = _Fields.findByThriftId(field.id);
25602
        if (fieldId == null) {
25603
          TProtocolUtil.skip(iprot, field.type);
25604
        } else {
25605
          switch (fieldId) {
483 rajveer 25606
            case ORDER_ID:
305 ashish 25607
              if (field.type == TType.I64) {
483 rajveer 25608
                this.orderId = iprot.readI64();
25609
                setOrderIdIsSet(true);
305 ashish 25610
              } else { 
25611
                TProtocolUtil.skip(iprot, field.type);
25612
              }
25613
              break;
25614
            case VALID:
25615
              if (field.type == TType.BOOL) {
25616
                this.valid = iprot.readBool();
25617
                setValidIsSet(true);
25618
              } else { 
25619
                TProtocolUtil.skip(iprot, field.type);
25620
              }
25621
              break;
25622
          }
25623
          iprot.readFieldEnd();
25624
        }
25625
      }
25626
      iprot.readStructEnd();
25627
      validate();
25628
    }
25629
 
25630
    public void write(TProtocol oprot) throws TException {
25631
      validate();
25632
 
25633
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25634
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25635
      oprot.writeI64(this.orderId);
305 ashish 25636
      oprot.writeFieldEnd();
25637
      oprot.writeFieldBegin(VALID_FIELD_DESC);
25638
      oprot.writeBool(this.valid);
25639
      oprot.writeFieldEnd();
25640
      oprot.writeFieldStop();
25641
      oprot.writeStructEnd();
25642
    }
25643
 
25644
    @Override
25645
    public String toString() {
25646
      StringBuilder sb = new StringBuilder("getAlerts_args(");
25647
      boolean first = true;
25648
 
483 rajveer 25649
      sb.append("orderId:");
25650
      sb.append(this.orderId);
305 ashish 25651
      first = false;
25652
      if (!first) sb.append(", ");
25653
      sb.append("valid:");
25654
      sb.append(this.valid);
25655
      first = false;
25656
      sb.append(")");
25657
      return sb.toString();
25658
    }
25659
 
25660
    public void validate() throws TException {
25661
      // check for required fields
25662
    }
25663
 
25664
  }
25665
 
25666
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
25667
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
25668
 
25669
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25670
 
25671
    private List<Alert> success;
25672
 
25673
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25674
    public enum _Fields implements TFieldIdEnum {
25675
      SUCCESS((short)0, "success");
25676
 
25677
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25678
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25679
 
25680
      static {
25681
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25682
          byId.put((int)field._thriftId, field);
25683
          byName.put(field.getFieldName(), field);
25684
        }
25685
      }
25686
 
25687
      /**
25688
       * Find the _Fields constant that matches fieldId, or null if its not found.
25689
       */
25690
      public static _Fields findByThriftId(int fieldId) {
25691
        return byId.get(fieldId);
25692
      }
25693
 
25694
      /**
25695
       * Find the _Fields constant that matches fieldId, throwing an exception
25696
       * if it is not found.
25697
       */
25698
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25699
        _Fields fields = findByThriftId(fieldId);
25700
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25701
        return fields;
25702
      }
25703
 
25704
      /**
25705
       * Find the _Fields constant that matches name, or null if its not found.
25706
       */
25707
      public static _Fields findByName(String name) {
25708
        return byName.get(name);
25709
      }
25710
 
25711
      private final short _thriftId;
25712
      private final String _fieldName;
25713
 
25714
      _Fields(short thriftId, String fieldName) {
25715
        _thriftId = thriftId;
25716
        _fieldName = fieldName;
25717
      }
25718
 
25719
      public short getThriftFieldId() {
25720
        return _thriftId;
25721
      }
25722
 
25723
      public String getFieldName() {
25724
        return _fieldName;
25725
      }
25726
    }
25727
 
25728
    // isset id assignments
25729
 
25730
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25731
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25732
          new ListMetaData(TType.LIST, 
25733
              new StructMetaData(TType.STRUCT, Alert.class))));
25734
    }});
25735
 
25736
    static {
25737
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
25738
    }
25739
 
25740
    public getAlerts_result() {
25741
    }
25742
 
25743
    public getAlerts_result(
25744
      List<Alert> success)
25745
    {
25746
      this();
25747
      this.success = success;
25748
    }
25749
 
25750
    /**
25751
     * Performs a deep copy on <i>other</i>.
25752
     */
25753
    public getAlerts_result(getAlerts_result other) {
25754
      if (other.isSetSuccess()) {
25755
        List<Alert> __this__success = new ArrayList<Alert>();
25756
        for (Alert other_element : other.success) {
25757
          __this__success.add(new Alert(other_element));
25758
        }
25759
        this.success = __this__success;
25760
      }
25761
    }
25762
 
25763
    public getAlerts_result deepCopy() {
25764
      return new getAlerts_result(this);
25765
    }
25766
 
25767
    @Deprecated
25768
    public getAlerts_result clone() {
25769
      return new getAlerts_result(this);
25770
    }
25771
 
25772
    public int getSuccessSize() {
25773
      return (this.success == null) ? 0 : this.success.size();
25774
    }
25775
 
25776
    public java.util.Iterator<Alert> getSuccessIterator() {
25777
      return (this.success == null) ? null : this.success.iterator();
25778
    }
25779
 
25780
    public void addToSuccess(Alert elem) {
25781
      if (this.success == null) {
25782
        this.success = new ArrayList<Alert>();
25783
      }
25784
      this.success.add(elem);
25785
    }
25786
 
25787
    public List<Alert> getSuccess() {
25788
      return this.success;
25789
    }
25790
 
25791
    public getAlerts_result setSuccess(List<Alert> success) {
25792
      this.success = success;
25793
      return this;
25794
    }
25795
 
25796
    public void unsetSuccess() {
25797
      this.success = null;
25798
    }
25799
 
25800
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25801
    public boolean isSetSuccess() {
25802
      return this.success != null;
25803
    }
25804
 
25805
    public void setSuccessIsSet(boolean value) {
25806
      if (!value) {
25807
        this.success = null;
25808
      }
25809
    }
25810
 
25811
    public void setFieldValue(_Fields field, Object value) {
25812
      switch (field) {
25813
      case SUCCESS:
25814
        if (value == null) {
25815
          unsetSuccess();
25816
        } else {
25817
          setSuccess((List<Alert>)value);
25818
        }
25819
        break;
25820
 
25821
      }
25822
    }
25823
 
25824
    public void setFieldValue(int fieldID, Object value) {
25825
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25826
    }
25827
 
25828
    public Object getFieldValue(_Fields field) {
25829
      switch (field) {
25830
      case SUCCESS:
25831
        return getSuccess();
25832
 
25833
      }
25834
      throw new IllegalStateException();
25835
    }
25836
 
25837
    public Object getFieldValue(int fieldId) {
25838
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25839
    }
25840
 
25841
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25842
    public boolean isSet(_Fields field) {
25843
      switch (field) {
25844
      case SUCCESS:
25845
        return isSetSuccess();
25846
      }
25847
      throw new IllegalStateException();
25848
    }
25849
 
25850
    public boolean isSet(int fieldID) {
25851
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25852
    }
25853
 
25854
    @Override
25855
    public boolean equals(Object that) {
25856
      if (that == null)
25857
        return false;
25858
      if (that instanceof getAlerts_result)
25859
        return this.equals((getAlerts_result)that);
25860
      return false;
25861
    }
25862
 
25863
    public boolean equals(getAlerts_result that) {
25864
      if (that == null)
25865
        return false;
25866
 
25867
      boolean this_present_success = true && this.isSetSuccess();
25868
      boolean that_present_success = true && that.isSetSuccess();
25869
      if (this_present_success || that_present_success) {
25870
        if (!(this_present_success && that_present_success))
25871
          return false;
25872
        if (!this.success.equals(that.success))
25873
          return false;
25874
      }
25875
 
25876
      return true;
25877
    }
25878
 
25879
    @Override
25880
    public int hashCode() {
25881
      return 0;
25882
    }
25883
 
25884
    public int compareTo(getAlerts_result other) {
25885
      if (!getClass().equals(other.getClass())) {
25886
        return getClass().getName().compareTo(other.getClass().getName());
25887
      }
25888
 
25889
      int lastComparison = 0;
25890
      getAlerts_result typedOther = (getAlerts_result)other;
25891
 
25892
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25893
      if (lastComparison != 0) {
25894
        return lastComparison;
25895
      }
25896
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25897
      if (lastComparison != 0) {
25898
        return lastComparison;
25899
      }
25900
      return 0;
25901
    }
25902
 
25903
    public void read(TProtocol iprot) throws TException {
25904
      TField field;
25905
      iprot.readStructBegin();
25906
      while (true)
25907
      {
25908
        field = iprot.readFieldBegin();
25909
        if (field.type == TType.STOP) { 
25910
          break;
25911
        }
25912
        _Fields fieldId = _Fields.findByThriftId(field.id);
25913
        if (fieldId == null) {
25914
          TProtocolUtil.skip(iprot, field.type);
25915
        } else {
25916
          switch (fieldId) {
25917
            case SUCCESS:
25918
              if (field.type == TType.LIST) {
25919
                {
1406 ankur.sing 25920
                  TList _list76 = iprot.readListBegin();
25921
                  this.success = new ArrayList<Alert>(_list76.size);
25922
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 25923
                  {
1406 ankur.sing 25924
                    Alert _elem78;
25925
                    _elem78 = new Alert();
25926
                    _elem78.read(iprot);
25927
                    this.success.add(_elem78);
305 ashish 25928
                  }
25929
                  iprot.readListEnd();
25930
                }
25931
              } else { 
25932
                TProtocolUtil.skip(iprot, field.type);
25933
              }
25934
              break;
25935
          }
25936
          iprot.readFieldEnd();
25937
        }
25938
      }
25939
      iprot.readStructEnd();
25940
      validate();
25941
    }
25942
 
25943
    public void write(TProtocol oprot) throws TException {
25944
      oprot.writeStructBegin(STRUCT_DESC);
25945
 
25946
      if (this.isSetSuccess()) {
25947
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25948
        {
25949
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 25950
          for (Alert _iter79 : this.success)
305 ashish 25951
          {
1406 ankur.sing 25952
            _iter79.write(oprot);
305 ashish 25953
          }
25954
          oprot.writeListEnd();
25955
        }
25956
        oprot.writeFieldEnd();
25957
      }
25958
      oprot.writeFieldStop();
25959
      oprot.writeStructEnd();
25960
    }
25961
 
25962
    @Override
25963
    public String toString() {
25964
      StringBuilder sb = new StringBuilder("getAlerts_result(");
25965
      boolean first = true;
25966
 
25967
      sb.append("success:");
25968
      if (this.success == null) {
25969
        sb.append("null");
25970
      } else {
25971
        sb.append(this.success);
25972
      }
25973
      first = false;
25974
      sb.append(")");
25975
      return sb.toString();
25976
    }
25977
 
25978
    public void validate() throws TException {
25979
      // check for required fields
25980
    }
25981
 
25982
  }
25983
 
25984
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
25985
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
25986
 
483 rajveer 25987
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25988
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
25989
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
25990
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
25991
 
483 rajveer 25992
    private long orderId;
305 ashish 25993
    private boolean unset;
25994
    private long type;
25995
    private String comment;
25996
 
25997
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25998
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25999
      ORDER_ID((short)1, "orderId"),
305 ashish 26000
      UNSET((short)2, "unset"),
26001
      TYPE((short)3, "type"),
26002
      COMMENT((short)4, "comment");
26003
 
26004
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26005
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26006
 
26007
      static {
26008
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26009
          byId.put((int)field._thriftId, field);
26010
          byName.put(field.getFieldName(), field);
26011
        }
26012
      }
26013
 
26014
      /**
26015
       * Find the _Fields constant that matches fieldId, or null if its not found.
26016
       */
26017
      public static _Fields findByThriftId(int fieldId) {
26018
        return byId.get(fieldId);
26019
      }
26020
 
26021
      /**
26022
       * Find the _Fields constant that matches fieldId, throwing an exception
26023
       * if it is not found.
26024
       */
26025
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26026
        _Fields fields = findByThriftId(fieldId);
26027
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26028
        return fields;
26029
      }
26030
 
26031
      /**
26032
       * Find the _Fields constant that matches name, or null if its not found.
26033
       */
26034
      public static _Fields findByName(String name) {
26035
        return byName.get(name);
26036
      }
26037
 
26038
      private final short _thriftId;
26039
      private final String _fieldName;
26040
 
26041
      _Fields(short thriftId, String fieldName) {
26042
        _thriftId = thriftId;
26043
        _fieldName = fieldName;
26044
      }
26045
 
26046
      public short getThriftFieldId() {
26047
        return _thriftId;
26048
      }
26049
 
26050
      public String getFieldName() {
26051
        return _fieldName;
26052
      }
26053
    }
26054
 
26055
    // isset id assignments
483 rajveer 26056
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 26057
    private static final int __UNSET_ISSET_ID = 1;
26058
    private static final int __TYPE_ISSET_ID = 2;
26059
    private BitSet __isset_bit_vector = new BitSet(3);
26060
 
26061
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 26062
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 26063
          new FieldValueMetaData(TType.I64)));
26064
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
26065
          new FieldValueMetaData(TType.BOOL)));
26066
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
26067
          new FieldValueMetaData(TType.I64)));
26068
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
26069
          new FieldValueMetaData(TType.STRING)));
26070
    }});
26071
 
26072
    static {
26073
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
26074
    }
26075
 
26076
    public setAlert_args() {
26077
    }
26078
 
26079
    public setAlert_args(
483 rajveer 26080
      long orderId,
305 ashish 26081
      boolean unset,
26082
      long type,
26083
      String comment)
26084
    {
26085
      this();
483 rajveer 26086
      this.orderId = orderId;
26087
      setOrderIdIsSet(true);
305 ashish 26088
      this.unset = unset;
26089
      setUnsetIsSet(true);
26090
      this.type = type;
26091
      setTypeIsSet(true);
26092
      this.comment = comment;
26093
    }
26094
 
26095
    /**
26096
     * Performs a deep copy on <i>other</i>.
26097
     */
26098
    public setAlert_args(setAlert_args other) {
26099
      __isset_bit_vector.clear();
26100
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 26101
      this.orderId = other.orderId;
305 ashish 26102
      this.unset = other.unset;
26103
      this.type = other.type;
26104
      if (other.isSetComment()) {
26105
        this.comment = other.comment;
26106
      }
26107
    }
26108
 
26109
    public setAlert_args deepCopy() {
26110
      return new setAlert_args(this);
26111
    }
26112
 
26113
    @Deprecated
26114
    public setAlert_args clone() {
26115
      return new setAlert_args(this);
26116
    }
26117
 
483 rajveer 26118
    public long getOrderId() {
26119
      return this.orderId;
305 ashish 26120
    }
26121
 
483 rajveer 26122
    public setAlert_args setOrderId(long orderId) {
26123
      this.orderId = orderId;
26124
      setOrderIdIsSet(true);
305 ashish 26125
      return this;
26126
    }
26127
 
483 rajveer 26128
    public void unsetOrderId() {
26129
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 26130
    }
26131
 
483 rajveer 26132
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
26133
    public boolean isSetOrderId() {
26134
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 26135
    }
26136
 
483 rajveer 26137
    public void setOrderIdIsSet(boolean value) {
26138
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 26139
    }
26140
 
26141
    public boolean isUnset() {
26142
      return this.unset;
26143
    }
26144
 
26145
    public setAlert_args setUnset(boolean unset) {
26146
      this.unset = unset;
26147
      setUnsetIsSet(true);
26148
      return this;
26149
    }
26150
 
26151
    public void unsetUnset() {
26152
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
26153
    }
26154
 
26155
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
26156
    public boolean isSetUnset() {
26157
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
26158
    }
26159
 
26160
    public void setUnsetIsSet(boolean value) {
26161
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
26162
    }
26163
 
26164
    public long getType() {
26165
      return this.type;
26166
    }
26167
 
26168
    public setAlert_args setType(long type) {
26169
      this.type = type;
26170
      setTypeIsSet(true);
26171
      return this;
26172
    }
26173
 
26174
    public void unsetType() {
26175
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
26176
    }
26177
 
26178
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
26179
    public boolean isSetType() {
26180
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
26181
    }
26182
 
26183
    public void setTypeIsSet(boolean value) {
26184
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
26185
    }
26186
 
26187
    public String getComment() {
26188
      return this.comment;
26189
    }
26190
 
26191
    public setAlert_args setComment(String comment) {
26192
      this.comment = comment;
26193
      return this;
26194
    }
26195
 
26196
    public void unsetComment() {
26197
      this.comment = null;
26198
    }
26199
 
26200
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
26201
    public boolean isSetComment() {
26202
      return this.comment != null;
26203
    }
26204
 
26205
    public void setCommentIsSet(boolean value) {
26206
      if (!value) {
26207
        this.comment = null;
26208
      }
26209
    }
26210
 
26211
    public void setFieldValue(_Fields field, Object value) {
26212
      switch (field) {
483 rajveer 26213
      case ORDER_ID:
305 ashish 26214
        if (value == null) {
483 rajveer 26215
          unsetOrderId();
305 ashish 26216
        } else {
483 rajveer 26217
          setOrderId((Long)value);
305 ashish 26218
        }
26219
        break;
26220
 
26221
      case UNSET:
26222
        if (value == null) {
26223
          unsetUnset();
26224
        } else {
26225
          setUnset((Boolean)value);
26226
        }
26227
        break;
26228
 
26229
      case TYPE:
26230
        if (value == null) {
26231
          unsetType();
26232
        } else {
26233
          setType((Long)value);
26234
        }
26235
        break;
26236
 
26237
      case COMMENT:
26238
        if (value == null) {
26239
          unsetComment();
26240
        } else {
26241
          setComment((String)value);
26242
        }
26243
        break;
26244
 
26245
      }
26246
    }
26247
 
26248
    public void setFieldValue(int fieldID, Object value) {
26249
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26250
    }
26251
 
26252
    public Object getFieldValue(_Fields field) {
26253
      switch (field) {
483 rajveer 26254
      case ORDER_ID:
26255
        return new Long(getOrderId());
305 ashish 26256
 
26257
      case UNSET:
26258
        return new Boolean(isUnset());
26259
 
26260
      case TYPE:
26261
        return new Long(getType());
26262
 
26263
      case COMMENT:
26264
        return getComment();
26265
 
26266
      }
26267
      throw new IllegalStateException();
26268
    }
26269
 
26270
    public Object getFieldValue(int fieldId) {
26271
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26272
    }
26273
 
26274
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26275
    public boolean isSet(_Fields field) {
26276
      switch (field) {
483 rajveer 26277
      case ORDER_ID:
26278
        return isSetOrderId();
305 ashish 26279
      case UNSET:
26280
        return isSetUnset();
26281
      case TYPE:
26282
        return isSetType();
26283
      case COMMENT:
26284
        return isSetComment();
26285
      }
26286
      throw new IllegalStateException();
26287
    }
26288
 
26289
    public boolean isSet(int fieldID) {
26290
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26291
    }
26292
 
26293
    @Override
26294
    public boolean equals(Object that) {
26295
      if (that == null)
26296
        return false;
26297
      if (that instanceof setAlert_args)
26298
        return this.equals((setAlert_args)that);
26299
      return false;
26300
    }
26301
 
26302
    public boolean equals(setAlert_args that) {
26303
      if (that == null)
26304
        return false;
26305
 
483 rajveer 26306
      boolean this_present_orderId = true;
26307
      boolean that_present_orderId = true;
26308
      if (this_present_orderId || that_present_orderId) {
26309
        if (!(this_present_orderId && that_present_orderId))
305 ashish 26310
          return false;
483 rajveer 26311
        if (this.orderId != that.orderId)
305 ashish 26312
          return false;
26313
      }
26314
 
26315
      boolean this_present_unset = true;
26316
      boolean that_present_unset = true;
26317
      if (this_present_unset || that_present_unset) {
26318
        if (!(this_present_unset && that_present_unset))
26319
          return false;
26320
        if (this.unset != that.unset)
26321
          return false;
26322
      }
26323
 
26324
      boolean this_present_type = true;
26325
      boolean that_present_type = true;
26326
      if (this_present_type || that_present_type) {
26327
        if (!(this_present_type && that_present_type))
26328
          return false;
26329
        if (this.type != that.type)
26330
          return false;
26331
      }
26332
 
26333
      boolean this_present_comment = true && this.isSetComment();
26334
      boolean that_present_comment = true && that.isSetComment();
26335
      if (this_present_comment || that_present_comment) {
26336
        if (!(this_present_comment && that_present_comment))
26337
          return false;
26338
        if (!this.comment.equals(that.comment))
26339
          return false;
26340
      }
26341
 
26342
      return true;
26343
    }
26344
 
26345
    @Override
26346
    public int hashCode() {
26347
      return 0;
26348
    }
26349
 
26350
    public int compareTo(setAlert_args other) {
26351
      if (!getClass().equals(other.getClass())) {
26352
        return getClass().getName().compareTo(other.getClass().getName());
26353
      }
26354
 
26355
      int lastComparison = 0;
26356
      setAlert_args typedOther = (setAlert_args)other;
26357
 
483 rajveer 26358
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 26359
      if (lastComparison != 0) {
26360
        return lastComparison;
26361
      }
483 rajveer 26362
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 26363
      if (lastComparison != 0) {
26364
        return lastComparison;
26365
      }
26366
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
26367
      if (lastComparison != 0) {
26368
        return lastComparison;
26369
      }
26370
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
26371
      if (lastComparison != 0) {
26372
        return lastComparison;
26373
      }
26374
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
26375
      if (lastComparison != 0) {
26376
        return lastComparison;
26377
      }
26378
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
26379
      if (lastComparison != 0) {
26380
        return lastComparison;
26381
      }
26382
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
26383
      if (lastComparison != 0) {
26384
        return lastComparison;
26385
      }
26386
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
26387
      if (lastComparison != 0) {
26388
        return lastComparison;
26389
      }
26390
      return 0;
26391
    }
26392
 
26393
    public void read(TProtocol iprot) throws TException {
26394
      TField field;
26395
      iprot.readStructBegin();
26396
      while (true)
26397
      {
26398
        field = iprot.readFieldBegin();
26399
        if (field.type == TType.STOP) { 
26400
          break;
26401
        }
26402
        _Fields fieldId = _Fields.findByThriftId(field.id);
26403
        if (fieldId == null) {
26404
          TProtocolUtil.skip(iprot, field.type);
26405
        } else {
26406
          switch (fieldId) {
483 rajveer 26407
            case ORDER_ID:
305 ashish 26408
              if (field.type == TType.I64) {
483 rajveer 26409
                this.orderId = iprot.readI64();
26410
                setOrderIdIsSet(true);
305 ashish 26411
              } else { 
26412
                TProtocolUtil.skip(iprot, field.type);
26413
              }
26414
              break;
26415
            case UNSET:
26416
              if (field.type == TType.BOOL) {
26417
                this.unset = iprot.readBool();
26418
                setUnsetIsSet(true);
26419
              } else { 
26420
                TProtocolUtil.skip(iprot, field.type);
26421
              }
26422
              break;
26423
            case TYPE:
26424
              if (field.type == TType.I64) {
26425
                this.type = iprot.readI64();
26426
                setTypeIsSet(true);
26427
              } else { 
26428
                TProtocolUtil.skip(iprot, field.type);
26429
              }
26430
              break;
26431
            case COMMENT:
26432
              if (field.type == TType.STRING) {
26433
                this.comment = iprot.readString();
26434
              } else { 
26435
                TProtocolUtil.skip(iprot, field.type);
26436
              }
26437
              break;
26438
          }
26439
          iprot.readFieldEnd();
26440
        }
26441
      }
26442
      iprot.readStructEnd();
26443
      validate();
26444
    }
26445
 
26446
    public void write(TProtocol oprot) throws TException {
26447
      validate();
26448
 
26449
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 26450
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
26451
      oprot.writeI64(this.orderId);
305 ashish 26452
      oprot.writeFieldEnd();
26453
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
26454
      oprot.writeBool(this.unset);
26455
      oprot.writeFieldEnd();
26456
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
26457
      oprot.writeI64(this.type);
26458
      oprot.writeFieldEnd();
26459
      if (this.comment != null) {
26460
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
26461
        oprot.writeString(this.comment);
26462
        oprot.writeFieldEnd();
26463
      }
26464
      oprot.writeFieldStop();
26465
      oprot.writeStructEnd();
26466
    }
26467
 
26468
    @Override
26469
    public String toString() {
26470
      StringBuilder sb = new StringBuilder("setAlert_args(");
26471
      boolean first = true;
26472
 
483 rajveer 26473
      sb.append("orderId:");
26474
      sb.append(this.orderId);
305 ashish 26475
      first = false;
26476
      if (!first) sb.append(", ");
26477
      sb.append("unset:");
26478
      sb.append(this.unset);
26479
      first = false;
26480
      if (!first) sb.append(", ");
26481
      sb.append("type:");
26482
      sb.append(this.type);
26483
      first = false;
26484
      if (!first) sb.append(", ");
26485
      sb.append("comment:");
26486
      if (this.comment == null) {
26487
        sb.append("null");
26488
      } else {
26489
        sb.append(this.comment);
26490
      }
26491
      first = false;
26492
      sb.append(")");
26493
      return sb.toString();
26494
    }
26495
 
26496
    public void validate() throws TException {
26497
      // check for required fields
26498
    }
26499
 
26500
  }
26501
 
26502
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
26503
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
26504
 
26505
 
26506
 
26507
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26508
    public enum _Fields implements TFieldIdEnum {
26509
;
26510
 
26511
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26512
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26513
 
26514
      static {
26515
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26516
          byId.put((int)field._thriftId, field);
26517
          byName.put(field.getFieldName(), field);
26518
        }
26519
      }
26520
 
26521
      /**
26522
       * Find the _Fields constant that matches fieldId, or null if its not found.
26523
       */
26524
      public static _Fields findByThriftId(int fieldId) {
26525
        return byId.get(fieldId);
26526
      }
26527
 
26528
      /**
26529
       * Find the _Fields constant that matches fieldId, throwing an exception
26530
       * if it is not found.
26531
       */
26532
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26533
        _Fields fields = findByThriftId(fieldId);
26534
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26535
        return fields;
26536
      }
26537
 
26538
      /**
26539
       * Find the _Fields constant that matches name, or null if its not found.
26540
       */
26541
      public static _Fields findByName(String name) {
26542
        return byName.get(name);
26543
      }
26544
 
26545
      private final short _thriftId;
26546
      private final String _fieldName;
26547
 
26548
      _Fields(short thriftId, String fieldName) {
26549
        _thriftId = thriftId;
26550
        _fieldName = fieldName;
26551
      }
26552
 
26553
      public short getThriftFieldId() {
26554
        return _thriftId;
26555
      }
26556
 
26557
      public String getFieldName() {
26558
        return _fieldName;
26559
      }
26560
    }
26561
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26562
    }});
26563
 
26564
    static {
26565
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
26566
    }
26567
 
26568
    public setAlert_result() {
26569
    }
26570
 
26571
    /**
26572
     * Performs a deep copy on <i>other</i>.
26573
     */
26574
    public setAlert_result(setAlert_result other) {
26575
    }
26576
 
26577
    public setAlert_result deepCopy() {
26578
      return new setAlert_result(this);
26579
    }
26580
 
26581
    @Deprecated
26582
    public setAlert_result clone() {
26583
      return new setAlert_result(this);
26584
    }
26585
 
26586
    public void setFieldValue(_Fields field, Object value) {
26587
      switch (field) {
26588
      }
26589
    }
26590
 
26591
    public void setFieldValue(int fieldID, Object value) {
26592
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26593
    }
26594
 
26595
    public Object getFieldValue(_Fields field) {
26596
      switch (field) {
26597
      }
26598
      throw new IllegalStateException();
26599
    }
26600
 
26601
    public Object getFieldValue(int fieldId) {
26602
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26603
    }
26604
 
26605
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26606
    public boolean isSet(_Fields field) {
26607
      switch (field) {
26608
      }
26609
      throw new IllegalStateException();
26610
    }
26611
 
26612
    public boolean isSet(int fieldID) {
26613
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26614
    }
26615
 
26616
    @Override
26617
    public boolean equals(Object that) {
26618
      if (that == null)
26619
        return false;
26620
      if (that instanceof setAlert_result)
26621
        return this.equals((setAlert_result)that);
26622
      return false;
26623
    }
26624
 
26625
    public boolean equals(setAlert_result that) {
26626
      if (that == null)
26627
        return false;
26628
 
26629
      return true;
26630
    }
26631
 
26632
    @Override
26633
    public int hashCode() {
26634
      return 0;
26635
    }
26636
 
26637
    public int compareTo(setAlert_result other) {
26638
      if (!getClass().equals(other.getClass())) {
26639
        return getClass().getName().compareTo(other.getClass().getName());
26640
      }
26641
 
26642
      int lastComparison = 0;
26643
      setAlert_result typedOther = (setAlert_result)other;
26644
 
26645
      return 0;
26646
    }
26647
 
26648
    public void read(TProtocol iprot) throws TException {
26649
      TField field;
26650
      iprot.readStructBegin();
26651
      while (true)
26652
      {
26653
        field = iprot.readFieldBegin();
26654
        if (field.type == TType.STOP) { 
26655
          break;
26656
        }
26657
        _Fields fieldId = _Fields.findByThriftId(field.id);
26658
        if (fieldId == null) {
26659
          TProtocolUtil.skip(iprot, field.type);
26660
        } else {
26661
          switch (fieldId) {
26662
          }
26663
          iprot.readFieldEnd();
26664
        }
26665
      }
26666
      iprot.readStructEnd();
26667
      validate();
26668
    }
26669
 
26670
    public void write(TProtocol oprot) throws TException {
26671
      oprot.writeStructBegin(STRUCT_DESC);
26672
 
26673
      oprot.writeFieldStop();
26674
      oprot.writeStructEnd();
26675
    }
26676
 
26677
    @Override
26678
    public String toString() {
26679
      StringBuilder sb = new StringBuilder("setAlert_result(");
26680
      boolean first = true;
26681
 
26682
      sb.append(")");
26683
      return sb.toString();
26684
    }
26685
 
26686
    public void validate() throws TException {
26687
      // check for required fields
26688
    }
26689
 
26690
  }
26691
 
1598 ankur.sing 26692
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
26693
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
26694
 
26695
 
26696
 
26697
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26698
    public enum _Fields implements TFieldIdEnum {
26699
;
26700
 
26701
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26702
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26703
 
26704
      static {
26705
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26706
          byId.put((int)field._thriftId, field);
26707
          byName.put(field.getFieldName(), field);
26708
        }
26709
      }
26710
 
26711
      /**
26712
       * Find the _Fields constant that matches fieldId, or null if its not found.
26713
       */
26714
      public static _Fields findByThriftId(int fieldId) {
26715
        return byId.get(fieldId);
26716
      }
26717
 
26718
      /**
26719
       * Find the _Fields constant that matches fieldId, throwing an exception
26720
       * if it is not found.
26721
       */
26722
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26723
        _Fields fields = findByThriftId(fieldId);
26724
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26725
        return fields;
26726
      }
26727
 
26728
      /**
26729
       * Find the _Fields constant that matches name, or null if its not found.
26730
       */
26731
      public static _Fields findByName(String name) {
26732
        return byName.get(name);
26733
      }
26734
 
26735
      private final short _thriftId;
26736
      private final String _fieldName;
26737
 
26738
      _Fields(short thriftId, String fieldName) {
26739
        _thriftId = thriftId;
26740
        _fieldName = fieldName;
26741
      }
26742
 
26743
      public short getThriftFieldId() {
26744
        return _thriftId;
26745
      }
26746
 
26747
      public String getFieldName() {
26748
        return _fieldName;
26749
      }
26750
    }
26751
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26752
    }});
26753
 
26754
    static {
26755
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
26756
    }
26757
 
26758
    public getValidOrderCount_args() {
26759
    }
26760
 
26761
    /**
26762
     * Performs a deep copy on <i>other</i>.
26763
     */
26764
    public getValidOrderCount_args(getValidOrderCount_args other) {
26765
    }
26766
 
26767
    public getValidOrderCount_args deepCopy() {
26768
      return new getValidOrderCount_args(this);
26769
    }
26770
 
26771
    @Deprecated
26772
    public getValidOrderCount_args clone() {
26773
      return new getValidOrderCount_args(this);
26774
    }
26775
 
26776
    public void setFieldValue(_Fields field, Object value) {
26777
      switch (field) {
26778
      }
26779
    }
26780
 
26781
    public void setFieldValue(int fieldID, Object value) {
26782
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26783
    }
26784
 
26785
    public Object getFieldValue(_Fields field) {
26786
      switch (field) {
26787
      }
26788
      throw new IllegalStateException();
26789
    }
26790
 
26791
    public Object getFieldValue(int fieldId) {
26792
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26793
    }
26794
 
26795
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26796
    public boolean isSet(_Fields field) {
26797
      switch (field) {
26798
      }
26799
      throw new IllegalStateException();
26800
    }
26801
 
26802
    public boolean isSet(int fieldID) {
26803
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26804
    }
26805
 
26806
    @Override
26807
    public boolean equals(Object that) {
26808
      if (that == null)
26809
        return false;
26810
      if (that instanceof getValidOrderCount_args)
26811
        return this.equals((getValidOrderCount_args)that);
26812
      return false;
26813
    }
26814
 
26815
    public boolean equals(getValidOrderCount_args that) {
26816
      if (that == null)
26817
        return false;
26818
 
26819
      return true;
26820
    }
26821
 
26822
    @Override
26823
    public int hashCode() {
26824
      return 0;
26825
    }
26826
 
26827
    public int compareTo(getValidOrderCount_args other) {
26828
      if (!getClass().equals(other.getClass())) {
26829
        return getClass().getName().compareTo(other.getClass().getName());
26830
      }
26831
 
26832
      int lastComparison = 0;
26833
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
26834
 
26835
      return 0;
26836
    }
26837
 
26838
    public void read(TProtocol iprot) throws TException {
26839
      TField field;
26840
      iprot.readStructBegin();
26841
      while (true)
26842
      {
26843
        field = iprot.readFieldBegin();
26844
        if (field.type == TType.STOP) { 
26845
          break;
26846
        }
26847
        _Fields fieldId = _Fields.findByThriftId(field.id);
26848
        if (fieldId == null) {
26849
          TProtocolUtil.skip(iprot, field.type);
26850
        } else {
26851
          switch (fieldId) {
26852
          }
26853
          iprot.readFieldEnd();
26854
        }
26855
      }
26856
      iprot.readStructEnd();
26857
      validate();
26858
    }
26859
 
26860
    public void write(TProtocol oprot) throws TException {
26861
      validate();
26862
 
26863
      oprot.writeStructBegin(STRUCT_DESC);
26864
      oprot.writeFieldStop();
26865
      oprot.writeStructEnd();
26866
    }
26867
 
26868
    @Override
26869
    public String toString() {
26870
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
26871
      boolean first = true;
26872
 
26873
      sb.append(")");
26874
      return sb.toString();
26875
    }
26876
 
26877
    public void validate() throws TException {
26878
      // check for required fields
26879
    }
26880
 
26881
  }
26882
 
26883
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
26884
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
26885
 
26886
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26887
 
26888
    private long success;
26889
 
26890
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26891
    public enum _Fields implements TFieldIdEnum {
26892
      SUCCESS((short)0, "success");
26893
 
26894
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26895
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26896
 
26897
      static {
26898
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26899
          byId.put((int)field._thriftId, field);
26900
          byName.put(field.getFieldName(), field);
26901
        }
26902
      }
26903
 
26904
      /**
26905
       * Find the _Fields constant that matches fieldId, or null if its not found.
26906
       */
26907
      public static _Fields findByThriftId(int fieldId) {
26908
        return byId.get(fieldId);
26909
      }
26910
 
26911
      /**
26912
       * Find the _Fields constant that matches fieldId, throwing an exception
26913
       * if it is not found.
26914
       */
26915
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26916
        _Fields fields = findByThriftId(fieldId);
26917
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26918
        return fields;
26919
      }
26920
 
26921
      /**
26922
       * Find the _Fields constant that matches name, or null if its not found.
26923
       */
26924
      public static _Fields findByName(String name) {
26925
        return byName.get(name);
26926
      }
26927
 
26928
      private final short _thriftId;
26929
      private final String _fieldName;
26930
 
26931
      _Fields(short thriftId, String fieldName) {
26932
        _thriftId = thriftId;
26933
        _fieldName = fieldName;
26934
      }
26935
 
26936
      public short getThriftFieldId() {
26937
        return _thriftId;
26938
      }
26939
 
26940
      public String getFieldName() {
26941
        return _fieldName;
26942
      }
26943
    }
26944
 
26945
    // isset id assignments
26946
    private static final int __SUCCESS_ISSET_ID = 0;
26947
    private BitSet __isset_bit_vector = new BitSet(1);
26948
 
26949
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26950
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26951
          new FieldValueMetaData(TType.I64)));
26952
    }});
26953
 
26954
    static {
26955
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
26956
    }
26957
 
26958
    public getValidOrderCount_result() {
26959
    }
26960
 
26961
    public getValidOrderCount_result(
26962
      long success)
26963
    {
26964
      this();
26965
      this.success = success;
26966
      setSuccessIsSet(true);
26967
    }
26968
 
26969
    /**
26970
     * Performs a deep copy on <i>other</i>.
26971
     */
26972
    public getValidOrderCount_result(getValidOrderCount_result other) {
26973
      __isset_bit_vector.clear();
26974
      __isset_bit_vector.or(other.__isset_bit_vector);
26975
      this.success = other.success;
26976
    }
26977
 
26978
    public getValidOrderCount_result deepCopy() {
26979
      return new getValidOrderCount_result(this);
26980
    }
26981
 
26982
    @Deprecated
26983
    public getValidOrderCount_result clone() {
26984
      return new getValidOrderCount_result(this);
26985
    }
26986
 
26987
    public long getSuccess() {
26988
      return this.success;
26989
    }
26990
 
26991
    public getValidOrderCount_result setSuccess(long success) {
26992
      this.success = success;
26993
      setSuccessIsSet(true);
26994
      return this;
26995
    }
26996
 
26997
    public void unsetSuccess() {
26998
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26999
    }
27000
 
27001
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27002
    public boolean isSetSuccess() {
27003
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27004
    }
27005
 
27006
    public void setSuccessIsSet(boolean value) {
27007
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27008
    }
27009
 
27010
    public void setFieldValue(_Fields field, Object value) {
27011
      switch (field) {
27012
      case SUCCESS:
27013
        if (value == null) {
27014
          unsetSuccess();
27015
        } else {
27016
          setSuccess((Long)value);
27017
        }
27018
        break;
27019
 
27020
      }
27021
    }
27022
 
27023
    public void setFieldValue(int fieldID, Object value) {
27024
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27025
    }
27026
 
27027
    public Object getFieldValue(_Fields field) {
27028
      switch (field) {
27029
      case SUCCESS:
27030
        return new Long(getSuccess());
27031
 
27032
      }
27033
      throw new IllegalStateException();
27034
    }
27035
 
27036
    public Object getFieldValue(int fieldId) {
27037
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27038
    }
27039
 
27040
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27041
    public boolean isSet(_Fields field) {
27042
      switch (field) {
27043
      case SUCCESS:
27044
        return isSetSuccess();
27045
      }
27046
      throw new IllegalStateException();
27047
    }
27048
 
27049
    public boolean isSet(int fieldID) {
27050
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27051
    }
27052
 
27053
    @Override
27054
    public boolean equals(Object that) {
27055
      if (that == null)
27056
        return false;
27057
      if (that instanceof getValidOrderCount_result)
27058
        return this.equals((getValidOrderCount_result)that);
27059
      return false;
27060
    }
27061
 
27062
    public boolean equals(getValidOrderCount_result that) {
27063
      if (that == null)
27064
        return false;
27065
 
27066
      boolean this_present_success = true;
27067
      boolean that_present_success = true;
27068
      if (this_present_success || that_present_success) {
27069
        if (!(this_present_success && that_present_success))
27070
          return false;
27071
        if (this.success != that.success)
27072
          return false;
27073
      }
27074
 
27075
      return true;
27076
    }
27077
 
27078
    @Override
27079
    public int hashCode() {
27080
      return 0;
27081
    }
27082
 
27083
    public int compareTo(getValidOrderCount_result other) {
27084
      if (!getClass().equals(other.getClass())) {
27085
        return getClass().getName().compareTo(other.getClass().getName());
27086
      }
27087
 
27088
      int lastComparison = 0;
27089
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
27090
 
27091
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27092
      if (lastComparison != 0) {
27093
        return lastComparison;
27094
      }
27095
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27096
      if (lastComparison != 0) {
27097
        return lastComparison;
27098
      }
27099
      return 0;
27100
    }
27101
 
27102
    public void read(TProtocol iprot) throws TException {
27103
      TField field;
27104
      iprot.readStructBegin();
27105
      while (true)
27106
      {
27107
        field = iprot.readFieldBegin();
27108
        if (field.type == TType.STOP) { 
27109
          break;
27110
        }
27111
        _Fields fieldId = _Fields.findByThriftId(field.id);
27112
        if (fieldId == null) {
27113
          TProtocolUtil.skip(iprot, field.type);
27114
        } else {
27115
          switch (fieldId) {
27116
            case SUCCESS:
27117
              if (field.type == TType.I64) {
27118
                this.success = iprot.readI64();
27119
                setSuccessIsSet(true);
27120
              } else { 
27121
                TProtocolUtil.skip(iprot, field.type);
27122
              }
27123
              break;
27124
          }
27125
          iprot.readFieldEnd();
27126
        }
27127
      }
27128
      iprot.readStructEnd();
27129
      validate();
27130
    }
27131
 
27132
    public void write(TProtocol oprot) throws TException {
27133
      oprot.writeStructBegin(STRUCT_DESC);
27134
 
27135
      if (this.isSetSuccess()) {
27136
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27137
        oprot.writeI64(this.success);
27138
        oprot.writeFieldEnd();
27139
      }
27140
      oprot.writeFieldStop();
27141
      oprot.writeStructEnd();
27142
    }
27143
 
27144
    @Override
27145
    public String toString() {
27146
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
27147
      boolean first = true;
27148
 
27149
      sb.append("success:");
27150
      sb.append(this.success);
27151
      first = false;
27152
      sb.append(")");
27153
      return sb.toString();
27154
    }
27155
 
27156
    public void validate() throws TException {
27157
      // check for required fields
27158
    }
27159
 
27160
  }
27161
 
1629 ankur.sing 27162
  public static class getNoOfCustomersWithSuccessfulTransaction_args implements TBase<getNoOfCustomersWithSuccessfulTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_args>   {
27163
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_args");
27164
 
27165
 
27166
 
27167
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27168
    public enum _Fields implements TFieldIdEnum {
27169
;
27170
 
27171
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27172
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27173
 
27174
      static {
27175
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27176
          byId.put((int)field._thriftId, field);
27177
          byName.put(field.getFieldName(), field);
27178
        }
27179
      }
27180
 
27181
      /**
27182
       * Find the _Fields constant that matches fieldId, or null if its not found.
27183
       */
27184
      public static _Fields findByThriftId(int fieldId) {
27185
        return byId.get(fieldId);
27186
      }
27187
 
27188
      /**
27189
       * Find the _Fields constant that matches fieldId, throwing an exception
27190
       * if it is not found.
27191
       */
27192
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27193
        _Fields fields = findByThriftId(fieldId);
27194
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27195
        return fields;
27196
      }
27197
 
27198
      /**
27199
       * Find the _Fields constant that matches name, or null if its not found.
27200
       */
27201
      public static _Fields findByName(String name) {
27202
        return byName.get(name);
27203
      }
27204
 
27205
      private final short _thriftId;
27206
      private final String _fieldName;
27207
 
27208
      _Fields(short thriftId, String fieldName) {
27209
        _thriftId = thriftId;
27210
        _fieldName = fieldName;
27211
      }
27212
 
27213
      public short getThriftFieldId() {
27214
        return _thriftId;
27215
      }
27216
 
27217
      public String getFieldName() {
27218
        return _fieldName;
27219
      }
27220
    }
27221
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27222
    }});
27223
 
27224
    static {
27225
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_args.class, metaDataMap);
27226
    }
27227
 
27228
    public getNoOfCustomersWithSuccessfulTransaction_args() {
27229
    }
27230
 
27231
    /**
27232
     * Performs a deep copy on <i>other</i>.
27233
     */
27234
    public getNoOfCustomersWithSuccessfulTransaction_args(getNoOfCustomersWithSuccessfulTransaction_args other) {
27235
    }
27236
 
27237
    public getNoOfCustomersWithSuccessfulTransaction_args deepCopy() {
27238
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27239
    }
27240
 
27241
    @Deprecated
27242
    public getNoOfCustomersWithSuccessfulTransaction_args clone() {
27243
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27244
    }
27245
 
27246
    public void setFieldValue(_Fields field, Object value) {
27247
      switch (field) {
27248
      }
27249
    }
27250
 
27251
    public void setFieldValue(int fieldID, Object value) {
27252
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27253
    }
27254
 
27255
    public Object getFieldValue(_Fields field) {
27256
      switch (field) {
27257
      }
27258
      throw new IllegalStateException();
27259
    }
27260
 
27261
    public Object getFieldValue(int fieldId) {
27262
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27263
    }
27264
 
27265
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27266
    public boolean isSet(_Fields field) {
27267
      switch (field) {
27268
      }
27269
      throw new IllegalStateException();
27270
    }
27271
 
27272
    public boolean isSet(int fieldID) {
27273
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27274
    }
27275
 
27276
    @Override
27277
    public boolean equals(Object that) {
27278
      if (that == null)
27279
        return false;
27280
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_args)
27281
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_args)that);
27282
      return false;
27283
    }
27284
 
27285
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_args that) {
27286
      if (that == null)
27287
        return false;
27288
 
27289
      return true;
27290
    }
27291
 
27292
    @Override
27293
    public int hashCode() {
27294
      return 0;
27295
    }
27296
 
27297
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_args other) {
27298
      if (!getClass().equals(other.getClass())) {
27299
        return getClass().getName().compareTo(other.getClass().getName());
27300
      }
27301
 
27302
      int lastComparison = 0;
27303
      getNoOfCustomersWithSuccessfulTransaction_args typedOther = (getNoOfCustomersWithSuccessfulTransaction_args)other;
27304
 
27305
      return 0;
27306
    }
27307
 
27308
    public void read(TProtocol iprot) throws TException {
27309
      TField field;
27310
      iprot.readStructBegin();
27311
      while (true)
27312
      {
27313
        field = iprot.readFieldBegin();
27314
        if (field.type == TType.STOP) { 
27315
          break;
27316
        }
27317
        _Fields fieldId = _Fields.findByThriftId(field.id);
27318
        if (fieldId == null) {
27319
          TProtocolUtil.skip(iprot, field.type);
27320
        } else {
27321
          switch (fieldId) {
27322
          }
27323
          iprot.readFieldEnd();
27324
        }
27325
      }
27326
      iprot.readStructEnd();
27327
      validate();
27328
    }
27329
 
27330
    public void write(TProtocol oprot) throws TException {
27331
      validate();
27332
 
27333
      oprot.writeStructBegin(STRUCT_DESC);
27334
      oprot.writeFieldStop();
27335
      oprot.writeStructEnd();
27336
    }
27337
 
27338
    @Override
27339
    public String toString() {
27340
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_args(");
27341
      boolean first = true;
27342
 
27343
      sb.append(")");
27344
      return sb.toString();
27345
    }
27346
 
27347
    public void validate() throws TException {
27348
      // check for required fields
27349
    }
27350
 
27351
  }
27352
 
27353
  public static class getNoOfCustomersWithSuccessfulTransaction_result implements TBase<getNoOfCustomersWithSuccessfulTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_result>   {
27354
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_result");
27355
 
27356
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
27357
 
27358
    private long success;
27359
 
27360
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27361
    public enum _Fields implements TFieldIdEnum {
27362
      SUCCESS((short)0, "success");
27363
 
27364
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27365
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27366
 
27367
      static {
27368
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27369
          byId.put((int)field._thriftId, field);
27370
          byName.put(field.getFieldName(), field);
27371
        }
27372
      }
27373
 
27374
      /**
27375
       * Find the _Fields constant that matches fieldId, or null if its not found.
27376
       */
27377
      public static _Fields findByThriftId(int fieldId) {
27378
        return byId.get(fieldId);
27379
      }
27380
 
27381
      /**
27382
       * Find the _Fields constant that matches fieldId, throwing an exception
27383
       * if it is not found.
27384
       */
27385
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27386
        _Fields fields = findByThriftId(fieldId);
27387
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27388
        return fields;
27389
      }
27390
 
27391
      /**
27392
       * Find the _Fields constant that matches name, or null if its not found.
27393
       */
27394
      public static _Fields findByName(String name) {
27395
        return byName.get(name);
27396
      }
27397
 
27398
      private final short _thriftId;
27399
      private final String _fieldName;
27400
 
27401
      _Fields(short thriftId, String fieldName) {
27402
        _thriftId = thriftId;
27403
        _fieldName = fieldName;
27404
      }
27405
 
27406
      public short getThriftFieldId() {
27407
        return _thriftId;
27408
      }
27409
 
27410
      public String getFieldName() {
27411
        return _fieldName;
27412
      }
27413
    }
27414
 
27415
    // isset id assignments
27416
    private static final int __SUCCESS_ISSET_ID = 0;
27417
    private BitSet __isset_bit_vector = new BitSet(1);
27418
 
27419
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27420
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27421
          new FieldValueMetaData(TType.I64)));
27422
    }});
27423
 
27424
    static {
27425
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_result.class, metaDataMap);
27426
    }
27427
 
27428
    public getNoOfCustomersWithSuccessfulTransaction_result() {
27429
    }
27430
 
27431
    public getNoOfCustomersWithSuccessfulTransaction_result(
27432
      long success)
27433
    {
27434
      this();
27435
      this.success = success;
27436
      setSuccessIsSet(true);
27437
    }
27438
 
27439
    /**
27440
     * Performs a deep copy on <i>other</i>.
27441
     */
27442
    public getNoOfCustomersWithSuccessfulTransaction_result(getNoOfCustomersWithSuccessfulTransaction_result other) {
27443
      __isset_bit_vector.clear();
27444
      __isset_bit_vector.or(other.__isset_bit_vector);
27445
      this.success = other.success;
27446
    }
27447
 
27448
    public getNoOfCustomersWithSuccessfulTransaction_result deepCopy() {
27449
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27450
    }
27451
 
27452
    @Deprecated
27453
    public getNoOfCustomersWithSuccessfulTransaction_result clone() {
27454
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27455
    }
27456
 
27457
    public long getSuccess() {
27458
      return this.success;
27459
    }
27460
 
27461
    public getNoOfCustomersWithSuccessfulTransaction_result setSuccess(long success) {
27462
      this.success = success;
27463
      setSuccessIsSet(true);
27464
      return this;
27465
    }
27466
 
27467
    public void unsetSuccess() {
27468
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27469
    }
27470
 
27471
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27472
    public boolean isSetSuccess() {
27473
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27474
    }
27475
 
27476
    public void setSuccessIsSet(boolean value) {
27477
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27478
    }
27479
 
27480
    public void setFieldValue(_Fields field, Object value) {
27481
      switch (field) {
27482
      case SUCCESS:
27483
        if (value == null) {
27484
          unsetSuccess();
27485
        } else {
27486
          setSuccess((Long)value);
27487
        }
27488
        break;
27489
 
27490
      }
27491
    }
27492
 
27493
    public void setFieldValue(int fieldID, Object value) {
27494
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27495
    }
27496
 
27497
    public Object getFieldValue(_Fields field) {
27498
      switch (field) {
27499
      case SUCCESS:
27500
        return new Long(getSuccess());
27501
 
27502
      }
27503
      throw new IllegalStateException();
27504
    }
27505
 
27506
    public Object getFieldValue(int fieldId) {
27507
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27508
    }
27509
 
27510
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27511
    public boolean isSet(_Fields field) {
27512
      switch (field) {
27513
      case SUCCESS:
27514
        return isSetSuccess();
27515
      }
27516
      throw new IllegalStateException();
27517
    }
27518
 
27519
    public boolean isSet(int fieldID) {
27520
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27521
    }
27522
 
27523
    @Override
27524
    public boolean equals(Object that) {
27525
      if (that == null)
27526
        return false;
27527
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_result)
27528
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_result)that);
27529
      return false;
27530
    }
27531
 
27532
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_result that) {
27533
      if (that == null)
27534
        return false;
27535
 
27536
      boolean this_present_success = true;
27537
      boolean that_present_success = true;
27538
      if (this_present_success || that_present_success) {
27539
        if (!(this_present_success && that_present_success))
27540
          return false;
27541
        if (this.success != that.success)
27542
          return false;
27543
      }
27544
 
27545
      return true;
27546
    }
27547
 
27548
    @Override
27549
    public int hashCode() {
27550
      return 0;
27551
    }
27552
 
27553
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_result other) {
27554
      if (!getClass().equals(other.getClass())) {
27555
        return getClass().getName().compareTo(other.getClass().getName());
27556
      }
27557
 
27558
      int lastComparison = 0;
27559
      getNoOfCustomersWithSuccessfulTransaction_result typedOther = (getNoOfCustomersWithSuccessfulTransaction_result)other;
27560
 
27561
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27562
      if (lastComparison != 0) {
27563
        return lastComparison;
27564
      }
27565
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27566
      if (lastComparison != 0) {
27567
        return lastComparison;
27568
      }
27569
      return 0;
27570
    }
27571
 
27572
    public void read(TProtocol iprot) throws TException {
27573
      TField field;
27574
      iprot.readStructBegin();
27575
      while (true)
27576
      {
27577
        field = iprot.readFieldBegin();
27578
        if (field.type == TType.STOP) { 
27579
          break;
27580
        }
27581
        _Fields fieldId = _Fields.findByThriftId(field.id);
27582
        if (fieldId == null) {
27583
          TProtocolUtil.skip(iprot, field.type);
27584
        } else {
27585
          switch (fieldId) {
27586
            case SUCCESS:
27587
              if (field.type == TType.I64) {
27588
                this.success = iprot.readI64();
27589
                setSuccessIsSet(true);
27590
              } else { 
27591
                TProtocolUtil.skip(iprot, field.type);
27592
              }
27593
              break;
27594
          }
27595
          iprot.readFieldEnd();
27596
        }
27597
      }
27598
      iprot.readStructEnd();
27599
      validate();
27600
    }
27601
 
27602
    public void write(TProtocol oprot) throws TException {
27603
      oprot.writeStructBegin(STRUCT_DESC);
27604
 
27605
      if (this.isSetSuccess()) {
27606
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27607
        oprot.writeI64(this.success);
27608
        oprot.writeFieldEnd();
27609
      }
27610
      oprot.writeFieldStop();
27611
      oprot.writeStructEnd();
27612
    }
27613
 
27614
    @Override
27615
    public String toString() {
27616
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_result(");
27617
      boolean first = true;
27618
 
27619
      sb.append("success:");
27620
      sb.append(this.success);
27621
      first = false;
27622
      sb.append(")");
27623
      return sb.toString();
27624
    }
27625
 
27626
    public void validate() throws TException {
27627
      // check for required fields
27628
    }
27629
 
27630
  }
27631
 
1731 ankur.sing 27632
  public static class getValidOrdersAmountRange_args implements TBase<getValidOrdersAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_args>   {
27633
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_args");
1629 ankur.sing 27634
 
27635
 
27636
 
27637
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27638
    public enum _Fields implements TFieldIdEnum {
27639
;
27640
 
27641
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27642
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27643
 
27644
      static {
27645
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27646
          byId.put((int)field._thriftId, field);
27647
          byName.put(field.getFieldName(), field);
27648
        }
27649
      }
27650
 
27651
      /**
27652
       * Find the _Fields constant that matches fieldId, or null if its not found.
27653
       */
27654
      public static _Fields findByThriftId(int fieldId) {
27655
        return byId.get(fieldId);
27656
      }
27657
 
27658
      /**
27659
       * Find the _Fields constant that matches fieldId, throwing an exception
27660
       * if it is not found.
27661
       */
27662
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27663
        _Fields fields = findByThriftId(fieldId);
27664
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27665
        return fields;
27666
      }
27667
 
27668
      /**
27669
       * Find the _Fields constant that matches name, or null if its not found.
27670
       */
27671
      public static _Fields findByName(String name) {
27672
        return byName.get(name);
27673
      }
27674
 
27675
      private final short _thriftId;
27676
      private final String _fieldName;
27677
 
27678
      _Fields(short thriftId, String fieldName) {
27679
        _thriftId = thriftId;
27680
        _fieldName = fieldName;
27681
      }
27682
 
27683
      public short getThriftFieldId() {
27684
        return _thriftId;
27685
      }
27686
 
27687
      public String getFieldName() {
27688
        return _fieldName;
27689
      }
27690
    }
27691
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27692
    }});
27693
 
27694
    static {
1731 ankur.sing 27695
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_args.class, metaDataMap);
1629 ankur.sing 27696
    }
27697
 
1731 ankur.sing 27698
    public getValidOrdersAmountRange_args() {
1629 ankur.sing 27699
    }
27700
 
27701
    /**
27702
     * Performs a deep copy on <i>other</i>.
27703
     */
1731 ankur.sing 27704
    public getValidOrdersAmountRange_args(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27705
    }
27706
 
1731 ankur.sing 27707
    public getValidOrdersAmountRange_args deepCopy() {
27708
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27709
    }
27710
 
27711
    @Deprecated
1731 ankur.sing 27712
    public getValidOrdersAmountRange_args clone() {
27713
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27714
    }
27715
 
27716
    public void setFieldValue(_Fields field, Object value) {
27717
      switch (field) {
27718
      }
27719
    }
27720
 
27721
    public void setFieldValue(int fieldID, Object value) {
27722
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27723
    }
27724
 
27725
    public Object getFieldValue(_Fields field) {
27726
      switch (field) {
27727
      }
27728
      throw new IllegalStateException();
27729
    }
27730
 
27731
    public Object getFieldValue(int fieldId) {
27732
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27733
    }
27734
 
27735
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27736
    public boolean isSet(_Fields field) {
27737
      switch (field) {
27738
      }
27739
      throw new IllegalStateException();
27740
    }
27741
 
27742
    public boolean isSet(int fieldID) {
27743
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27744
    }
27745
 
27746
    @Override
27747
    public boolean equals(Object that) {
27748
      if (that == null)
27749
        return false;
1731 ankur.sing 27750
      if (that instanceof getValidOrdersAmountRange_args)
27751
        return this.equals((getValidOrdersAmountRange_args)that);
1629 ankur.sing 27752
      return false;
27753
    }
27754
 
1731 ankur.sing 27755
    public boolean equals(getValidOrdersAmountRange_args that) {
1629 ankur.sing 27756
      if (that == null)
27757
        return false;
27758
 
27759
      return true;
27760
    }
27761
 
27762
    @Override
27763
    public int hashCode() {
27764
      return 0;
27765
    }
27766
 
1731 ankur.sing 27767
    public int compareTo(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27768
      if (!getClass().equals(other.getClass())) {
27769
        return getClass().getName().compareTo(other.getClass().getName());
27770
      }
27771
 
27772
      int lastComparison = 0;
1731 ankur.sing 27773
      getValidOrdersAmountRange_args typedOther = (getValidOrdersAmountRange_args)other;
1629 ankur.sing 27774
 
27775
      return 0;
27776
    }
27777
 
27778
    public void read(TProtocol iprot) throws TException {
27779
      TField field;
27780
      iprot.readStructBegin();
27781
      while (true)
27782
      {
27783
        field = iprot.readFieldBegin();
27784
        if (field.type == TType.STOP) { 
27785
          break;
27786
        }
27787
        _Fields fieldId = _Fields.findByThriftId(field.id);
27788
        if (fieldId == null) {
27789
          TProtocolUtil.skip(iprot, field.type);
27790
        } else {
27791
          switch (fieldId) {
27792
          }
27793
          iprot.readFieldEnd();
27794
        }
27795
      }
27796
      iprot.readStructEnd();
27797
      validate();
27798
    }
27799
 
27800
    public void write(TProtocol oprot) throws TException {
27801
      validate();
27802
 
27803
      oprot.writeStructBegin(STRUCT_DESC);
27804
      oprot.writeFieldStop();
27805
      oprot.writeStructEnd();
27806
    }
27807
 
27808
    @Override
27809
    public String toString() {
1731 ankur.sing 27810
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_args(");
1629 ankur.sing 27811
      boolean first = true;
27812
 
27813
      sb.append(")");
27814
      return sb.toString();
27815
    }
27816
 
27817
    public void validate() throws TException {
27818
      // check for required fields
27819
    }
27820
 
27821
  }
27822
 
1731 ankur.sing 27823
  public static class getValidOrdersAmountRange_result implements TBase<getValidOrdersAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_result>   {
27824
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_result");
1629 ankur.sing 27825
 
1731 ankur.sing 27826
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 27827
 
1731 ankur.sing 27828
    private List<Double> success;
1629 ankur.sing 27829
 
27830
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27831
    public enum _Fields implements TFieldIdEnum {
27832
      SUCCESS((short)0, "success");
27833
 
27834
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27835
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27836
 
27837
      static {
27838
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27839
          byId.put((int)field._thriftId, field);
27840
          byName.put(field.getFieldName(), field);
27841
        }
27842
      }
27843
 
27844
      /**
27845
       * Find the _Fields constant that matches fieldId, or null if its not found.
27846
       */
27847
      public static _Fields findByThriftId(int fieldId) {
27848
        return byId.get(fieldId);
27849
      }
27850
 
27851
      /**
27852
       * Find the _Fields constant that matches fieldId, throwing an exception
27853
       * if it is not found.
27854
       */
27855
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27856
        _Fields fields = findByThriftId(fieldId);
27857
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27858
        return fields;
27859
      }
27860
 
27861
      /**
27862
       * Find the _Fields constant that matches name, or null if its not found.
27863
       */
27864
      public static _Fields findByName(String name) {
27865
        return byName.get(name);
27866
      }
27867
 
27868
      private final short _thriftId;
27869
      private final String _fieldName;
27870
 
27871
      _Fields(short thriftId, String fieldName) {
27872
        _thriftId = thriftId;
27873
        _fieldName = fieldName;
27874
      }
27875
 
27876
      public short getThriftFieldId() {
27877
        return _thriftId;
27878
      }
27879
 
27880
      public String getFieldName() {
27881
        return _fieldName;
27882
      }
27883
    }
27884
 
27885
    // isset id assignments
27886
 
27887
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27888
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 27889
          new ListMetaData(TType.LIST, 
27890
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 27891
    }});
27892
 
27893
    static {
1731 ankur.sing 27894
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_result.class, metaDataMap);
1629 ankur.sing 27895
    }
27896
 
1731 ankur.sing 27897
    public getValidOrdersAmountRange_result() {
1629 ankur.sing 27898
    }
27899
 
1731 ankur.sing 27900
    public getValidOrdersAmountRange_result(
27901
      List<Double> success)
1629 ankur.sing 27902
    {
27903
      this();
27904
      this.success = success;
27905
    }
27906
 
27907
    /**
27908
     * Performs a deep copy on <i>other</i>.
27909
     */
1731 ankur.sing 27910
    public getValidOrdersAmountRange_result(getValidOrdersAmountRange_result other) {
27911
      if (other.isSetSuccess()) {
27912
        List<Double> __this__success = new ArrayList<Double>();
27913
        for (Double other_element : other.success) {
27914
          __this__success.add(other_element);
1629 ankur.sing 27915
        }
1731 ankur.sing 27916
        this.success = __this__success;
1629 ankur.sing 27917
      }
27918
    }
27919
 
1731 ankur.sing 27920
    public getValidOrdersAmountRange_result deepCopy() {
27921
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27922
    }
27923
 
27924
    @Deprecated
1731 ankur.sing 27925
    public getValidOrdersAmountRange_result clone() {
27926
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27927
    }
27928
 
1731 ankur.sing 27929
    public int getSuccessSize() {
27930
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 27931
    }
27932
 
1731 ankur.sing 27933
    public java.util.Iterator<Double> getSuccessIterator() {
27934
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 27935
    }
27936
 
1731 ankur.sing 27937
    public void addToSuccess(double elem) {
27938
      if (this.success == null) {
27939
        this.success = new ArrayList<Double>();
1629 ankur.sing 27940
      }
1731 ankur.sing 27941
      this.success.add(elem);
1629 ankur.sing 27942
    }
27943
 
1731 ankur.sing 27944
    public List<Double> getSuccess() {
1629 ankur.sing 27945
      return this.success;
27946
    }
27947
 
1731 ankur.sing 27948
    public getValidOrdersAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 27949
      this.success = success;
27950
      return this;
27951
    }
27952
 
27953
    public void unsetSuccess() {
1731 ankur.sing 27954
      this.success = null;
1629 ankur.sing 27955
    }
27956
 
27957
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27958
    public boolean isSetSuccess() {
1731 ankur.sing 27959
      return this.success != null;
1629 ankur.sing 27960
    }
27961
 
27962
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 27963
      if (!value) {
27964
        this.success = null;
27965
      }
1629 ankur.sing 27966
    }
27967
 
27968
    public void setFieldValue(_Fields field, Object value) {
27969
      switch (field) {
27970
      case SUCCESS:
27971
        if (value == null) {
27972
          unsetSuccess();
27973
        } else {
1731 ankur.sing 27974
          setSuccess((List<Double>)value);
1629 ankur.sing 27975
        }
27976
        break;
27977
 
27978
      }
27979
    }
27980
 
27981
    public void setFieldValue(int fieldID, Object value) {
27982
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27983
    }
27984
 
27985
    public Object getFieldValue(_Fields field) {
27986
      switch (field) {
27987
      case SUCCESS:
1731 ankur.sing 27988
        return getSuccess();
1629 ankur.sing 27989
 
27990
      }
27991
      throw new IllegalStateException();
27992
    }
27993
 
27994
    public Object getFieldValue(int fieldId) {
27995
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27996
    }
27997
 
27998
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27999
    public boolean isSet(_Fields field) {
28000
      switch (field) {
28001
      case SUCCESS:
28002
        return isSetSuccess();
28003
      }
28004
      throw new IllegalStateException();
28005
    }
28006
 
28007
    public boolean isSet(int fieldID) {
28008
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28009
    }
28010
 
28011
    @Override
28012
    public boolean equals(Object that) {
28013
      if (that == null)
28014
        return false;
1731 ankur.sing 28015
      if (that instanceof getValidOrdersAmountRange_result)
28016
        return this.equals((getValidOrdersAmountRange_result)that);
1629 ankur.sing 28017
      return false;
28018
    }
28019
 
1731 ankur.sing 28020
    public boolean equals(getValidOrdersAmountRange_result that) {
1629 ankur.sing 28021
      if (that == null)
28022
        return false;
28023
 
1731 ankur.sing 28024
      boolean this_present_success = true && this.isSetSuccess();
28025
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 28026
      if (this_present_success || that_present_success) {
28027
        if (!(this_present_success && that_present_success))
28028
          return false;
1731 ankur.sing 28029
        if (!this.success.equals(that.success))
1629 ankur.sing 28030
          return false;
28031
      }
28032
 
28033
      return true;
28034
    }
28035
 
28036
    @Override
28037
    public int hashCode() {
28038
      return 0;
28039
    }
28040
 
1731 ankur.sing 28041
    public int compareTo(getValidOrdersAmountRange_result other) {
1629 ankur.sing 28042
      if (!getClass().equals(other.getClass())) {
28043
        return getClass().getName().compareTo(other.getClass().getName());
28044
      }
28045
 
28046
      int lastComparison = 0;
1731 ankur.sing 28047
      getValidOrdersAmountRange_result typedOther = (getValidOrdersAmountRange_result)other;
1629 ankur.sing 28048
 
28049
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28050
      if (lastComparison != 0) {
28051
        return lastComparison;
28052
      }
28053
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28054
      if (lastComparison != 0) {
28055
        return lastComparison;
28056
      }
28057
      return 0;
28058
    }
28059
 
28060
    public void read(TProtocol iprot) throws TException {
28061
      TField field;
28062
      iprot.readStructBegin();
28063
      while (true)
28064
      {
28065
        field = iprot.readFieldBegin();
28066
        if (field.type == TType.STOP) { 
28067
          break;
28068
        }
28069
        _Fields fieldId = _Fields.findByThriftId(field.id);
28070
        if (fieldId == null) {
28071
          TProtocolUtil.skip(iprot, field.type);
28072
        } else {
28073
          switch (fieldId) {
28074
            case SUCCESS:
1731 ankur.sing 28075
              if (field.type == TType.LIST) {
28076
                {
28077
                  TList _list80 = iprot.readListBegin();
28078
                  this.success = new ArrayList<Double>(_list80.size);
28079
                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
28080
                  {
28081
                    double _elem82;
28082
                    _elem82 = iprot.readDouble();
28083
                    this.success.add(_elem82);
28084
                  }
28085
                  iprot.readListEnd();
28086
                }
1629 ankur.sing 28087
              } else { 
28088
                TProtocolUtil.skip(iprot, field.type);
28089
              }
28090
              break;
28091
          }
28092
          iprot.readFieldEnd();
28093
        }
28094
      }
28095
      iprot.readStructEnd();
28096
      validate();
28097
    }
28098
 
28099
    public void write(TProtocol oprot) throws TException {
28100
      oprot.writeStructBegin(STRUCT_DESC);
28101
 
28102
      if (this.isSetSuccess()) {
28103
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 28104
        {
28105
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
28106
          for (double _iter83 : this.success)
28107
          {
28108
            oprot.writeDouble(_iter83);
28109
          }
28110
          oprot.writeListEnd();
28111
        }
1629 ankur.sing 28112
        oprot.writeFieldEnd();
28113
      }
28114
      oprot.writeFieldStop();
28115
      oprot.writeStructEnd();
28116
    }
28117
 
28118
    @Override
28119
    public String toString() {
1731 ankur.sing 28120
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_result(");
1629 ankur.sing 28121
      boolean first = true;
28122
 
28123
      sb.append("success:");
1731 ankur.sing 28124
      if (this.success == null) {
28125
        sb.append("null");
28126
      } else {
28127
        sb.append(this.success);
28128
      }
1629 ankur.sing 28129
      first = false;
28130
      sb.append(")");
28131
      return sb.toString();
28132
    }
28133
 
28134
    public void validate() throws TException {
28135
      // check for required fields
28136
    }
28137
 
28138
  }
28139
 
1886 ankur.sing 28140
  public static class getValidOrders_args implements TBase<getValidOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_args>   {
28141
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_args");
28142
 
28143
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)1);
28144
 
28145
    private long limit;
28146
 
28147
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28148
    public enum _Fields implements TFieldIdEnum {
28149
      LIMIT((short)1, "limit");
28150
 
28151
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28152
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28153
 
28154
      static {
28155
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28156
          byId.put((int)field._thriftId, field);
28157
          byName.put(field.getFieldName(), field);
28158
        }
28159
      }
28160
 
28161
      /**
28162
       * Find the _Fields constant that matches fieldId, or null if its not found.
28163
       */
28164
      public static _Fields findByThriftId(int fieldId) {
28165
        return byId.get(fieldId);
28166
      }
28167
 
28168
      /**
28169
       * Find the _Fields constant that matches fieldId, throwing an exception
28170
       * if it is not found.
28171
       */
28172
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28173
        _Fields fields = findByThriftId(fieldId);
28174
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28175
        return fields;
28176
      }
28177
 
28178
      /**
28179
       * Find the _Fields constant that matches name, or null if its not found.
28180
       */
28181
      public static _Fields findByName(String name) {
28182
        return byName.get(name);
28183
      }
28184
 
28185
      private final short _thriftId;
28186
      private final String _fieldName;
28187
 
28188
      _Fields(short thriftId, String fieldName) {
28189
        _thriftId = thriftId;
28190
        _fieldName = fieldName;
28191
      }
28192
 
28193
      public short getThriftFieldId() {
28194
        return _thriftId;
28195
      }
28196
 
28197
      public String getFieldName() {
28198
        return _fieldName;
28199
      }
28200
    }
28201
 
28202
    // isset id assignments
28203
    private static final int __LIMIT_ISSET_ID = 0;
28204
    private BitSet __isset_bit_vector = new BitSet(1);
28205
 
28206
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28207
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
28208
          new FieldValueMetaData(TType.I64)));
28209
    }});
28210
 
28211
    static {
28212
      FieldMetaData.addStructMetaDataMap(getValidOrders_args.class, metaDataMap);
28213
    }
28214
 
28215
    public getValidOrders_args() {
28216
    }
28217
 
28218
    public getValidOrders_args(
28219
      long limit)
28220
    {
28221
      this();
28222
      this.limit = limit;
28223
      setLimitIsSet(true);
28224
    }
28225
 
28226
    /**
28227
     * Performs a deep copy on <i>other</i>.
28228
     */
28229
    public getValidOrders_args(getValidOrders_args other) {
28230
      __isset_bit_vector.clear();
28231
      __isset_bit_vector.or(other.__isset_bit_vector);
28232
      this.limit = other.limit;
28233
    }
28234
 
28235
    public getValidOrders_args deepCopy() {
28236
      return new getValidOrders_args(this);
28237
    }
28238
 
28239
    @Deprecated
28240
    public getValidOrders_args clone() {
28241
      return new getValidOrders_args(this);
28242
    }
28243
 
28244
    public long getLimit() {
28245
      return this.limit;
28246
    }
28247
 
28248
    public getValidOrders_args setLimit(long limit) {
28249
      this.limit = limit;
28250
      setLimitIsSet(true);
28251
      return this;
28252
    }
28253
 
28254
    public void unsetLimit() {
28255
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
28256
    }
28257
 
28258
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
28259
    public boolean isSetLimit() {
28260
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
28261
    }
28262
 
28263
    public void setLimitIsSet(boolean value) {
28264
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
28265
    }
28266
 
28267
    public void setFieldValue(_Fields field, Object value) {
28268
      switch (field) {
28269
      case LIMIT:
28270
        if (value == null) {
28271
          unsetLimit();
28272
        } else {
28273
          setLimit((Long)value);
28274
        }
28275
        break;
28276
 
28277
      }
28278
    }
28279
 
28280
    public void setFieldValue(int fieldID, Object value) {
28281
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28282
    }
28283
 
28284
    public Object getFieldValue(_Fields field) {
28285
      switch (field) {
28286
      case LIMIT:
28287
        return new Long(getLimit());
28288
 
28289
      }
28290
      throw new IllegalStateException();
28291
    }
28292
 
28293
    public Object getFieldValue(int fieldId) {
28294
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28295
    }
28296
 
28297
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28298
    public boolean isSet(_Fields field) {
28299
      switch (field) {
28300
      case LIMIT:
28301
        return isSetLimit();
28302
      }
28303
      throw new IllegalStateException();
28304
    }
28305
 
28306
    public boolean isSet(int fieldID) {
28307
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28308
    }
28309
 
28310
    @Override
28311
    public boolean equals(Object that) {
28312
      if (that == null)
28313
        return false;
28314
      if (that instanceof getValidOrders_args)
28315
        return this.equals((getValidOrders_args)that);
28316
      return false;
28317
    }
28318
 
28319
    public boolean equals(getValidOrders_args that) {
28320
      if (that == null)
28321
        return false;
28322
 
28323
      boolean this_present_limit = true;
28324
      boolean that_present_limit = true;
28325
      if (this_present_limit || that_present_limit) {
28326
        if (!(this_present_limit && that_present_limit))
28327
          return false;
28328
        if (this.limit != that.limit)
28329
          return false;
28330
      }
28331
 
28332
      return true;
28333
    }
28334
 
28335
    @Override
28336
    public int hashCode() {
28337
      return 0;
28338
    }
28339
 
28340
    public int compareTo(getValidOrders_args other) {
28341
      if (!getClass().equals(other.getClass())) {
28342
        return getClass().getName().compareTo(other.getClass().getName());
28343
      }
28344
 
28345
      int lastComparison = 0;
28346
      getValidOrders_args typedOther = (getValidOrders_args)other;
28347
 
28348
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
28349
      if (lastComparison != 0) {
28350
        return lastComparison;
28351
      }
28352
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
28353
      if (lastComparison != 0) {
28354
        return lastComparison;
28355
      }
28356
      return 0;
28357
    }
28358
 
28359
    public void read(TProtocol iprot) throws TException {
28360
      TField field;
28361
      iprot.readStructBegin();
28362
      while (true)
28363
      {
28364
        field = iprot.readFieldBegin();
28365
        if (field.type == TType.STOP) { 
28366
          break;
28367
        }
28368
        _Fields fieldId = _Fields.findByThriftId(field.id);
28369
        if (fieldId == null) {
28370
          TProtocolUtil.skip(iprot, field.type);
28371
        } else {
28372
          switch (fieldId) {
28373
            case LIMIT:
28374
              if (field.type == TType.I64) {
28375
                this.limit = iprot.readI64();
28376
                setLimitIsSet(true);
28377
              } else { 
28378
                TProtocolUtil.skip(iprot, field.type);
28379
              }
28380
              break;
28381
          }
28382
          iprot.readFieldEnd();
28383
        }
28384
      }
28385
      iprot.readStructEnd();
28386
      validate();
28387
    }
28388
 
28389
    public void write(TProtocol oprot) throws TException {
28390
      validate();
28391
 
28392
      oprot.writeStructBegin(STRUCT_DESC);
28393
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
28394
      oprot.writeI64(this.limit);
28395
      oprot.writeFieldEnd();
28396
      oprot.writeFieldStop();
28397
      oprot.writeStructEnd();
28398
    }
28399
 
28400
    @Override
28401
    public String toString() {
28402
      StringBuilder sb = new StringBuilder("getValidOrders_args(");
28403
      boolean first = true;
28404
 
28405
      sb.append("limit:");
28406
      sb.append(this.limit);
28407
      first = false;
28408
      sb.append(")");
28409
      return sb.toString();
28410
    }
28411
 
28412
    public void validate() throws TException {
28413
      // check for required fields
28414
    }
28415
 
28416
  }
28417
 
28418
  public static class getValidOrders_result implements TBase<getValidOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_result>   {
28419
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_result");
28420
 
28421
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
28422
 
28423
    private List<Order> success;
28424
 
28425
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28426
    public enum _Fields implements TFieldIdEnum {
28427
      SUCCESS((short)0, "success");
28428
 
28429
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28430
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28431
 
28432
      static {
28433
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28434
          byId.put((int)field._thriftId, field);
28435
          byName.put(field.getFieldName(), field);
28436
        }
28437
      }
28438
 
28439
      /**
28440
       * Find the _Fields constant that matches fieldId, or null if its not found.
28441
       */
28442
      public static _Fields findByThriftId(int fieldId) {
28443
        return byId.get(fieldId);
28444
      }
28445
 
28446
      /**
28447
       * Find the _Fields constant that matches fieldId, throwing an exception
28448
       * if it is not found.
28449
       */
28450
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28451
        _Fields fields = findByThriftId(fieldId);
28452
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28453
        return fields;
28454
      }
28455
 
28456
      /**
28457
       * Find the _Fields constant that matches name, or null if its not found.
28458
       */
28459
      public static _Fields findByName(String name) {
28460
        return byName.get(name);
28461
      }
28462
 
28463
      private final short _thriftId;
28464
      private final String _fieldName;
28465
 
28466
      _Fields(short thriftId, String fieldName) {
28467
        _thriftId = thriftId;
28468
        _fieldName = fieldName;
28469
      }
28470
 
28471
      public short getThriftFieldId() {
28472
        return _thriftId;
28473
      }
28474
 
28475
      public String getFieldName() {
28476
        return _fieldName;
28477
      }
28478
    }
28479
 
28480
    // isset id assignments
28481
 
28482
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28483
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28484
          new ListMetaData(TType.LIST, 
28485
              new StructMetaData(TType.STRUCT, Order.class))));
28486
    }});
28487
 
28488
    static {
28489
      FieldMetaData.addStructMetaDataMap(getValidOrders_result.class, metaDataMap);
28490
    }
28491
 
28492
    public getValidOrders_result() {
28493
    }
28494
 
28495
    public getValidOrders_result(
28496
      List<Order> success)
28497
    {
28498
      this();
28499
      this.success = success;
28500
    }
28501
 
28502
    /**
28503
     * Performs a deep copy on <i>other</i>.
28504
     */
28505
    public getValidOrders_result(getValidOrders_result other) {
28506
      if (other.isSetSuccess()) {
28507
        List<Order> __this__success = new ArrayList<Order>();
28508
        for (Order other_element : other.success) {
28509
          __this__success.add(new Order(other_element));
28510
        }
28511
        this.success = __this__success;
28512
      }
28513
    }
28514
 
28515
    public getValidOrders_result deepCopy() {
28516
      return new getValidOrders_result(this);
28517
    }
28518
 
28519
    @Deprecated
28520
    public getValidOrders_result clone() {
28521
      return new getValidOrders_result(this);
28522
    }
28523
 
28524
    public int getSuccessSize() {
28525
      return (this.success == null) ? 0 : this.success.size();
28526
    }
28527
 
28528
    public java.util.Iterator<Order> getSuccessIterator() {
28529
      return (this.success == null) ? null : this.success.iterator();
28530
    }
28531
 
28532
    public void addToSuccess(Order elem) {
28533
      if (this.success == null) {
28534
        this.success = new ArrayList<Order>();
28535
      }
28536
      this.success.add(elem);
28537
    }
28538
 
28539
    public List<Order> getSuccess() {
28540
      return this.success;
28541
    }
28542
 
28543
    public getValidOrders_result setSuccess(List<Order> success) {
28544
      this.success = success;
28545
      return this;
28546
    }
28547
 
28548
    public void unsetSuccess() {
28549
      this.success = null;
28550
    }
28551
 
28552
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28553
    public boolean isSetSuccess() {
28554
      return this.success != null;
28555
    }
28556
 
28557
    public void setSuccessIsSet(boolean value) {
28558
      if (!value) {
28559
        this.success = null;
28560
      }
28561
    }
28562
 
28563
    public void setFieldValue(_Fields field, Object value) {
28564
      switch (field) {
28565
      case SUCCESS:
28566
        if (value == null) {
28567
          unsetSuccess();
28568
        } else {
28569
          setSuccess((List<Order>)value);
28570
        }
28571
        break;
28572
 
28573
      }
28574
    }
28575
 
28576
    public void setFieldValue(int fieldID, Object value) {
28577
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28578
    }
28579
 
28580
    public Object getFieldValue(_Fields field) {
28581
      switch (field) {
28582
      case SUCCESS:
28583
        return getSuccess();
28584
 
28585
      }
28586
      throw new IllegalStateException();
28587
    }
28588
 
28589
    public Object getFieldValue(int fieldId) {
28590
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28591
    }
28592
 
28593
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28594
    public boolean isSet(_Fields field) {
28595
      switch (field) {
28596
      case SUCCESS:
28597
        return isSetSuccess();
28598
      }
28599
      throw new IllegalStateException();
28600
    }
28601
 
28602
    public boolean isSet(int fieldID) {
28603
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28604
    }
28605
 
28606
    @Override
28607
    public boolean equals(Object that) {
28608
      if (that == null)
28609
        return false;
28610
      if (that instanceof getValidOrders_result)
28611
        return this.equals((getValidOrders_result)that);
28612
      return false;
28613
    }
28614
 
28615
    public boolean equals(getValidOrders_result that) {
28616
      if (that == null)
28617
        return false;
28618
 
28619
      boolean this_present_success = true && this.isSetSuccess();
28620
      boolean that_present_success = true && that.isSetSuccess();
28621
      if (this_present_success || that_present_success) {
28622
        if (!(this_present_success && that_present_success))
28623
          return false;
28624
        if (!this.success.equals(that.success))
28625
          return false;
28626
      }
28627
 
28628
      return true;
28629
    }
28630
 
28631
    @Override
28632
    public int hashCode() {
28633
      return 0;
28634
    }
28635
 
28636
    public int compareTo(getValidOrders_result other) {
28637
      if (!getClass().equals(other.getClass())) {
28638
        return getClass().getName().compareTo(other.getClass().getName());
28639
      }
28640
 
28641
      int lastComparison = 0;
28642
      getValidOrders_result typedOther = (getValidOrders_result)other;
28643
 
28644
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28645
      if (lastComparison != 0) {
28646
        return lastComparison;
28647
      }
28648
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28649
      if (lastComparison != 0) {
28650
        return lastComparison;
28651
      }
28652
      return 0;
28653
    }
28654
 
28655
    public void read(TProtocol iprot) throws TException {
28656
      TField field;
28657
      iprot.readStructBegin();
28658
      while (true)
28659
      {
28660
        field = iprot.readFieldBegin();
28661
        if (field.type == TType.STOP) { 
28662
          break;
28663
        }
28664
        _Fields fieldId = _Fields.findByThriftId(field.id);
28665
        if (fieldId == null) {
28666
          TProtocolUtil.skip(iprot, field.type);
28667
        } else {
28668
          switch (fieldId) {
28669
            case SUCCESS:
28670
              if (field.type == TType.LIST) {
28671
                {
28672
                  TList _list84 = iprot.readListBegin();
28673
                  this.success = new ArrayList<Order>(_list84.size);
28674
                  for (int _i85 = 0; _i85 < _list84.size; ++_i85)
28675
                  {
28676
                    Order _elem86;
28677
                    _elem86 = new Order();
28678
                    _elem86.read(iprot);
28679
                    this.success.add(_elem86);
28680
                  }
28681
                  iprot.readListEnd();
28682
                }
28683
              } else { 
28684
                TProtocolUtil.skip(iprot, field.type);
28685
              }
28686
              break;
28687
          }
28688
          iprot.readFieldEnd();
28689
        }
28690
      }
28691
      iprot.readStructEnd();
28692
      validate();
28693
    }
28694
 
28695
    public void write(TProtocol oprot) throws TException {
28696
      oprot.writeStructBegin(STRUCT_DESC);
28697
 
28698
      if (this.isSetSuccess()) {
28699
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28700
        {
28701
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
28702
          for (Order _iter87 : this.success)
28703
          {
28704
            _iter87.write(oprot);
28705
          }
28706
          oprot.writeListEnd();
28707
        }
28708
        oprot.writeFieldEnd();
28709
      }
28710
      oprot.writeFieldStop();
28711
      oprot.writeStructEnd();
28712
    }
28713
 
28714
    @Override
28715
    public String toString() {
28716
      StringBuilder sb = new StringBuilder("getValidOrders_result(");
28717
      boolean first = true;
28718
 
28719
      sb.append("success:");
28720
      if (this.success == null) {
28721
        sb.append("null");
28722
      } else {
28723
        sb.append(this.success);
28724
      }
28725
      first = false;
28726
      sb.append(")");
28727
      return sb.toString();
28728
    }
28729
 
28730
    public void validate() throws TException {
28731
      // check for required fields
28732
    }
28733
 
28734
  }
28735
 
2538 chandransh 28736
  public static class toggleDOAFlag_args implements TBase<toggleDOAFlag_args._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_args>   {
28737
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_args");
28738
 
28739
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
28740
 
28741
    private long orderId;
28742
 
28743
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28744
    public enum _Fields implements TFieldIdEnum {
28745
      ORDER_ID((short)1, "orderId");
28746
 
28747
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28748
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28749
 
28750
      static {
28751
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28752
          byId.put((int)field._thriftId, field);
28753
          byName.put(field.getFieldName(), field);
28754
        }
28755
      }
28756
 
28757
      /**
28758
       * Find the _Fields constant that matches fieldId, or null if its not found.
28759
       */
28760
      public static _Fields findByThriftId(int fieldId) {
28761
        return byId.get(fieldId);
28762
      }
28763
 
28764
      /**
28765
       * Find the _Fields constant that matches fieldId, throwing an exception
28766
       * if it is not found.
28767
       */
28768
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28769
        _Fields fields = findByThriftId(fieldId);
28770
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28771
        return fields;
28772
      }
28773
 
28774
      /**
28775
       * Find the _Fields constant that matches name, or null if its not found.
28776
       */
28777
      public static _Fields findByName(String name) {
28778
        return byName.get(name);
28779
      }
28780
 
28781
      private final short _thriftId;
28782
      private final String _fieldName;
28783
 
28784
      _Fields(short thriftId, String fieldName) {
28785
        _thriftId = thriftId;
28786
        _fieldName = fieldName;
28787
      }
28788
 
28789
      public short getThriftFieldId() {
28790
        return _thriftId;
28791
      }
28792
 
28793
      public String getFieldName() {
28794
        return _fieldName;
28795
      }
28796
    }
28797
 
28798
    // isset id assignments
28799
    private static final int __ORDERID_ISSET_ID = 0;
28800
    private BitSet __isset_bit_vector = new BitSet(1);
28801
 
28802
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28803
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
28804
          new FieldValueMetaData(TType.I64)));
28805
    }});
28806
 
28807
    static {
28808
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_args.class, metaDataMap);
28809
    }
28810
 
28811
    public toggleDOAFlag_args() {
28812
    }
28813
 
28814
    public toggleDOAFlag_args(
28815
      long orderId)
28816
    {
28817
      this();
28818
      this.orderId = orderId;
28819
      setOrderIdIsSet(true);
28820
    }
28821
 
28822
    /**
28823
     * Performs a deep copy on <i>other</i>.
28824
     */
28825
    public toggleDOAFlag_args(toggleDOAFlag_args other) {
28826
      __isset_bit_vector.clear();
28827
      __isset_bit_vector.or(other.__isset_bit_vector);
28828
      this.orderId = other.orderId;
28829
    }
28830
 
28831
    public toggleDOAFlag_args deepCopy() {
28832
      return new toggleDOAFlag_args(this);
28833
    }
28834
 
28835
    @Deprecated
28836
    public toggleDOAFlag_args clone() {
28837
      return new toggleDOAFlag_args(this);
28838
    }
28839
 
28840
    public long getOrderId() {
28841
      return this.orderId;
28842
    }
28843
 
28844
    public toggleDOAFlag_args setOrderId(long orderId) {
28845
      this.orderId = orderId;
28846
      setOrderIdIsSet(true);
28847
      return this;
28848
    }
28849
 
28850
    public void unsetOrderId() {
28851
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
28852
    }
28853
 
28854
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
28855
    public boolean isSetOrderId() {
28856
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
28857
    }
28858
 
28859
    public void setOrderIdIsSet(boolean value) {
28860
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
28861
    }
28862
 
28863
    public void setFieldValue(_Fields field, Object value) {
28864
      switch (field) {
28865
      case ORDER_ID:
28866
        if (value == null) {
28867
          unsetOrderId();
28868
        } else {
28869
          setOrderId((Long)value);
28870
        }
28871
        break;
28872
 
28873
      }
28874
    }
28875
 
28876
    public void setFieldValue(int fieldID, Object value) {
28877
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28878
    }
28879
 
28880
    public Object getFieldValue(_Fields field) {
28881
      switch (field) {
28882
      case ORDER_ID:
28883
        return new Long(getOrderId());
28884
 
28885
      }
28886
      throw new IllegalStateException();
28887
    }
28888
 
28889
    public Object getFieldValue(int fieldId) {
28890
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28891
    }
28892
 
28893
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28894
    public boolean isSet(_Fields field) {
28895
      switch (field) {
28896
      case ORDER_ID:
28897
        return isSetOrderId();
28898
      }
28899
      throw new IllegalStateException();
28900
    }
28901
 
28902
    public boolean isSet(int fieldID) {
28903
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28904
    }
28905
 
28906
    @Override
28907
    public boolean equals(Object that) {
28908
      if (that == null)
28909
        return false;
28910
      if (that instanceof toggleDOAFlag_args)
28911
        return this.equals((toggleDOAFlag_args)that);
28912
      return false;
28913
    }
28914
 
28915
    public boolean equals(toggleDOAFlag_args that) {
28916
      if (that == null)
28917
        return false;
28918
 
28919
      boolean this_present_orderId = true;
28920
      boolean that_present_orderId = true;
28921
      if (this_present_orderId || that_present_orderId) {
28922
        if (!(this_present_orderId && that_present_orderId))
28923
          return false;
28924
        if (this.orderId != that.orderId)
28925
          return false;
28926
      }
28927
 
28928
      return true;
28929
    }
28930
 
28931
    @Override
28932
    public int hashCode() {
28933
      return 0;
28934
    }
28935
 
28936
    public int compareTo(toggleDOAFlag_args other) {
28937
      if (!getClass().equals(other.getClass())) {
28938
        return getClass().getName().compareTo(other.getClass().getName());
28939
      }
28940
 
28941
      int lastComparison = 0;
28942
      toggleDOAFlag_args typedOther = (toggleDOAFlag_args)other;
28943
 
28944
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
28945
      if (lastComparison != 0) {
28946
        return lastComparison;
28947
      }
28948
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
28949
      if (lastComparison != 0) {
28950
        return lastComparison;
28951
      }
28952
      return 0;
28953
    }
28954
 
28955
    public void read(TProtocol iprot) throws TException {
28956
      TField field;
28957
      iprot.readStructBegin();
28958
      while (true)
28959
      {
28960
        field = iprot.readFieldBegin();
28961
        if (field.type == TType.STOP) { 
28962
          break;
28963
        }
28964
        _Fields fieldId = _Fields.findByThriftId(field.id);
28965
        if (fieldId == null) {
28966
          TProtocolUtil.skip(iprot, field.type);
28967
        } else {
28968
          switch (fieldId) {
28969
            case ORDER_ID:
28970
              if (field.type == TType.I64) {
28971
                this.orderId = iprot.readI64();
28972
                setOrderIdIsSet(true);
28973
              } else { 
28974
                TProtocolUtil.skip(iprot, field.type);
28975
              }
28976
              break;
28977
          }
28978
          iprot.readFieldEnd();
28979
        }
28980
      }
28981
      iprot.readStructEnd();
28982
      validate();
28983
    }
28984
 
28985
    public void write(TProtocol oprot) throws TException {
28986
      validate();
28987
 
28988
      oprot.writeStructBegin(STRUCT_DESC);
28989
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
28990
      oprot.writeI64(this.orderId);
28991
      oprot.writeFieldEnd();
28992
      oprot.writeFieldStop();
28993
      oprot.writeStructEnd();
28994
    }
28995
 
28996
    @Override
28997
    public String toString() {
28998
      StringBuilder sb = new StringBuilder("toggleDOAFlag_args(");
28999
      boolean first = true;
29000
 
29001
      sb.append("orderId:");
29002
      sb.append(this.orderId);
29003
      first = false;
29004
      sb.append(")");
29005
      return sb.toString();
29006
    }
29007
 
29008
    public void validate() throws TException {
29009
      // check for required fields
29010
    }
29011
 
29012
  }
29013
 
29014
  public static class toggleDOAFlag_result implements TBase<toggleDOAFlag_result._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_result>   {
29015
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_result");
29016
 
29017
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
29018
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
29019
 
29020
    private boolean success;
29021
    private TransactionServiceException ex;
29022
 
29023
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29024
    public enum _Fields implements TFieldIdEnum {
29025
      SUCCESS((short)0, "success"),
29026
      EX((short)1, "ex");
29027
 
29028
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29029
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29030
 
29031
      static {
29032
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29033
          byId.put((int)field._thriftId, field);
29034
          byName.put(field.getFieldName(), field);
29035
        }
29036
      }
29037
 
29038
      /**
29039
       * Find the _Fields constant that matches fieldId, or null if its not found.
29040
       */
29041
      public static _Fields findByThriftId(int fieldId) {
29042
        return byId.get(fieldId);
29043
      }
29044
 
29045
      /**
29046
       * Find the _Fields constant that matches fieldId, throwing an exception
29047
       * if it is not found.
29048
       */
29049
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29050
        _Fields fields = findByThriftId(fieldId);
29051
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29052
        return fields;
29053
      }
29054
 
29055
      /**
29056
       * Find the _Fields constant that matches name, or null if its not found.
29057
       */
29058
      public static _Fields findByName(String name) {
29059
        return byName.get(name);
29060
      }
29061
 
29062
      private final short _thriftId;
29063
      private final String _fieldName;
29064
 
29065
      _Fields(short thriftId, String fieldName) {
29066
        _thriftId = thriftId;
29067
        _fieldName = fieldName;
29068
      }
29069
 
29070
      public short getThriftFieldId() {
29071
        return _thriftId;
29072
      }
29073
 
29074
      public String getFieldName() {
29075
        return _fieldName;
29076
      }
29077
    }
29078
 
29079
    // isset id assignments
29080
    private static final int __SUCCESS_ISSET_ID = 0;
29081
    private BitSet __isset_bit_vector = new BitSet(1);
29082
 
29083
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29084
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29085
          new FieldValueMetaData(TType.BOOL)));
29086
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
29087
          new FieldValueMetaData(TType.STRUCT)));
29088
    }});
29089
 
29090
    static {
29091
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_result.class, metaDataMap);
29092
    }
29093
 
29094
    public toggleDOAFlag_result() {
29095
    }
29096
 
29097
    public toggleDOAFlag_result(
29098
      boolean success,
29099
      TransactionServiceException ex)
29100
    {
29101
      this();
29102
      this.success = success;
29103
      setSuccessIsSet(true);
29104
      this.ex = ex;
29105
    }
29106
 
29107
    /**
29108
     * Performs a deep copy on <i>other</i>.
29109
     */
29110
    public toggleDOAFlag_result(toggleDOAFlag_result other) {
29111
      __isset_bit_vector.clear();
29112
      __isset_bit_vector.or(other.__isset_bit_vector);
29113
      this.success = other.success;
29114
      if (other.isSetEx()) {
29115
        this.ex = new TransactionServiceException(other.ex);
29116
      }
29117
    }
29118
 
29119
    public toggleDOAFlag_result deepCopy() {
29120
      return new toggleDOAFlag_result(this);
29121
    }
29122
 
29123
    @Deprecated
29124
    public toggleDOAFlag_result clone() {
29125
      return new toggleDOAFlag_result(this);
29126
    }
29127
 
29128
    public boolean isSuccess() {
29129
      return this.success;
29130
    }
29131
 
29132
    public toggleDOAFlag_result setSuccess(boolean success) {
29133
      this.success = success;
29134
      setSuccessIsSet(true);
29135
      return this;
29136
    }
29137
 
29138
    public void unsetSuccess() {
29139
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29140
    }
29141
 
29142
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29143
    public boolean isSetSuccess() {
29144
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29145
    }
29146
 
29147
    public void setSuccessIsSet(boolean value) {
29148
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29149
    }
29150
 
29151
    public TransactionServiceException getEx() {
29152
      return this.ex;
29153
    }
29154
 
29155
    public toggleDOAFlag_result setEx(TransactionServiceException ex) {
29156
      this.ex = ex;
29157
      return this;
29158
    }
29159
 
29160
    public void unsetEx() {
29161
      this.ex = null;
29162
    }
29163
 
29164
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
29165
    public boolean isSetEx() {
29166
      return this.ex != null;
29167
    }
29168
 
29169
    public void setExIsSet(boolean value) {
29170
      if (!value) {
29171
        this.ex = null;
29172
      }
29173
    }
29174
 
29175
    public void setFieldValue(_Fields field, Object value) {
29176
      switch (field) {
29177
      case SUCCESS:
29178
        if (value == null) {
29179
          unsetSuccess();
29180
        } else {
29181
          setSuccess((Boolean)value);
29182
        }
29183
        break;
29184
 
29185
      case EX:
29186
        if (value == null) {
29187
          unsetEx();
29188
        } else {
29189
          setEx((TransactionServiceException)value);
29190
        }
29191
        break;
29192
 
29193
      }
29194
    }
29195
 
29196
    public void setFieldValue(int fieldID, Object value) {
29197
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29198
    }
29199
 
29200
    public Object getFieldValue(_Fields field) {
29201
      switch (field) {
29202
      case SUCCESS:
29203
        return new Boolean(isSuccess());
29204
 
29205
      case EX:
29206
        return getEx();
29207
 
29208
      }
29209
      throw new IllegalStateException();
29210
    }
29211
 
29212
    public Object getFieldValue(int fieldId) {
29213
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29214
    }
29215
 
29216
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29217
    public boolean isSet(_Fields field) {
29218
      switch (field) {
29219
      case SUCCESS:
29220
        return isSetSuccess();
29221
      case EX:
29222
        return isSetEx();
29223
      }
29224
      throw new IllegalStateException();
29225
    }
29226
 
29227
    public boolean isSet(int fieldID) {
29228
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29229
    }
29230
 
29231
    @Override
29232
    public boolean equals(Object that) {
29233
      if (that == null)
29234
        return false;
29235
      if (that instanceof toggleDOAFlag_result)
29236
        return this.equals((toggleDOAFlag_result)that);
29237
      return false;
29238
    }
29239
 
29240
    public boolean equals(toggleDOAFlag_result that) {
29241
      if (that == null)
29242
        return false;
29243
 
29244
      boolean this_present_success = true;
29245
      boolean that_present_success = true;
29246
      if (this_present_success || that_present_success) {
29247
        if (!(this_present_success && that_present_success))
29248
          return false;
29249
        if (this.success != that.success)
29250
          return false;
29251
      }
29252
 
29253
      boolean this_present_ex = true && this.isSetEx();
29254
      boolean that_present_ex = true && that.isSetEx();
29255
      if (this_present_ex || that_present_ex) {
29256
        if (!(this_present_ex && that_present_ex))
29257
          return false;
29258
        if (!this.ex.equals(that.ex))
29259
          return false;
29260
      }
29261
 
29262
      return true;
29263
    }
29264
 
29265
    @Override
29266
    public int hashCode() {
29267
      return 0;
29268
    }
29269
 
29270
    public int compareTo(toggleDOAFlag_result other) {
29271
      if (!getClass().equals(other.getClass())) {
29272
        return getClass().getName().compareTo(other.getClass().getName());
29273
      }
29274
 
29275
      int lastComparison = 0;
29276
      toggleDOAFlag_result typedOther = (toggleDOAFlag_result)other;
29277
 
29278
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29279
      if (lastComparison != 0) {
29280
        return lastComparison;
29281
      }
29282
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29283
      if (lastComparison != 0) {
29284
        return lastComparison;
29285
      }
29286
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
29287
      if (lastComparison != 0) {
29288
        return lastComparison;
29289
      }
29290
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
29291
      if (lastComparison != 0) {
29292
        return lastComparison;
29293
      }
29294
      return 0;
29295
    }
29296
 
29297
    public void read(TProtocol iprot) throws TException {
29298
      TField field;
29299
      iprot.readStructBegin();
29300
      while (true)
29301
      {
29302
        field = iprot.readFieldBegin();
29303
        if (field.type == TType.STOP) { 
29304
          break;
29305
        }
29306
        _Fields fieldId = _Fields.findByThriftId(field.id);
29307
        if (fieldId == null) {
29308
          TProtocolUtil.skip(iprot, field.type);
29309
        } else {
29310
          switch (fieldId) {
29311
            case SUCCESS:
29312
              if (field.type == TType.BOOL) {
29313
                this.success = iprot.readBool();
29314
                setSuccessIsSet(true);
29315
              } else { 
29316
                TProtocolUtil.skip(iprot, field.type);
29317
              }
29318
              break;
29319
            case EX:
29320
              if (field.type == TType.STRUCT) {
29321
                this.ex = new TransactionServiceException();
29322
                this.ex.read(iprot);
29323
              } else { 
29324
                TProtocolUtil.skip(iprot, field.type);
29325
              }
29326
              break;
29327
          }
29328
          iprot.readFieldEnd();
29329
        }
29330
      }
29331
      iprot.readStructEnd();
29332
      validate();
29333
    }
29334
 
29335
    public void write(TProtocol oprot) throws TException {
29336
      oprot.writeStructBegin(STRUCT_DESC);
29337
 
29338
      if (this.isSetSuccess()) {
29339
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29340
        oprot.writeBool(this.success);
29341
        oprot.writeFieldEnd();
29342
      } else if (this.isSetEx()) {
29343
        oprot.writeFieldBegin(EX_FIELD_DESC);
29344
        this.ex.write(oprot);
29345
        oprot.writeFieldEnd();
29346
      }
29347
      oprot.writeFieldStop();
29348
      oprot.writeStructEnd();
29349
    }
29350
 
29351
    @Override
29352
    public String toString() {
29353
      StringBuilder sb = new StringBuilder("toggleDOAFlag_result(");
29354
      boolean first = true;
29355
 
29356
      sb.append("success:");
29357
      sb.append(this.success);
29358
      first = false;
29359
      if (!first) sb.append(", ");
29360
      sb.append("ex:");
29361
      if (this.ex == null) {
29362
        sb.append("null");
29363
      } else {
29364
        sb.append(this.ex);
29365
      }
29366
      first = false;
29367
      sb.append(")");
29368
      return sb.toString();
29369
    }
29370
 
29371
    public void validate() throws TException {
29372
      // check for required fields
29373
    }
29374
 
29375
  }
29376
 
29377
  public static class requestPickupNumber_args implements TBase<requestPickupNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_args>   {
29378
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_args");
29379
 
29380
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
29381
 
29382
    private long orderId;
29383
 
29384
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29385
    public enum _Fields implements TFieldIdEnum {
29386
      ORDER_ID((short)1, "orderId");
29387
 
29388
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29389
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29390
 
29391
      static {
29392
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29393
          byId.put((int)field._thriftId, field);
29394
          byName.put(field.getFieldName(), field);
29395
        }
29396
      }
29397
 
29398
      /**
29399
       * Find the _Fields constant that matches fieldId, or null if its not found.
29400
       */
29401
      public static _Fields findByThriftId(int fieldId) {
29402
        return byId.get(fieldId);
29403
      }
29404
 
29405
      /**
29406
       * Find the _Fields constant that matches fieldId, throwing an exception
29407
       * if it is not found.
29408
       */
29409
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29410
        _Fields fields = findByThriftId(fieldId);
29411
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29412
        return fields;
29413
      }
29414
 
29415
      /**
29416
       * Find the _Fields constant that matches name, or null if its not found.
29417
       */
29418
      public static _Fields findByName(String name) {
29419
        return byName.get(name);
29420
      }
29421
 
29422
      private final short _thriftId;
29423
      private final String _fieldName;
29424
 
29425
      _Fields(short thriftId, String fieldName) {
29426
        _thriftId = thriftId;
29427
        _fieldName = fieldName;
29428
      }
29429
 
29430
      public short getThriftFieldId() {
29431
        return _thriftId;
29432
      }
29433
 
29434
      public String getFieldName() {
29435
        return _fieldName;
29436
      }
29437
    }
29438
 
29439
    // isset id assignments
29440
    private static final int __ORDERID_ISSET_ID = 0;
29441
    private BitSet __isset_bit_vector = new BitSet(1);
29442
 
29443
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29444
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
29445
          new FieldValueMetaData(TType.I64)));
29446
    }});
29447
 
29448
    static {
29449
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_args.class, metaDataMap);
29450
    }
29451
 
29452
    public requestPickupNumber_args() {
29453
    }
29454
 
29455
    public requestPickupNumber_args(
29456
      long orderId)
29457
    {
29458
      this();
29459
      this.orderId = orderId;
29460
      setOrderIdIsSet(true);
29461
    }
29462
 
29463
    /**
29464
     * Performs a deep copy on <i>other</i>.
29465
     */
29466
    public requestPickupNumber_args(requestPickupNumber_args other) {
29467
      __isset_bit_vector.clear();
29468
      __isset_bit_vector.or(other.__isset_bit_vector);
29469
      this.orderId = other.orderId;
29470
    }
29471
 
29472
    public requestPickupNumber_args deepCopy() {
29473
      return new requestPickupNumber_args(this);
29474
    }
29475
 
29476
    @Deprecated
29477
    public requestPickupNumber_args clone() {
29478
      return new requestPickupNumber_args(this);
29479
    }
29480
 
29481
    public long getOrderId() {
29482
      return this.orderId;
29483
    }
29484
 
29485
    public requestPickupNumber_args setOrderId(long orderId) {
29486
      this.orderId = orderId;
29487
      setOrderIdIsSet(true);
29488
      return this;
29489
    }
29490
 
29491
    public void unsetOrderId() {
29492
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
29493
    }
29494
 
29495
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
29496
    public boolean isSetOrderId() {
29497
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
29498
    }
29499
 
29500
    public void setOrderIdIsSet(boolean value) {
29501
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
29502
    }
29503
 
29504
    public void setFieldValue(_Fields field, Object value) {
29505
      switch (field) {
29506
      case ORDER_ID:
29507
        if (value == null) {
29508
          unsetOrderId();
29509
        } else {
29510
          setOrderId((Long)value);
29511
        }
29512
        break;
29513
 
29514
      }
29515
    }
29516
 
29517
    public void setFieldValue(int fieldID, Object value) {
29518
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29519
    }
29520
 
29521
    public Object getFieldValue(_Fields field) {
29522
      switch (field) {
29523
      case ORDER_ID:
29524
        return new Long(getOrderId());
29525
 
29526
      }
29527
      throw new IllegalStateException();
29528
    }
29529
 
29530
    public Object getFieldValue(int fieldId) {
29531
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29532
    }
29533
 
29534
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29535
    public boolean isSet(_Fields field) {
29536
      switch (field) {
29537
      case ORDER_ID:
29538
        return isSetOrderId();
29539
      }
29540
      throw new IllegalStateException();
29541
    }
29542
 
29543
    public boolean isSet(int fieldID) {
29544
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29545
    }
29546
 
29547
    @Override
29548
    public boolean equals(Object that) {
29549
      if (that == null)
29550
        return false;
29551
      if (that instanceof requestPickupNumber_args)
29552
        return this.equals((requestPickupNumber_args)that);
29553
      return false;
29554
    }
29555
 
29556
    public boolean equals(requestPickupNumber_args that) {
29557
      if (that == null)
29558
        return false;
29559
 
29560
      boolean this_present_orderId = true;
29561
      boolean that_present_orderId = true;
29562
      if (this_present_orderId || that_present_orderId) {
29563
        if (!(this_present_orderId && that_present_orderId))
29564
          return false;
29565
        if (this.orderId != that.orderId)
29566
          return false;
29567
      }
29568
 
29569
      return true;
29570
    }
29571
 
29572
    @Override
29573
    public int hashCode() {
29574
      return 0;
29575
    }
29576
 
29577
    public int compareTo(requestPickupNumber_args other) {
29578
      if (!getClass().equals(other.getClass())) {
29579
        return getClass().getName().compareTo(other.getClass().getName());
29580
      }
29581
 
29582
      int lastComparison = 0;
29583
      requestPickupNumber_args typedOther = (requestPickupNumber_args)other;
29584
 
29585
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
29586
      if (lastComparison != 0) {
29587
        return lastComparison;
29588
      }
29589
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
29590
      if (lastComparison != 0) {
29591
        return lastComparison;
29592
      }
29593
      return 0;
29594
    }
29595
 
29596
    public void read(TProtocol iprot) throws TException {
29597
      TField field;
29598
      iprot.readStructBegin();
29599
      while (true)
29600
      {
29601
        field = iprot.readFieldBegin();
29602
        if (field.type == TType.STOP) { 
29603
          break;
29604
        }
29605
        _Fields fieldId = _Fields.findByThriftId(field.id);
29606
        if (fieldId == null) {
29607
          TProtocolUtil.skip(iprot, field.type);
29608
        } else {
29609
          switch (fieldId) {
29610
            case ORDER_ID:
29611
              if (field.type == TType.I64) {
29612
                this.orderId = iprot.readI64();
29613
                setOrderIdIsSet(true);
29614
              } else { 
29615
                TProtocolUtil.skip(iprot, field.type);
29616
              }
29617
              break;
29618
          }
29619
          iprot.readFieldEnd();
29620
        }
29621
      }
29622
      iprot.readStructEnd();
29623
      validate();
29624
    }
29625
 
29626
    public void write(TProtocol oprot) throws TException {
29627
      validate();
29628
 
29629
      oprot.writeStructBegin(STRUCT_DESC);
29630
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
29631
      oprot.writeI64(this.orderId);
29632
      oprot.writeFieldEnd();
29633
      oprot.writeFieldStop();
29634
      oprot.writeStructEnd();
29635
    }
29636
 
29637
    @Override
29638
    public String toString() {
29639
      StringBuilder sb = new StringBuilder("requestPickupNumber_args(");
29640
      boolean first = true;
29641
 
29642
      sb.append("orderId:");
29643
      sb.append(this.orderId);
29644
      first = false;
29645
      sb.append(")");
29646
      return sb.toString();
29647
    }
29648
 
29649
    public void validate() throws TException {
29650
      // check for required fields
29651
    }
29652
 
29653
  }
29654
 
29655
  public static class requestPickupNumber_result implements TBase<requestPickupNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_result>   {
29656
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_result");
29657
 
29658
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
29659
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
29660
 
29661
    private boolean success;
29662
    private TransactionServiceException ex;
29663
 
29664
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29665
    public enum _Fields implements TFieldIdEnum {
29666
      SUCCESS((short)0, "success"),
29667
      EX((short)1, "ex");
29668
 
29669
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29670
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29671
 
29672
      static {
29673
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29674
          byId.put((int)field._thriftId, field);
29675
          byName.put(field.getFieldName(), field);
29676
        }
29677
      }
29678
 
29679
      /**
29680
       * Find the _Fields constant that matches fieldId, or null if its not found.
29681
       */
29682
      public static _Fields findByThriftId(int fieldId) {
29683
        return byId.get(fieldId);
29684
      }
29685
 
29686
      /**
29687
       * Find the _Fields constant that matches fieldId, throwing an exception
29688
       * if it is not found.
29689
       */
29690
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29691
        _Fields fields = findByThriftId(fieldId);
29692
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29693
        return fields;
29694
      }
29695
 
29696
      /**
29697
       * Find the _Fields constant that matches name, or null if its not found.
29698
       */
29699
      public static _Fields findByName(String name) {
29700
        return byName.get(name);
29701
      }
29702
 
29703
      private final short _thriftId;
29704
      private final String _fieldName;
29705
 
29706
      _Fields(short thriftId, String fieldName) {
29707
        _thriftId = thriftId;
29708
        _fieldName = fieldName;
29709
      }
29710
 
29711
      public short getThriftFieldId() {
29712
        return _thriftId;
29713
      }
29714
 
29715
      public String getFieldName() {
29716
        return _fieldName;
29717
      }
29718
    }
29719
 
29720
    // isset id assignments
29721
    private static final int __SUCCESS_ISSET_ID = 0;
29722
    private BitSet __isset_bit_vector = new BitSet(1);
29723
 
29724
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29725
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29726
          new FieldValueMetaData(TType.BOOL)));
29727
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
29728
          new FieldValueMetaData(TType.STRUCT)));
29729
    }});
29730
 
29731
    static {
29732
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_result.class, metaDataMap);
29733
    }
29734
 
29735
    public requestPickupNumber_result() {
29736
    }
29737
 
29738
    public requestPickupNumber_result(
29739
      boolean success,
29740
      TransactionServiceException ex)
29741
    {
29742
      this();
29743
      this.success = success;
29744
      setSuccessIsSet(true);
29745
      this.ex = ex;
29746
    }
29747
 
29748
    /**
29749
     * Performs a deep copy on <i>other</i>.
29750
     */
29751
    public requestPickupNumber_result(requestPickupNumber_result other) {
29752
      __isset_bit_vector.clear();
29753
      __isset_bit_vector.or(other.__isset_bit_vector);
29754
      this.success = other.success;
29755
      if (other.isSetEx()) {
29756
        this.ex = new TransactionServiceException(other.ex);
29757
      }
29758
    }
29759
 
29760
    public requestPickupNumber_result deepCopy() {
29761
      return new requestPickupNumber_result(this);
29762
    }
29763
 
29764
    @Deprecated
29765
    public requestPickupNumber_result clone() {
29766
      return new requestPickupNumber_result(this);
29767
    }
29768
 
29769
    public boolean isSuccess() {
29770
      return this.success;
29771
    }
29772
 
29773
    public requestPickupNumber_result setSuccess(boolean success) {
29774
      this.success = success;
29775
      setSuccessIsSet(true);
29776
      return this;
29777
    }
29778
 
29779
    public void unsetSuccess() {
29780
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29781
    }
29782
 
29783
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29784
    public boolean isSetSuccess() {
29785
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29786
    }
29787
 
29788
    public void setSuccessIsSet(boolean value) {
29789
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29790
    }
29791
 
29792
    public TransactionServiceException getEx() {
29793
      return this.ex;
29794
    }
29795
 
29796
    public requestPickupNumber_result setEx(TransactionServiceException ex) {
29797
      this.ex = ex;
29798
      return this;
29799
    }
29800
 
29801
    public void unsetEx() {
29802
      this.ex = null;
29803
    }
29804
 
29805
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
29806
    public boolean isSetEx() {
29807
      return this.ex != null;
29808
    }
29809
 
29810
    public void setExIsSet(boolean value) {
29811
      if (!value) {
29812
        this.ex = null;
29813
      }
29814
    }
29815
 
29816
    public void setFieldValue(_Fields field, Object value) {
29817
      switch (field) {
29818
      case SUCCESS:
29819
        if (value == null) {
29820
          unsetSuccess();
29821
        } else {
29822
          setSuccess((Boolean)value);
29823
        }
29824
        break;
29825
 
29826
      case EX:
29827
        if (value == null) {
29828
          unsetEx();
29829
        } else {
29830
          setEx((TransactionServiceException)value);
29831
        }
29832
        break;
29833
 
29834
      }
29835
    }
29836
 
29837
    public void setFieldValue(int fieldID, Object value) {
29838
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29839
    }
29840
 
29841
    public Object getFieldValue(_Fields field) {
29842
      switch (field) {
29843
      case SUCCESS:
29844
        return new Boolean(isSuccess());
29845
 
29846
      case EX:
29847
        return getEx();
29848
 
29849
      }
29850
      throw new IllegalStateException();
29851
    }
29852
 
29853
    public Object getFieldValue(int fieldId) {
29854
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29855
    }
29856
 
29857
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29858
    public boolean isSet(_Fields field) {
29859
      switch (field) {
29860
      case SUCCESS:
29861
        return isSetSuccess();
29862
      case EX:
29863
        return isSetEx();
29864
      }
29865
      throw new IllegalStateException();
29866
    }
29867
 
29868
    public boolean isSet(int fieldID) {
29869
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29870
    }
29871
 
29872
    @Override
29873
    public boolean equals(Object that) {
29874
      if (that == null)
29875
        return false;
29876
      if (that instanceof requestPickupNumber_result)
29877
        return this.equals((requestPickupNumber_result)that);
29878
      return false;
29879
    }
29880
 
29881
    public boolean equals(requestPickupNumber_result that) {
29882
      if (that == null)
29883
        return false;
29884
 
29885
      boolean this_present_success = true;
29886
      boolean that_present_success = true;
29887
      if (this_present_success || that_present_success) {
29888
        if (!(this_present_success && that_present_success))
29889
          return false;
29890
        if (this.success != that.success)
29891
          return false;
29892
      }
29893
 
29894
      boolean this_present_ex = true && this.isSetEx();
29895
      boolean that_present_ex = true && that.isSetEx();
29896
      if (this_present_ex || that_present_ex) {
29897
        if (!(this_present_ex && that_present_ex))
29898
          return false;
29899
        if (!this.ex.equals(that.ex))
29900
          return false;
29901
      }
29902
 
29903
      return true;
29904
    }
29905
 
29906
    @Override
29907
    public int hashCode() {
29908
      return 0;
29909
    }
29910
 
29911
    public int compareTo(requestPickupNumber_result other) {
29912
      if (!getClass().equals(other.getClass())) {
29913
        return getClass().getName().compareTo(other.getClass().getName());
29914
      }
29915
 
29916
      int lastComparison = 0;
29917
      requestPickupNumber_result typedOther = (requestPickupNumber_result)other;
29918
 
29919
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29920
      if (lastComparison != 0) {
29921
        return lastComparison;
29922
      }
29923
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29924
      if (lastComparison != 0) {
29925
        return lastComparison;
29926
      }
29927
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
29928
      if (lastComparison != 0) {
29929
        return lastComparison;
29930
      }
29931
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
29932
      if (lastComparison != 0) {
29933
        return lastComparison;
29934
      }
29935
      return 0;
29936
    }
29937
 
29938
    public void read(TProtocol iprot) throws TException {
29939
      TField field;
29940
      iprot.readStructBegin();
29941
      while (true)
29942
      {
29943
        field = iprot.readFieldBegin();
29944
        if (field.type == TType.STOP) { 
29945
          break;
29946
        }
29947
        _Fields fieldId = _Fields.findByThriftId(field.id);
29948
        if (fieldId == null) {
29949
          TProtocolUtil.skip(iprot, field.type);
29950
        } else {
29951
          switch (fieldId) {
29952
            case SUCCESS:
29953
              if (field.type == TType.BOOL) {
29954
                this.success = iprot.readBool();
29955
                setSuccessIsSet(true);
29956
              } else { 
29957
                TProtocolUtil.skip(iprot, field.type);
29958
              }
29959
              break;
29960
            case EX:
29961
              if (field.type == TType.STRUCT) {
29962
                this.ex = new TransactionServiceException();
29963
                this.ex.read(iprot);
29964
              } else { 
29965
                TProtocolUtil.skip(iprot, field.type);
29966
              }
29967
              break;
29968
          }
29969
          iprot.readFieldEnd();
29970
        }
29971
      }
29972
      iprot.readStructEnd();
29973
      validate();
29974
    }
29975
 
29976
    public void write(TProtocol oprot) throws TException {
29977
      oprot.writeStructBegin(STRUCT_DESC);
29978
 
29979
      if (this.isSetSuccess()) {
29980
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29981
        oprot.writeBool(this.success);
29982
        oprot.writeFieldEnd();
29983
      } else if (this.isSetEx()) {
29984
        oprot.writeFieldBegin(EX_FIELD_DESC);
29985
        this.ex.write(oprot);
29986
        oprot.writeFieldEnd();
29987
      }
29988
      oprot.writeFieldStop();
29989
      oprot.writeStructEnd();
29990
    }
29991
 
29992
    @Override
29993
    public String toString() {
29994
      StringBuilder sb = new StringBuilder("requestPickupNumber_result(");
29995
      boolean first = true;
29996
 
29997
      sb.append("success:");
29998
      sb.append(this.success);
29999
      first = false;
30000
      if (!first) sb.append(", ");
30001
      sb.append("ex:");
30002
      if (this.ex == null) {
30003
        sb.append("null");
30004
      } else {
30005
        sb.append(this.ex);
30006
      }
30007
      first = false;
30008
      sb.append(")");
30009
      return sb.toString();
30010
    }
30011
 
30012
    public void validate() throws TException {
30013
      // check for required fields
30014
    }
30015
 
30016
  }
30017
 
30018
  public static class authorizePickup_args implements TBase<authorizePickup_args._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_args>   {
30019
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_args");
30020
 
30021
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
30022
    private static final TField PICKUP_NUMBER_FIELD_DESC = new TField("pickupNumber", TType.STRING, (short)2);
30023
 
30024
    private long orderId;
30025
    private String pickupNumber;
30026
 
30027
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30028
    public enum _Fields implements TFieldIdEnum {
30029
      ORDER_ID((short)1, "orderId"),
30030
      PICKUP_NUMBER((short)2, "pickupNumber");
30031
 
30032
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30033
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30034
 
30035
      static {
30036
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30037
          byId.put((int)field._thriftId, field);
30038
          byName.put(field.getFieldName(), field);
30039
        }
30040
      }
30041
 
30042
      /**
30043
       * Find the _Fields constant that matches fieldId, or null if its not found.
30044
       */
30045
      public static _Fields findByThriftId(int fieldId) {
30046
        return byId.get(fieldId);
30047
      }
30048
 
30049
      /**
30050
       * Find the _Fields constant that matches fieldId, throwing an exception
30051
       * if it is not found.
30052
       */
30053
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30054
        _Fields fields = findByThriftId(fieldId);
30055
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30056
        return fields;
30057
      }
30058
 
30059
      /**
30060
       * Find the _Fields constant that matches name, or null if its not found.
30061
       */
30062
      public static _Fields findByName(String name) {
30063
        return byName.get(name);
30064
      }
30065
 
30066
      private final short _thriftId;
30067
      private final String _fieldName;
30068
 
30069
      _Fields(short thriftId, String fieldName) {
30070
        _thriftId = thriftId;
30071
        _fieldName = fieldName;
30072
      }
30073
 
30074
      public short getThriftFieldId() {
30075
        return _thriftId;
30076
      }
30077
 
30078
      public String getFieldName() {
30079
        return _fieldName;
30080
      }
30081
    }
30082
 
30083
    // isset id assignments
30084
    private static final int __ORDERID_ISSET_ID = 0;
30085
    private BitSet __isset_bit_vector = new BitSet(1);
30086
 
30087
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30088
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
30089
          new FieldValueMetaData(TType.I64)));
30090
      put(_Fields.PICKUP_NUMBER, new FieldMetaData("pickupNumber", TFieldRequirementType.DEFAULT, 
30091
          new FieldValueMetaData(TType.STRING)));
30092
    }});
30093
 
30094
    static {
30095
      FieldMetaData.addStructMetaDataMap(authorizePickup_args.class, metaDataMap);
30096
    }
30097
 
30098
    public authorizePickup_args() {
30099
    }
30100
 
30101
    public authorizePickup_args(
30102
      long orderId,
30103
      String pickupNumber)
30104
    {
30105
      this();
30106
      this.orderId = orderId;
30107
      setOrderIdIsSet(true);
30108
      this.pickupNumber = pickupNumber;
30109
    }
30110
 
30111
    /**
30112
     * Performs a deep copy on <i>other</i>.
30113
     */
30114
    public authorizePickup_args(authorizePickup_args other) {
30115
      __isset_bit_vector.clear();
30116
      __isset_bit_vector.or(other.__isset_bit_vector);
30117
      this.orderId = other.orderId;
30118
      if (other.isSetPickupNumber()) {
30119
        this.pickupNumber = other.pickupNumber;
30120
      }
30121
    }
30122
 
30123
    public authorizePickup_args deepCopy() {
30124
      return new authorizePickup_args(this);
30125
    }
30126
 
30127
    @Deprecated
30128
    public authorizePickup_args clone() {
30129
      return new authorizePickup_args(this);
30130
    }
30131
 
30132
    public long getOrderId() {
30133
      return this.orderId;
30134
    }
30135
 
30136
    public authorizePickup_args setOrderId(long orderId) {
30137
      this.orderId = orderId;
30138
      setOrderIdIsSet(true);
30139
      return this;
30140
    }
30141
 
30142
    public void unsetOrderId() {
30143
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
30144
    }
30145
 
30146
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
30147
    public boolean isSetOrderId() {
30148
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
30149
    }
30150
 
30151
    public void setOrderIdIsSet(boolean value) {
30152
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
30153
    }
30154
 
30155
    public String getPickupNumber() {
30156
      return this.pickupNumber;
30157
    }
30158
 
30159
    public authorizePickup_args setPickupNumber(String pickupNumber) {
30160
      this.pickupNumber = pickupNumber;
30161
      return this;
30162
    }
30163
 
30164
    public void unsetPickupNumber() {
30165
      this.pickupNumber = null;
30166
    }
30167
 
30168
    /** Returns true if field pickupNumber is set (has been asigned a value) and false otherwise */
30169
    public boolean isSetPickupNumber() {
30170
      return this.pickupNumber != null;
30171
    }
30172
 
30173
    public void setPickupNumberIsSet(boolean value) {
30174
      if (!value) {
30175
        this.pickupNumber = null;
30176
      }
30177
    }
30178
 
30179
    public void setFieldValue(_Fields field, Object value) {
30180
      switch (field) {
30181
      case ORDER_ID:
30182
        if (value == null) {
30183
          unsetOrderId();
30184
        } else {
30185
          setOrderId((Long)value);
30186
        }
30187
        break;
30188
 
30189
      case PICKUP_NUMBER:
30190
        if (value == null) {
30191
          unsetPickupNumber();
30192
        } else {
30193
          setPickupNumber((String)value);
30194
        }
30195
        break;
30196
 
30197
      }
30198
    }
30199
 
30200
    public void setFieldValue(int fieldID, Object value) {
30201
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30202
    }
30203
 
30204
    public Object getFieldValue(_Fields field) {
30205
      switch (field) {
30206
      case ORDER_ID:
30207
        return new Long(getOrderId());
30208
 
30209
      case PICKUP_NUMBER:
30210
        return getPickupNumber();
30211
 
30212
      }
30213
      throw new IllegalStateException();
30214
    }
30215
 
30216
    public Object getFieldValue(int fieldId) {
30217
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30218
    }
30219
 
30220
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30221
    public boolean isSet(_Fields field) {
30222
      switch (field) {
30223
      case ORDER_ID:
30224
        return isSetOrderId();
30225
      case PICKUP_NUMBER:
30226
        return isSetPickupNumber();
30227
      }
30228
      throw new IllegalStateException();
30229
    }
30230
 
30231
    public boolean isSet(int fieldID) {
30232
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30233
    }
30234
 
30235
    @Override
30236
    public boolean equals(Object that) {
30237
      if (that == null)
30238
        return false;
30239
      if (that instanceof authorizePickup_args)
30240
        return this.equals((authorizePickup_args)that);
30241
      return false;
30242
    }
30243
 
30244
    public boolean equals(authorizePickup_args that) {
30245
      if (that == null)
30246
        return false;
30247
 
30248
      boolean this_present_orderId = true;
30249
      boolean that_present_orderId = true;
30250
      if (this_present_orderId || that_present_orderId) {
30251
        if (!(this_present_orderId && that_present_orderId))
30252
          return false;
30253
        if (this.orderId != that.orderId)
30254
          return false;
30255
      }
30256
 
30257
      boolean this_present_pickupNumber = true && this.isSetPickupNumber();
30258
      boolean that_present_pickupNumber = true && that.isSetPickupNumber();
30259
      if (this_present_pickupNumber || that_present_pickupNumber) {
30260
        if (!(this_present_pickupNumber && that_present_pickupNumber))
30261
          return false;
30262
        if (!this.pickupNumber.equals(that.pickupNumber))
30263
          return false;
30264
      }
30265
 
30266
      return true;
30267
    }
30268
 
30269
    @Override
30270
    public int hashCode() {
30271
      return 0;
30272
    }
30273
 
30274
    public int compareTo(authorizePickup_args other) {
30275
      if (!getClass().equals(other.getClass())) {
30276
        return getClass().getName().compareTo(other.getClass().getName());
30277
      }
30278
 
30279
      int lastComparison = 0;
30280
      authorizePickup_args typedOther = (authorizePickup_args)other;
30281
 
30282
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
30283
      if (lastComparison != 0) {
30284
        return lastComparison;
30285
      }
30286
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
30287
      if (lastComparison != 0) {
30288
        return lastComparison;
30289
      }
30290
      lastComparison = Boolean.valueOf(isSetPickupNumber()).compareTo(isSetPickupNumber());
30291
      if (lastComparison != 0) {
30292
        return lastComparison;
30293
      }
30294
      lastComparison = TBaseHelper.compareTo(pickupNumber, typedOther.pickupNumber);
30295
      if (lastComparison != 0) {
30296
        return lastComparison;
30297
      }
30298
      return 0;
30299
    }
30300
 
30301
    public void read(TProtocol iprot) throws TException {
30302
      TField field;
30303
      iprot.readStructBegin();
30304
      while (true)
30305
      {
30306
        field = iprot.readFieldBegin();
30307
        if (field.type == TType.STOP) { 
30308
          break;
30309
        }
30310
        _Fields fieldId = _Fields.findByThriftId(field.id);
30311
        if (fieldId == null) {
30312
          TProtocolUtil.skip(iprot, field.type);
30313
        } else {
30314
          switch (fieldId) {
30315
            case ORDER_ID:
30316
              if (field.type == TType.I64) {
30317
                this.orderId = iprot.readI64();
30318
                setOrderIdIsSet(true);
30319
              } else { 
30320
                TProtocolUtil.skip(iprot, field.type);
30321
              }
30322
              break;
30323
            case PICKUP_NUMBER:
30324
              if (field.type == TType.STRING) {
30325
                this.pickupNumber = iprot.readString();
30326
              } else { 
30327
                TProtocolUtil.skip(iprot, field.type);
30328
              }
30329
              break;
30330
          }
30331
          iprot.readFieldEnd();
30332
        }
30333
      }
30334
      iprot.readStructEnd();
30335
      validate();
30336
    }
30337
 
30338
    public void write(TProtocol oprot) throws TException {
30339
      validate();
30340
 
30341
      oprot.writeStructBegin(STRUCT_DESC);
30342
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
30343
      oprot.writeI64(this.orderId);
30344
      oprot.writeFieldEnd();
30345
      if (this.pickupNumber != null) {
30346
        oprot.writeFieldBegin(PICKUP_NUMBER_FIELD_DESC);
30347
        oprot.writeString(this.pickupNumber);
30348
        oprot.writeFieldEnd();
30349
      }
30350
      oprot.writeFieldStop();
30351
      oprot.writeStructEnd();
30352
    }
30353
 
30354
    @Override
30355
    public String toString() {
30356
      StringBuilder sb = new StringBuilder("authorizePickup_args(");
30357
      boolean first = true;
30358
 
30359
      sb.append("orderId:");
30360
      sb.append(this.orderId);
30361
      first = false;
30362
      if (!first) sb.append(", ");
30363
      sb.append("pickupNumber:");
30364
      if (this.pickupNumber == null) {
30365
        sb.append("null");
30366
      } else {
30367
        sb.append(this.pickupNumber);
30368
      }
30369
      first = false;
30370
      sb.append(")");
30371
      return sb.toString();
30372
    }
30373
 
30374
    public void validate() throws TException {
30375
      // check for required fields
30376
    }
30377
 
30378
  }
30379
 
30380
  public static class authorizePickup_result implements TBase<authorizePickup_result._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_result>   {
30381
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_result");
30382
 
30383
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
30384
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
30385
 
30386
    private boolean success;
30387
    private TransactionServiceException ex;
30388
 
30389
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30390
    public enum _Fields implements TFieldIdEnum {
30391
      SUCCESS((short)0, "success"),
30392
      EX((short)1, "ex");
30393
 
30394
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30395
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30396
 
30397
      static {
30398
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30399
          byId.put((int)field._thriftId, field);
30400
          byName.put(field.getFieldName(), field);
30401
        }
30402
      }
30403
 
30404
      /**
30405
       * Find the _Fields constant that matches fieldId, or null if its not found.
30406
       */
30407
      public static _Fields findByThriftId(int fieldId) {
30408
        return byId.get(fieldId);
30409
      }
30410
 
30411
      /**
30412
       * Find the _Fields constant that matches fieldId, throwing an exception
30413
       * if it is not found.
30414
       */
30415
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30416
        _Fields fields = findByThriftId(fieldId);
30417
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30418
        return fields;
30419
      }
30420
 
30421
      /**
30422
       * Find the _Fields constant that matches name, or null if its not found.
30423
       */
30424
      public static _Fields findByName(String name) {
30425
        return byName.get(name);
30426
      }
30427
 
30428
      private final short _thriftId;
30429
      private final String _fieldName;
30430
 
30431
      _Fields(short thriftId, String fieldName) {
30432
        _thriftId = thriftId;
30433
        _fieldName = fieldName;
30434
      }
30435
 
30436
      public short getThriftFieldId() {
30437
        return _thriftId;
30438
      }
30439
 
30440
      public String getFieldName() {
30441
        return _fieldName;
30442
      }
30443
    }
30444
 
30445
    // isset id assignments
30446
    private static final int __SUCCESS_ISSET_ID = 0;
30447
    private BitSet __isset_bit_vector = new BitSet(1);
30448
 
30449
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30450
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30451
          new FieldValueMetaData(TType.BOOL)));
30452
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
30453
          new FieldValueMetaData(TType.STRUCT)));
30454
    }});
30455
 
30456
    static {
30457
      FieldMetaData.addStructMetaDataMap(authorizePickup_result.class, metaDataMap);
30458
    }
30459
 
30460
    public authorizePickup_result() {
30461
    }
30462
 
30463
    public authorizePickup_result(
30464
      boolean success,
30465
      TransactionServiceException ex)
30466
    {
30467
      this();
30468
      this.success = success;
30469
      setSuccessIsSet(true);
30470
      this.ex = ex;
30471
    }
30472
 
30473
    /**
30474
     * Performs a deep copy on <i>other</i>.
30475
     */
30476
    public authorizePickup_result(authorizePickup_result other) {
30477
      __isset_bit_vector.clear();
30478
      __isset_bit_vector.or(other.__isset_bit_vector);
30479
      this.success = other.success;
30480
      if (other.isSetEx()) {
30481
        this.ex = new TransactionServiceException(other.ex);
30482
      }
30483
    }
30484
 
30485
    public authorizePickup_result deepCopy() {
30486
      return new authorizePickup_result(this);
30487
    }
30488
 
30489
    @Deprecated
30490
    public authorizePickup_result clone() {
30491
      return new authorizePickup_result(this);
30492
    }
30493
 
30494
    public boolean isSuccess() {
30495
      return this.success;
30496
    }
30497
 
30498
    public authorizePickup_result setSuccess(boolean success) {
30499
      this.success = success;
30500
      setSuccessIsSet(true);
30501
      return this;
30502
    }
30503
 
30504
    public void unsetSuccess() {
30505
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
30506
    }
30507
 
30508
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30509
    public boolean isSetSuccess() {
30510
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
30511
    }
30512
 
30513
    public void setSuccessIsSet(boolean value) {
30514
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
30515
    }
30516
 
30517
    public TransactionServiceException getEx() {
30518
      return this.ex;
30519
    }
30520
 
30521
    public authorizePickup_result setEx(TransactionServiceException ex) {
30522
      this.ex = ex;
30523
      return this;
30524
    }
30525
 
30526
    public void unsetEx() {
30527
      this.ex = null;
30528
    }
30529
 
30530
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
30531
    public boolean isSetEx() {
30532
      return this.ex != null;
30533
    }
30534
 
30535
    public void setExIsSet(boolean value) {
30536
      if (!value) {
30537
        this.ex = null;
30538
      }
30539
    }
30540
 
30541
    public void setFieldValue(_Fields field, Object value) {
30542
      switch (field) {
30543
      case SUCCESS:
30544
        if (value == null) {
30545
          unsetSuccess();
30546
        } else {
30547
          setSuccess((Boolean)value);
30548
        }
30549
        break;
30550
 
30551
      case EX:
30552
        if (value == null) {
30553
          unsetEx();
30554
        } else {
30555
          setEx((TransactionServiceException)value);
30556
        }
30557
        break;
30558
 
30559
      }
30560
    }
30561
 
30562
    public void setFieldValue(int fieldID, Object value) {
30563
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30564
    }
30565
 
30566
    public Object getFieldValue(_Fields field) {
30567
      switch (field) {
30568
      case SUCCESS:
30569
        return new Boolean(isSuccess());
30570
 
30571
      case EX:
30572
        return getEx();
30573
 
30574
      }
30575
      throw new IllegalStateException();
30576
    }
30577
 
30578
    public Object getFieldValue(int fieldId) {
30579
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30580
    }
30581
 
30582
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30583
    public boolean isSet(_Fields field) {
30584
      switch (field) {
30585
      case SUCCESS:
30586
        return isSetSuccess();
30587
      case EX:
30588
        return isSetEx();
30589
      }
30590
      throw new IllegalStateException();
30591
    }
30592
 
30593
    public boolean isSet(int fieldID) {
30594
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30595
    }
30596
 
30597
    @Override
30598
    public boolean equals(Object that) {
30599
      if (that == null)
30600
        return false;
30601
      if (that instanceof authorizePickup_result)
30602
        return this.equals((authorizePickup_result)that);
30603
      return false;
30604
    }
30605
 
30606
    public boolean equals(authorizePickup_result that) {
30607
      if (that == null)
30608
        return false;
30609
 
30610
      boolean this_present_success = true;
30611
      boolean that_present_success = true;
30612
      if (this_present_success || that_present_success) {
30613
        if (!(this_present_success && that_present_success))
30614
          return false;
30615
        if (this.success != that.success)
30616
          return false;
30617
      }
30618
 
30619
      boolean this_present_ex = true && this.isSetEx();
30620
      boolean that_present_ex = true && that.isSetEx();
30621
      if (this_present_ex || that_present_ex) {
30622
        if (!(this_present_ex && that_present_ex))
30623
          return false;
30624
        if (!this.ex.equals(that.ex))
30625
          return false;
30626
      }
30627
 
30628
      return true;
30629
    }
30630
 
30631
    @Override
30632
    public int hashCode() {
30633
      return 0;
30634
    }
30635
 
30636
    public int compareTo(authorizePickup_result other) {
30637
      if (!getClass().equals(other.getClass())) {
30638
        return getClass().getName().compareTo(other.getClass().getName());
30639
      }
30640
 
30641
      int lastComparison = 0;
30642
      authorizePickup_result typedOther = (authorizePickup_result)other;
30643
 
30644
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30645
      if (lastComparison != 0) {
30646
        return lastComparison;
30647
      }
30648
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30649
      if (lastComparison != 0) {
30650
        return lastComparison;
30651
      }
30652
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
30653
      if (lastComparison != 0) {
30654
        return lastComparison;
30655
      }
30656
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
30657
      if (lastComparison != 0) {
30658
        return lastComparison;
30659
      }
30660
      return 0;
30661
    }
30662
 
30663
    public void read(TProtocol iprot) throws TException {
30664
      TField field;
30665
      iprot.readStructBegin();
30666
      while (true)
30667
      {
30668
        field = iprot.readFieldBegin();
30669
        if (field.type == TType.STOP) { 
30670
          break;
30671
        }
30672
        _Fields fieldId = _Fields.findByThriftId(field.id);
30673
        if (fieldId == null) {
30674
          TProtocolUtil.skip(iprot, field.type);
30675
        } else {
30676
          switch (fieldId) {
30677
            case SUCCESS:
30678
              if (field.type == TType.BOOL) {
30679
                this.success = iprot.readBool();
30680
                setSuccessIsSet(true);
30681
              } else { 
30682
                TProtocolUtil.skip(iprot, field.type);
30683
              }
30684
              break;
30685
            case EX:
30686
              if (field.type == TType.STRUCT) {
30687
                this.ex = new TransactionServiceException();
30688
                this.ex.read(iprot);
30689
              } else { 
30690
                TProtocolUtil.skip(iprot, field.type);
30691
              }
30692
              break;
30693
          }
30694
          iprot.readFieldEnd();
30695
        }
30696
      }
30697
      iprot.readStructEnd();
30698
      validate();
30699
    }
30700
 
30701
    public void write(TProtocol oprot) throws TException {
30702
      oprot.writeStructBegin(STRUCT_DESC);
30703
 
30704
      if (this.isSetSuccess()) {
30705
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30706
        oprot.writeBool(this.success);
30707
        oprot.writeFieldEnd();
30708
      } else if (this.isSetEx()) {
30709
        oprot.writeFieldBegin(EX_FIELD_DESC);
30710
        this.ex.write(oprot);
30711
        oprot.writeFieldEnd();
30712
      }
30713
      oprot.writeFieldStop();
30714
      oprot.writeStructEnd();
30715
    }
30716
 
30717
    @Override
30718
    public String toString() {
30719
      StringBuilder sb = new StringBuilder("authorizePickup_result(");
30720
      boolean first = true;
30721
 
30722
      sb.append("success:");
30723
      sb.append(this.success);
30724
      first = false;
30725
      if (!first) sb.append(", ");
30726
      sb.append("ex:");
30727
      if (this.ex == null) {
30728
        sb.append("null");
30729
      } else {
30730
        sb.append(this.ex);
30731
      }
30732
      first = false;
30733
      sb.append(")");
30734
      return sb.toString();
30735
    }
30736
 
30737
    public void validate() throws TException {
30738
      // check for required fields
30739
    }
30740
 
30741
  }
30742
 
2590 chandransh 30743
  public static class acceptDoa_args implements TBase<acceptDoa_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptDoa_args>   {
30744
    private static final TStruct STRUCT_DESC = new TStruct("acceptDoa_args");
30745
 
30746
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
30747
 
30748
    private long orderId;
30749
 
30750
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30751
    public enum _Fields implements TFieldIdEnum {
30752
      ORDER_ID((short)1, "orderId");
30753
 
30754
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30755
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30756
 
30757
      static {
30758
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30759
          byId.put((int)field._thriftId, field);
30760
          byName.put(field.getFieldName(), field);
30761
        }
30762
      }
30763
 
30764
      /**
30765
       * Find the _Fields constant that matches fieldId, or null if its not found.
30766
       */
30767
      public static _Fields findByThriftId(int fieldId) {
30768
        return byId.get(fieldId);
30769
      }
30770
 
30771
      /**
30772
       * Find the _Fields constant that matches fieldId, throwing an exception
30773
       * if it is not found.
30774
       */
30775
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30776
        _Fields fields = findByThriftId(fieldId);
30777
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30778
        return fields;
30779
      }
30780
 
30781
      /**
30782
       * Find the _Fields constant that matches name, or null if its not found.
30783
       */
30784
      public static _Fields findByName(String name) {
30785
        return byName.get(name);
30786
      }
30787
 
30788
      private final short _thriftId;
30789
      private final String _fieldName;
30790
 
30791
      _Fields(short thriftId, String fieldName) {
30792
        _thriftId = thriftId;
30793
        _fieldName = fieldName;
30794
      }
30795
 
30796
      public short getThriftFieldId() {
30797
        return _thriftId;
30798
      }
30799
 
30800
      public String getFieldName() {
30801
        return _fieldName;
30802
      }
30803
    }
30804
 
30805
    // isset id assignments
30806
    private static final int __ORDERID_ISSET_ID = 0;
30807
    private BitSet __isset_bit_vector = new BitSet(1);
30808
 
30809
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30810
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
30811
          new FieldValueMetaData(TType.I64)));
30812
    }});
30813
 
30814
    static {
30815
      FieldMetaData.addStructMetaDataMap(acceptDoa_args.class, metaDataMap);
30816
    }
30817
 
30818
    public acceptDoa_args() {
30819
    }
30820
 
30821
    public acceptDoa_args(
30822
      long orderId)
30823
    {
30824
      this();
30825
      this.orderId = orderId;
30826
      setOrderIdIsSet(true);
30827
    }
30828
 
30829
    /**
30830
     * Performs a deep copy on <i>other</i>.
30831
     */
30832
    public acceptDoa_args(acceptDoa_args other) {
30833
      __isset_bit_vector.clear();
30834
      __isset_bit_vector.or(other.__isset_bit_vector);
30835
      this.orderId = other.orderId;
30836
    }
30837
 
30838
    public acceptDoa_args deepCopy() {
30839
      return new acceptDoa_args(this);
30840
    }
30841
 
30842
    @Deprecated
30843
    public acceptDoa_args clone() {
30844
      return new acceptDoa_args(this);
30845
    }
30846
 
30847
    public long getOrderId() {
30848
      return this.orderId;
30849
    }
30850
 
30851
    public acceptDoa_args setOrderId(long orderId) {
30852
      this.orderId = orderId;
30853
      setOrderIdIsSet(true);
30854
      return this;
30855
    }
30856
 
30857
    public void unsetOrderId() {
30858
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
30859
    }
30860
 
30861
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
30862
    public boolean isSetOrderId() {
30863
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
30864
    }
30865
 
30866
    public void setOrderIdIsSet(boolean value) {
30867
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
30868
    }
30869
 
30870
    public void setFieldValue(_Fields field, Object value) {
30871
      switch (field) {
30872
      case ORDER_ID:
30873
        if (value == null) {
30874
          unsetOrderId();
30875
        } else {
30876
          setOrderId((Long)value);
30877
        }
30878
        break;
30879
 
30880
      }
30881
    }
30882
 
30883
    public void setFieldValue(int fieldID, Object value) {
30884
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30885
    }
30886
 
30887
    public Object getFieldValue(_Fields field) {
30888
      switch (field) {
30889
      case ORDER_ID:
30890
        return new Long(getOrderId());
30891
 
30892
      }
30893
      throw new IllegalStateException();
30894
    }
30895
 
30896
    public Object getFieldValue(int fieldId) {
30897
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30898
    }
30899
 
30900
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30901
    public boolean isSet(_Fields field) {
30902
      switch (field) {
30903
      case ORDER_ID:
30904
        return isSetOrderId();
30905
      }
30906
      throw new IllegalStateException();
30907
    }
30908
 
30909
    public boolean isSet(int fieldID) {
30910
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30911
    }
30912
 
30913
    @Override
30914
    public boolean equals(Object that) {
30915
      if (that == null)
30916
        return false;
30917
      if (that instanceof acceptDoa_args)
30918
        return this.equals((acceptDoa_args)that);
30919
      return false;
30920
    }
30921
 
30922
    public boolean equals(acceptDoa_args that) {
30923
      if (that == null)
30924
        return false;
30925
 
30926
      boolean this_present_orderId = true;
30927
      boolean that_present_orderId = true;
30928
      if (this_present_orderId || that_present_orderId) {
30929
        if (!(this_present_orderId && that_present_orderId))
30930
          return false;
30931
        if (this.orderId != that.orderId)
30932
          return false;
30933
      }
30934
 
30935
      return true;
30936
    }
30937
 
30938
    @Override
30939
    public int hashCode() {
30940
      return 0;
30941
    }
30942
 
30943
    public int compareTo(acceptDoa_args other) {
30944
      if (!getClass().equals(other.getClass())) {
30945
        return getClass().getName().compareTo(other.getClass().getName());
30946
      }
30947
 
30948
      int lastComparison = 0;
30949
      acceptDoa_args typedOther = (acceptDoa_args)other;
30950
 
30951
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
30952
      if (lastComparison != 0) {
30953
        return lastComparison;
30954
      }
30955
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
30956
      if (lastComparison != 0) {
30957
        return lastComparison;
30958
      }
30959
      return 0;
30960
    }
30961
 
30962
    public void read(TProtocol iprot) throws TException {
30963
      TField field;
30964
      iprot.readStructBegin();
30965
      while (true)
30966
      {
30967
        field = iprot.readFieldBegin();
30968
        if (field.type == TType.STOP) { 
30969
          break;
30970
        }
30971
        _Fields fieldId = _Fields.findByThriftId(field.id);
30972
        if (fieldId == null) {
30973
          TProtocolUtil.skip(iprot, field.type);
30974
        } else {
30975
          switch (fieldId) {
30976
            case ORDER_ID:
30977
              if (field.type == TType.I64) {
30978
                this.orderId = iprot.readI64();
30979
                setOrderIdIsSet(true);
30980
              } else { 
30981
                TProtocolUtil.skip(iprot, field.type);
30982
              }
30983
              break;
30984
          }
30985
          iprot.readFieldEnd();
30986
        }
30987
      }
30988
      iprot.readStructEnd();
30989
      validate();
30990
    }
30991
 
30992
    public void write(TProtocol oprot) throws TException {
30993
      validate();
30994
 
30995
      oprot.writeStructBegin(STRUCT_DESC);
30996
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
30997
      oprot.writeI64(this.orderId);
30998
      oprot.writeFieldEnd();
30999
      oprot.writeFieldStop();
31000
      oprot.writeStructEnd();
31001
    }
31002
 
31003
    @Override
31004
    public String toString() {
31005
      StringBuilder sb = new StringBuilder("acceptDoa_args(");
31006
      boolean first = true;
31007
 
31008
      sb.append("orderId:");
31009
      sb.append(this.orderId);
31010
      first = false;
31011
      sb.append(")");
31012
      return sb.toString();
31013
    }
31014
 
31015
    public void validate() throws TException {
31016
      // check for required fields
31017
    }
31018
 
31019
  }
31020
 
31021
  public static class acceptDoa_result implements TBase<acceptDoa_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptDoa_result>   {
31022
    private static final TStruct STRUCT_DESC = new TStruct("acceptDoa_result");
31023
 
31024
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
31025
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
31026
 
31027
    private boolean success;
31028
    private TransactionServiceException ex;
31029
 
31030
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31031
    public enum _Fields implements TFieldIdEnum {
31032
      SUCCESS((short)0, "success"),
31033
      EX((short)1, "ex");
31034
 
31035
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31036
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31037
 
31038
      static {
31039
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31040
          byId.put((int)field._thriftId, field);
31041
          byName.put(field.getFieldName(), field);
31042
        }
31043
      }
31044
 
31045
      /**
31046
       * Find the _Fields constant that matches fieldId, or null if its not found.
31047
       */
31048
      public static _Fields findByThriftId(int fieldId) {
31049
        return byId.get(fieldId);
31050
      }
31051
 
31052
      /**
31053
       * Find the _Fields constant that matches fieldId, throwing an exception
31054
       * if it is not found.
31055
       */
31056
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31057
        _Fields fields = findByThriftId(fieldId);
31058
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31059
        return fields;
31060
      }
31061
 
31062
      /**
31063
       * Find the _Fields constant that matches name, or null if its not found.
31064
       */
31065
      public static _Fields findByName(String name) {
31066
        return byName.get(name);
31067
      }
31068
 
31069
      private final short _thriftId;
31070
      private final String _fieldName;
31071
 
31072
      _Fields(short thriftId, String fieldName) {
31073
        _thriftId = thriftId;
31074
        _fieldName = fieldName;
31075
      }
31076
 
31077
      public short getThriftFieldId() {
31078
        return _thriftId;
31079
      }
31080
 
31081
      public String getFieldName() {
31082
        return _fieldName;
31083
      }
31084
    }
31085
 
31086
    // isset id assignments
31087
    private static final int __SUCCESS_ISSET_ID = 0;
31088
    private BitSet __isset_bit_vector = new BitSet(1);
31089
 
31090
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31091
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31092
          new FieldValueMetaData(TType.BOOL)));
31093
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
31094
          new FieldValueMetaData(TType.STRUCT)));
31095
    }});
31096
 
31097
    static {
31098
      FieldMetaData.addStructMetaDataMap(acceptDoa_result.class, metaDataMap);
31099
    }
31100
 
31101
    public acceptDoa_result() {
31102
    }
31103
 
31104
    public acceptDoa_result(
31105
      boolean success,
31106
      TransactionServiceException ex)
31107
    {
31108
      this();
31109
      this.success = success;
31110
      setSuccessIsSet(true);
31111
      this.ex = ex;
31112
    }
31113
 
31114
    /**
31115
     * Performs a deep copy on <i>other</i>.
31116
     */
31117
    public acceptDoa_result(acceptDoa_result other) {
31118
      __isset_bit_vector.clear();
31119
      __isset_bit_vector.or(other.__isset_bit_vector);
31120
      this.success = other.success;
31121
      if (other.isSetEx()) {
31122
        this.ex = new TransactionServiceException(other.ex);
31123
      }
31124
    }
31125
 
31126
    public acceptDoa_result deepCopy() {
31127
      return new acceptDoa_result(this);
31128
    }
31129
 
31130
    @Deprecated
31131
    public acceptDoa_result clone() {
31132
      return new acceptDoa_result(this);
31133
    }
31134
 
31135
    public boolean isSuccess() {
31136
      return this.success;
31137
    }
31138
 
31139
    public acceptDoa_result setSuccess(boolean success) {
31140
      this.success = success;
31141
      setSuccessIsSet(true);
31142
      return this;
31143
    }
31144
 
31145
    public void unsetSuccess() {
31146
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
31147
    }
31148
 
31149
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31150
    public boolean isSetSuccess() {
31151
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
31152
    }
31153
 
31154
    public void setSuccessIsSet(boolean value) {
31155
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
31156
    }
31157
 
31158
    public TransactionServiceException getEx() {
31159
      return this.ex;
31160
    }
31161
 
31162
    public acceptDoa_result setEx(TransactionServiceException ex) {
31163
      this.ex = ex;
31164
      return this;
31165
    }
31166
 
31167
    public void unsetEx() {
31168
      this.ex = null;
31169
    }
31170
 
31171
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
31172
    public boolean isSetEx() {
31173
      return this.ex != null;
31174
    }
31175
 
31176
    public void setExIsSet(boolean value) {
31177
      if (!value) {
31178
        this.ex = null;
31179
      }
31180
    }
31181
 
31182
    public void setFieldValue(_Fields field, Object value) {
31183
      switch (field) {
31184
      case SUCCESS:
31185
        if (value == null) {
31186
          unsetSuccess();
31187
        } else {
31188
          setSuccess((Boolean)value);
31189
        }
31190
        break;
31191
 
31192
      case EX:
31193
        if (value == null) {
31194
          unsetEx();
31195
        } else {
31196
          setEx((TransactionServiceException)value);
31197
        }
31198
        break;
31199
 
31200
      }
31201
    }
31202
 
31203
    public void setFieldValue(int fieldID, Object value) {
31204
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31205
    }
31206
 
31207
    public Object getFieldValue(_Fields field) {
31208
      switch (field) {
31209
      case SUCCESS:
31210
        return new Boolean(isSuccess());
31211
 
31212
      case EX:
31213
        return getEx();
31214
 
31215
      }
31216
      throw new IllegalStateException();
31217
    }
31218
 
31219
    public Object getFieldValue(int fieldId) {
31220
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31221
    }
31222
 
31223
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31224
    public boolean isSet(_Fields field) {
31225
      switch (field) {
31226
      case SUCCESS:
31227
        return isSetSuccess();
31228
      case EX:
31229
        return isSetEx();
31230
      }
31231
      throw new IllegalStateException();
31232
    }
31233
 
31234
    public boolean isSet(int fieldID) {
31235
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31236
    }
31237
 
31238
    @Override
31239
    public boolean equals(Object that) {
31240
      if (that == null)
31241
        return false;
31242
      if (that instanceof acceptDoa_result)
31243
        return this.equals((acceptDoa_result)that);
31244
      return false;
31245
    }
31246
 
31247
    public boolean equals(acceptDoa_result that) {
31248
      if (that == null)
31249
        return false;
31250
 
31251
      boolean this_present_success = true;
31252
      boolean that_present_success = true;
31253
      if (this_present_success || that_present_success) {
31254
        if (!(this_present_success && that_present_success))
31255
          return false;
31256
        if (this.success != that.success)
31257
          return false;
31258
      }
31259
 
31260
      boolean this_present_ex = true && this.isSetEx();
31261
      boolean that_present_ex = true && that.isSetEx();
31262
      if (this_present_ex || that_present_ex) {
31263
        if (!(this_present_ex && that_present_ex))
31264
          return false;
31265
        if (!this.ex.equals(that.ex))
31266
          return false;
31267
      }
31268
 
31269
      return true;
31270
    }
31271
 
31272
    @Override
31273
    public int hashCode() {
31274
      return 0;
31275
    }
31276
 
31277
    public int compareTo(acceptDoa_result other) {
31278
      if (!getClass().equals(other.getClass())) {
31279
        return getClass().getName().compareTo(other.getClass().getName());
31280
      }
31281
 
31282
      int lastComparison = 0;
31283
      acceptDoa_result typedOther = (acceptDoa_result)other;
31284
 
31285
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
31286
      if (lastComparison != 0) {
31287
        return lastComparison;
31288
      }
31289
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
31290
      if (lastComparison != 0) {
31291
        return lastComparison;
31292
      }
31293
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
31294
      if (lastComparison != 0) {
31295
        return lastComparison;
31296
      }
31297
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
31298
      if (lastComparison != 0) {
31299
        return lastComparison;
31300
      }
31301
      return 0;
31302
    }
31303
 
31304
    public void read(TProtocol iprot) throws TException {
31305
      TField field;
31306
      iprot.readStructBegin();
31307
      while (true)
31308
      {
31309
        field = iprot.readFieldBegin();
31310
        if (field.type == TType.STOP) { 
31311
          break;
31312
        }
31313
        _Fields fieldId = _Fields.findByThriftId(field.id);
31314
        if (fieldId == null) {
31315
          TProtocolUtil.skip(iprot, field.type);
31316
        } else {
31317
          switch (fieldId) {
31318
            case SUCCESS:
31319
              if (field.type == TType.BOOL) {
31320
                this.success = iprot.readBool();
31321
                setSuccessIsSet(true);
31322
              } else { 
31323
                TProtocolUtil.skip(iprot, field.type);
31324
              }
31325
              break;
31326
            case EX:
31327
              if (field.type == TType.STRUCT) {
31328
                this.ex = new TransactionServiceException();
31329
                this.ex.read(iprot);
31330
              } else { 
31331
                TProtocolUtil.skip(iprot, field.type);
31332
              }
31333
              break;
31334
          }
31335
          iprot.readFieldEnd();
31336
        }
31337
      }
31338
      iprot.readStructEnd();
31339
      validate();
31340
    }
31341
 
31342
    public void write(TProtocol oprot) throws TException {
31343
      oprot.writeStructBegin(STRUCT_DESC);
31344
 
31345
      if (this.isSetSuccess()) {
31346
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
31347
        oprot.writeBool(this.success);
31348
        oprot.writeFieldEnd();
31349
      } else if (this.isSetEx()) {
31350
        oprot.writeFieldBegin(EX_FIELD_DESC);
31351
        this.ex.write(oprot);
31352
        oprot.writeFieldEnd();
31353
      }
31354
      oprot.writeFieldStop();
31355
      oprot.writeStructEnd();
31356
    }
31357
 
31358
    @Override
31359
    public String toString() {
31360
      StringBuilder sb = new StringBuilder("acceptDoa_result(");
31361
      boolean first = true;
31362
 
31363
      sb.append("success:");
31364
      sb.append(this.success);
31365
      first = false;
31366
      if (!first) sb.append(", ");
31367
      sb.append("ex:");
31368
      if (this.ex == null) {
31369
        sb.append("null");
31370
      } else {
31371
        sb.append(this.ex);
31372
      }
31373
      first = false;
31374
      sb.append(")");
31375
      return sb.toString();
31376
    }
31377
 
31378
    public void validate() throws TException {
31379
      // check for required fields
31380
    }
31381
 
31382
  }
31383
 
31384
  public static class validateDoa_args implements TBase<validateDoa_args._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_args>   {
31385
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_args");
31386
 
31387
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
31388
    private static final TField IS_VALID_FIELD_DESC = new TField("isValid", TType.BOOL, (short)2);
31389
 
31390
    private long orderId;
31391
    private boolean isValid;
31392
 
31393
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31394
    public enum _Fields implements TFieldIdEnum {
31395
      ORDER_ID((short)1, "orderId"),
31396
      IS_VALID((short)2, "isValid");
31397
 
31398
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31399
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31400
 
31401
      static {
31402
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31403
          byId.put((int)field._thriftId, field);
31404
          byName.put(field.getFieldName(), field);
31405
        }
31406
      }
31407
 
31408
      /**
31409
       * Find the _Fields constant that matches fieldId, or null if its not found.
31410
       */
31411
      public static _Fields findByThriftId(int fieldId) {
31412
        return byId.get(fieldId);
31413
      }
31414
 
31415
      /**
31416
       * Find the _Fields constant that matches fieldId, throwing an exception
31417
       * if it is not found.
31418
       */
31419
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31420
        _Fields fields = findByThriftId(fieldId);
31421
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31422
        return fields;
31423
      }
31424
 
31425
      /**
31426
       * Find the _Fields constant that matches name, or null if its not found.
31427
       */
31428
      public static _Fields findByName(String name) {
31429
        return byName.get(name);
31430
      }
31431
 
31432
      private final short _thriftId;
31433
      private final String _fieldName;
31434
 
31435
      _Fields(short thriftId, String fieldName) {
31436
        _thriftId = thriftId;
31437
        _fieldName = fieldName;
31438
      }
31439
 
31440
      public short getThriftFieldId() {
31441
        return _thriftId;
31442
      }
31443
 
31444
      public String getFieldName() {
31445
        return _fieldName;
31446
      }
31447
    }
31448
 
31449
    // isset id assignments
31450
    private static final int __ORDERID_ISSET_ID = 0;
31451
    private static final int __ISVALID_ISSET_ID = 1;
31452
    private BitSet __isset_bit_vector = new BitSet(2);
31453
 
31454
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31455
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
31456
          new FieldValueMetaData(TType.I64)));
31457
      put(_Fields.IS_VALID, new FieldMetaData("isValid", TFieldRequirementType.DEFAULT, 
31458
          new FieldValueMetaData(TType.BOOL)));
31459
    }});
31460
 
31461
    static {
31462
      FieldMetaData.addStructMetaDataMap(validateDoa_args.class, metaDataMap);
31463
    }
31464
 
31465
    public validateDoa_args() {
31466
    }
31467
 
31468
    public validateDoa_args(
31469
      long orderId,
31470
      boolean isValid)
31471
    {
31472
      this();
31473
      this.orderId = orderId;
31474
      setOrderIdIsSet(true);
31475
      this.isValid = isValid;
31476
      setIsValidIsSet(true);
31477
    }
31478
 
31479
    /**
31480
     * Performs a deep copy on <i>other</i>.
31481
     */
31482
    public validateDoa_args(validateDoa_args other) {
31483
      __isset_bit_vector.clear();
31484
      __isset_bit_vector.or(other.__isset_bit_vector);
31485
      this.orderId = other.orderId;
31486
      this.isValid = other.isValid;
31487
    }
31488
 
31489
    public validateDoa_args deepCopy() {
31490
      return new validateDoa_args(this);
31491
    }
31492
 
31493
    @Deprecated
31494
    public validateDoa_args clone() {
31495
      return new validateDoa_args(this);
31496
    }
31497
 
31498
    public long getOrderId() {
31499
      return this.orderId;
31500
    }
31501
 
31502
    public validateDoa_args setOrderId(long orderId) {
31503
      this.orderId = orderId;
31504
      setOrderIdIsSet(true);
31505
      return this;
31506
    }
31507
 
31508
    public void unsetOrderId() {
31509
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
31510
    }
31511
 
31512
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
31513
    public boolean isSetOrderId() {
31514
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
31515
    }
31516
 
31517
    public void setOrderIdIsSet(boolean value) {
31518
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
31519
    }
31520
 
31521
    public boolean isIsValid() {
31522
      return this.isValid;
31523
    }
31524
 
31525
    public validateDoa_args setIsValid(boolean isValid) {
31526
      this.isValid = isValid;
31527
      setIsValidIsSet(true);
31528
      return this;
31529
    }
31530
 
31531
    public void unsetIsValid() {
31532
      __isset_bit_vector.clear(__ISVALID_ISSET_ID);
31533
    }
31534
 
31535
    /** Returns true if field isValid is set (has been asigned a value) and false otherwise */
31536
    public boolean isSetIsValid() {
31537
      return __isset_bit_vector.get(__ISVALID_ISSET_ID);
31538
    }
31539
 
31540
    public void setIsValidIsSet(boolean value) {
31541
      __isset_bit_vector.set(__ISVALID_ISSET_ID, value);
31542
    }
31543
 
31544
    public void setFieldValue(_Fields field, Object value) {
31545
      switch (field) {
31546
      case ORDER_ID:
31547
        if (value == null) {
31548
          unsetOrderId();
31549
        } else {
31550
          setOrderId((Long)value);
31551
        }
31552
        break;
31553
 
31554
      case IS_VALID:
31555
        if (value == null) {
31556
          unsetIsValid();
31557
        } else {
31558
          setIsValid((Boolean)value);
31559
        }
31560
        break;
31561
 
31562
      }
31563
    }
31564
 
31565
    public void setFieldValue(int fieldID, Object value) {
31566
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31567
    }
31568
 
31569
    public Object getFieldValue(_Fields field) {
31570
      switch (field) {
31571
      case ORDER_ID:
31572
        return new Long(getOrderId());
31573
 
31574
      case IS_VALID:
31575
        return new Boolean(isIsValid());
31576
 
31577
      }
31578
      throw new IllegalStateException();
31579
    }
31580
 
31581
    public Object getFieldValue(int fieldId) {
31582
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31583
    }
31584
 
31585
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31586
    public boolean isSet(_Fields field) {
31587
      switch (field) {
31588
      case ORDER_ID:
31589
        return isSetOrderId();
31590
      case IS_VALID:
31591
        return isSetIsValid();
31592
      }
31593
      throw new IllegalStateException();
31594
    }
31595
 
31596
    public boolean isSet(int fieldID) {
31597
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31598
    }
31599
 
31600
    @Override
31601
    public boolean equals(Object that) {
31602
      if (that == null)
31603
        return false;
31604
      if (that instanceof validateDoa_args)
31605
        return this.equals((validateDoa_args)that);
31606
      return false;
31607
    }
31608
 
31609
    public boolean equals(validateDoa_args that) {
31610
      if (that == null)
31611
        return false;
31612
 
31613
      boolean this_present_orderId = true;
31614
      boolean that_present_orderId = true;
31615
      if (this_present_orderId || that_present_orderId) {
31616
        if (!(this_present_orderId && that_present_orderId))
31617
          return false;
31618
        if (this.orderId != that.orderId)
31619
          return false;
31620
      }
31621
 
31622
      boolean this_present_isValid = true;
31623
      boolean that_present_isValid = true;
31624
      if (this_present_isValid || that_present_isValid) {
31625
        if (!(this_present_isValid && that_present_isValid))
31626
          return false;
31627
        if (this.isValid != that.isValid)
31628
          return false;
31629
      }
31630
 
31631
      return true;
31632
    }
31633
 
31634
    @Override
31635
    public int hashCode() {
31636
      return 0;
31637
    }
31638
 
31639
    public int compareTo(validateDoa_args other) {
31640
      if (!getClass().equals(other.getClass())) {
31641
        return getClass().getName().compareTo(other.getClass().getName());
31642
      }
31643
 
31644
      int lastComparison = 0;
31645
      validateDoa_args typedOther = (validateDoa_args)other;
31646
 
31647
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
31648
      if (lastComparison != 0) {
31649
        return lastComparison;
31650
      }
31651
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
31652
      if (lastComparison != 0) {
31653
        return lastComparison;
31654
      }
31655
      lastComparison = Boolean.valueOf(isSetIsValid()).compareTo(isSetIsValid());
31656
      if (lastComparison != 0) {
31657
        return lastComparison;
31658
      }
31659
      lastComparison = TBaseHelper.compareTo(isValid, typedOther.isValid);
31660
      if (lastComparison != 0) {
31661
        return lastComparison;
31662
      }
31663
      return 0;
31664
    }
31665
 
31666
    public void read(TProtocol iprot) throws TException {
31667
      TField field;
31668
      iprot.readStructBegin();
31669
      while (true)
31670
      {
31671
        field = iprot.readFieldBegin();
31672
        if (field.type == TType.STOP) { 
31673
          break;
31674
        }
31675
        _Fields fieldId = _Fields.findByThriftId(field.id);
31676
        if (fieldId == null) {
31677
          TProtocolUtil.skip(iprot, field.type);
31678
        } else {
31679
          switch (fieldId) {
31680
            case ORDER_ID:
31681
              if (field.type == TType.I64) {
31682
                this.orderId = iprot.readI64();
31683
                setOrderIdIsSet(true);
31684
              } else { 
31685
                TProtocolUtil.skip(iprot, field.type);
31686
              }
31687
              break;
31688
            case IS_VALID:
31689
              if (field.type == TType.BOOL) {
31690
                this.isValid = iprot.readBool();
31691
                setIsValidIsSet(true);
31692
              } else { 
31693
                TProtocolUtil.skip(iprot, field.type);
31694
              }
31695
              break;
31696
          }
31697
          iprot.readFieldEnd();
31698
        }
31699
      }
31700
      iprot.readStructEnd();
31701
      validate();
31702
    }
31703
 
31704
    public void write(TProtocol oprot) throws TException {
31705
      validate();
31706
 
31707
      oprot.writeStructBegin(STRUCT_DESC);
31708
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
31709
      oprot.writeI64(this.orderId);
31710
      oprot.writeFieldEnd();
31711
      oprot.writeFieldBegin(IS_VALID_FIELD_DESC);
31712
      oprot.writeBool(this.isValid);
31713
      oprot.writeFieldEnd();
31714
      oprot.writeFieldStop();
31715
      oprot.writeStructEnd();
31716
    }
31717
 
31718
    @Override
31719
    public String toString() {
31720
      StringBuilder sb = new StringBuilder("validateDoa_args(");
31721
      boolean first = true;
31722
 
31723
      sb.append("orderId:");
31724
      sb.append(this.orderId);
31725
      first = false;
31726
      if (!first) sb.append(", ");
31727
      sb.append("isValid:");
31728
      sb.append(this.isValid);
31729
      first = false;
31730
      sb.append(")");
31731
      return sb.toString();
31732
    }
31733
 
31734
    public void validate() throws TException {
31735
      // check for required fields
31736
    }
31737
 
31738
  }
31739
 
31740
  public static class validateDoa_result implements TBase<validateDoa_result._Fields>, java.io.Serializable, Cloneable, Comparable<validateDoa_result>   {
31741
    private static final TStruct STRUCT_DESC = new TStruct("validateDoa_result");
31742
 
31743
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
31744
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
31745
 
31746
    private boolean success;
31747
    private TransactionServiceException ex;
31748
 
31749
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
31750
    public enum _Fields implements TFieldIdEnum {
31751
      SUCCESS((short)0, "success"),
31752
      EX((short)1, "ex");
31753
 
31754
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
31755
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
31756
 
31757
      static {
31758
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
31759
          byId.put((int)field._thriftId, field);
31760
          byName.put(field.getFieldName(), field);
31761
        }
31762
      }
31763
 
31764
      /**
31765
       * Find the _Fields constant that matches fieldId, or null if its not found.
31766
       */
31767
      public static _Fields findByThriftId(int fieldId) {
31768
        return byId.get(fieldId);
31769
      }
31770
 
31771
      /**
31772
       * Find the _Fields constant that matches fieldId, throwing an exception
31773
       * if it is not found.
31774
       */
31775
      public static _Fields findByThriftIdOrThrow(int fieldId) {
31776
        _Fields fields = findByThriftId(fieldId);
31777
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
31778
        return fields;
31779
      }
31780
 
31781
      /**
31782
       * Find the _Fields constant that matches name, or null if its not found.
31783
       */
31784
      public static _Fields findByName(String name) {
31785
        return byName.get(name);
31786
      }
31787
 
31788
      private final short _thriftId;
31789
      private final String _fieldName;
31790
 
31791
      _Fields(short thriftId, String fieldName) {
31792
        _thriftId = thriftId;
31793
        _fieldName = fieldName;
31794
      }
31795
 
31796
      public short getThriftFieldId() {
31797
        return _thriftId;
31798
      }
31799
 
31800
      public String getFieldName() {
31801
        return _fieldName;
31802
      }
31803
    }
31804
 
31805
    // isset id assignments
31806
    private static final int __SUCCESS_ISSET_ID = 0;
31807
    private BitSet __isset_bit_vector = new BitSet(1);
31808
 
31809
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
31810
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
31811
          new FieldValueMetaData(TType.BOOL)));
31812
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
31813
          new FieldValueMetaData(TType.STRUCT)));
31814
    }});
31815
 
31816
    static {
31817
      FieldMetaData.addStructMetaDataMap(validateDoa_result.class, metaDataMap);
31818
    }
31819
 
31820
    public validateDoa_result() {
31821
    }
31822
 
31823
    public validateDoa_result(
31824
      boolean success,
31825
      TransactionServiceException ex)
31826
    {
31827
      this();
31828
      this.success = success;
31829
      setSuccessIsSet(true);
31830
      this.ex = ex;
31831
    }
31832
 
31833
    /**
31834
     * Performs a deep copy on <i>other</i>.
31835
     */
31836
    public validateDoa_result(validateDoa_result other) {
31837
      __isset_bit_vector.clear();
31838
      __isset_bit_vector.or(other.__isset_bit_vector);
31839
      this.success = other.success;
31840
      if (other.isSetEx()) {
31841
        this.ex = new TransactionServiceException(other.ex);
31842
      }
31843
    }
31844
 
31845
    public validateDoa_result deepCopy() {
31846
      return new validateDoa_result(this);
31847
    }
31848
 
31849
    @Deprecated
31850
    public validateDoa_result clone() {
31851
      return new validateDoa_result(this);
31852
    }
31853
 
31854
    public boolean isSuccess() {
31855
      return this.success;
31856
    }
31857
 
31858
    public validateDoa_result setSuccess(boolean success) {
31859
      this.success = success;
31860
      setSuccessIsSet(true);
31861
      return this;
31862
    }
31863
 
31864
    public void unsetSuccess() {
31865
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
31866
    }
31867
 
31868
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
31869
    public boolean isSetSuccess() {
31870
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
31871
    }
31872
 
31873
    public void setSuccessIsSet(boolean value) {
31874
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
31875
    }
31876
 
31877
    public TransactionServiceException getEx() {
31878
      return this.ex;
31879
    }
31880
 
31881
    public validateDoa_result setEx(TransactionServiceException ex) {
31882
      this.ex = ex;
31883
      return this;
31884
    }
31885
 
31886
    public void unsetEx() {
31887
      this.ex = null;
31888
    }
31889
 
31890
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
31891
    public boolean isSetEx() {
31892
      return this.ex != null;
31893
    }
31894
 
31895
    public void setExIsSet(boolean value) {
31896
      if (!value) {
31897
        this.ex = null;
31898
      }
31899
    }
31900
 
31901
    public void setFieldValue(_Fields field, Object value) {
31902
      switch (field) {
31903
      case SUCCESS:
31904
        if (value == null) {
31905
          unsetSuccess();
31906
        } else {
31907
          setSuccess((Boolean)value);
31908
        }
31909
        break;
31910
 
31911
      case EX:
31912
        if (value == null) {
31913
          unsetEx();
31914
        } else {
31915
          setEx((TransactionServiceException)value);
31916
        }
31917
        break;
31918
 
31919
      }
31920
    }
31921
 
31922
    public void setFieldValue(int fieldID, Object value) {
31923
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
31924
    }
31925
 
31926
    public Object getFieldValue(_Fields field) {
31927
      switch (field) {
31928
      case SUCCESS:
31929
        return new Boolean(isSuccess());
31930
 
31931
      case EX:
31932
        return getEx();
31933
 
31934
      }
31935
      throw new IllegalStateException();
31936
    }
31937
 
31938
    public Object getFieldValue(int fieldId) {
31939
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
31940
    }
31941
 
31942
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
31943
    public boolean isSet(_Fields field) {
31944
      switch (field) {
31945
      case SUCCESS:
31946
        return isSetSuccess();
31947
      case EX:
31948
        return isSetEx();
31949
      }
31950
      throw new IllegalStateException();
31951
    }
31952
 
31953
    public boolean isSet(int fieldID) {
31954
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
31955
    }
31956
 
31957
    @Override
31958
    public boolean equals(Object that) {
31959
      if (that == null)
31960
        return false;
31961
      if (that instanceof validateDoa_result)
31962
        return this.equals((validateDoa_result)that);
31963
      return false;
31964
    }
31965
 
31966
    public boolean equals(validateDoa_result that) {
31967
      if (that == null)
31968
        return false;
31969
 
31970
      boolean this_present_success = true;
31971
      boolean that_present_success = true;
31972
      if (this_present_success || that_present_success) {
31973
        if (!(this_present_success && that_present_success))
31974
          return false;
31975
        if (this.success != that.success)
31976
          return false;
31977
      }
31978
 
31979
      boolean this_present_ex = true && this.isSetEx();
31980
      boolean that_present_ex = true && that.isSetEx();
31981
      if (this_present_ex || that_present_ex) {
31982
        if (!(this_present_ex && that_present_ex))
31983
          return false;
31984
        if (!this.ex.equals(that.ex))
31985
          return false;
31986
      }
31987
 
31988
      return true;
31989
    }
31990
 
31991
    @Override
31992
    public int hashCode() {
31993
      return 0;
31994
    }
31995
 
31996
    public int compareTo(validateDoa_result other) {
31997
      if (!getClass().equals(other.getClass())) {
31998
        return getClass().getName().compareTo(other.getClass().getName());
31999
      }
32000
 
32001
      int lastComparison = 0;
32002
      validateDoa_result typedOther = (validateDoa_result)other;
32003
 
32004
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
32005
      if (lastComparison != 0) {
32006
        return lastComparison;
32007
      }
32008
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
32009
      if (lastComparison != 0) {
32010
        return lastComparison;
32011
      }
32012
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
32013
      if (lastComparison != 0) {
32014
        return lastComparison;
32015
      }
32016
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
32017
      if (lastComparison != 0) {
32018
        return lastComparison;
32019
      }
32020
      return 0;
32021
    }
32022
 
32023
    public void read(TProtocol iprot) throws TException {
32024
      TField field;
32025
      iprot.readStructBegin();
32026
      while (true)
32027
      {
32028
        field = iprot.readFieldBegin();
32029
        if (field.type == TType.STOP) { 
32030
          break;
32031
        }
32032
        _Fields fieldId = _Fields.findByThriftId(field.id);
32033
        if (fieldId == null) {
32034
          TProtocolUtil.skip(iprot, field.type);
32035
        } else {
32036
          switch (fieldId) {
32037
            case SUCCESS:
32038
              if (field.type == TType.BOOL) {
32039
                this.success = iprot.readBool();
32040
                setSuccessIsSet(true);
32041
              } else { 
32042
                TProtocolUtil.skip(iprot, field.type);
32043
              }
32044
              break;
32045
            case EX:
32046
              if (field.type == TType.STRUCT) {
32047
                this.ex = new TransactionServiceException();
32048
                this.ex.read(iprot);
32049
              } else { 
32050
                TProtocolUtil.skip(iprot, field.type);
32051
              }
32052
              break;
32053
          }
32054
          iprot.readFieldEnd();
32055
        }
32056
      }
32057
      iprot.readStructEnd();
32058
      validate();
32059
    }
32060
 
32061
    public void write(TProtocol oprot) throws TException {
32062
      oprot.writeStructBegin(STRUCT_DESC);
32063
 
32064
      if (this.isSetSuccess()) {
32065
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
32066
        oprot.writeBool(this.success);
32067
        oprot.writeFieldEnd();
32068
      } else if (this.isSetEx()) {
32069
        oprot.writeFieldBegin(EX_FIELD_DESC);
32070
        this.ex.write(oprot);
32071
        oprot.writeFieldEnd();
32072
      }
32073
      oprot.writeFieldStop();
32074
      oprot.writeStructEnd();
32075
    }
32076
 
32077
    @Override
32078
    public String toString() {
32079
      StringBuilder sb = new StringBuilder("validateDoa_result(");
32080
      boolean first = true;
32081
 
32082
      sb.append("success:");
32083
      sb.append(this.success);
32084
      first = false;
32085
      if (!first) sb.append(", ");
32086
      sb.append("ex:");
32087
      if (this.ex == null) {
32088
        sb.append("null");
32089
      } else {
32090
        sb.append(this.ex);
32091
      }
32092
      first = false;
32093
      sb.append(")");
32094
      return sb.toString();
32095
    }
32096
 
32097
    public void validate() throws TException {
32098
      // check for required fields
32099
    }
32100
 
32101
  }
32102
 
68 ashish 32103
}