Subversion Repositories SmartDukaan

Rev

Rev 2383 | Rev 2590 | 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
253
     * If the order is any other status, it returns false.
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
 
68 ashish 261
  }
262
 
263
  public static class Client implements Iface {
264
    public Client(TProtocol prot)
265
    {
266
      this(prot, prot);
267
    }
268
 
269
    public Client(TProtocol iprot, TProtocol oprot)
270
    {
271
      iprot_ = iprot;
272
      oprot_ = oprot;
273
    }
274
 
275
    protected TProtocol iprot_;
276
    protected TProtocol oprot_;
277
 
278
    protected int seqid_;
279
 
280
    public TProtocol getInputProtocol()
281
    {
282
      return this.iprot_;
283
    }
284
 
285
    public TProtocol getOutputProtocol()
286
    {
287
      return this.oprot_;
288
    }
289
 
764 rajveer 290
    public void closeSession() throws TException
291
    {
292
      send_closeSession();
293
      recv_closeSession();
294
    }
295
 
296
    public void send_closeSession() throws TException
297
    {
298
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
299
      closeSession_args args = new closeSession_args();
300
      args.write(oprot_);
301
      oprot_.writeMessageEnd();
302
      oprot_.getTransport().flush();
303
    }
304
 
305
    public void recv_closeSession() throws TException
306
    {
307
      TMessage msg = iprot_.readMessageBegin();
308
      if (msg.type == TMessageType.EXCEPTION) {
309
        TApplicationException x = TApplicationException.read(iprot_);
310
        iprot_.readMessageEnd();
311
        throw x;
312
      }
313
      closeSession_result result = new closeSession_result();
314
      result.read(iprot_);
315
      iprot_.readMessageEnd();
316
      return;
317
    }
318
 
132 ashish 319
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 320
    {
321
      send_createTransaction(transaction);
132 ashish 322
      return recv_createTransaction();
68 ashish 323
    }
324
 
325
    public void send_createTransaction(Transaction transaction) throws TException
326
    {
327
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
328
      createTransaction_args args = new createTransaction_args();
329
      args.transaction = transaction;
330
      args.write(oprot_);
331
      oprot_.writeMessageEnd();
332
      oprot_.getTransport().flush();
333
    }
334
 
132 ashish 335
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 336
    {
337
      TMessage msg = iprot_.readMessageBegin();
338
      if (msg.type == TMessageType.EXCEPTION) {
339
        TApplicationException x = TApplicationException.read(iprot_);
340
        iprot_.readMessageEnd();
341
        throw x;
342
      }
343
      createTransaction_result result = new createTransaction_result();
344
      result.read(iprot_);
345
      iprot_.readMessageEnd();
132 ashish 346
      if (result.isSetSuccess()) {
347
        return result.success;
348
      }
68 ashish 349
      if (result.ex != null) {
350
        throw result.ex;
351
      }
132 ashish 352
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 353
    }
354
 
355
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
356
    {
357
      send_getTransaction(id);
358
      return recv_getTransaction();
359
    }
360
 
361
    public void send_getTransaction(long id) throws TException
362
    {
363
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
364
      getTransaction_args args = new getTransaction_args();
365
      args.id = id;
366
      args.write(oprot_);
367
      oprot_.writeMessageEnd();
368
      oprot_.getTransport().flush();
369
    }
370
 
371
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
372
    {
373
      TMessage msg = iprot_.readMessageBegin();
374
      if (msg.type == TMessageType.EXCEPTION) {
375
        TApplicationException x = TApplicationException.read(iprot_);
376
        iprot_.readMessageEnd();
377
        throw x;
378
      }
379
      getTransaction_result result = new getTransaction_result();
380
      result.read(iprot_);
381
      iprot_.readMessageEnd();
382
      if (result.isSetSuccess()) {
383
        return result.success;
384
      }
385
      if (result.ex != null) {
386
        throw result.ex;
387
      }
388
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
389
    }
390
 
132 ashish 391
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 392
    {
132 ashish 393
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 394
      return recv_getTransactionsForCustomer();
395
    }
396
 
132 ashish 397
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 398
    {
399
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
400
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
401
      args.customerId = customerId;
132 ashish 402
      args.from_date = from_date;
403
      args.to_date = to_date;
68 ashish 404
      args.status = status;
405
      args.write(oprot_);
406
      oprot_.writeMessageEnd();
407
      oprot_.getTransport().flush();
408
    }
409
 
410
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
411
    {
412
      TMessage msg = iprot_.readMessageBegin();
413
      if (msg.type == TMessageType.EXCEPTION) {
414
        TApplicationException x = TApplicationException.read(iprot_);
415
        iprot_.readMessageEnd();
416
        throw x;
417
      }
418
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
419
      result.read(iprot_);
420
      iprot_.readMessageEnd();
421
      if (result.isSetSuccess()) {
422
        return result.success;
423
      }
424
      if (result.ex != null) {
425
        throw result.ex;
426
      }
427
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
428
    }
429
 
132 ashish 430
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
431
    {
432
      send_getTransactionsForShoppingCartId(shoppingCartId);
433
      return recv_getTransactionsForShoppingCartId();
434
    }
435
 
436
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
437
    {
438
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
439
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
440
      args.shoppingCartId = shoppingCartId;
441
      args.write(oprot_);
442
      oprot_.writeMessageEnd();
443
      oprot_.getTransport().flush();
444
    }
445
 
446
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
447
    {
448
      TMessage msg = iprot_.readMessageBegin();
449
      if (msg.type == TMessageType.EXCEPTION) {
450
        TApplicationException x = TApplicationException.read(iprot_);
451
        iprot_.readMessageEnd();
452
        throw x;
453
      }
454
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
455
      result.read(iprot_);
456
      iprot_.readMessageEnd();
457
      if (result.isSetSuccess()) {
458
        return result.success;
459
      }
460
      if (result.ex != null) {
461
        throw result.ex;
462
      }
463
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
464
    }
465
 
68 ashish 466
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
467
    {
468
      send_getTransactionStatus(transactionId);
469
      return recv_getTransactionStatus();
470
    }
471
 
472
    public void send_getTransactionStatus(long transactionId) throws TException
473
    {
474
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
475
      getTransactionStatus_args args = new getTransactionStatus_args();
476
      args.transactionId = transactionId;
477
      args.write(oprot_);
478
      oprot_.writeMessageEnd();
479
      oprot_.getTransport().flush();
480
    }
481
 
482
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
483
    {
484
      TMessage msg = iprot_.readMessageBegin();
485
      if (msg.type == TMessageType.EXCEPTION) {
486
        TApplicationException x = TApplicationException.read(iprot_);
487
        iprot_.readMessageEnd();
488
        throw x;
489
      }
490
      getTransactionStatus_result result = new getTransactionStatus_result();
491
      result.read(iprot_);
492
      iprot_.readMessageEnd();
493
      if (result.isSetSuccess()) {
494
        return result.success;
495
      }
496
      if (result.ex != null) {
497
        throw result.ex;
498
      }
499
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
500
    }
501
 
502
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
503
    {
504
      send_changeTransactionStatus(transactionId, status, description);
505
      return recv_changeTransactionStatus();
506
    }
507
 
508
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
509
    {
510
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
511
      changeTransactionStatus_args args = new changeTransactionStatus_args();
512
      args.transactionId = transactionId;
513
      args.status = status;
514
      args.description = description;
515
      args.write(oprot_);
516
      oprot_.writeMessageEnd();
517
      oprot_.getTransport().flush();
518
    }
519
 
520
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
521
    {
522
      TMessage msg = iprot_.readMessageBegin();
523
      if (msg.type == TMessageType.EXCEPTION) {
524
        TApplicationException x = TApplicationException.read(iprot_);
525
        iprot_.readMessageEnd();
526
        throw x;
527
      }
528
      changeTransactionStatus_result result = new changeTransactionStatus_result();
529
      result.read(iprot_);
530
      iprot_.readMessageEnd();
531
      if (result.isSetSuccess()) {
532
        return result.success;
533
      }
534
      if (result.ex != null) {
535
        throw result.ex;
536
      }
537
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
538
    }
539
 
1398 varun.gupt 540
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 541
    {
1398 varun.gupt 542
      send_enqueueTransactionInfoEmail(transactionId);
543
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 544
    }
545
 
1398 varun.gupt 546
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 547
    {
1398 varun.gupt 548
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
549
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 550
      args.transactionId = transactionId;
551
      args.write(oprot_);
552
      oprot_.writeMessageEnd();
553
      oprot_.getTransport().flush();
554
    }
555
 
1398 varun.gupt 556
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 557
    {
558
      TMessage msg = iprot_.readMessageBegin();
559
      if (msg.type == TMessageType.EXCEPTION) {
560
        TApplicationException x = TApplicationException.read(iprot_);
561
        iprot_.readMessageEnd();
562
        throw x;
563
      }
1398 varun.gupt 564
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 565
      result.read(iprot_);
566
      iprot_.readMessageEnd();
567
      if (result.isSetSuccess()) {
568
        return result.success;
569
      }
570
      if (result.ex != null) {
571
        throw result.ex;
572
      }
1398 varun.gupt 573
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 574
    }
575
 
483 rajveer 576
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 577
    {
483 rajveer 578
      send_getAllOrders(status, from_date, to_date, warehouse_id);
579
      return recv_getAllOrders();
68 ashish 580
    }
581
 
483 rajveer 582
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 583
    {
483 rajveer 584
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
585
      getAllOrders_args args = new getAllOrders_args();
586
      args.status = status;
587
      args.from_date = from_date;
588
      args.to_date = to_date;
589
      args.warehouse_id = warehouse_id;
68 ashish 590
      args.write(oprot_);
591
      oprot_.writeMessageEnd();
592
      oprot_.getTransport().flush();
593
    }
594
 
483 rajveer 595
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 596
    {
597
      TMessage msg = iprot_.readMessageBegin();
598
      if (msg.type == TMessageType.EXCEPTION) {
599
        TApplicationException x = TApplicationException.read(iprot_);
600
        iprot_.readMessageEnd();
601
        throw x;
602
      }
483 rajveer 603
      getAllOrders_result result = new getAllOrders_result();
68 ashish 604
      result.read(iprot_);
605
      iprot_.readMessageEnd();
606
      if (result.isSetSuccess()) {
607
        return result.success;
608
      }
609
      if (result.ex != null) {
610
        throw result.ex;
611
      }
483 rajveer 612
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 613
    }
614
 
1022 varun.gupt 615
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
616
    {
617
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
618
      return recv_getOrdersByBillingDate();
619
    }
620
 
621
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
622
    {
623
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
624
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
625
      args.status = status;
626
      args.start_billing_date = start_billing_date;
627
      args.end_billing_date = end_billing_date;
628
      args.warehouse_id = warehouse_id;
629
      args.write(oprot_);
630
      oprot_.writeMessageEnd();
631
      oprot_.getTransport().flush();
632
    }
633
 
634
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
635
    {
636
      TMessage msg = iprot_.readMessageBegin();
637
      if (msg.type == TMessageType.EXCEPTION) {
638
        TApplicationException x = TApplicationException.read(iprot_);
639
        iprot_.readMessageEnd();
640
        throw x;
641
      }
642
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
643
      result.read(iprot_);
644
      iprot_.readMessageEnd();
645
      if (result.isSetSuccess()) {
646
        return result.success;
647
      }
648
      if (result.ex != null) {
649
        throw result.ex;
650
      }
651
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
652
    }
653
 
1382 varun.gupt 654
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
655
    {
656
      send_getReturnableOrdersForCustomer(customer_id, limit);
657
      return recv_getReturnableOrdersForCustomer();
658
    }
659
 
660
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
661
    {
662
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
663
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
664
      args.customer_id = customer_id;
665
      args.limit = limit;
666
      args.write(oprot_);
667
      oprot_.writeMessageEnd();
668
      oprot_.getTransport().flush();
669
    }
670
 
671
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
672
    {
673
      TMessage msg = iprot_.readMessageBegin();
674
      if (msg.type == TMessageType.EXCEPTION) {
675
        TApplicationException x = TApplicationException.read(iprot_);
676
        iprot_.readMessageEnd();
677
        throw x;
678
      }
679
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
680
      result.read(iprot_);
681
      iprot_.readMessageEnd();
682
      if (result.isSetSuccess()) {
683
        return result.success;
684
      }
685
      if (result.ex != null) {
686
        throw result.ex;
687
      }
688
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
689
    }
690
 
691
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
692
    {
693
      send_getCancellableOrdersForCustomer(customer_id, limit);
694
      return recv_getCancellableOrdersForCustomer();
695
    }
696
 
697
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
698
    {
699
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
700
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
701
      args.customer_id = customer_id;
702
      args.limit = limit;
703
      args.write(oprot_);
704
      oprot_.writeMessageEnd();
705
      oprot_.getTransport().flush();
706
    }
707
 
708
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
709
    {
710
      TMessage msg = iprot_.readMessageBegin();
711
      if (msg.type == TMessageType.EXCEPTION) {
712
        TApplicationException x = TApplicationException.read(iprot_);
713
        iprot_.readMessageEnd();
714
        throw x;
715
      }
716
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
717
      result.read(iprot_);
718
      iprot_.readMessageEnd();
719
      if (result.isSetSuccess()) {
720
        return result.success;
721
      }
722
      if (result.ex != null) {
723
        throw result.ex;
724
      }
725
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
726
    }
727
 
483 rajveer 728
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 729
    {
483 rajveer 730
      send_changeOrderStatus(orderId, status, description);
731
      return recv_changeOrderStatus();
68 ashish 732
    }
733
 
483 rajveer 734
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 735
    {
483 rajveer 736
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
737
      changeOrderStatus_args args = new changeOrderStatus_args();
738
      args.orderId = orderId;
739
      args.status = status;
740
      args.description = description;
68 ashish 741
      args.write(oprot_);
742
      oprot_.writeMessageEnd();
743
      oprot_.getTransport().flush();
744
    }
745
 
483 rajveer 746
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 747
    {
748
      TMessage msg = iprot_.readMessageBegin();
749
      if (msg.type == TMessageType.EXCEPTION) {
750
        TApplicationException x = TApplicationException.read(iprot_);
751
        iprot_.readMessageEnd();
752
        throw x;
753
      }
483 rajveer 754
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 755
      result.read(iprot_);
756
      iprot_.readMessageEnd();
757
      if (result.isSetSuccess()) {
758
        return result.success;
759
      }
760
      if (result.ex != null) {
761
        throw result.ex;
762
      }
483 rajveer 763
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 764
    }
765
 
1148 chandransh 766
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 767
    {
1148 chandransh 768
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 769
      return recv_addBillingDetails();
770
    }
771
 
1148 chandransh 772
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 773
    {
774
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
775
      addBillingDetails_args args = new addBillingDetails_args();
776
      args.orderId = orderId;
777
      args.invoice_number = invoice_number;
778
      args.billed_by = billed_by;
779
      args.write(oprot_);
780
      oprot_.writeMessageEnd();
781
      oprot_.getTransport().flush();
782
    }
783
 
784
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
785
    {
786
      TMessage msg = iprot_.readMessageBegin();
787
      if (msg.type == TMessageType.EXCEPTION) {
788
        TApplicationException x = TApplicationException.read(iprot_);
789
        iprot_.readMessageEnd();
790
        throw x;
791
      }
792
      addBillingDetails_result result = new addBillingDetails_result();
793
      result.read(iprot_);
794
      iprot_.readMessageEnd();
795
      if (result.isSetSuccess()) {
796
        return result.success;
797
      }
798
      if (result.ex != null) {
799
        throw result.ex;
800
      }
801
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
802
    }
803
 
2383 rajveer 804
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
1148 chandransh 805
    {
2383 rajveer 806
      send_addJacketNumber(orderId, jacketNumber);
1148 chandransh 807
      return recv_addJacketNumber();
808
    }
809
 
2383 rajveer 810
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
1148 chandransh 811
    {
812
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
813
      addJacketNumber_args args = new addJacketNumber_args();
814
      args.orderId = orderId;
815
      args.jacketNumber = jacketNumber;
816
      args.write(oprot_);
817
      oprot_.writeMessageEnd();
818
      oprot_.getTransport().flush();
819
    }
820
 
821
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
822
    {
823
      TMessage msg = iprot_.readMessageBegin();
824
      if (msg.type == TMessageType.EXCEPTION) {
825
        TApplicationException x = TApplicationException.read(iprot_);
826
        iprot_.readMessageEnd();
827
        throw x;
828
      }
829
      addJacketNumber_result result = new addJacketNumber_result();
830
      result.read(iprot_);
831
      iprot_.readMessageEnd();
832
      if (result.isSetSuccess()) {
833
        return result.success;
834
      }
835
      if (result.ex != null) {
836
        throw result.ex;
837
      }
838
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
839
    }
840
 
923 rajveer 841
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
842
    {
843
      send_acceptOrder(orderId);
844
      return recv_acceptOrder();
845
    }
846
 
847
    public void send_acceptOrder(long orderId) throws TException
848
    {
849
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
850
      acceptOrder_args args = new acceptOrder_args();
851
      args.orderId = orderId;
852
      args.write(oprot_);
853
      oprot_.writeMessageEnd();
854
      oprot_.getTransport().flush();
855
    }
856
 
857
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
858
    {
859
      TMessage msg = iprot_.readMessageBegin();
860
      if (msg.type == TMessageType.EXCEPTION) {
861
        TApplicationException x = TApplicationException.read(iprot_);
862
        iprot_.readMessageEnd();
863
        throw x;
864
      }
865
      acceptOrder_result result = new acceptOrder_result();
866
      result.read(iprot_);
867
      iprot_.readMessageEnd();
868
      if (result.isSetSuccess()) {
869
        return result.success;
870
      }
871
      if (result.ex != null) {
872
        throw result.ex;
873
      }
874
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
875
    }
876
 
877
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
878
    {
879
      send_billOrder(orderId);
880
      return recv_billOrder();
881
    }
882
 
883
    public void send_billOrder(long orderId) throws TException
884
    {
885
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
886
      billOrder_args args = new billOrder_args();
887
      args.orderId = orderId;
888
      args.write(oprot_);
889
      oprot_.writeMessageEnd();
890
      oprot_.getTransport().flush();
891
    }
892
 
893
    public boolean recv_billOrder() throws TransactionServiceException, TException
894
    {
895
      TMessage msg = iprot_.readMessageBegin();
896
      if (msg.type == TMessageType.EXCEPTION) {
897
        TApplicationException x = TApplicationException.read(iprot_);
898
        iprot_.readMessageEnd();
899
        throw x;
900
      }
901
      billOrder_result result = new billOrder_result();
902
      result.read(iprot_);
903
      iprot_.readMessageEnd();
904
      if (result.isSetSuccess()) {
905
        return result.success;
906
      }
907
      if (result.ex != null) {
908
        throw result.ex;
909
      }
910
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
911
    }
912
 
1529 ankur.sing 913
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 914
    {
1529 ankur.sing 915
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 916
      return recv_getOrdersForTransaction();
68 ashish 917
    }
918
 
1529 ankur.sing 919
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 920
    {
483 rajveer 921
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
922
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 923
      args.transactionId = transactionId;
1529 ankur.sing 924
      args.customerId = customerId;
68 ashish 925
      args.write(oprot_);
926
      oprot_.writeMessageEnd();
927
      oprot_.getTransport().flush();
928
    }
929
 
483 rajveer 930
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 931
    {
932
      TMessage msg = iprot_.readMessageBegin();
933
      if (msg.type == TMessageType.EXCEPTION) {
934
        TApplicationException x = TApplicationException.read(iprot_);
935
        iprot_.readMessageEnd();
936
        throw x;
937
      }
483 rajveer 938
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 939
      result.read(iprot_);
940
      iprot_.readMessageEnd();
941
      if (result.isSetSuccess()) {
942
        return result.success;
943
      }
944
      if (result.ex != null) {
945
        throw result.ex;
946
      }
483 rajveer 947
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 948
    }
949
 
483 rajveer 950
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 951
    {
483 rajveer 952
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
953
      return recv_getOrdersForCustomer();
68 ashish 954
    }
955
 
483 rajveer 956
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 957
    {
483 rajveer 958
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
959
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
960
      args.customerId = customerId;
961
      args.from_date = from_date;
962
      args.to_date = to_date;
963
      args.status = status;
68 ashish 964
      args.write(oprot_);
965
      oprot_.writeMessageEnd();
966
      oprot_.getTransport().flush();
967
    }
968
 
483 rajveer 969
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 970
    {
971
      TMessage msg = iprot_.readMessageBegin();
972
      if (msg.type == TMessageType.EXCEPTION) {
973
        TApplicationException x = TApplicationException.read(iprot_);
974
        iprot_.readMessageEnd();
975
        throw x;
976
      }
483 rajveer 977
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 978
      result.read(iprot_);
979
      iprot_.readMessageEnd();
980
      if (result.isSetSuccess()) {
981
        return result.success;
982
      }
983
      if (result.ex != null) {
984
        throw result.ex;
985
      }
483 rajveer 986
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 987
    }
988
 
483 rajveer 989
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 990
    {
483 rajveer 991
      send_createOrder(order);
992
      return recv_createOrder();
68 ashish 993
    }
994
 
483 rajveer 995
    public void send_createOrder(Order order) throws TException
68 ashish 996
    {
483 rajveer 997
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
998
      createOrder_args args = new createOrder_args();
999
      args.order = order;
68 ashish 1000
      args.write(oprot_);
1001
      oprot_.writeMessageEnd();
1002
      oprot_.getTransport().flush();
1003
    }
1004
 
483 rajveer 1005
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 1006
    {
1007
      TMessage msg = iprot_.readMessageBegin();
1008
      if (msg.type == TMessageType.EXCEPTION) {
1009
        TApplicationException x = TApplicationException.read(iprot_);
1010
        iprot_.readMessageEnd();
1011
        throw x;
1012
      }
483 rajveer 1013
      createOrder_result result = new createOrder_result();
68 ashish 1014
      result.read(iprot_);
1015
      iprot_.readMessageEnd();
1016
      if (result.isSetSuccess()) {
1017
        return result.success;
1018
      }
1019
      if (result.ex != null) {
1020
        throw result.ex;
1021
      }
483 rajveer 1022
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 1023
    }
1024
 
483 rajveer 1025
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 1026
    {
483 rajveer 1027
      send_getOrder(id);
1028
      return recv_getOrder();
68 ashish 1029
    }
1030
 
483 rajveer 1031
    public void send_getOrder(long id) throws TException
68 ashish 1032
    {
483 rajveer 1033
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
1034
      getOrder_args args = new getOrder_args();
1035
      args.id = id;
68 ashish 1036
      args.write(oprot_);
1037
      oprot_.writeMessageEnd();
1038
      oprot_.getTransport().flush();
1039
    }
1040
 
483 rajveer 1041
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 1042
    {
1043
      TMessage msg = iprot_.readMessageBegin();
1044
      if (msg.type == TMessageType.EXCEPTION) {
1045
        TApplicationException x = TApplicationException.read(iprot_);
1046
        iprot_.readMessageEnd();
1047
        throw x;
1048
      }
483 rajveer 1049
      getOrder_result result = new getOrder_result();
68 ashish 1050
      result.read(iprot_);
1051
      iprot_.readMessageEnd();
1052
      if (result.isSetSuccess()) {
1053
        return result.success;
1054
      }
1055
      if (result.ex != null) {
1056
        throw result.ex;
1057
      }
483 rajveer 1058
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1059
    }
1060
 
483 rajveer 1061
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1062
    {
483 rajveer 1063
      send_getLineItemsForOrder(orderId);
1064
      return recv_getLineItemsForOrder();
68 ashish 1065
    }
1066
 
483 rajveer 1067
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1068
    {
483 rajveer 1069
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1070
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1071
      args.orderId = orderId;
68 ashish 1072
      args.write(oprot_);
1073
      oprot_.writeMessageEnd();
1074
      oprot_.getTransport().flush();
1075
    }
1076
 
483 rajveer 1077
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1078
    {
1079
      TMessage msg = iprot_.readMessageBegin();
1080
      if (msg.type == TMessageType.EXCEPTION) {
1081
        TApplicationException x = TApplicationException.read(iprot_);
1082
        iprot_.readMessageEnd();
1083
        throw x;
1084
      }
483 rajveer 1085
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1086
      result.read(iprot_);
1087
      iprot_.readMessageEnd();
1088
      if (result.isSetSuccess()) {
1089
        return result.success;
1090
      }
1091
      if (result.ex != null) {
1092
        throw result.ex;
1093
      }
483 rajveer 1094
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1095
    }
1096
 
1529 ankur.sing 1097
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1098
    {
1099
      send_getOrderForCustomer(orderId, customerId);
1100
      return recv_getOrderForCustomer();
1101
    }
1102
 
1103
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1104
    {
1105
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1106
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1107
      args.orderId = orderId;
1108
      args.customerId = customerId;
1109
      args.write(oprot_);
1110
      oprot_.writeMessageEnd();
1111
      oprot_.getTransport().flush();
1112
    }
1113
 
1114
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1115
    {
1116
      TMessage msg = iprot_.readMessageBegin();
1117
      if (msg.type == TMessageType.EXCEPTION) {
1118
        TApplicationException x = TApplicationException.read(iprot_);
1119
        iprot_.readMessageEnd();
1120
        throw x;
1121
      }
1122
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1123
      result.read(iprot_);
1124
      iprot_.readMessageEnd();
1125
      if (result.isSetSuccess()) {
1126
        return result.success;
1127
      }
1128
      if (result.ex != null) {
1129
        throw result.ex;
1130
      }
1131
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1132
    }
1133
 
1221 chandransh 1134
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1135
    {
1136
      send_batchOrders(warehouseId);
1137
      return recv_batchOrders();
1138
    }
1139
 
1140
    public void send_batchOrders(long warehouseId) throws TException
1141
    {
1142
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1143
      batchOrders_args args = new batchOrders_args();
1144
      args.warehouseId = warehouseId;
1145
      args.write(oprot_);
1146
      oprot_.writeMessageEnd();
1147
      oprot_.getTransport().flush();
1148
    }
1149
 
1150
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1151
    {
1152
      TMessage msg = iprot_.readMessageBegin();
1153
      if (msg.type == TMessageType.EXCEPTION) {
1154
        TApplicationException x = TApplicationException.read(iprot_);
1155
        iprot_.readMessageEnd();
1156
        throw x;
1157
      }
1158
      batchOrders_result result = new batchOrders_result();
1159
      result.read(iprot_);
1160
      iprot_.readMessageEnd();
1161
      if (result.isSetSuccess()) {
1162
        return result.success;
1163
      }
1164
      if (result.ex != null) {
1165
        throw result.ex;
1166
      }
1167
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1168
    }
1169
 
1209 chandransh 1170
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1171
    {
1172
      send_markOrderAsOutOfStock(orderId);
1173
      return recv_markOrderAsOutOfStock();
1174
    }
1175
 
1176
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1177
    {
1178
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1179
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1180
      args.orderId = orderId;
1181
      args.write(oprot_);
1182
      oprot_.writeMessageEnd();
1183
      oprot_.getTransport().flush();
1184
    }
1185
 
1186
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1187
    {
1188
      TMessage msg = iprot_.readMessageBegin();
1189
      if (msg.type == TMessageType.EXCEPTION) {
1190
        TApplicationException x = TApplicationException.read(iprot_);
1191
        iprot_.readMessageEnd();
1192
        throw x;
1193
      }
1194
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1195
      result.read(iprot_);
1196
      iprot_.readMessageEnd();
1197
      if (result.isSetSuccess()) {
1198
        return result.success;
1199
      }
1200
      if (result.ex != null) {
1201
        throw result.ex;
1202
      }
1203
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1204
    }
1205
 
758 chandransh 1206
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1207
    {
1208
      send_markOrdersAsManifested(warehouseId, providerId);
1209
      return recv_markOrdersAsManifested();
1210
    }
1211
 
1212
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1213
    {
1214
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1215
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1216
      args.warehouseId = warehouseId;
1217
      args.providerId = providerId;
1218
      args.write(oprot_);
1219
      oprot_.writeMessageEnd();
1220
      oprot_.getTransport().flush();
1221
    }
1222
 
1223
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1224
    {
1225
      TMessage msg = iprot_.readMessageBegin();
1226
      if (msg.type == TMessageType.EXCEPTION) {
1227
        TApplicationException x = TApplicationException.read(iprot_);
1228
        iprot_.readMessageEnd();
1229
        throw x;
1230
      }
1231
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1232
      result.read(iprot_);
1233
      iprot_.readMessageEnd();
1234
      if (result.isSetSuccess()) {
1235
        return result.success;
1236
      }
1237
      if (result.ex != null) {
1238
        throw result.ex;
1239
      }
1240
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1241
    }
1242
 
1245 chandransh 1243
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1244
    {
1245
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1246
      return recv_markOrdersAsPickedUp();
1247
    }
1248
 
1245 chandransh 1249
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1250
    {
1251
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1252
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1253
      args.providerId = providerId;
1254
      args.pickupDetails = pickupDetails;
1255
      args.write(oprot_);
1256
      oprot_.writeMessageEnd();
1257
      oprot_.getTransport().flush();
1258
    }
1259
 
1260
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1261
    {
1262
      TMessage msg = iprot_.readMessageBegin();
1263
      if (msg.type == TMessageType.EXCEPTION) {
1264
        TApplicationException x = TApplicationException.read(iprot_);
1265
        iprot_.readMessageEnd();
1266
        throw x;
1267
      }
1268
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1269
      result.read(iprot_);
1270
      iprot_.readMessageEnd();
1271
      if (result.isSetSuccess()) {
1272
        return result.success;
1273
      }
1274
      if (result.ex != null) {
1275
        throw result.ex;
1276
      }
1277
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1278
    }
1279
 
1133 chandransh 1280
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1281
    {
1282
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1283
      recv_markOrdersAsDelivered();
1284
    }
1285
 
1286
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1287
    {
1288
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1289
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1290
      args.providerId = providerId;
1291
      args.deliveredOrders = deliveredOrders;
1292
      args.write(oprot_);
1293
      oprot_.writeMessageEnd();
1294
      oprot_.getTransport().flush();
1295
    }
1296
 
1297
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1298
    {
1299
      TMessage msg = iprot_.readMessageBegin();
1300
      if (msg.type == TMessageType.EXCEPTION) {
1301
        TApplicationException x = TApplicationException.read(iprot_);
1302
        iprot_.readMessageEnd();
1303
        throw x;
1304
      }
1305
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1306
      result.read(iprot_);
1307
      iprot_.readMessageEnd();
1308
      if (result.ex != null) {
1309
        throw result.ex;
1310
      }
1311
      return;
1312
    }
1313
 
1314
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1315
    {
1316
      send_markOrdersAsFailed(providerId, returnedOrders);
1317
      recv_markOrdersAsFailed();
1318
    }
1319
 
1320
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1321
    {
1322
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1323
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1324
      args.providerId = providerId;
1325
      args.returnedOrders = returnedOrders;
1326
      args.write(oprot_);
1327
      oprot_.writeMessageEnd();
1328
      oprot_.getTransport().flush();
1329
    }
1330
 
1331
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1332
    {
1333
      TMessage msg = iprot_.readMessageBegin();
1334
      if (msg.type == TMessageType.EXCEPTION) {
1335
        TApplicationException x = TApplicationException.read(iprot_);
1336
        iprot_.readMessageEnd();
1337
        throw x;
1338
      }
1339
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1340
      result.read(iprot_);
1341
      iprot_.readMessageEnd();
1342
      if (result.ex != null) {
1343
        throw result.ex;
1344
      }
1345
      return;
1346
    }
1347
 
1245 chandransh 1348
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1349
    {
1350
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1351
      recv_updateNonDeliveryReason();
1352
    }
1353
 
1354
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1355
    {
1356
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1357
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1358
      args.providerId = providerId;
1359
      args.undeliveredOrders = undeliveredOrders;
1360
      args.write(oprot_);
1361
      oprot_.writeMessageEnd();
1362
      oprot_.getTransport().flush();
1363
    }
1364
 
1365
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1366
    {
1367
      TMessage msg = iprot_.readMessageBegin();
1368
      if (msg.type == TMessageType.EXCEPTION) {
1369
        TApplicationException x = TApplicationException.read(iprot_);
1370
        iprot_.readMessageEnd();
1371
        throw x;
1372
      }
1373
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1374
      result.read(iprot_);
1375
      iprot_.readMessageEnd();
1376
      if (result.ex != null) {
1377
        throw result.ex;
1378
      }
1379
      return;
1380
    }
1381
 
1406 ankur.sing 1382
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1383
    {
1384
      send_getUndeliveredOrders(providerId, warehouseId);
1385
      return recv_getUndeliveredOrders();
1386
    }
1387
 
1388
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1389
    {
1390
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1391
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1392
      args.providerId = providerId;
1393
      args.warehouseId = warehouseId;
1394
      args.write(oprot_);
1395
      oprot_.writeMessageEnd();
1396
      oprot_.getTransport().flush();
1397
    }
1398
 
1399
    public List<Order> recv_getUndeliveredOrders() throws TException
1400
    {
1401
      TMessage msg = iprot_.readMessageBegin();
1402
      if (msg.type == TMessageType.EXCEPTION) {
1403
        TApplicationException x = TApplicationException.read(iprot_);
1404
        iprot_.readMessageEnd();
1405
        throw x;
1406
      }
1407
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1408
      result.read(iprot_);
1409
      iprot_.readMessageEnd();
1410
      if (result.isSetSuccess()) {
1411
        return result.success;
1412
      }
1413
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1414
    }
1415
 
483 rajveer 1416
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1417
    {
483 rajveer 1418
      send_getAlerts(orderId, valid);
305 ashish 1419
      return recv_getAlerts();
1420
    }
1421
 
483 rajveer 1422
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1423
    {
1424
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1425
      getAlerts_args args = new getAlerts_args();
483 rajveer 1426
      args.orderId = orderId;
305 ashish 1427
      args.valid = valid;
1428
      args.write(oprot_);
1429
      oprot_.writeMessageEnd();
1430
      oprot_.getTransport().flush();
1431
    }
1432
 
1433
    public List<Alert> recv_getAlerts() throws TException
1434
    {
1435
      TMessage msg = iprot_.readMessageBegin();
1436
      if (msg.type == TMessageType.EXCEPTION) {
1437
        TApplicationException x = TApplicationException.read(iprot_);
1438
        iprot_.readMessageEnd();
1439
        throw x;
1440
      }
1441
      getAlerts_result result = new getAlerts_result();
1442
      result.read(iprot_);
1443
      iprot_.readMessageEnd();
1444
      if (result.isSetSuccess()) {
1445
        return result.success;
1446
      }
1447
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1448
    }
1449
 
483 rajveer 1450
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1451
    {
483 rajveer 1452
      send_setAlert(orderId, unset, type, comment);
305 ashish 1453
      recv_setAlert();
1454
    }
1455
 
483 rajveer 1456
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1457
    {
1458
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1459
      setAlert_args args = new setAlert_args();
483 rajveer 1460
      args.orderId = orderId;
305 ashish 1461
      args.unset = unset;
1462
      args.type = type;
1463
      args.comment = comment;
1464
      args.write(oprot_);
1465
      oprot_.writeMessageEnd();
1466
      oprot_.getTransport().flush();
1467
    }
1468
 
1469
    public void recv_setAlert() throws TException
1470
    {
1471
      TMessage msg = iprot_.readMessageBegin();
1472
      if (msg.type == TMessageType.EXCEPTION) {
1473
        TApplicationException x = TApplicationException.read(iprot_);
1474
        iprot_.readMessageEnd();
1475
        throw x;
1476
      }
1477
      setAlert_result result = new setAlert_result();
1478
      result.read(iprot_);
1479
      iprot_.readMessageEnd();
1480
      return;
1481
    }
1482
 
1598 ankur.sing 1483
    public long getValidOrderCount() throws TException
1484
    {
1485
      send_getValidOrderCount();
1486
      return recv_getValidOrderCount();
1487
    }
1488
 
1489
    public void send_getValidOrderCount() throws TException
1490
    {
1491
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1492
      getValidOrderCount_args args = new getValidOrderCount_args();
1493
      args.write(oprot_);
1494
      oprot_.writeMessageEnd();
1495
      oprot_.getTransport().flush();
1496
    }
1497
 
1498
    public long recv_getValidOrderCount() throws TException
1499
    {
1500
      TMessage msg = iprot_.readMessageBegin();
1501
      if (msg.type == TMessageType.EXCEPTION) {
1502
        TApplicationException x = TApplicationException.read(iprot_);
1503
        iprot_.readMessageEnd();
1504
        throw x;
1505
      }
1506
      getValidOrderCount_result result = new getValidOrderCount_result();
1507
      result.read(iprot_);
1508
      iprot_.readMessageEnd();
1509
      if (result.isSetSuccess()) {
1510
        return result.success;
1511
      }
1512
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1513
    }
1514
 
1629 ankur.sing 1515
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException
1516
    {
1517
      send_getNoOfCustomersWithSuccessfulTransaction();
1518
      return recv_getNoOfCustomersWithSuccessfulTransaction();
1519
    }
1520
 
1521
    public void send_getNoOfCustomersWithSuccessfulTransaction() throws TException
1522
    {
1523
      oprot_.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.CALL, seqid_));
1524
      getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
1525
      args.write(oprot_);
1526
      oprot_.writeMessageEnd();
1527
      oprot_.getTransport().flush();
1528
    }
1529
 
1530
    public long recv_getNoOfCustomersWithSuccessfulTransaction() throws TException
1531
    {
1532
      TMessage msg = iprot_.readMessageBegin();
1533
      if (msg.type == TMessageType.EXCEPTION) {
1534
        TApplicationException x = TApplicationException.read(iprot_);
1535
        iprot_.readMessageEnd();
1536
        throw x;
1537
      }
1538
      getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
1539
      result.read(iprot_);
1540
      iprot_.readMessageEnd();
1541
      if (result.isSetSuccess()) {
1542
        return result.success;
1543
      }
1544
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1545
    }
1546
 
1731 ankur.sing 1547
    public List<Double> getValidOrdersAmountRange() throws TException
1629 ankur.sing 1548
    {
1731 ankur.sing 1549
      send_getValidOrdersAmountRange();
1550
      return recv_getValidOrdersAmountRange();
1629 ankur.sing 1551
    }
1552
 
1731 ankur.sing 1553
    public void send_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1554
    {
1731 ankur.sing 1555
      oprot_.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.CALL, seqid_));
1556
      getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 1557
      args.write(oprot_);
1558
      oprot_.writeMessageEnd();
1559
      oprot_.getTransport().flush();
1560
    }
1561
 
1731 ankur.sing 1562
    public List<Double> recv_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1563
    {
1564
      TMessage msg = iprot_.readMessageBegin();
1565
      if (msg.type == TMessageType.EXCEPTION) {
1566
        TApplicationException x = TApplicationException.read(iprot_);
1567
        iprot_.readMessageEnd();
1568
        throw x;
1569
      }
1731 ankur.sing 1570
      getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
1629 ankur.sing 1571
      result.read(iprot_);
1572
      iprot_.readMessageEnd();
1573
      if (result.isSetSuccess()) {
1574
        return result.success;
1575
      }
1731 ankur.sing 1576
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1629 ankur.sing 1577
    }
1578
 
1886 ankur.sing 1579
    public List<Order> getValidOrders(long limit) throws TException
1580
    {
1581
      send_getValidOrders(limit);
1582
      return recv_getValidOrders();
1583
    }
1584
 
1585
    public void send_getValidOrders(long limit) throws TException
1586
    {
1587
      oprot_.writeMessageBegin(new TMessage("getValidOrders", TMessageType.CALL, seqid_));
1588
      getValidOrders_args args = new getValidOrders_args();
1589
      args.limit = limit;
1590
      args.write(oprot_);
1591
      oprot_.writeMessageEnd();
1592
      oprot_.getTransport().flush();
1593
    }
1594
 
1595
    public List<Order> recv_getValidOrders() throws TException
1596
    {
1597
      TMessage msg = iprot_.readMessageBegin();
1598
      if (msg.type == TMessageType.EXCEPTION) {
1599
        TApplicationException x = TApplicationException.read(iprot_);
1600
        iprot_.readMessageEnd();
1601
        throw x;
1602
      }
1603
      getValidOrders_result result = new getValidOrders_result();
1604
      result.read(iprot_);
1605
      iprot_.readMessageEnd();
1606
      if (result.isSetSuccess()) {
1607
        return result.success;
1608
      }
1609
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1610
    }
1611
 
2538 chandransh 1612
    public boolean toggleDOAFlag(long orderId) throws TransactionServiceException, TException
1613
    {
1614
      send_toggleDOAFlag(orderId);
1615
      return recv_toggleDOAFlag();
1616
    }
1617
 
1618
    public void send_toggleDOAFlag(long orderId) throws TException
1619
    {
1620
      oprot_.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.CALL, seqid_));
1621
      toggleDOAFlag_args args = new toggleDOAFlag_args();
1622
      args.orderId = orderId;
1623
      args.write(oprot_);
1624
      oprot_.writeMessageEnd();
1625
      oprot_.getTransport().flush();
1626
    }
1627
 
1628
    public boolean recv_toggleDOAFlag() throws TransactionServiceException, TException
1629
    {
1630
      TMessage msg = iprot_.readMessageBegin();
1631
      if (msg.type == TMessageType.EXCEPTION) {
1632
        TApplicationException x = TApplicationException.read(iprot_);
1633
        iprot_.readMessageEnd();
1634
        throw x;
1635
      }
1636
      toggleDOAFlag_result result = new toggleDOAFlag_result();
1637
      result.read(iprot_);
1638
      iprot_.readMessageEnd();
1639
      if (result.isSetSuccess()) {
1640
        return result.success;
1641
      }
1642
      if (result.ex != null) {
1643
        throw result.ex;
1644
      }
1645
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "toggleDOAFlag failed: unknown result");
1646
    }
1647
 
1648
    public boolean requestPickupNumber(long orderId) throws TransactionServiceException, TException
1649
    {
1650
      send_requestPickupNumber(orderId);
1651
      return recv_requestPickupNumber();
1652
    }
1653
 
1654
    public void send_requestPickupNumber(long orderId) throws TException
1655
    {
1656
      oprot_.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.CALL, seqid_));
1657
      requestPickupNumber_args args = new requestPickupNumber_args();
1658
      args.orderId = orderId;
1659
      args.write(oprot_);
1660
      oprot_.writeMessageEnd();
1661
      oprot_.getTransport().flush();
1662
    }
1663
 
1664
    public boolean recv_requestPickupNumber() throws TransactionServiceException, TException
1665
    {
1666
      TMessage msg = iprot_.readMessageBegin();
1667
      if (msg.type == TMessageType.EXCEPTION) {
1668
        TApplicationException x = TApplicationException.read(iprot_);
1669
        iprot_.readMessageEnd();
1670
        throw x;
1671
      }
1672
      requestPickupNumber_result result = new requestPickupNumber_result();
1673
      result.read(iprot_);
1674
      iprot_.readMessageEnd();
1675
      if (result.isSetSuccess()) {
1676
        return result.success;
1677
      }
1678
      if (result.ex != null) {
1679
        throw result.ex;
1680
      }
1681
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "requestPickupNumber failed: unknown result");
1682
    }
1683
 
1684
    public boolean authorizePickup(long orderId, String pickupNumber) throws TransactionServiceException, TException
1685
    {
1686
      send_authorizePickup(orderId, pickupNumber);
1687
      return recv_authorizePickup();
1688
    }
1689
 
1690
    public void send_authorizePickup(long orderId, String pickupNumber) throws TException
1691
    {
1692
      oprot_.writeMessageBegin(new TMessage("authorizePickup", TMessageType.CALL, seqid_));
1693
      authorizePickup_args args = new authorizePickup_args();
1694
      args.orderId = orderId;
1695
      args.pickupNumber = pickupNumber;
1696
      args.write(oprot_);
1697
      oprot_.writeMessageEnd();
1698
      oprot_.getTransport().flush();
1699
    }
1700
 
1701
    public boolean recv_authorizePickup() throws TransactionServiceException, TException
1702
    {
1703
      TMessage msg = iprot_.readMessageBegin();
1704
      if (msg.type == TMessageType.EXCEPTION) {
1705
        TApplicationException x = TApplicationException.read(iprot_);
1706
        iprot_.readMessageEnd();
1707
        throw x;
1708
      }
1709
      authorizePickup_result result = new authorizePickup_result();
1710
      result.read(iprot_);
1711
      iprot_.readMessageEnd();
1712
      if (result.isSetSuccess()) {
1713
        return result.success;
1714
      }
1715
      if (result.ex != null) {
1716
        throw result.ex;
1717
      }
1718
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "authorizePickup failed: unknown result");
1719
    }
1720
 
68 ashish 1721
  }
1722
  public static class Processor implements TProcessor {
1723
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1724
    public Processor(Iface iface)
1725
    {
1726
      iface_ = iface;
764 rajveer 1727
      processMap_.put("closeSession", new closeSession());
68 ashish 1728
      processMap_.put("createTransaction", new createTransaction());
1729
      processMap_.put("getTransaction", new getTransaction());
1730
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1731
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1732
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1733
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1734
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1735
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1736
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1737
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1738
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1739
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1740
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1741
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1742
      processMap_.put("acceptOrder", new acceptOrder());
1743
      processMap_.put("billOrder", new billOrder());
483 rajveer 1744
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1745
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1746
      processMap_.put("createOrder", new createOrder());
1747
      processMap_.put("getOrder", new getOrder());
1748
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 1749
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 1750
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1751
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1752
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1753
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1754
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1755
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1756
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1757
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1758
      processMap_.put("getAlerts", new getAlerts());
1759
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 1760
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1629 ankur.sing 1761
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1731 ankur.sing 1762
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1886 ankur.sing 1763
      processMap_.put("getValidOrders", new getValidOrders());
2538 chandransh 1764
      processMap_.put("toggleDOAFlag", new toggleDOAFlag());
1765
      processMap_.put("requestPickupNumber", new requestPickupNumber());
1766
      processMap_.put("authorizePickup", new authorizePickup());
68 ashish 1767
    }
1768
 
1769
    protected static interface ProcessFunction {
1770
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1771
    }
1772
 
1773
    private Iface iface_;
1774
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1775
 
1776
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1777
    {
1778
      TMessage msg = iprot.readMessageBegin();
1779
      ProcessFunction fn = processMap_.get(msg.name);
1780
      if (fn == null) {
1781
        TProtocolUtil.skip(iprot, TType.STRUCT);
1782
        iprot.readMessageEnd();
1783
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1784
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1785
        x.write(oprot);
1786
        oprot.writeMessageEnd();
1787
        oprot.getTransport().flush();
1788
        return true;
1789
      }
1790
      fn.process(msg.seqid, iprot, oprot);
1791
      return true;
1792
    }
1793
 
764 rajveer 1794
    private class closeSession implements ProcessFunction {
1795
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1796
      {
1797
        closeSession_args args = new closeSession_args();
1798
        args.read(iprot);
1799
        iprot.readMessageEnd();
1800
        closeSession_result result = new closeSession_result();
1801
        iface_.closeSession();
1802
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1803
        result.write(oprot);
1804
        oprot.writeMessageEnd();
1805
        oprot.getTransport().flush();
1806
      }
1807
 
1808
    }
1809
 
68 ashish 1810
    private class createTransaction implements ProcessFunction {
1811
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1812
      {
1813
        createTransaction_args args = new createTransaction_args();
1814
        args.read(iprot);
1815
        iprot.readMessageEnd();
1816
        createTransaction_result result = new createTransaction_result();
1817
        try {
132 ashish 1818
          result.success = iface_.createTransaction(args.transaction);
1819
          result.setSuccessIsSet(true);
68 ashish 1820
        } catch (TransactionServiceException ex) {
1821
          result.ex = ex;
1822
        } catch (Throwable th) {
1823
          LOGGER.error("Internal error processing createTransaction", th);
1824
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1825
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1826
          x.write(oprot);
1827
          oprot.writeMessageEnd();
1828
          oprot.getTransport().flush();
1829
          return;
1830
        }
1831
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1832
        result.write(oprot);
1833
        oprot.writeMessageEnd();
1834
        oprot.getTransport().flush();
1835
      }
1836
 
1837
    }
1838
 
1839
    private class getTransaction implements ProcessFunction {
1840
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1841
      {
1842
        getTransaction_args args = new getTransaction_args();
1843
        args.read(iprot);
1844
        iprot.readMessageEnd();
1845
        getTransaction_result result = new getTransaction_result();
1846
        try {
1847
          result.success = iface_.getTransaction(args.id);
1848
        } catch (TransactionServiceException ex) {
1849
          result.ex = ex;
1850
        } catch (Throwable th) {
1851
          LOGGER.error("Internal error processing getTransaction", th);
1852
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1853
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1854
          x.write(oprot);
1855
          oprot.writeMessageEnd();
1856
          oprot.getTransport().flush();
1857
          return;
1858
        }
1859
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1860
        result.write(oprot);
1861
        oprot.writeMessageEnd();
1862
        oprot.getTransport().flush();
1863
      }
1864
 
1865
    }
1866
 
1867
    private class getTransactionsForCustomer implements ProcessFunction {
1868
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1869
      {
1870
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1871
        args.read(iprot);
1872
        iprot.readMessageEnd();
1873
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1874
        try {
132 ashish 1875
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1876
        } catch (TransactionServiceException ex) {
1877
          result.ex = ex;
1878
        } catch (Throwable th) {
1879
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1880
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1881
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1882
          x.write(oprot);
1883
          oprot.writeMessageEnd();
1884
          oprot.getTransport().flush();
1885
          return;
1886
        }
1887
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1888
        result.write(oprot);
1889
        oprot.writeMessageEnd();
1890
        oprot.getTransport().flush();
1891
      }
1892
 
1893
    }
1894
 
132 ashish 1895
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1896
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1897
      {
1898
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1899
        args.read(iprot);
1900
        iprot.readMessageEnd();
1901
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1902
        try {
1903
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1904
        } catch (TransactionServiceException ex) {
1905
          result.ex = ex;
1906
        } catch (Throwable th) {
1907
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1908
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1909
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1910
          x.write(oprot);
1911
          oprot.writeMessageEnd();
1912
          oprot.getTransport().flush();
1913
          return;
1914
        }
1915
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1916
        result.write(oprot);
1917
        oprot.writeMessageEnd();
1918
        oprot.getTransport().flush();
1919
      }
1920
 
1921
    }
1922
 
68 ashish 1923
    private class getTransactionStatus implements ProcessFunction {
1924
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1925
      {
1926
        getTransactionStatus_args args = new getTransactionStatus_args();
1927
        args.read(iprot);
1928
        iprot.readMessageEnd();
1929
        getTransactionStatus_result result = new getTransactionStatus_result();
1930
        try {
1931
          result.success = iface_.getTransactionStatus(args.transactionId);
1932
        } catch (TransactionServiceException ex) {
1933
          result.ex = ex;
1934
        } catch (Throwable th) {
1935
          LOGGER.error("Internal error processing getTransactionStatus", th);
1936
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1937
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1938
          x.write(oprot);
1939
          oprot.writeMessageEnd();
1940
          oprot.getTransport().flush();
1941
          return;
1942
        }
1943
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1944
        result.write(oprot);
1945
        oprot.writeMessageEnd();
1946
        oprot.getTransport().flush();
1947
      }
1948
 
1949
    }
1950
 
1951
    private class changeTransactionStatus implements ProcessFunction {
1952
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1953
      {
1954
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1955
        args.read(iprot);
1956
        iprot.readMessageEnd();
1957
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1958
        try {
1959
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1960
          result.setSuccessIsSet(true);
1961
        } catch (TransactionServiceException ex) {
1962
          result.ex = ex;
1963
        } catch (Throwable th) {
1964
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1965
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1966
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1967
          x.write(oprot);
1968
          oprot.writeMessageEnd();
1969
          oprot.getTransport().flush();
1970
          return;
1971
        }
1972
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1973
        result.write(oprot);
1974
        oprot.writeMessageEnd();
1975
        oprot.getTransport().flush();
1976
      }
1977
 
1978
    }
1979
 
1398 varun.gupt 1980
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 1981
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1982
      {
1398 varun.gupt 1983
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 1984
        args.read(iprot);
1985
        iprot.readMessageEnd();
1398 varun.gupt 1986
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 1987
        try {
1398 varun.gupt 1988
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 1989
          result.setSuccessIsSet(true);
1990
        } catch (TransactionServiceException ex) {
1991
          result.ex = ex;
1992
        } catch (Throwable th) {
1398 varun.gupt 1993
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
1994
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
1995
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 1996
          x.write(oprot);
1997
          oprot.writeMessageEnd();
1998
          oprot.getTransport().flush();
1999
          return;
2000
        }
1398 varun.gupt 2001
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 2002
        result.write(oprot);
2003
        oprot.writeMessageEnd();
2004
        oprot.getTransport().flush();
2005
      }
2006
 
2007
    }
2008
 
483 rajveer 2009
    private class getAllOrders implements ProcessFunction {
68 ashish 2010
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2011
      {
483 rajveer 2012
        getAllOrders_args args = new getAllOrders_args();
68 ashish 2013
        args.read(iprot);
2014
        iprot.readMessageEnd();
483 rajveer 2015
        getAllOrders_result result = new getAllOrders_result();
68 ashish 2016
        try {
483 rajveer 2017
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 2018
        } catch (TransactionServiceException ex) {
2019
          result.ex = ex;
2020
        } catch (Throwable th) {
483 rajveer 2021
          LOGGER.error("Internal error processing getAllOrders", th);
2022
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
2023
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 2024
          x.write(oprot);
2025
          oprot.writeMessageEnd();
2026
          oprot.getTransport().flush();
2027
          return;
2028
        }
483 rajveer 2029
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 2030
        result.write(oprot);
2031
        oprot.writeMessageEnd();
2032
        oprot.getTransport().flush();
2033
      }
2034
 
2035
    }
2036
 
1022 varun.gupt 2037
    private class getOrdersByBillingDate implements ProcessFunction {
2038
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2039
      {
2040
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
2041
        args.read(iprot);
2042
        iprot.readMessageEnd();
2043
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
2044
        try {
2045
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
2046
        } catch (TransactionServiceException ex) {
2047
          result.ex = ex;
2048
        } catch (Throwable th) {
2049
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
2050
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
2051
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
2052
          x.write(oprot);
2053
          oprot.writeMessageEnd();
2054
          oprot.getTransport().flush();
2055
          return;
2056
        }
2057
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
2058
        result.write(oprot);
2059
        oprot.writeMessageEnd();
2060
        oprot.getTransport().flush();
2061
      }
2062
 
2063
    }
2064
 
1382 varun.gupt 2065
    private class getReturnableOrdersForCustomer implements ProcessFunction {
2066
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2067
      {
2068
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
2069
        args.read(iprot);
2070
        iprot.readMessageEnd();
2071
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
2072
        try {
2073
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
2074
        } catch (TransactionServiceException ex) {
2075
          result.ex = ex;
2076
        } catch (Throwable th) {
2077
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
2078
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
2079
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2080
          x.write(oprot);
2081
          oprot.writeMessageEnd();
2082
          oprot.getTransport().flush();
2083
          return;
2084
        }
2085
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
2086
        result.write(oprot);
2087
        oprot.writeMessageEnd();
2088
        oprot.getTransport().flush();
2089
      }
2090
 
2091
    }
2092
 
2093
    private class getCancellableOrdersForCustomer implements ProcessFunction {
2094
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2095
      {
2096
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
2097
        args.read(iprot);
2098
        iprot.readMessageEnd();
2099
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
2100
        try {
2101
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
2102
        } catch (TransactionServiceException ex) {
2103
          result.ex = ex;
2104
        } catch (Throwable th) {
2105
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
2106
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
2107
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
2108
          x.write(oprot);
2109
          oprot.writeMessageEnd();
2110
          oprot.getTransport().flush();
2111
          return;
2112
        }
2113
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
2114
        result.write(oprot);
2115
        oprot.writeMessageEnd();
2116
        oprot.getTransport().flush();
2117
      }
2118
 
2119
    }
2120
 
483 rajveer 2121
    private class changeOrderStatus implements ProcessFunction {
68 ashish 2122
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2123
      {
483 rajveer 2124
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 2125
        args.read(iprot);
2126
        iprot.readMessageEnd();
483 rajveer 2127
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 2128
        try {
483 rajveer 2129
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 2130
          result.setSuccessIsSet(true);
2131
        } catch (TransactionServiceException ex) {
2132
          result.ex = ex;
2133
        } catch (Throwable th) {
483 rajveer 2134
          LOGGER.error("Internal error processing changeOrderStatus", th);
2135
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
2136
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 2137
          x.write(oprot);
2138
          oprot.writeMessageEnd();
2139
          oprot.getTransport().flush();
2140
          return;
2141
        }
483 rajveer 2142
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 2143
        result.write(oprot);
2144
        oprot.writeMessageEnd();
2145
        oprot.getTransport().flush();
2146
      }
2147
 
2148
    }
2149
 
495 rajveer 2150
    private class addBillingDetails implements ProcessFunction {
2151
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2152
      {
2153
        addBillingDetails_args args = new addBillingDetails_args();
2154
        args.read(iprot);
2155
        iprot.readMessageEnd();
2156
        addBillingDetails_result result = new addBillingDetails_result();
2157
        try {
1148 chandransh 2158
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 2159
          result.setSuccessIsSet(true);
2160
        } catch (TransactionServiceException ex) {
2161
          result.ex = ex;
2162
        } catch (Throwable th) {
2163
          LOGGER.error("Internal error processing addBillingDetails", th);
2164
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
2165
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
2166
          x.write(oprot);
2167
          oprot.writeMessageEnd();
2168
          oprot.getTransport().flush();
2169
          return;
2170
        }
2171
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
2172
        result.write(oprot);
2173
        oprot.writeMessageEnd();
2174
        oprot.getTransport().flush();
2175
      }
2176
 
2177
    }
2178
 
1148 chandransh 2179
    private class addJacketNumber implements ProcessFunction {
2180
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2181
      {
2182
        addJacketNumber_args args = new addJacketNumber_args();
2183
        args.read(iprot);
2184
        iprot.readMessageEnd();
2185
        addJacketNumber_result result = new addJacketNumber_result();
2186
        try {
2383 rajveer 2187
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1148 chandransh 2188
          result.setSuccessIsSet(true);
2189
        } catch (TransactionServiceException ex) {
2190
          result.ex = ex;
2191
        } catch (Throwable th) {
2192
          LOGGER.error("Internal error processing addJacketNumber", th);
2193
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
2194
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
2195
          x.write(oprot);
2196
          oprot.writeMessageEnd();
2197
          oprot.getTransport().flush();
2198
          return;
2199
        }
2200
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
2201
        result.write(oprot);
2202
        oprot.writeMessageEnd();
2203
        oprot.getTransport().flush();
2204
      }
2205
 
2206
    }
2207
 
923 rajveer 2208
    private class acceptOrder implements ProcessFunction {
2209
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2210
      {
2211
        acceptOrder_args args = new acceptOrder_args();
2212
        args.read(iprot);
2213
        iprot.readMessageEnd();
2214
        acceptOrder_result result = new acceptOrder_result();
2215
        try {
2216
          result.success = iface_.acceptOrder(args.orderId);
2217
          result.setSuccessIsSet(true);
2218
        } catch (TransactionServiceException ex) {
2219
          result.ex = ex;
2220
        } catch (Throwable th) {
2221
          LOGGER.error("Internal error processing acceptOrder", th);
2222
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
2223
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
2224
          x.write(oprot);
2225
          oprot.writeMessageEnd();
2226
          oprot.getTransport().flush();
2227
          return;
2228
        }
2229
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
2230
        result.write(oprot);
2231
        oprot.writeMessageEnd();
2232
        oprot.getTransport().flush();
2233
      }
2234
 
2235
    }
2236
 
2237
    private class billOrder implements ProcessFunction {
2238
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2239
      {
2240
        billOrder_args args = new billOrder_args();
2241
        args.read(iprot);
2242
        iprot.readMessageEnd();
2243
        billOrder_result result = new billOrder_result();
2244
        try {
2245
          result.success = iface_.billOrder(args.orderId);
2246
          result.setSuccessIsSet(true);
2247
        } catch (TransactionServiceException ex) {
2248
          result.ex = ex;
2249
        } catch (Throwable th) {
2250
          LOGGER.error("Internal error processing billOrder", th);
2251
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
2252
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
2253
          x.write(oprot);
2254
          oprot.writeMessageEnd();
2255
          oprot.getTransport().flush();
2256
          return;
2257
        }
2258
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
2259
        result.write(oprot);
2260
        oprot.writeMessageEnd();
2261
        oprot.getTransport().flush();
2262
      }
2263
 
2264
    }
2265
 
483 rajveer 2266
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2267
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2268
      {
483 rajveer 2269
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2270
        args.read(iprot);
2271
        iprot.readMessageEnd();
483 rajveer 2272
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2273
        try {
1529 ankur.sing 2274
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2275
        } catch (TransactionServiceException ex) {
2276
          result.ex = ex;
2277
        } catch (Throwable th) {
483 rajveer 2278
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2279
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2280
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2281
          x.write(oprot);
2282
          oprot.writeMessageEnd();
2283
          oprot.getTransport().flush();
2284
          return;
2285
        }
483 rajveer 2286
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2287
        result.write(oprot);
2288
        oprot.writeMessageEnd();
2289
        oprot.getTransport().flush();
2290
      }
2291
 
2292
    }
2293
 
483 rajveer 2294
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2295
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2296
      {
483 rajveer 2297
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2298
        args.read(iprot);
2299
        iprot.readMessageEnd();
483 rajveer 2300
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2301
        try {
483 rajveer 2302
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2303
        } catch (TransactionServiceException ex) {
2304
          result.ex = ex;
2305
        } catch (Throwable th) {
483 rajveer 2306
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2307
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2308
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2309
          x.write(oprot);
2310
          oprot.writeMessageEnd();
2311
          oprot.getTransport().flush();
2312
          return;
2313
        }
483 rajveer 2314
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2315
        result.write(oprot);
2316
        oprot.writeMessageEnd();
2317
        oprot.getTransport().flush();
2318
      }
2319
 
2320
    }
2321
 
483 rajveer 2322
    private class createOrder implements ProcessFunction {
68 ashish 2323
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2324
      {
483 rajveer 2325
        createOrder_args args = new createOrder_args();
68 ashish 2326
        args.read(iprot);
2327
        iprot.readMessageEnd();
483 rajveer 2328
        createOrder_result result = new createOrder_result();
68 ashish 2329
        try {
483 rajveer 2330
          result.success = iface_.createOrder(args.order);
68 ashish 2331
          result.setSuccessIsSet(true);
2332
        } catch (TransactionServiceException ex) {
2333
          result.ex = ex;
2334
        } catch (Throwable th) {
483 rajveer 2335
          LOGGER.error("Internal error processing createOrder", th);
2336
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2337
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2338
          x.write(oprot);
2339
          oprot.writeMessageEnd();
2340
          oprot.getTransport().flush();
2341
          return;
2342
        }
483 rajveer 2343
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2344
        result.write(oprot);
2345
        oprot.writeMessageEnd();
2346
        oprot.getTransport().flush();
2347
      }
2348
 
2349
    }
2350
 
483 rajveer 2351
    private class getOrder implements ProcessFunction {
68 ashish 2352
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2353
      {
483 rajveer 2354
        getOrder_args args = new getOrder_args();
68 ashish 2355
        args.read(iprot);
2356
        iprot.readMessageEnd();
483 rajveer 2357
        getOrder_result result = new getOrder_result();
68 ashish 2358
        try {
483 rajveer 2359
          result.success = iface_.getOrder(args.id);
68 ashish 2360
        } catch (TransactionServiceException ex) {
2361
          result.ex = ex;
2362
        } catch (Throwable th) {
483 rajveer 2363
          LOGGER.error("Internal error processing getOrder", th);
2364
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2365
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2366
          x.write(oprot);
2367
          oprot.writeMessageEnd();
2368
          oprot.getTransport().flush();
2369
          return;
2370
        }
483 rajveer 2371
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2372
        result.write(oprot);
2373
        oprot.writeMessageEnd();
2374
        oprot.getTransport().flush();
2375
      }
2376
 
2377
    }
2378
 
483 rajveer 2379
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2380
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2381
      {
483 rajveer 2382
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2383
        args.read(iprot);
2384
        iprot.readMessageEnd();
483 rajveer 2385
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2386
        try {
483 rajveer 2387
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2388
        } catch (TransactionServiceException ex) {
2389
          result.ex = ex;
2390
        } catch (Throwable th) {
483 rajveer 2391
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2392
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2393
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2394
          x.write(oprot);
2395
          oprot.writeMessageEnd();
2396
          oprot.getTransport().flush();
2397
          return;
2398
        }
483 rajveer 2399
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2400
        result.write(oprot);
2401
        oprot.writeMessageEnd();
2402
        oprot.getTransport().flush();
2403
      }
2404
 
2405
    }
2406
 
1529 ankur.sing 2407
    private class getOrderForCustomer implements ProcessFunction {
2408
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2409
      {
2410
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2411
        args.read(iprot);
2412
        iprot.readMessageEnd();
2413
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2414
        try {
2415
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2416
        } catch (TransactionServiceException ex) {
2417
          result.ex = ex;
2418
        } catch (Throwable th) {
2419
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2420
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2421
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2422
          x.write(oprot);
2423
          oprot.writeMessageEnd();
2424
          oprot.getTransport().flush();
2425
          return;
2426
        }
2427
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2428
        result.write(oprot);
2429
        oprot.writeMessageEnd();
2430
        oprot.getTransport().flush();
2431
      }
2432
 
2433
    }
2434
 
1221 chandransh 2435
    private class batchOrders implements ProcessFunction {
2436
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2437
      {
2438
        batchOrders_args args = new batchOrders_args();
2439
        args.read(iprot);
2440
        iprot.readMessageEnd();
2441
        batchOrders_result result = new batchOrders_result();
2442
        try {
2443
          result.success = iface_.batchOrders(args.warehouseId);
2444
        } catch (TransactionServiceException ex) {
2445
          result.ex = ex;
2446
        } catch (Throwable th) {
2447
          LOGGER.error("Internal error processing batchOrders", th);
2448
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2449
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2450
          x.write(oprot);
2451
          oprot.writeMessageEnd();
2452
          oprot.getTransport().flush();
2453
          return;
2454
        }
2455
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2456
        result.write(oprot);
2457
        oprot.writeMessageEnd();
2458
        oprot.getTransport().flush();
2459
      }
2460
 
2461
    }
2462
 
1209 chandransh 2463
    private class markOrderAsOutOfStock implements ProcessFunction {
2464
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2465
      {
2466
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2467
        args.read(iprot);
2468
        iprot.readMessageEnd();
2469
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2470
        try {
2471
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2472
          result.setSuccessIsSet(true);
2473
        } catch (TransactionServiceException ex) {
2474
          result.ex = ex;
2475
        } catch (Throwable th) {
2476
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2477
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2478
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2479
          x.write(oprot);
2480
          oprot.writeMessageEnd();
2481
          oprot.getTransport().flush();
2482
          return;
2483
        }
2484
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2485
        result.write(oprot);
2486
        oprot.writeMessageEnd();
2487
        oprot.getTransport().flush();
2488
      }
2489
 
2490
    }
2491
 
758 chandransh 2492
    private class markOrdersAsManifested implements ProcessFunction {
2493
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2494
      {
2495
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2496
        args.read(iprot);
2497
        iprot.readMessageEnd();
2498
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2499
        try {
2500
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2501
          result.setSuccessIsSet(true);
2502
        } catch (TransactionServiceException ex) {
2503
          result.ex = ex;
2504
        } catch (Throwable th) {
2505
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2506
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2507
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2508
          x.write(oprot);
2509
          oprot.writeMessageEnd();
2510
          oprot.getTransport().flush();
2511
          return;
2512
        }
2513
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2514
        result.write(oprot);
2515
        oprot.writeMessageEnd();
2516
        oprot.getTransport().flush();
2517
      }
2518
 
2519
    }
2520
 
1114 chandransh 2521
    private class markOrdersAsPickedUp implements ProcessFunction {
2522
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2523
      {
2524
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2525
        args.read(iprot);
2526
        iprot.readMessageEnd();
2527
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2528
        try {
2529
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2530
        } catch (TransactionServiceException ex) {
2531
          result.ex = ex;
2532
        } catch (Throwable th) {
2533
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2534
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2535
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2536
          x.write(oprot);
2537
          oprot.writeMessageEnd();
2538
          oprot.getTransport().flush();
2539
          return;
2540
        }
2541
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2542
        result.write(oprot);
2543
        oprot.writeMessageEnd();
2544
        oprot.getTransport().flush();
2545
      }
2546
 
2547
    }
2548
 
1133 chandransh 2549
    private class markOrdersAsDelivered implements ProcessFunction {
2550
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2551
      {
2552
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2553
        args.read(iprot);
2554
        iprot.readMessageEnd();
2555
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2556
        try {
2557
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2558
        } catch (TransactionServiceException ex) {
2559
          result.ex = ex;
2560
        } catch (Throwable th) {
2561
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2562
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2563
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2564
          x.write(oprot);
2565
          oprot.writeMessageEnd();
2566
          oprot.getTransport().flush();
2567
          return;
2568
        }
2569
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2570
        result.write(oprot);
2571
        oprot.writeMessageEnd();
2572
        oprot.getTransport().flush();
2573
      }
2574
 
2575
    }
2576
 
2577
    private class markOrdersAsFailed implements ProcessFunction {
2578
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2579
      {
2580
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2581
        args.read(iprot);
2582
        iprot.readMessageEnd();
2583
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2584
        try {
2585
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2586
        } catch (TransactionServiceException ex) {
2587
          result.ex = ex;
2588
        } catch (Throwable th) {
2589
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2590
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2591
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2592
          x.write(oprot);
2593
          oprot.writeMessageEnd();
2594
          oprot.getTransport().flush();
2595
          return;
2596
        }
2597
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2598
        result.write(oprot);
2599
        oprot.writeMessageEnd();
2600
        oprot.getTransport().flush();
2601
      }
2602
 
2603
    }
2604
 
1245 chandransh 2605
    private class updateNonDeliveryReason implements ProcessFunction {
2606
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2607
      {
2608
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2609
        args.read(iprot);
2610
        iprot.readMessageEnd();
2611
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2612
        try {
2613
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2614
        } catch (TransactionServiceException ex) {
2615
          result.ex = ex;
2616
        } catch (Throwable th) {
2617
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2618
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2619
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2620
          x.write(oprot);
2621
          oprot.writeMessageEnd();
2622
          oprot.getTransport().flush();
2623
          return;
2624
        }
2625
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2626
        result.write(oprot);
2627
        oprot.writeMessageEnd();
2628
        oprot.getTransport().flush();
2629
      }
2630
 
2631
    }
2632
 
1406 ankur.sing 2633
    private class getUndeliveredOrders implements ProcessFunction {
2634
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2635
      {
2636
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2637
        args.read(iprot);
2638
        iprot.readMessageEnd();
2639
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2640
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2641
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2642
        result.write(oprot);
2643
        oprot.writeMessageEnd();
2644
        oprot.getTransport().flush();
2645
      }
2646
 
2647
    }
2648
 
305 ashish 2649
    private class getAlerts implements ProcessFunction {
2650
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2651
      {
2652
        getAlerts_args args = new getAlerts_args();
2653
        args.read(iprot);
2654
        iprot.readMessageEnd();
2655
        getAlerts_result result = new getAlerts_result();
483 rajveer 2656
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2657
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2658
        result.write(oprot);
2659
        oprot.writeMessageEnd();
2660
        oprot.getTransport().flush();
2661
      }
2662
 
2663
    }
2664
 
2665
    private class setAlert implements ProcessFunction {
2666
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2667
      {
2668
        setAlert_args args = new setAlert_args();
2669
        args.read(iprot);
2670
        iprot.readMessageEnd();
2671
        setAlert_result result = new setAlert_result();
483 rajveer 2672
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2673
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2674
        result.write(oprot);
2675
        oprot.writeMessageEnd();
2676
        oprot.getTransport().flush();
2677
      }
2678
 
2679
    }
2680
 
1598 ankur.sing 2681
    private class getValidOrderCount implements ProcessFunction {
2682
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2683
      {
2684
        getValidOrderCount_args args = new getValidOrderCount_args();
2685
        args.read(iprot);
2686
        iprot.readMessageEnd();
2687
        getValidOrderCount_result result = new getValidOrderCount_result();
2688
        result.success = iface_.getValidOrderCount();
2689
        result.setSuccessIsSet(true);
2690
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
2691
        result.write(oprot);
2692
        oprot.writeMessageEnd();
2693
        oprot.getTransport().flush();
2694
      }
2695
 
2696
    }
2697
 
1629 ankur.sing 2698
    private class getNoOfCustomersWithSuccessfulTransaction implements ProcessFunction {
2699
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2700
      {
2701
        getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
2702
        args.read(iprot);
2703
        iprot.readMessageEnd();
2704
        getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
2705
        result.success = iface_.getNoOfCustomersWithSuccessfulTransaction();
2706
        result.setSuccessIsSet(true);
2707
        oprot.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid));
2708
        result.write(oprot);
2709
        oprot.writeMessageEnd();
2710
        oprot.getTransport().flush();
2711
      }
2712
 
2713
    }
2714
 
1731 ankur.sing 2715
    private class getValidOrdersAmountRange implements ProcessFunction {
1629 ankur.sing 2716
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2717
      {
1731 ankur.sing 2718
        getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 2719
        args.read(iprot);
2720
        iprot.readMessageEnd();
1731 ankur.sing 2721
        getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
2722
        result.success = iface_.getValidOrdersAmountRange();
2723
        oprot.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 2724
        result.write(oprot);
2725
        oprot.writeMessageEnd();
2726
        oprot.getTransport().flush();
2727
      }
2728
 
2729
    }
2730
 
1886 ankur.sing 2731
    private class getValidOrders implements ProcessFunction {
2732
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2733
      {
2734
        getValidOrders_args args = new getValidOrders_args();
2735
        args.read(iprot);
2736
        iprot.readMessageEnd();
2737
        getValidOrders_result result = new getValidOrders_result();
2738
        result.success = iface_.getValidOrders(args.limit);
2739
        oprot.writeMessageBegin(new TMessage("getValidOrders", TMessageType.REPLY, seqid));
2740
        result.write(oprot);
2741
        oprot.writeMessageEnd();
2742
        oprot.getTransport().flush();
2743
      }
2744
 
2745
    }
2746
 
2538 chandransh 2747
    private class toggleDOAFlag implements ProcessFunction {
2748
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2749
      {
2750
        toggleDOAFlag_args args = new toggleDOAFlag_args();
2751
        args.read(iprot);
2752
        iprot.readMessageEnd();
2753
        toggleDOAFlag_result result = new toggleDOAFlag_result();
2754
        try {
2755
          result.success = iface_.toggleDOAFlag(args.orderId);
2756
          result.setSuccessIsSet(true);
2757
        } catch (TransactionServiceException ex) {
2758
          result.ex = ex;
2759
        } catch (Throwable th) {
2760
          LOGGER.error("Internal error processing toggleDOAFlag", th);
2761
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing toggleDOAFlag");
2762
          oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.EXCEPTION, seqid));
2763
          x.write(oprot);
2764
          oprot.writeMessageEnd();
2765
          oprot.getTransport().flush();
2766
          return;
2767
        }
2768
        oprot.writeMessageBegin(new TMessage("toggleDOAFlag", TMessageType.REPLY, seqid));
2769
        result.write(oprot);
2770
        oprot.writeMessageEnd();
2771
        oprot.getTransport().flush();
2772
      }
2773
 
2774
    }
2775
 
2776
    private class requestPickupNumber implements ProcessFunction {
2777
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2778
      {
2779
        requestPickupNumber_args args = new requestPickupNumber_args();
2780
        args.read(iprot);
2781
        iprot.readMessageEnd();
2782
        requestPickupNumber_result result = new requestPickupNumber_result();
2783
        try {
2784
          result.success = iface_.requestPickupNumber(args.orderId);
2785
          result.setSuccessIsSet(true);
2786
        } catch (TransactionServiceException ex) {
2787
          result.ex = ex;
2788
        } catch (Throwable th) {
2789
          LOGGER.error("Internal error processing requestPickupNumber", th);
2790
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing requestPickupNumber");
2791
          oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.EXCEPTION, seqid));
2792
          x.write(oprot);
2793
          oprot.writeMessageEnd();
2794
          oprot.getTransport().flush();
2795
          return;
2796
        }
2797
        oprot.writeMessageBegin(new TMessage("requestPickupNumber", TMessageType.REPLY, seqid));
2798
        result.write(oprot);
2799
        oprot.writeMessageEnd();
2800
        oprot.getTransport().flush();
2801
      }
2802
 
2803
    }
2804
 
2805
    private class authorizePickup implements ProcessFunction {
2806
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2807
      {
2808
        authorizePickup_args args = new authorizePickup_args();
2809
        args.read(iprot);
2810
        iprot.readMessageEnd();
2811
        authorizePickup_result result = new authorizePickup_result();
2812
        try {
2813
          result.success = iface_.authorizePickup(args.orderId, args.pickupNumber);
2814
          result.setSuccessIsSet(true);
2815
        } catch (TransactionServiceException ex) {
2816
          result.ex = ex;
2817
        } catch (Throwable th) {
2818
          LOGGER.error("Internal error processing authorizePickup", th);
2819
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing authorizePickup");
2820
          oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.EXCEPTION, seqid));
2821
          x.write(oprot);
2822
          oprot.writeMessageEnd();
2823
          oprot.getTransport().flush();
2824
          return;
2825
        }
2826
        oprot.writeMessageBegin(new TMessage("authorizePickup", TMessageType.REPLY, seqid));
2827
        result.write(oprot);
2828
        oprot.writeMessageEnd();
2829
        oprot.getTransport().flush();
2830
      }
2831
 
2832
    }
2833
 
68 ashish 2834
  }
2835
 
764 rajveer 2836
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2837
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2838
 
2839
 
2840
 
2841
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2842
    public enum _Fields implements TFieldIdEnum {
2843
;
2844
 
2845
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2846
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2847
 
2848
      static {
2849
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2850
          byId.put((int)field._thriftId, field);
2851
          byName.put(field.getFieldName(), field);
2852
        }
2853
      }
2854
 
2855
      /**
2856
       * Find the _Fields constant that matches fieldId, or null if its not found.
2857
       */
2858
      public static _Fields findByThriftId(int fieldId) {
2859
        return byId.get(fieldId);
2860
      }
2861
 
2862
      /**
2863
       * Find the _Fields constant that matches fieldId, throwing an exception
2864
       * if it is not found.
2865
       */
2866
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2867
        _Fields fields = findByThriftId(fieldId);
2868
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2869
        return fields;
2870
      }
2871
 
2872
      /**
2873
       * Find the _Fields constant that matches name, or null if its not found.
2874
       */
2875
      public static _Fields findByName(String name) {
2876
        return byName.get(name);
2877
      }
2878
 
2879
      private final short _thriftId;
2880
      private final String _fieldName;
2881
 
2882
      _Fields(short thriftId, String fieldName) {
2883
        _thriftId = thriftId;
2884
        _fieldName = fieldName;
2885
      }
2886
 
2887
      public short getThriftFieldId() {
2888
        return _thriftId;
2889
      }
2890
 
2891
      public String getFieldName() {
2892
        return _fieldName;
2893
      }
2894
    }
2895
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2896
    }});
2897
 
2898
    static {
2899
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2900
    }
2901
 
2902
    public closeSession_args() {
2903
    }
2904
 
2905
    /**
2906
     * Performs a deep copy on <i>other</i>.
2907
     */
2908
    public closeSession_args(closeSession_args other) {
2909
    }
2910
 
2911
    public closeSession_args deepCopy() {
2912
      return new closeSession_args(this);
2913
    }
2914
 
2915
    @Deprecated
2916
    public closeSession_args clone() {
2917
      return new closeSession_args(this);
2918
    }
2919
 
2920
    public void setFieldValue(_Fields field, Object value) {
2921
      switch (field) {
2922
      }
2923
    }
2924
 
2925
    public void setFieldValue(int fieldID, Object value) {
2926
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2927
    }
2928
 
2929
    public Object getFieldValue(_Fields field) {
2930
      switch (field) {
2931
      }
2932
      throw new IllegalStateException();
2933
    }
2934
 
2935
    public Object getFieldValue(int fieldId) {
2936
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2937
    }
2938
 
2939
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2940
    public boolean isSet(_Fields field) {
2941
      switch (field) {
2942
      }
2943
      throw new IllegalStateException();
2944
    }
2945
 
2946
    public boolean isSet(int fieldID) {
2947
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2948
    }
2949
 
2950
    @Override
2951
    public boolean equals(Object that) {
2952
      if (that == null)
2953
        return false;
2954
      if (that instanceof closeSession_args)
2955
        return this.equals((closeSession_args)that);
2956
      return false;
2957
    }
2958
 
2959
    public boolean equals(closeSession_args that) {
2960
      if (that == null)
2961
        return false;
2962
 
2963
      return true;
2964
    }
2965
 
2966
    @Override
2967
    public int hashCode() {
2968
      return 0;
2969
    }
2970
 
2971
    public int compareTo(closeSession_args other) {
2972
      if (!getClass().equals(other.getClass())) {
2973
        return getClass().getName().compareTo(other.getClass().getName());
2974
      }
2975
 
2976
      int lastComparison = 0;
2977
      closeSession_args typedOther = (closeSession_args)other;
2978
 
2979
      return 0;
2980
    }
2981
 
2982
    public void read(TProtocol iprot) throws TException {
2983
      TField field;
2984
      iprot.readStructBegin();
2985
      while (true)
2986
      {
2987
        field = iprot.readFieldBegin();
2988
        if (field.type == TType.STOP) { 
2989
          break;
2990
        }
2991
        _Fields fieldId = _Fields.findByThriftId(field.id);
2992
        if (fieldId == null) {
2993
          TProtocolUtil.skip(iprot, field.type);
2994
        } else {
2995
          switch (fieldId) {
2996
          }
2997
          iprot.readFieldEnd();
2998
        }
2999
      }
3000
      iprot.readStructEnd();
3001
      validate();
3002
    }
3003
 
3004
    public void write(TProtocol oprot) throws TException {
3005
      validate();
3006
 
3007
      oprot.writeStructBegin(STRUCT_DESC);
3008
      oprot.writeFieldStop();
3009
      oprot.writeStructEnd();
3010
    }
3011
 
3012
    @Override
3013
    public String toString() {
3014
      StringBuilder sb = new StringBuilder("closeSession_args(");
3015
      boolean first = true;
3016
 
3017
      sb.append(")");
3018
      return sb.toString();
3019
    }
3020
 
3021
    public void validate() throws TException {
3022
      // check for required fields
3023
    }
3024
 
3025
  }
3026
 
3027
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
3028
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
3029
 
3030
 
3031
 
3032
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3033
    public enum _Fields implements TFieldIdEnum {
3034
;
3035
 
3036
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3037
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3038
 
3039
      static {
3040
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3041
          byId.put((int)field._thriftId, field);
3042
          byName.put(field.getFieldName(), field);
3043
        }
3044
      }
3045
 
3046
      /**
3047
       * Find the _Fields constant that matches fieldId, or null if its not found.
3048
       */
3049
      public static _Fields findByThriftId(int fieldId) {
3050
        return byId.get(fieldId);
3051
      }
3052
 
3053
      /**
3054
       * Find the _Fields constant that matches fieldId, throwing an exception
3055
       * if it is not found.
3056
       */
3057
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3058
        _Fields fields = findByThriftId(fieldId);
3059
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3060
        return fields;
3061
      }
3062
 
3063
      /**
3064
       * Find the _Fields constant that matches name, or null if its not found.
3065
       */
3066
      public static _Fields findByName(String name) {
3067
        return byName.get(name);
3068
      }
3069
 
3070
      private final short _thriftId;
3071
      private final String _fieldName;
3072
 
3073
      _Fields(short thriftId, String fieldName) {
3074
        _thriftId = thriftId;
3075
        _fieldName = fieldName;
3076
      }
3077
 
3078
      public short getThriftFieldId() {
3079
        return _thriftId;
3080
      }
3081
 
3082
      public String getFieldName() {
3083
        return _fieldName;
3084
      }
3085
    }
3086
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3087
    }});
3088
 
3089
    static {
3090
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
3091
    }
3092
 
3093
    public closeSession_result() {
3094
    }
3095
 
3096
    /**
3097
     * Performs a deep copy on <i>other</i>.
3098
     */
3099
    public closeSession_result(closeSession_result other) {
3100
    }
3101
 
3102
    public closeSession_result deepCopy() {
3103
      return new closeSession_result(this);
3104
    }
3105
 
3106
    @Deprecated
3107
    public closeSession_result clone() {
3108
      return new closeSession_result(this);
3109
    }
3110
 
3111
    public void setFieldValue(_Fields field, Object value) {
3112
      switch (field) {
3113
      }
3114
    }
3115
 
3116
    public void setFieldValue(int fieldID, Object value) {
3117
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3118
    }
3119
 
3120
    public Object getFieldValue(_Fields field) {
3121
      switch (field) {
3122
      }
3123
      throw new IllegalStateException();
3124
    }
3125
 
3126
    public Object getFieldValue(int fieldId) {
3127
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3128
    }
3129
 
3130
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3131
    public boolean isSet(_Fields field) {
3132
      switch (field) {
3133
      }
3134
      throw new IllegalStateException();
3135
    }
3136
 
3137
    public boolean isSet(int fieldID) {
3138
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3139
    }
3140
 
3141
    @Override
3142
    public boolean equals(Object that) {
3143
      if (that == null)
3144
        return false;
3145
      if (that instanceof closeSession_result)
3146
        return this.equals((closeSession_result)that);
3147
      return false;
3148
    }
3149
 
3150
    public boolean equals(closeSession_result that) {
3151
      if (that == null)
3152
        return false;
3153
 
3154
      return true;
3155
    }
3156
 
3157
    @Override
3158
    public int hashCode() {
3159
      return 0;
3160
    }
3161
 
3162
    public int compareTo(closeSession_result other) {
3163
      if (!getClass().equals(other.getClass())) {
3164
        return getClass().getName().compareTo(other.getClass().getName());
3165
      }
3166
 
3167
      int lastComparison = 0;
3168
      closeSession_result typedOther = (closeSession_result)other;
3169
 
3170
      return 0;
3171
    }
3172
 
3173
    public void read(TProtocol iprot) throws TException {
3174
      TField field;
3175
      iprot.readStructBegin();
3176
      while (true)
3177
      {
3178
        field = iprot.readFieldBegin();
3179
        if (field.type == TType.STOP) { 
3180
          break;
3181
        }
3182
        _Fields fieldId = _Fields.findByThriftId(field.id);
3183
        if (fieldId == null) {
3184
          TProtocolUtil.skip(iprot, field.type);
3185
        } else {
3186
          switch (fieldId) {
3187
          }
3188
          iprot.readFieldEnd();
3189
        }
3190
      }
3191
      iprot.readStructEnd();
3192
      validate();
3193
    }
3194
 
3195
    public void write(TProtocol oprot) throws TException {
3196
      oprot.writeStructBegin(STRUCT_DESC);
3197
 
3198
      oprot.writeFieldStop();
3199
      oprot.writeStructEnd();
3200
    }
3201
 
3202
    @Override
3203
    public String toString() {
3204
      StringBuilder sb = new StringBuilder("closeSession_result(");
3205
      boolean first = true;
3206
 
3207
      sb.append(")");
3208
      return sb.toString();
3209
    }
3210
 
3211
    public void validate() throws TException {
3212
      // check for required fields
3213
    }
3214
 
3215
  }
3216
 
684 chandransh 3217
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 3218
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
3219
 
3220
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
3221
 
3222
    private Transaction transaction;
3223
 
3224
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3225
    public enum _Fields implements TFieldIdEnum {
3226
      TRANSACTION((short)1, "transaction");
3227
 
3228
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3229
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3230
 
3231
      static {
3232
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3233
          byId.put((int)field._thriftId, field);
3234
          byName.put(field.getFieldName(), field);
3235
        }
3236
      }
3237
 
3238
      /**
3239
       * Find the _Fields constant that matches fieldId, or null if its not found.
3240
       */
3241
      public static _Fields findByThriftId(int fieldId) {
3242
        return byId.get(fieldId);
3243
      }
3244
 
3245
      /**
3246
       * Find the _Fields constant that matches fieldId, throwing an exception
3247
       * if it is not found.
3248
       */
3249
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3250
        _Fields fields = findByThriftId(fieldId);
3251
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3252
        return fields;
3253
      }
3254
 
3255
      /**
3256
       * Find the _Fields constant that matches name, or null if its not found.
3257
       */
3258
      public static _Fields findByName(String name) {
3259
        return byName.get(name);
3260
      }
3261
 
3262
      private final short _thriftId;
3263
      private final String _fieldName;
3264
 
3265
      _Fields(short thriftId, String fieldName) {
3266
        _thriftId = thriftId;
3267
        _fieldName = fieldName;
3268
      }
3269
 
3270
      public short getThriftFieldId() {
3271
        return _thriftId;
3272
      }
3273
 
3274
      public String getFieldName() {
3275
        return _fieldName;
3276
      }
3277
    }
3278
 
3279
    // isset id assignments
3280
 
3281
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3282
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
3283
          new StructMetaData(TType.STRUCT, Transaction.class)));
3284
    }});
3285
 
3286
    static {
3287
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
3288
    }
3289
 
3290
    public createTransaction_args() {
3291
    }
3292
 
3293
    public createTransaction_args(
3294
      Transaction transaction)
3295
    {
3296
      this();
3297
      this.transaction = transaction;
3298
    }
3299
 
3300
    /**
3301
     * Performs a deep copy on <i>other</i>.
3302
     */
3303
    public createTransaction_args(createTransaction_args other) {
3304
      if (other.isSetTransaction()) {
3305
        this.transaction = new Transaction(other.transaction);
3306
      }
3307
    }
3308
 
3309
    public createTransaction_args deepCopy() {
3310
      return new createTransaction_args(this);
3311
    }
3312
 
3313
    @Deprecated
3314
    public createTransaction_args clone() {
3315
      return new createTransaction_args(this);
3316
    }
3317
 
3318
    public Transaction getTransaction() {
3319
      return this.transaction;
3320
    }
3321
 
3322
    public createTransaction_args setTransaction(Transaction transaction) {
3323
      this.transaction = transaction;
3324
      return this;
3325
    }
3326
 
3327
    public void unsetTransaction() {
3328
      this.transaction = null;
3329
    }
3330
 
3331
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
3332
    public boolean isSetTransaction() {
3333
      return this.transaction != null;
3334
    }
3335
 
3336
    public void setTransactionIsSet(boolean value) {
3337
      if (!value) {
3338
        this.transaction = null;
3339
      }
3340
    }
3341
 
3342
    public void setFieldValue(_Fields field, Object value) {
3343
      switch (field) {
3344
      case TRANSACTION:
3345
        if (value == null) {
3346
          unsetTransaction();
3347
        } else {
3348
          setTransaction((Transaction)value);
3349
        }
3350
        break;
3351
 
3352
      }
3353
    }
3354
 
3355
    public void setFieldValue(int fieldID, Object value) {
3356
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3357
    }
3358
 
3359
    public Object getFieldValue(_Fields field) {
3360
      switch (field) {
3361
      case TRANSACTION:
3362
        return getTransaction();
3363
 
3364
      }
3365
      throw new IllegalStateException();
3366
    }
3367
 
3368
    public Object getFieldValue(int fieldId) {
3369
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3370
    }
3371
 
3372
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3373
    public boolean isSet(_Fields field) {
3374
      switch (field) {
3375
      case TRANSACTION:
3376
        return isSetTransaction();
3377
      }
3378
      throw new IllegalStateException();
3379
    }
3380
 
3381
    public boolean isSet(int fieldID) {
3382
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3383
    }
3384
 
3385
    @Override
3386
    public boolean equals(Object that) {
3387
      if (that == null)
3388
        return false;
3389
      if (that instanceof createTransaction_args)
3390
        return this.equals((createTransaction_args)that);
3391
      return false;
3392
    }
3393
 
3394
    public boolean equals(createTransaction_args that) {
3395
      if (that == null)
3396
        return false;
3397
 
3398
      boolean this_present_transaction = true && this.isSetTransaction();
3399
      boolean that_present_transaction = true && that.isSetTransaction();
3400
      if (this_present_transaction || that_present_transaction) {
3401
        if (!(this_present_transaction && that_present_transaction))
3402
          return false;
3403
        if (!this.transaction.equals(that.transaction))
3404
          return false;
3405
      }
3406
 
3407
      return true;
3408
    }
3409
 
3410
    @Override
3411
    public int hashCode() {
3412
      return 0;
3413
    }
3414
 
684 chandransh 3415
    public int compareTo(createTransaction_args other) {
3416
      if (!getClass().equals(other.getClass())) {
3417
        return getClass().getName().compareTo(other.getClass().getName());
3418
      }
3419
 
3420
      int lastComparison = 0;
3421
      createTransaction_args typedOther = (createTransaction_args)other;
3422
 
3423
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
3424
      if (lastComparison != 0) {
3425
        return lastComparison;
3426
      }
3427
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
3428
      if (lastComparison != 0) {
3429
        return lastComparison;
3430
      }
3431
      return 0;
3432
    }
3433
 
68 ashish 3434
    public void read(TProtocol iprot) throws TException {
3435
      TField field;
3436
      iprot.readStructBegin();
3437
      while (true)
3438
      {
3439
        field = iprot.readFieldBegin();
3440
        if (field.type == TType.STOP) { 
3441
          break;
3442
        }
3443
        _Fields fieldId = _Fields.findByThriftId(field.id);
3444
        if (fieldId == null) {
3445
          TProtocolUtil.skip(iprot, field.type);
3446
        } else {
3447
          switch (fieldId) {
3448
            case TRANSACTION:
3449
              if (field.type == TType.STRUCT) {
3450
                this.transaction = new Transaction();
3451
                this.transaction.read(iprot);
3452
              } else { 
3453
                TProtocolUtil.skip(iprot, field.type);
3454
              }
3455
              break;
3456
          }
3457
          iprot.readFieldEnd();
3458
        }
3459
      }
3460
      iprot.readStructEnd();
3461
      validate();
3462
    }
3463
 
3464
    public void write(TProtocol oprot) throws TException {
3465
      validate();
3466
 
3467
      oprot.writeStructBegin(STRUCT_DESC);
3468
      if (this.transaction != null) {
3469
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
3470
        this.transaction.write(oprot);
3471
        oprot.writeFieldEnd();
3472
      }
3473
      oprot.writeFieldStop();
3474
      oprot.writeStructEnd();
3475
    }
3476
 
3477
    @Override
3478
    public String toString() {
3479
      StringBuilder sb = new StringBuilder("createTransaction_args(");
3480
      boolean first = true;
3481
 
3482
      sb.append("transaction:");
3483
      if (this.transaction == null) {
3484
        sb.append("null");
3485
      } else {
3486
        sb.append(this.transaction);
3487
      }
3488
      first = false;
3489
      sb.append(")");
3490
      return sb.toString();
3491
    }
3492
 
3493
    public void validate() throws TException {
3494
      // check for required fields
3495
    }
3496
 
3497
  }
3498
 
3499
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
3500
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
3501
 
132 ashish 3502
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 3503
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3504
 
132 ashish 3505
    private long success;
68 ashish 3506
    private TransactionServiceException ex;
3507
 
3508
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3509
    public enum _Fields implements TFieldIdEnum {
132 ashish 3510
      SUCCESS((short)0, "success"),
68 ashish 3511
      EX((short)1, "ex");
3512
 
3513
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3514
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3515
 
3516
      static {
3517
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3518
          byId.put((int)field._thriftId, field);
3519
          byName.put(field.getFieldName(), field);
3520
        }
3521
      }
3522
 
3523
      /**
3524
       * Find the _Fields constant that matches fieldId, or null if its not found.
3525
       */
3526
      public static _Fields findByThriftId(int fieldId) {
3527
        return byId.get(fieldId);
3528
      }
3529
 
3530
      /**
3531
       * Find the _Fields constant that matches fieldId, throwing an exception
3532
       * if it is not found.
3533
       */
3534
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3535
        _Fields fields = findByThriftId(fieldId);
3536
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3537
        return fields;
3538
      }
3539
 
3540
      /**
3541
       * Find the _Fields constant that matches name, or null if its not found.
3542
       */
3543
      public static _Fields findByName(String name) {
3544
        return byName.get(name);
3545
      }
3546
 
3547
      private final short _thriftId;
3548
      private final String _fieldName;
3549
 
3550
      _Fields(short thriftId, String fieldName) {
3551
        _thriftId = thriftId;
3552
        _fieldName = fieldName;
3553
      }
3554
 
3555
      public short getThriftFieldId() {
3556
        return _thriftId;
3557
      }
3558
 
3559
      public String getFieldName() {
3560
        return _fieldName;
3561
      }
3562
    }
3563
 
3564
    // isset id assignments
132 ashish 3565
    private static final int __SUCCESS_ISSET_ID = 0;
3566
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3567
 
3568
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3569
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3570
          new FieldValueMetaData(TType.I64)));
68 ashish 3571
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3572
          new FieldValueMetaData(TType.STRUCT)));
3573
    }});
3574
 
3575
    static {
3576
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3577
    }
3578
 
3579
    public createTransaction_result() {
3580
    }
3581
 
3582
    public createTransaction_result(
132 ashish 3583
      long success,
68 ashish 3584
      TransactionServiceException ex)
3585
    {
3586
      this();
132 ashish 3587
      this.success = success;
3588
      setSuccessIsSet(true);
68 ashish 3589
      this.ex = ex;
3590
    }
3591
 
3592
    /**
3593
     * Performs a deep copy on <i>other</i>.
3594
     */
3595
    public createTransaction_result(createTransaction_result other) {
132 ashish 3596
      __isset_bit_vector.clear();
3597
      __isset_bit_vector.or(other.__isset_bit_vector);
3598
      this.success = other.success;
68 ashish 3599
      if (other.isSetEx()) {
3600
        this.ex = new TransactionServiceException(other.ex);
3601
      }
3602
    }
3603
 
3604
    public createTransaction_result deepCopy() {
3605
      return new createTransaction_result(this);
3606
    }
3607
 
3608
    @Deprecated
3609
    public createTransaction_result clone() {
3610
      return new createTransaction_result(this);
3611
    }
3612
 
132 ashish 3613
    public long getSuccess() {
3614
      return this.success;
3615
    }
3616
 
3617
    public createTransaction_result setSuccess(long success) {
3618
      this.success = success;
3619
      setSuccessIsSet(true);
3620
      return this;
3621
    }
3622
 
3623
    public void unsetSuccess() {
3624
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3625
    }
3626
 
3627
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3628
    public boolean isSetSuccess() {
3629
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3630
    }
3631
 
3632
    public void setSuccessIsSet(boolean value) {
3633
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3634
    }
3635
 
68 ashish 3636
    public TransactionServiceException getEx() {
3637
      return this.ex;
3638
    }
3639
 
3640
    public createTransaction_result setEx(TransactionServiceException ex) {
3641
      this.ex = ex;
3642
      return this;
3643
    }
3644
 
3645
    public void unsetEx() {
3646
      this.ex = null;
3647
    }
3648
 
3649
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3650
    public boolean isSetEx() {
3651
      return this.ex != null;
3652
    }
3653
 
3654
    public void setExIsSet(boolean value) {
3655
      if (!value) {
3656
        this.ex = null;
3657
      }
3658
    }
3659
 
3660
    public void setFieldValue(_Fields field, Object value) {
3661
      switch (field) {
132 ashish 3662
      case SUCCESS:
3663
        if (value == null) {
3664
          unsetSuccess();
3665
        } else {
3666
          setSuccess((Long)value);
3667
        }
3668
        break;
3669
 
68 ashish 3670
      case EX:
3671
        if (value == null) {
3672
          unsetEx();
3673
        } else {
3674
          setEx((TransactionServiceException)value);
3675
        }
3676
        break;
3677
 
3678
      }
3679
    }
3680
 
3681
    public void setFieldValue(int fieldID, Object value) {
3682
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3683
    }
3684
 
3685
    public Object getFieldValue(_Fields field) {
3686
      switch (field) {
132 ashish 3687
      case SUCCESS:
3688
        return new Long(getSuccess());
3689
 
68 ashish 3690
      case EX:
3691
        return getEx();
3692
 
3693
      }
3694
      throw new IllegalStateException();
3695
    }
3696
 
3697
    public Object getFieldValue(int fieldId) {
3698
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3699
    }
3700
 
3701
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3702
    public boolean isSet(_Fields field) {
3703
      switch (field) {
132 ashish 3704
      case SUCCESS:
3705
        return isSetSuccess();
68 ashish 3706
      case EX:
3707
        return isSetEx();
3708
      }
3709
      throw new IllegalStateException();
3710
    }
3711
 
3712
    public boolean isSet(int fieldID) {
3713
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3714
    }
3715
 
3716
    @Override
3717
    public boolean equals(Object that) {
3718
      if (that == null)
3719
        return false;
3720
      if (that instanceof createTransaction_result)
3721
        return this.equals((createTransaction_result)that);
3722
      return false;
3723
    }
3724
 
3725
    public boolean equals(createTransaction_result that) {
3726
      if (that == null)
3727
        return false;
3728
 
132 ashish 3729
      boolean this_present_success = true;
3730
      boolean that_present_success = true;
3731
      if (this_present_success || that_present_success) {
3732
        if (!(this_present_success && that_present_success))
3733
          return false;
3734
        if (this.success != that.success)
3735
          return false;
3736
      }
3737
 
68 ashish 3738
      boolean this_present_ex = true && this.isSetEx();
3739
      boolean that_present_ex = true && that.isSetEx();
3740
      if (this_present_ex || that_present_ex) {
3741
        if (!(this_present_ex && that_present_ex))
3742
          return false;
3743
        if (!this.ex.equals(that.ex))
3744
          return false;
3745
      }
3746
 
3747
      return true;
3748
    }
3749
 
3750
    @Override
3751
    public int hashCode() {
3752
      return 0;
3753
    }
3754
 
3755
    public int compareTo(createTransaction_result other) {
3756
      if (!getClass().equals(other.getClass())) {
3757
        return getClass().getName().compareTo(other.getClass().getName());
3758
      }
3759
 
3760
      int lastComparison = 0;
3761
      createTransaction_result typedOther = (createTransaction_result)other;
3762
 
132 ashish 3763
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3764
      if (lastComparison != 0) {
3765
        return lastComparison;
3766
      }
3767
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3768
      if (lastComparison != 0) {
3769
        return lastComparison;
3770
      }
68 ashish 3771
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3772
      if (lastComparison != 0) {
3773
        return lastComparison;
3774
      }
3775
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3776
      if (lastComparison != 0) {
3777
        return lastComparison;
3778
      }
3779
      return 0;
3780
    }
3781
 
3782
    public void read(TProtocol iprot) throws TException {
3783
      TField field;
3784
      iprot.readStructBegin();
3785
      while (true)
3786
      {
3787
        field = iprot.readFieldBegin();
3788
        if (field.type == TType.STOP) { 
3789
          break;
3790
        }
3791
        _Fields fieldId = _Fields.findByThriftId(field.id);
3792
        if (fieldId == null) {
3793
          TProtocolUtil.skip(iprot, field.type);
3794
        } else {
3795
          switch (fieldId) {
132 ashish 3796
            case SUCCESS:
3797
              if (field.type == TType.I64) {
3798
                this.success = iprot.readI64();
3799
                setSuccessIsSet(true);
3800
              } else { 
3801
                TProtocolUtil.skip(iprot, field.type);
3802
              }
3803
              break;
68 ashish 3804
            case EX:
3805
              if (field.type == TType.STRUCT) {
3806
                this.ex = new TransactionServiceException();
3807
                this.ex.read(iprot);
3808
              } else { 
3809
                TProtocolUtil.skip(iprot, field.type);
3810
              }
3811
              break;
3812
          }
3813
          iprot.readFieldEnd();
3814
        }
3815
      }
3816
      iprot.readStructEnd();
3817
      validate();
3818
    }
3819
 
3820
    public void write(TProtocol oprot) throws TException {
3821
      oprot.writeStructBegin(STRUCT_DESC);
3822
 
132 ashish 3823
      if (this.isSetSuccess()) {
3824
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3825
        oprot.writeI64(this.success);
3826
        oprot.writeFieldEnd();
3827
      } else if (this.isSetEx()) {
68 ashish 3828
        oprot.writeFieldBegin(EX_FIELD_DESC);
3829
        this.ex.write(oprot);
3830
        oprot.writeFieldEnd();
3831
      }
3832
      oprot.writeFieldStop();
3833
      oprot.writeStructEnd();
3834
    }
3835
 
3836
    @Override
3837
    public String toString() {
3838
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3839
      boolean first = true;
3840
 
132 ashish 3841
      sb.append("success:");
3842
      sb.append(this.success);
3843
      first = false;
3844
      if (!first) sb.append(", ");
68 ashish 3845
      sb.append("ex:");
3846
      if (this.ex == null) {
3847
        sb.append("null");
3848
      } else {
3849
        sb.append(this.ex);
3850
      }
3851
      first = false;
3852
      sb.append(")");
3853
      return sb.toString();
3854
    }
3855
 
3856
    public void validate() throws TException {
3857
      // check for required fields
3858
    }
3859
 
3860
  }
3861
 
3862
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3863
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3864
 
3865
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3866
 
3867
    private long id;
3868
 
3869
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3870
    public enum _Fields implements TFieldIdEnum {
3871
      ID((short)1, "id");
3872
 
3873
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3874
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3875
 
3876
      static {
3877
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3878
          byId.put((int)field._thriftId, field);
3879
          byName.put(field.getFieldName(), field);
3880
        }
3881
      }
3882
 
3883
      /**
3884
       * Find the _Fields constant that matches fieldId, or null if its not found.
3885
       */
3886
      public static _Fields findByThriftId(int fieldId) {
3887
        return byId.get(fieldId);
3888
      }
3889
 
3890
      /**
3891
       * Find the _Fields constant that matches fieldId, throwing an exception
3892
       * if it is not found.
3893
       */
3894
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3895
        _Fields fields = findByThriftId(fieldId);
3896
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3897
        return fields;
3898
      }
3899
 
3900
      /**
3901
       * Find the _Fields constant that matches name, or null if its not found.
3902
       */
3903
      public static _Fields findByName(String name) {
3904
        return byName.get(name);
3905
      }
3906
 
3907
      private final short _thriftId;
3908
      private final String _fieldName;
3909
 
3910
      _Fields(short thriftId, String fieldName) {
3911
        _thriftId = thriftId;
3912
        _fieldName = fieldName;
3913
      }
3914
 
3915
      public short getThriftFieldId() {
3916
        return _thriftId;
3917
      }
3918
 
3919
      public String getFieldName() {
3920
        return _fieldName;
3921
      }
3922
    }
3923
 
3924
    // isset id assignments
3925
    private static final int __ID_ISSET_ID = 0;
3926
    private BitSet __isset_bit_vector = new BitSet(1);
3927
 
3928
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3929
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3930
          new FieldValueMetaData(TType.I64)));
3931
    }});
3932
 
3933
    static {
3934
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3935
    }
3936
 
3937
    public getTransaction_args() {
3938
    }
3939
 
3940
    public getTransaction_args(
3941
      long id)
3942
    {
3943
      this();
3944
      this.id = id;
3945
      setIdIsSet(true);
3946
    }
3947
 
3948
    /**
3949
     * Performs a deep copy on <i>other</i>.
3950
     */
3951
    public getTransaction_args(getTransaction_args other) {
3952
      __isset_bit_vector.clear();
3953
      __isset_bit_vector.or(other.__isset_bit_vector);
3954
      this.id = other.id;
3955
    }
3956
 
3957
    public getTransaction_args deepCopy() {
3958
      return new getTransaction_args(this);
3959
    }
3960
 
3961
    @Deprecated
3962
    public getTransaction_args clone() {
3963
      return new getTransaction_args(this);
3964
    }
3965
 
3966
    public long getId() {
3967
      return this.id;
3968
    }
3969
 
3970
    public getTransaction_args setId(long id) {
3971
      this.id = id;
3972
      setIdIsSet(true);
3973
      return this;
3974
    }
3975
 
3976
    public void unsetId() {
3977
      __isset_bit_vector.clear(__ID_ISSET_ID);
3978
    }
3979
 
3980
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3981
    public boolean isSetId() {
3982
      return __isset_bit_vector.get(__ID_ISSET_ID);
3983
    }
3984
 
3985
    public void setIdIsSet(boolean value) {
3986
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3987
    }
3988
 
3989
    public void setFieldValue(_Fields field, Object value) {
3990
      switch (field) {
3991
      case ID:
3992
        if (value == null) {
3993
          unsetId();
3994
        } else {
3995
          setId((Long)value);
3996
        }
3997
        break;
3998
 
3999
      }
4000
    }
4001
 
4002
    public void setFieldValue(int fieldID, Object value) {
4003
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4004
    }
4005
 
4006
    public Object getFieldValue(_Fields field) {
4007
      switch (field) {
4008
      case ID:
4009
        return new Long(getId());
4010
 
4011
      }
4012
      throw new IllegalStateException();
4013
    }
4014
 
4015
    public Object getFieldValue(int fieldId) {
4016
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4017
    }
4018
 
4019
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4020
    public boolean isSet(_Fields field) {
4021
      switch (field) {
4022
      case ID:
4023
        return isSetId();
4024
      }
4025
      throw new IllegalStateException();
4026
    }
4027
 
4028
    public boolean isSet(int fieldID) {
4029
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4030
    }
4031
 
4032
    @Override
4033
    public boolean equals(Object that) {
4034
      if (that == null)
4035
        return false;
4036
      if (that instanceof getTransaction_args)
4037
        return this.equals((getTransaction_args)that);
4038
      return false;
4039
    }
4040
 
4041
    public boolean equals(getTransaction_args that) {
4042
      if (that == null)
4043
        return false;
4044
 
4045
      boolean this_present_id = true;
4046
      boolean that_present_id = true;
4047
      if (this_present_id || that_present_id) {
4048
        if (!(this_present_id && that_present_id))
4049
          return false;
4050
        if (this.id != that.id)
4051
          return false;
4052
      }
4053
 
4054
      return true;
4055
    }
4056
 
4057
    @Override
4058
    public int hashCode() {
4059
      return 0;
4060
    }
4061
 
4062
    public int compareTo(getTransaction_args other) {
4063
      if (!getClass().equals(other.getClass())) {
4064
        return getClass().getName().compareTo(other.getClass().getName());
4065
      }
4066
 
4067
      int lastComparison = 0;
4068
      getTransaction_args typedOther = (getTransaction_args)other;
4069
 
4070
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
4071
      if (lastComparison != 0) {
4072
        return lastComparison;
4073
      }
4074
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
4075
      if (lastComparison != 0) {
4076
        return lastComparison;
4077
      }
4078
      return 0;
4079
    }
4080
 
4081
    public void read(TProtocol iprot) throws TException {
4082
      TField field;
4083
      iprot.readStructBegin();
4084
      while (true)
4085
      {
4086
        field = iprot.readFieldBegin();
4087
        if (field.type == TType.STOP) { 
4088
          break;
4089
        }
4090
        _Fields fieldId = _Fields.findByThriftId(field.id);
4091
        if (fieldId == null) {
4092
          TProtocolUtil.skip(iprot, field.type);
4093
        } else {
4094
          switch (fieldId) {
4095
            case ID:
4096
              if (field.type == TType.I64) {
4097
                this.id = iprot.readI64();
4098
                setIdIsSet(true);
4099
              } else { 
4100
                TProtocolUtil.skip(iprot, field.type);
4101
              }
4102
              break;
4103
          }
4104
          iprot.readFieldEnd();
4105
        }
4106
      }
4107
      iprot.readStructEnd();
4108
      validate();
4109
    }
4110
 
4111
    public void write(TProtocol oprot) throws TException {
4112
      validate();
4113
 
4114
      oprot.writeStructBegin(STRUCT_DESC);
4115
      oprot.writeFieldBegin(ID_FIELD_DESC);
4116
      oprot.writeI64(this.id);
4117
      oprot.writeFieldEnd();
4118
      oprot.writeFieldStop();
4119
      oprot.writeStructEnd();
4120
    }
4121
 
4122
    @Override
4123
    public String toString() {
4124
      StringBuilder sb = new StringBuilder("getTransaction_args(");
4125
      boolean first = true;
4126
 
4127
      sb.append("id:");
4128
      sb.append(this.id);
4129
      first = false;
4130
      sb.append(")");
4131
      return sb.toString();
4132
    }
4133
 
4134
    public void validate() throws TException {
4135
      // check for required fields
4136
    }
4137
 
4138
  }
4139
 
684 chandransh 4140
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 4141
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
4142
 
4143
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
4144
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4145
 
4146
    private Transaction success;
4147
    private TransactionServiceException ex;
4148
 
4149
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4150
    public enum _Fields implements TFieldIdEnum {
4151
      SUCCESS((short)0, "success"),
4152
      EX((short)1, "ex");
4153
 
4154
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4155
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4156
 
4157
      static {
4158
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4159
          byId.put((int)field._thriftId, field);
4160
          byName.put(field.getFieldName(), field);
4161
        }
4162
      }
4163
 
4164
      /**
4165
       * Find the _Fields constant that matches fieldId, or null if its not found.
4166
       */
4167
      public static _Fields findByThriftId(int fieldId) {
4168
        return byId.get(fieldId);
4169
      }
4170
 
4171
      /**
4172
       * Find the _Fields constant that matches fieldId, throwing an exception
4173
       * if it is not found.
4174
       */
4175
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4176
        _Fields fields = findByThriftId(fieldId);
4177
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4178
        return fields;
4179
      }
4180
 
4181
      /**
4182
       * Find the _Fields constant that matches name, or null if its not found.
4183
       */
4184
      public static _Fields findByName(String name) {
4185
        return byName.get(name);
4186
      }
4187
 
4188
      private final short _thriftId;
4189
      private final String _fieldName;
4190
 
4191
      _Fields(short thriftId, String fieldName) {
4192
        _thriftId = thriftId;
4193
        _fieldName = fieldName;
4194
      }
4195
 
4196
      public short getThriftFieldId() {
4197
        return _thriftId;
4198
      }
4199
 
4200
      public String getFieldName() {
4201
        return _fieldName;
4202
      }
4203
    }
4204
 
4205
    // isset id assignments
4206
 
4207
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4208
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4209
          new StructMetaData(TType.STRUCT, Transaction.class)));
4210
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4211
          new FieldValueMetaData(TType.STRUCT)));
4212
    }});
4213
 
4214
    static {
4215
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
4216
    }
4217
 
4218
    public getTransaction_result() {
4219
    }
4220
 
4221
    public getTransaction_result(
4222
      Transaction success,
4223
      TransactionServiceException ex)
4224
    {
4225
      this();
4226
      this.success = success;
4227
      this.ex = ex;
4228
    }
4229
 
4230
    /**
4231
     * Performs a deep copy on <i>other</i>.
4232
     */
4233
    public getTransaction_result(getTransaction_result other) {
4234
      if (other.isSetSuccess()) {
4235
        this.success = new Transaction(other.success);
4236
      }
4237
      if (other.isSetEx()) {
4238
        this.ex = new TransactionServiceException(other.ex);
4239
      }
4240
    }
4241
 
4242
    public getTransaction_result deepCopy() {
4243
      return new getTransaction_result(this);
4244
    }
4245
 
4246
    @Deprecated
4247
    public getTransaction_result clone() {
4248
      return new getTransaction_result(this);
4249
    }
4250
 
4251
    public Transaction getSuccess() {
4252
      return this.success;
4253
    }
4254
 
4255
    public getTransaction_result setSuccess(Transaction success) {
4256
      this.success = success;
4257
      return this;
4258
    }
4259
 
4260
    public void unsetSuccess() {
4261
      this.success = null;
4262
    }
4263
 
4264
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4265
    public boolean isSetSuccess() {
4266
      return this.success != null;
4267
    }
4268
 
4269
    public void setSuccessIsSet(boolean value) {
4270
      if (!value) {
4271
        this.success = null;
4272
      }
4273
    }
4274
 
4275
    public TransactionServiceException getEx() {
4276
      return this.ex;
4277
    }
4278
 
4279
    public getTransaction_result setEx(TransactionServiceException ex) {
4280
      this.ex = ex;
4281
      return this;
4282
    }
4283
 
4284
    public void unsetEx() {
4285
      this.ex = null;
4286
    }
4287
 
4288
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4289
    public boolean isSetEx() {
4290
      return this.ex != null;
4291
    }
4292
 
4293
    public void setExIsSet(boolean value) {
4294
      if (!value) {
4295
        this.ex = null;
4296
      }
4297
    }
4298
 
4299
    public void setFieldValue(_Fields field, Object value) {
4300
      switch (field) {
4301
      case SUCCESS:
4302
        if (value == null) {
4303
          unsetSuccess();
4304
        } else {
4305
          setSuccess((Transaction)value);
4306
        }
4307
        break;
4308
 
4309
      case EX:
4310
        if (value == null) {
4311
          unsetEx();
4312
        } else {
4313
          setEx((TransactionServiceException)value);
4314
        }
4315
        break;
4316
 
4317
      }
4318
    }
4319
 
4320
    public void setFieldValue(int fieldID, Object value) {
4321
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4322
    }
4323
 
4324
    public Object getFieldValue(_Fields field) {
4325
      switch (field) {
4326
      case SUCCESS:
4327
        return getSuccess();
4328
 
4329
      case EX:
4330
        return getEx();
4331
 
4332
      }
4333
      throw new IllegalStateException();
4334
    }
4335
 
4336
    public Object getFieldValue(int fieldId) {
4337
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4338
    }
4339
 
4340
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4341
    public boolean isSet(_Fields field) {
4342
      switch (field) {
4343
      case SUCCESS:
4344
        return isSetSuccess();
4345
      case EX:
4346
        return isSetEx();
4347
      }
4348
      throw new IllegalStateException();
4349
    }
4350
 
4351
    public boolean isSet(int fieldID) {
4352
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4353
    }
4354
 
4355
    @Override
4356
    public boolean equals(Object that) {
4357
      if (that == null)
4358
        return false;
4359
      if (that instanceof getTransaction_result)
4360
        return this.equals((getTransaction_result)that);
4361
      return false;
4362
    }
4363
 
4364
    public boolean equals(getTransaction_result that) {
4365
      if (that == null)
4366
        return false;
4367
 
4368
      boolean this_present_success = true && this.isSetSuccess();
4369
      boolean that_present_success = true && that.isSetSuccess();
4370
      if (this_present_success || that_present_success) {
4371
        if (!(this_present_success && that_present_success))
4372
          return false;
4373
        if (!this.success.equals(that.success))
4374
          return false;
4375
      }
4376
 
4377
      boolean this_present_ex = true && this.isSetEx();
4378
      boolean that_present_ex = true && that.isSetEx();
4379
      if (this_present_ex || that_present_ex) {
4380
        if (!(this_present_ex && that_present_ex))
4381
          return false;
4382
        if (!this.ex.equals(that.ex))
4383
          return false;
4384
      }
4385
 
4386
      return true;
4387
    }
4388
 
4389
    @Override
4390
    public int hashCode() {
4391
      return 0;
4392
    }
4393
 
684 chandransh 4394
    public int compareTo(getTransaction_result other) {
4395
      if (!getClass().equals(other.getClass())) {
4396
        return getClass().getName().compareTo(other.getClass().getName());
4397
      }
4398
 
4399
      int lastComparison = 0;
4400
      getTransaction_result typedOther = (getTransaction_result)other;
4401
 
4402
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4403
      if (lastComparison != 0) {
4404
        return lastComparison;
4405
      }
4406
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4407
      if (lastComparison != 0) {
4408
        return lastComparison;
4409
      }
4410
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4411
      if (lastComparison != 0) {
4412
        return lastComparison;
4413
      }
4414
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4415
      if (lastComparison != 0) {
4416
        return lastComparison;
4417
      }
4418
      return 0;
4419
    }
4420
 
68 ashish 4421
    public void read(TProtocol iprot) throws TException {
4422
      TField field;
4423
      iprot.readStructBegin();
4424
      while (true)
4425
      {
4426
        field = iprot.readFieldBegin();
4427
        if (field.type == TType.STOP) { 
4428
          break;
4429
        }
4430
        _Fields fieldId = _Fields.findByThriftId(field.id);
4431
        if (fieldId == null) {
4432
          TProtocolUtil.skip(iprot, field.type);
4433
        } else {
4434
          switch (fieldId) {
4435
            case SUCCESS:
4436
              if (field.type == TType.STRUCT) {
4437
                this.success = new Transaction();
4438
                this.success.read(iprot);
4439
              } else { 
4440
                TProtocolUtil.skip(iprot, field.type);
4441
              }
4442
              break;
4443
            case EX:
4444
              if (field.type == TType.STRUCT) {
4445
                this.ex = new TransactionServiceException();
4446
                this.ex.read(iprot);
4447
              } else { 
4448
                TProtocolUtil.skip(iprot, field.type);
4449
              }
4450
              break;
4451
          }
4452
          iprot.readFieldEnd();
4453
        }
4454
      }
4455
      iprot.readStructEnd();
4456
      validate();
4457
    }
4458
 
4459
    public void write(TProtocol oprot) throws TException {
4460
      oprot.writeStructBegin(STRUCT_DESC);
4461
 
4462
      if (this.isSetSuccess()) {
4463
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4464
        this.success.write(oprot);
4465
        oprot.writeFieldEnd();
4466
      } else if (this.isSetEx()) {
4467
        oprot.writeFieldBegin(EX_FIELD_DESC);
4468
        this.ex.write(oprot);
4469
        oprot.writeFieldEnd();
4470
      }
4471
      oprot.writeFieldStop();
4472
      oprot.writeStructEnd();
4473
    }
4474
 
4475
    @Override
4476
    public String toString() {
4477
      StringBuilder sb = new StringBuilder("getTransaction_result(");
4478
      boolean first = true;
4479
 
4480
      sb.append("success:");
4481
      if (this.success == null) {
4482
        sb.append("null");
4483
      } else {
4484
        sb.append(this.success);
4485
      }
4486
      first = false;
4487
      if (!first) sb.append(", ");
4488
      sb.append("ex:");
4489
      if (this.ex == null) {
4490
        sb.append("null");
4491
      } else {
4492
        sb.append(this.ex);
4493
      }
4494
      first = false;
4495
      sb.append(")");
4496
      return sb.toString();
4497
    }
4498
 
4499
    public void validate() throws TException {
4500
      // check for required fields
4501
    }
4502
 
4503
  }
4504
 
4505
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4506
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4507
 
4508
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4509
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4510
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4511
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4512
 
4513
    private long customerId;
132 ashish 4514
    private long from_date;
4515
    private long to_date;
68 ashish 4516
    private TransactionStatus status;
4517
 
4518
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4519
    public enum _Fields implements TFieldIdEnum {
4520
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4521
      FROM_DATE((short)2, "from_date"),
4522
      TO_DATE((short)3, "to_date"),
68 ashish 4523
      /**
4524
       * 
4525
       * @see TransactionStatus
4526
       */
4527
      STATUS((short)4, "status");
4528
 
4529
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4530
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4531
 
4532
      static {
4533
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4534
          byId.put((int)field._thriftId, field);
4535
          byName.put(field.getFieldName(), field);
4536
        }
4537
      }
4538
 
4539
      /**
4540
       * Find the _Fields constant that matches fieldId, or null if its not found.
4541
       */
4542
      public static _Fields findByThriftId(int fieldId) {
4543
        return byId.get(fieldId);
4544
      }
4545
 
4546
      /**
4547
       * Find the _Fields constant that matches fieldId, throwing an exception
4548
       * if it is not found.
4549
       */
4550
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4551
        _Fields fields = findByThriftId(fieldId);
4552
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4553
        return fields;
4554
      }
4555
 
4556
      /**
4557
       * Find the _Fields constant that matches name, or null if its not found.
4558
       */
4559
      public static _Fields findByName(String name) {
4560
        return byName.get(name);
4561
      }
4562
 
4563
      private final short _thriftId;
4564
      private final String _fieldName;
4565
 
4566
      _Fields(short thriftId, String fieldName) {
4567
        _thriftId = thriftId;
4568
        _fieldName = fieldName;
4569
      }
4570
 
4571
      public short getThriftFieldId() {
4572
        return _thriftId;
4573
      }
4574
 
4575
      public String getFieldName() {
4576
        return _fieldName;
4577
      }
4578
    }
4579
 
4580
    // isset id assignments
4581
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4582
    private static final int __FROM_DATE_ISSET_ID = 1;
4583
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4584
    private BitSet __isset_bit_vector = new BitSet(3);
4585
 
4586
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4587
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4588
          new FieldValueMetaData(TType.I64)));
132 ashish 4589
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4590
          new FieldValueMetaData(TType.I64)));
132 ashish 4591
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4592
          new FieldValueMetaData(TType.I64)));
4593
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4594
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4595
    }});
4596
 
4597
    static {
4598
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4599
    }
4600
 
4601
    public getTransactionsForCustomer_args() {
4602
    }
4603
 
4604
    public getTransactionsForCustomer_args(
4605
      long customerId,
132 ashish 4606
      long from_date,
4607
      long to_date,
68 ashish 4608
      TransactionStatus status)
4609
    {
4610
      this();
4611
      this.customerId = customerId;
4612
      setCustomerIdIsSet(true);
132 ashish 4613
      this.from_date = from_date;
4614
      setFrom_dateIsSet(true);
4615
      this.to_date = to_date;
4616
      setTo_dateIsSet(true);
68 ashish 4617
      this.status = status;
4618
    }
4619
 
4620
    /**
4621
     * Performs a deep copy on <i>other</i>.
4622
     */
4623
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4624
      __isset_bit_vector.clear();
4625
      __isset_bit_vector.or(other.__isset_bit_vector);
4626
      this.customerId = other.customerId;
132 ashish 4627
      this.from_date = other.from_date;
4628
      this.to_date = other.to_date;
68 ashish 4629
      if (other.isSetStatus()) {
4630
        this.status = other.status;
4631
      }
4632
    }
4633
 
4634
    public getTransactionsForCustomer_args deepCopy() {
4635
      return new getTransactionsForCustomer_args(this);
4636
    }
4637
 
4638
    @Deprecated
4639
    public getTransactionsForCustomer_args clone() {
4640
      return new getTransactionsForCustomer_args(this);
4641
    }
4642
 
4643
    public long getCustomerId() {
4644
      return this.customerId;
4645
    }
4646
 
4647
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4648
      this.customerId = customerId;
4649
      setCustomerIdIsSet(true);
4650
      return this;
4651
    }
4652
 
4653
    public void unsetCustomerId() {
4654
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4655
    }
4656
 
4657
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4658
    public boolean isSetCustomerId() {
4659
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4660
    }
4661
 
4662
    public void setCustomerIdIsSet(boolean value) {
4663
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4664
    }
4665
 
132 ashish 4666
    public long getFrom_date() {
4667
      return this.from_date;
68 ashish 4668
    }
4669
 
132 ashish 4670
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4671
      this.from_date = from_date;
4672
      setFrom_dateIsSet(true);
68 ashish 4673
      return this;
4674
    }
4675
 
132 ashish 4676
    public void unsetFrom_date() {
4677
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4678
    }
4679
 
132 ashish 4680
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4681
    public boolean isSetFrom_date() {
4682
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4683
    }
4684
 
132 ashish 4685
    public void setFrom_dateIsSet(boolean value) {
4686
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4687
    }
4688
 
132 ashish 4689
    public long getTo_date() {
4690
      return this.to_date;
68 ashish 4691
    }
4692
 
132 ashish 4693
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4694
      this.to_date = to_date;
4695
      setTo_dateIsSet(true);
68 ashish 4696
      return this;
4697
    }
4698
 
132 ashish 4699
    public void unsetTo_date() {
4700
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4701
    }
4702
 
132 ashish 4703
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4704
    public boolean isSetTo_date() {
4705
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4706
    }
4707
 
132 ashish 4708
    public void setTo_dateIsSet(boolean value) {
4709
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4710
    }
4711
 
4712
    /**
4713
     * 
4714
     * @see TransactionStatus
4715
     */
4716
    public TransactionStatus getStatus() {
4717
      return this.status;
4718
    }
4719
 
4720
    /**
4721
     * 
4722
     * @see TransactionStatus
4723
     */
4724
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4725
      this.status = status;
4726
      return this;
4727
    }
4728
 
4729
    public void unsetStatus() {
4730
      this.status = null;
4731
    }
4732
 
4733
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4734
    public boolean isSetStatus() {
4735
      return this.status != null;
4736
    }
4737
 
4738
    public void setStatusIsSet(boolean value) {
4739
      if (!value) {
4740
        this.status = null;
4741
      }
4742
    }
4743
 
4744
    public void setFieldValue(_Fields field, Object value) {
4745
      switch (field) {
4746
      case CUSTOMER_ID:
4747
        if (value == null) {
4748
          unsetCustomerId();
4749
        } else {
4750
          setCustomerId((Long)value);
4751
        }
4752
        break;
4753
 
132 ashish 4754
      case FROM_DATE:
68 ashish 4755
        if (value == null) {
132 ashish 4756
          unsetFrom_date();
68 ashish 4757
        } else {
132 ashish 4758
          setFrom_date((Long)value);
68 ashish 4759
        }
4760
        break;
4761
 
132 ashish 4762
      case TO_DATE:
68 ashish 4763
        if (value == null) {
132 ashish 4764
          unsetTo_date();
68 ashish 4765
        } else {
132 ashish 4766
          setTo_date((Long)value);
68 ashish 4767
        }
4768
        break;
4769
 
4770
      case STATUS:
4771
        if (value == null) {
4772
          unsetStatus();
4773
        } else {
4774
          setStatus((TransactionStatus)value);
4775
        }
4776
        break;
4777
 
4778
      }
4779
    }
4780
 
4781
    public void setFieldValue(int fieldID, Object value) {
4782
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4783
    }
4784
 
4785
    public Object getFieldValue(_Fields field) {
4786
      switch (field) {
4787
      case CUSTOMER_ID:
4788
        return new Long(getCustomerId());
4789
 
132 ashish 4790
      case FROM_DATE:
4791
        return new Long(getFrom_date());
68 ashish 4792
 
132 ashish 4793
      case TO_DATE:
4794
        return new Long(getTo_date());
68 ashish 4795
 
4796
      case STATUS:
4797
        return getStatus();
4798
 
4799
      }
4800
      throw new IllegalStateException();
4801
    }
4802
 
4803
    public Object getFieldValue(int fieldId) {
4804
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4805
    }
4806
 
4807
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4808
    public boolean isSet(_Fields field) {
4809
      switch (field) {
4810
      case CUSTOMER_ID:
4811
        return isSetCustomerId();
132 ashish 4812
      case FROM_DATE:
4813
        return isSetFrom_date();
4814
      case TO_DATE:
4815
        return isSetTo_date();
68 ashish 4816
      case STATUS:
4817
        return isSetStatus();
4818
      }
4819
      throw new IllegalStateException();
4820
    }
4821
 
4822
    public boolean isSet(int fieldID) {
4823
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4824
    }
4825
 
4826
    @Override
4827
    public boolean equals(Object that) {
4828
      if (that == null)
4829
        return false;
4830
      if (that instanceof getTransactionsForCustomer_args)
4831
        return this.equals((getTransactionsForCustomer_args)that);
4832
      return false;
4833
    }
4834
 
4835
    public boolean equals(getTransactionsForCustomer_args that) {
4836
      if (that == null)
4837
        return false;
4838
 
4839
      boolean this_present_customerId = true;
4840
      boolean that_present_customerId = true;
4841
      if (this_present_customerId || that_present_customerId) {
4842
        if (!(this_present_customerId && that_present_customerId))
4843
          return false;
4844
        if (this.customerId != that.customerId)
4845
          return false;
4846
      }
4847
 
132 ashish 4848
      boolean this_present_from_date = true;
4849
      boolean that_present_from_date = true;
4850
      if (this_present_from_date || that_present_from_date) {
4851
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4852
          return false;
132 ashish 4853
        if (this.from_date != that.from_date)
68 ashish 4854
          return false;
4855
      }
4856
 
132 ashish 4857
      boolean this_present_to_date = true;
4858
      boolean that_present_to_date = true;
4859
      if (this_present_to_date || that_present_to_date) {
4860
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4861
          return false;
132 ashish 4862
        if (this.to_date != that.to_date)
68 ashish 4863
          return false;
4864
      }
4865
 
4866
      boolean this_present_status = true && this.isSetStatus();
4867
      boolean that_present_status = true && that.isSetStatus();
4868
      if (this_present_status || that_present_status) {
4869
        if (!(this_present_status && that_present_status))
4870
          return false;
4871
        if (!this.status.equals(that.status))
4872
          return false;
4873
      }
4874
 
4875
      return true;
4876
    }
4877
 
4878
    @Override
4879
    public int hashCode() {
4880
      return 0;
4881
    }
4882
 
4883
    public int compareTo(getTransactionsForCustomer_args other) {
4884
      if (!getClass().equals(other.getClass())) {
4885
        return getClass().getName().compareTo(other.getClass().getName());
4886
      }
4887
 
4888
      int lastComparison = 0;
4889
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4890
 
4891
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4892
      if (lastComparison != 0) {
4893
        return lastComparison;
4894
      }
4895
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4896
      if (lastComparison != 0) {
4897
        return lastComparison;
4898
      }
132 ashish 4899
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4900
      if (lastComparison != 0) {
4901
        return lastComparison;
4902
      }
132 ashish 4903
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4904
      if (lastComparison != 0) {
4905
        return lastComparison;
4906
      }
132 ashish 4907
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4908
      if (lastComparison != 0) {
4909
        return lastComparison;
4910
      }
132 ashish 4911
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4912
      if (lastComparison != 0) {
4913
        return lastComparison;
4914
      }
4915
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4916
      if (lastComparison != 0) {
4917
        return lastComparison;
4918
      }
4919
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4920
      if (lastComparison != 0) {
4921
        return lastComparison;
4922
      }
4923
      return 0;
4924
    }
4925
 
4926
    public void read(TProtocol iprot) throws TException {
4927
      TField field;
4928
      iprot.readStructBegin();
4929
      while (true)
4930
      {
4931
        field = iprot.readFieldBegin();
4932
        if (field.type == TType.STOP) { 
4933
          break;
4934
        }
4935
        _Fields fieldId = _Fields.findByThriftId(field.id);
4936
        if (fieldId == null) {
4937
          TProtocolUtil.skip(iprot, field.type);
4938
        } else {
4939
          switch (fieldId) {
4940
            case CUSTOMER_ID:
4941
              if (field.type == TType.I64) {
4942
                this.customerId = iprot.readI64();
4943
                setCustomerIdIsSet(true);
4944
              } else { 
4945
                TProtocolUtil.skip(iprot, field.type);
4946
              }
4947
              break;
132 ashish 4948
            case FROM_DATE:
68 ashish 4949
              if (field.type == TType.I64) {
132 ashish 4950
                this.from_date = iprot.readI64();
4951
                setFrom_dateIsSet(true);
68 ashish 4952
              } else { 
4953
                TProtocolUtil.skip(iprot, field.type);
4954
              }
4955
              break;
132 ashish 4956
            case TO_DATE:
68 ashish 4957
              if (field.type == TType.I64) {
132 ashish 4958
                this.to_date = iprot.readI64();
4959
                setTo_dateIsSet(true);
68 ashish 4960
              } else { 
4961
                TProtocolUtil.skip(iprot, field.type);
4962
              }
4963
              break;
4964
            case STATUS:
4965
              if (field.type == TType.I32) {
4966
                this.status = TransactionStatus.findByValue(iprot.readI32());
4967
              } else { 
4968
                TProtocolUtil.skip(iprot, field.type);
4969
              }
4970
              break;
4971
          }
4972
          iprot.readFieldEnd();
4973
        }
4974
      }
4975
      iprot.readStructEnd();
4976
      validate();
4977
    }
4978
 
4979
    public void write(TProtocol oprot) throws TException {
4980
      validate();
4981
 
4982
      oprot.writeStructBegin(STRUCT_DESC);
4983
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4984
      oprot.writeI64(this.customerId);
4985
      oprot.writeFieldEnd();
132 ashish 4986
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4987
      oprot.writeI64(this.from_date);
68 ashish 4988
      oprot.writeFieldEnd();
132 ashish 4989
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4990
      oprot.writeI64(this.to_date);
68 ashish 4991
      oprot.writeFieldEnd();
4992
      if (this.status != null) {
4993
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4994
        oprot.writeI32(this.status.getValue());
4995
        oprot.writeFieldEnd();
4996
      }
4997
      oprot.writeFieldStop();
4998
      oprot.writeStructEnd();
4999
    }
5000
 
5001
    @Override
5002
    public String toString() {
5003
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
5004
      boolean first = true;
5005
 
5006
      sb.append("customerId:");
5007
      sb.append(this.customerId);
5008
      first = false;
5009
      if (!first) sb.append(", ");
132 ashish 5010
      sb.append("from_date:");
5011
      sb.append(this.from_date);
68 ashish 5012
      first = false;
5013
      if (!first) sb.append(", ");
132 ashish 5014
      sb.append("to_date:");
5015
      sb.append(this.to_date);
68 ashish 5016
      first = false;
5017
      if (!first) sb.append(", ");
5018
      sb.append("status:");
5019
      if (this.status == null) {
5020
        sb.append("null");
5021
      } else {
5022
        String status_name = status.name();
5023
        if (status_name != null) {
5024
          sb.append(status_name);
5025
          sb.append(" (");
5026
        }
5027
        sb.append(this.status);
5028
        if (status_name != null) {
5029
          sb.append(")");
5030
        }
5031
      }
5032
      first = false;
5033
      sb.append(")");
5034
      return sb.toString();
5035
    }
5036
 
5037
    public void validate() throws TException {
5038
      // check for required fields
5039
    }
5040
 
5041
  }
5042
 
684 chandransh 5043
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 5044
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
5045
 
5046
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5047
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5048
 
5049
    private List<Transaction> success;
5050
    private TransactionServiceException ex;
5051
 
5052
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5053
    public enum _Fields implements TFieldIdEnum {
5054
      SUCCESS((short)0, "success"),
5055
      EX((short)1, "ex");
5056
 
5057
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5058
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5059
 
5060
      static {
5061
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5062
          byId.put((int)field._thriftId, field);
5063
          byName.put(field.getFieldName(), field);
5064
        }
5065
      }
5066
 
5067
      /**
5068
       * Find the _Fields constant that matches fieldId, or null if its not found.
5069
       */
5070
      public static _Fields findByThriftId(int fieldId) {
5071
        return byId.get(fieldId);
5072
      }
5073
 
5074
      /**
5075
       * Find the _Fields constant that matches fieldId, throwing an exception
5076
       * if it is not found.
5077
       */
5078
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5079
        _Fields fields = findByThriftId(fieldId);
5080
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5081
        return fields;
5082
      }
5083
 
5084
      /**
5085
       * Find the _Fields constant that matches name, or null if its not found.
5086
       */
5087
      public static _Fields findByName(String name) {
5088
        return byName.get(name);
5089
      }
5090
 
5091
      private final short _thriftId;
5092
      private final String _fieldName;
5093
 
5094
      _Fields(short thriftId, String fieldName) {
5095
        _thriftId = thriftId;
5096
        _fieldName = fieldName;
5097
      }
5098
 
5099
      public short getThriftFieldId() {
5100
        return _thriftId;
5101
      }
5102
 
5103
      public String getFieldName() {
5104
        return _fieldName;
5105
      }
5106
    }
5107
 
5108
    // isset id assignments
5109
 
5110
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5111
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5112
          new ListMetaData(TType.LIST, 
5113
              new StructMetaData(TType.STRUCT, Transaction.class))));
5114
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5115
          new FieldValueMetaData(TType.STRUCT)));
5116
    }});
5117
 
5118
    static {
5119
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
5120
    }
5121
 
5122
    public getTransactionsForCustomer_result() {
5123
    }
5124
 
5125
    public getTransactionsForCustomer_result(
5126
      List<Transaction> success,
5127
      TransactionServiceException ex)
5128
    {
5129
      this();
5130
      this.success = success;
5131
      this.ex = ex;
5132
    }
5133
 
5134
    /**
5135
     * Performs a deep copy on <i>other</i>.
5136
     */
5137
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
5138
      if (other.isSetSuccess()) {
5139
        List<Transaction> __this__success = new ArrayList<Transaction>();
5140
        for (Transaction other_element : other.success) {
5141
          __this__success.add(new Transaction(other_element));
5142
        }
5143
        this.success = __this__success;
5144
      }
5145
      if (other.isSetEx()) {
5146
        this.ex = new TransactionServiceException(other.ex);
5147
      }
5148
    }
5149
 
5150
    public getTransactionsForCustomer_result deepCopy() {
5151
      return new getTransactionsForCustomer_result(this);
5152
    }
5153
 
5154
    @Deprecated
5155
    public getTransactionsForCustomer_result clone() {
5156
      return new getTransactionsForCustomer_result(this);
5157
    }
5158
 
5159
    public int getSuccessSize() {
5160
      return (this.success == null) ? 0 : this.success.size();
5161
    }
5162
 
5163
    public java.util.Iterator<Transaction> getSuccessIterator() {
5164
      return (this.success == null) ? null : this.success.iterator();
5165
    }
5166
 
5167
    public void addToSuccess(Transaction elem) {
5168
      if (this.success == null) {
5169
        this.success = new ArrayList<Transaction>();
5170
      }
5171
      this.success.add(elem);
5172
    }
5173
 
5174
    public List<Transaction> getSuccess() {
5175
      return this.success;
5176
    }
5177
 
5178
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
5179
      this.success = success;
5180
      return this;
5181
    }
5182
 
5183
    public void unsetSuccess() {
5184
      this.success = null;
5185
    }
5186
 
5187
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5188
    public boolean isSetSuccess() {
5189
      return this.success != null;
5190
    }
5191
 
5192
    public void setSuccessIsSet(boolean value) {
5193
      if (!value) {
5194
        this.success = null;
5195
      }
5196
    }
5197
 
5198
    public TransactionServiceException getEx() {
5199
      return this.ex;
5200
    }
5201
 
5202
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
5203
      this.ex = ex;
5204
      return this;
5205
    }
5206
 
5207
    public void unsetEx() {
5208
      this.ex = null;
5209
    }
5210
 
5211
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5212
    public boolean isSetEx() {
5213
      return this.ex != null;
5214
    }
5215
 
5216
    public void setExIsSet(boolean value) {
5217
      if (!value) {
5218
        this.ex = null;
5219
      }
5220
    }
5221
 
5222
    public void setFieldValue(_Fields field, Object value) {
5223
      switch (field) {
5224
      case SUCCESS:
5225
        if (value == null) {
5226
          unsetSuccess();
5227
        } else {
5228
          setSuccess((List<Transaction>)value);
5229
        }
5230
        break;
5231
 
5232
      case EX:
5233
        if (value == null) {
5234
          unsetEx();
5235
        } else {
5236
          setEx((TransactionServiceException)value);
5237
        }
5238
        break;
5239
 
5240
      }
5241
    }
5242
 
5243
    public void setFieldValue(int fieldID, Object value) {
5244
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5245
    }
5246
 
5247
    public Object getFieldValue(_Fields field) {
5248
      switch (field) {
5249
      case SUCCESS:
5250
        return getSuccess();
5251
 
5252
      case EX:
5253
        return getEx();
5254
 
5255
      }
5256
      throw new IllegalStateException();
5257
    }
5258
 
5259
    public Object getFieldValue(int fieldId) {
5260
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5261
    }
5262
 
5263
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5264
    public boolean isSet(_Fields field) {
5265
      switch (field) {
5266
      case SUCCESS:
5267
        return isSetSuccess();
5268
      case EX:
5269
        return isSetEx();
5270
      }
5271
      throw new IllegalStateException();
5272
    }
5273
 
5274
    public boolean isSet(int fieldID) {
5275
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5276
    }
5277
 
5278
    @Override
5279
    public boolean equals(Object that) {
5280
      if (that == null)
5281
        return false;
5282
      if (that instanceof getTransactionsForCustomer_result)
5283
        return this.equals((getTransactionsForCustomer_result)that);
5284
      return false;
5285
    }
5286
 
5287
    public boolean equals(getTransactionsForCustomer_result that) {
5288
      if (that == null)
5289
        return false;
5290
 
5291
      boolean this_present_success = true && this.isSetSuccess();
5292
      boolean that_present_success = true && that.isSetSuccess();
5293
      if (this_present_success || that_present_success) {
5294
        if (!(this_present_success && that_present_success))
5295
          return false;
5296
        if (!this.success.equals(that.success))
5297
          return false;
5298
      }
5299
 
5300
      boolean this_present_ex = true && this.isSetEx();
5301
      boolean that_present_ex = true && that.isSetEx();
5302
      if (this_present_ex || that_present_ex) {
5303
        if (!(this_present_ex && that_present_ex))
5304
          return false;
5305
        if (!this.ex.equals(that.ex))
5306
          return false;
5307
      }
5308
 
5309
      return true;
5310
    }
5311
 
5312
    @Override
5313
    public int hashCode() {
5314
      return 0;
5315
    }
5316
 
684 chandransh 5317
    public int compareTo(getTransactionsForCustomer_result other) {
5318
      if (!getClass().equals(other.getClass())) {
5319
        return getClass().getName().compareTo(other.getClass().getName());
5320
      }
5321
 
5322
      int lastComparison = 0;
5323
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
5324
 
5325
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5326
      if (lastComparison != 0) {
5327
        return lastComparison;
5328
      }
5329
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5330
      if (lastComparison != 0) {
5331
        return lastComparison;
5332
      }
5333
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5334
      if (lastComparison != 0) {
5335
        return lastComparison;
5336
      }
5337
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5338
      if (lastComparison != 0) {
5339
        return lastComparison;
5340
      }
5341
      return 0;
5342
    }
5343
 
68 ashish 5344
    public void read(TProtocol iprot) throws TException {
5345
      TField field;
5346
      iprot.readStructBegin();
5347
      while (true)
5348
      {
5349
        field = iprot.readFieldBegin();
5350
        if (field.type == TType.STOP) { 
5351
          break;
5352
        }
5353
        _Fields fieldId = _Fields.findByThriftId(field.id);
5354
        if (fieldId == null) {
5355
          TProtocolUtil.skip(iprot, field.type);
5356
        } else {
5357
          switch (fieldId) {
5358
            case SUCCESS:
5359
              if (field.type == TType.LIST) {
5360
                {
684 chandransh 5361
                  TList _list8 = iprot.readListBegin();
5362
                  this.success = new ArrayList<Transaction>(_list8.size);
5363
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 5364
                  {
684 chandransh 5365
                    Transaction _elem10;
5366
                    _elem10 = new Transaction();
5367
                    _elem10.read(iprot);
5368
                    this.success.add(_elem10);
68 ashish 5369
                  }
5370
                  iprot.readListEnd();
5371
                }
5372
              } else { 
5373
                TProtocolUtil.skip(iprot, field.type);
5374
              }
5375
              break;
5376
            case EX:
5377
              if (field.type == TType.STRUCT) {
5378
                this.ex = new TransactionServiceException();
5379
                this.ex.read(iprot);
5380
              } else { 
5381
                TProtocolUtil.skip(iprot, field.type);
5382
              }
5383
              break;
5384
          }
5385
          iprot.readFieldEnd();
5386
        }
5387
      }
5388
      iprot.readStructEnd();
5389
      validate();
5390
    }
5391
 
5392
    public void write(TProtocol oprot) throws TException {
5393
      oprot.writeStructBegin(STRUCT_DESC);
5394
 
5395
      if (this.isSetSuccess()) {
5396
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5397
        {
5398
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5399
          for (Transaction _iter11 : this.success)
68 ashish 5400
          {
684 chandransh 5401
            _iter11.write(oprot);
68 ashish 5402
          }
5403
          oprot.writeListEnd();
5404
        }
5405
        oprot.writeFieldEnd();
5406
      } else if (this.isSetEx()) {
5407
        oprot.writeFieldBegin(EX_FIELD_DESC);
5408
        this.ex.write(oprot);
5409
        oprot.writeFieldEnd();
5410
      }
5411
      oprot.writeFieldStop();
5412
      oprot.writeStructEnd();
5413
    }
5414
 
5415
    @Override
5416
    public String toString() {
5417
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5418
      boolean first = true;
5419
 
5420
      sb.append("success:");
5421
      if (this.success == null) {
5422
        sb.append("null");
5423
      } else {
5424
        sb.append(this.success);
5425
      }
5426
      first = false;
5427
      if (!first) sb.append(", ");
5428
      sb.append("ex:");
5429
      if (this.ex == null) {
5430
        sb.append("null");
5431
      } else {
5432
        sb.append(this.ex);
5433
      }
5434
      first = false;
5435
      sb.append(")");
5436
      return sb.toString();
5437
    }
5438
 
5439
    public void validate() throws TException {
5440
      // check for required fields
5441
    }
5442
 
5443
  }
5444
 
132 ashish 5445
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
5446
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
5447
 
5448
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
5449
 
5450
    private long shoppingCartId;
5451
 
5452
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5453
    public enum _Fields implements TFieldIdEnum {
5454
      SHOPPING_CART_ID((short)1, "shoppingCartId");
5455
 
5456
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5457
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5458
 
5459
      static {
5460
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5461
          byId.put((int)field._thriftId, field);
5462
          byName.put(field.getFieldName(), field);
5463
        }
5464
      }
5465
 
5466
      /**
5467
       * Find the _Fields constant that matches fieldId, or null if its not found.
5468
       */
5469
      public static _Fields findByThriftId(int fieldId) {
5470
        return byId.get(fieldId);
5471
      }
5472
 
5473
      /**
5474
       * Find the _Fields constant that matches fieldId, throwing an exception
5475
       * if it is not found.
5476
       */
5477
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5478
        _Fields fields = findByThriftId(fieldId);
5479
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5480
        return fields;
5481
      }
5482
 
5483
      /**
5484
       * Find the _Fields constant that matches name, or null if its not found.
5485
       */
5486
      public static _Fields findByName(String name) {
5487
        return byName.get(name);
5488
      }
5489
 
5490
      private final short _thriftId;
5491
      private final String _fieldName;
5492
 
5493
      _Fields(short thriftId, String fieldName) {
5494
        _thriftId = thriftId;
5495
        _fieldName = fieldName;
5496
      }
5497
 
5498
      public short getThriftFieldId() {
5499
        return _thriftId;
5500
      }
5501
 
5502
      public String getFieldName() {
5503
        return _fieldName;
5504
      }
5505
    }
5506
 
5507
    // isset id assignments
5508
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
5509
    private BitSet __isset_bit_vector = new BitSet(1);
5510
 
5511
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5512
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
5513
          new FieldValueMetaData(TType.I64)));
5514
    }});
5515
 
5516
    static {
5517
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
5518
    }
5519
 
5520
    public getTransactionsForShoppingCartId_args() {
5521
    }
5522
 
5523
    public getTransactionsForShoppingCartId_args(
5524
      long shoppingCartId)
5525
    {
5526
      this();
5527
      this.shoppingCartId = shoppingCartId;
5528
      setShoppingCartIdIsSet(true);
5529
    }
5530
 
5531
    /**
5532
     * Performs a deep copy on <i>other</i>.
5533
     */
5534
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
5535
      __isset_bit_vector.clear();
5536
      __isset_bit_vector.or(other.__isset_bit_vector);
5537
      this.shoppingCartId = other.shoppingCartId;
5538
    }
5539
 
5540
    public getTransactionsForShoppingCartId_args deepCopy() {
5541
      return new getTransactionsForShoppingCartId_args(this);
5542
    }
5543
 
5544
    @Deprecated
5545
    public getTransactionsForShoppingCartId_args clone() {
5546
      return new getTransactionsForShoppingCartId_args(this);
5547
    }
5548
 
5549
    public long getShoppingCartId() {
5550
      return this.shoppingCartId;
5551
    }
5552
 
5553
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5554
      this.shoppingCartId = shoppingCartId;
5555
      setShoppingCartIdIsSet(true);
5556
      return this;
5557
    }
5558
 
5559
    public void unsetShoppingCartId() {
5560
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5561
    }
5562
 
5563
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5564
    public boolean isSetShoppingCartId() {
5565
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5566
    }
5567
 
5568
    public void setShoppingCartIdIsSet(boolean value) {
5569
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5570
    }
5571
 
5572
    public void setFieldValue(_Fields field, Object value) {
5573
      switch (field) {
5574
      case SHOPPING_CART_ID:
5575
        if (value == null) {
5576
          unsetShoppingCartId();
5577
        } else {
5578
          setShoppingCartId((Long)value);
5579
        }
5580
        break;
5581
 
5582
      }
5583
    }
5584
 
5585
    public void setFieldValue(int fieldID, Object value) {
5586
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5587
    }
5588
 
5589
    public Object getFieldValue(_Fields field) {
5590
      switch (field) {
5591
      case SHOPPING_CART_ID:
5592
        return new Long(getShoppingCartId());
5593
 
5594
      }
5595
      throw new IllegalStateException();
5596
    }
5597
 
5598
    public Object getFieldValue(int fieldId) {
5599
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5600
    }
5601
 
5602
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5603
    public boolean isSet(_Fields field) {
5604
      switch (field) {
5605
      case SHOPPING_CART_ID:
5606
        return isSetShoppingCartId();
5607
      }
5608
      throw new IllegalStateException();
5609
    }
5610
 
5611
    public boolean isSet(int fieldID) {
5612
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5613
    }
5614
 
5615
    @Override
5616
    public boolean equals(Object that) {
5617
      if (that == null)
5618
        return false;
5619
      if (that instanceof getTransactionsForShoppingCartId_args)
5620
        return this.equals((getTransactionsForShoppingCartId_args)that);
5621
      return false;
5622
    }
5623
 
5624
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5625
      if (that == null)
5626
        return false;
5627
 
5628
      boolean this_present_shoppingCartId = true;
5629
      boolean that_present_shoppingCartId = true;
5630
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5631
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5632
          return false;
5633
        if (this.shoppingCartId != that.shoppingCartId)
5634
          return false;
5635
      }
5636
 
5637
      return true;
5638
    }
5639
 
5640
    @Override
5641
    public int hashCode() {
5642
      return 0;
5643
    }
5644
 
5645
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5646
      if (!getClass().equals(other.getClass())) {
5647
        return getClass().getName().compareTo(other.getClass().getName());
5648
      }
5649
 
5650
      int lastComparison = 0;
5651
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5652
 
5653
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5654
      if (lastComparison != 0) {
5655
        return lastComparison;
5656
      }
5657
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5658
      if (lastComparison != 0) {
5659
        return lastComparison;
5660
      }
5661
      return 0;
5662
    }
5663
 
5664
    public void read(TProtocol iprot) throws TException {
5665
      TField field;
5666
      iprot.readStructBegin();
5667
      while (true)
5668
      {
5669
        field = iprot.readFieldBegin();
5670
        if (field.type == TType.STOP) { 
5671
          break;
5672
        }
5673
        _Fields fieldId = _Fields.findByThriftId(field.id);
5674
        if (fieldId == null) {
5675
          TProtocolUtil.skip(iprot, field.type);
5676
        } else {
5677
          switch (fieldId) {
5678
            case SHOPPING_CART_ID:
5679
              if (field.type == TType.I64) {
5680
                this.shoppingCartId = iprot.readI64();
5681
                setShoppingCartIdIsSet(true);
5682
              } else { 
5683
                TProtocolUtil.skip(iprot, field.type);
5684
              }
5685
              break;
5686
          }
5687
          iprot.readFieldEnd();
5688
        }
5689
      }
5690
      iprot.readStructEnd();
5691
      validate();
5692
    }
5693
 
5694
    public void write(TProtocol oprot) throws TException {
5695
      validate();
5696
 
5697
      oprot.writeStructBegin(STRUCT_DESC);
5698
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5699
      oprot.writeI64(this.shoppingCartId);
5700
      oprot.writeFieldEnd();
5701
      oprot.writeFieldStop();
5702
      oprot.writeStructEnd();
5703
    }
5704
 
5705
    @Override
5706
    public String toString() {
5707
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5708
      boolean first = true;
5709
 
5710
      sb.append("shoppingCartId:");
5711
      sb.append(this.shoppingCartId);
5712
      first = false;
5713
      sb.append(")");
5714
      return sb.toString();
5715
    }
5716
 
5717
    public void validate() throws TException {
5718
      // check for required fields
5719
    }
5720
 
5721
  }
5722
 
684 chandransh 5723
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5724
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5725
 
5726
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5727
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5728
 
5729
    private List<Transaction> success;
5730
    private TransactionServiceException ex;
5731
 
5732
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5733
    public enum _Fields implements TFieldIdEnum {
5734
      SUCCESS((short)0, "success"),
5735
      EX((short)1, "ex");
5736
 
5737
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5738
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5739
 
5740
      static {
5741
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5742
          byId.put((int)field._thriftId, field);
5743
          byName.put(field.getFieldName(), field);
5744
        }
5745
      }
5746
 
5747
      /**
5748
       * Find the _Fields constant that matches fieldId, or null if its not found.
5749
       */
5750
      public static _Fields findByThriftId(int fieldId) {
5751
        return byId.get(fieldId);
5752
      }
5753
 
5754
      /**
5755
       * Find the _Fields constant that matches fieldId, throwing an exception
5756
       * if it is not found.
5757
       */
5758
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5759
        _Fields fields = findByThriftId(fieldId);
5760
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5761
        return fields;
5762
      }
5763
 
5764
      /**
5765
       * Find the _Fields constant that matches name, or null if its not found.
5766
       */
5767
      public static _Fields findByName(String name) {
5768
        return byName.get(name);
5769
      }
5770
 
5771
      private final short _thriftId;
5772
      private final String _fieldName;
5773
 
5774
      _Fields(short thriftId, String fieldName) {
5775
        _thriftId = thriftId;
5776
        _fieldName = fieldName;
5777
      }
5778
 
5779
      public short getThriftFieldId() {
5780
        return _thriftId;
5781
      }
5782
 
5783
      public String getFieldName() {
5784
        return _fieldName;
5785
      }
5786
    }
5787
 
5788
    // isset id assignments
5789
 
5790
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5791
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5792
          new ListMetaData(TType.LIST, 
5793
              new StructMetaData(TType.STRUCT, Transaction.class))));
5794
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5795
          new FieldValueMetaData(TType.STRUCT)));
5796
    }});
5797
 
5798
    static {
5799
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5800
    }
5801
 
5802
    public getTransactionsForShoppingCartId_result() {
5803
    }
5804
 
5805
    public getTransactionsForShoppingCartId_result(
5806
      List<Transaction> success,
5807
      TransactionServiceException ex)
5808
    {
5809
      this();
5810
      this.success = success;
5811
      this.ex = ex;
5812
    }
5813
 
5814
    /**
5815
     * Performs a deep copy on <i>other</i>.
5816
     */
5817
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5818
      if (other.isSetSuccess()) {
5819
        List<Transaction> __this__success = new ArrayList<Transaction>();
5820
        for (Transaction other_element : other.success) {
5821
          __this__success.add(new Transaction(other_element));
5822
        }
5823
        this.success = __this__success;
5824
      }
5825
      if (other.isSetEx()) {
5826
        this.ex = new TransactionServiceException(other.ex);
5827
      }
5828
    }
5829
 
5830
    public getTransactionsForShoppingCartId_result deepCopy() {
5831
      return new getTransactionsForShoppingCartId_result(this);
5832
    }
5833
 
5834
    @Deprecated
5835
    public getTransactionsForShoppingCartId_result clone() {
5836
      return new getTransactionsForShoppingCartId_result(this);
5837
    }
5838
 
5839
    public int getSuccessSize() {
5840
      return (this.success == null) ? 0 : this.success.size();
5841
    }
5842
 
5843
    public java.util.Iterator<Transaction> getSuccessIterator() {
5844
      return (this.success == null) ? null : this.success.iterator();
5845
    }
5846
 
5847
    public void addToSuccess(Transaction elem) {
5848
      if (this.success == null) {
5849
        this.success = new ArrayList<Transaction>();
5850
      }
5851
      this.success.add(elem);
5852
    }
5853
 
5854
    public List<Transaction> getSuccess() {
5855
      return this.success;
5856
    }
5857
 
5858
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5859
      this.success = success;
5860
      return this;
5861
    }
5862
 
5863
    public void unsetSuccess() {
5864
      this.success = null;
5865
    }
5866
 
5867
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5868
    public boolean isSetSuccess() {
5869
      return this.success != null;
5870
    }
5871
 
5872
    public void setSuccessIsSet(boolean value) {
5873
      if (!value) {
5874
        this.success = null;
5875
      }
5876
    }
5877
 
5878
    public TransactionServiceException getEx() {
5879
      return this.ex;
5880
    }
5881
 
5882
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5883
      this.ex = ex;
5884
      return this;
5885
    }
5886
 
5887
    public void unsetEx() {
5888
      this.ex = null;
5889
    }
5890
 
5891
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5892
    public boolean isSetEx() {
5893
      return this.ex != null;
5894
    }
5895
 
5896
    public void setExIsSet(boolean value) {
5897
      if (!value) {
5898
        this.ex = null;
5899
      }
5900
    }
5901
 
5902
    public void setFieldValue(_Fields field, Object value) {
5903
      switch (field) {
5904
      case SUCCESS:
5905
        if (value == null) {
5906
          unsetSuccess();
5907
        } else {
5908
          setSuccess((List<Transaction>)value);
5909
        }
5910
        break;
5911
 
5912
      case EX:
5913
        if (value == null) {
5914
          unsetEx();
5915
        } else {
5916
          setEx((TransactionServiceException)value);
5917
        }
5918
        break;
5919
 
5920
      }
5921
    }
5922
 
5923
    public void setFieldValue(int fieldID, Object value) {
5924
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5925
    }
5926
 
5927
    public Object getFieldValue(_Fields field) {
5928
      switch (field) {
5929
      case SUCCESS:
5930
        return getSuccess();
5931
 
5932
      case EX:
5933
        return getEx();
5934
 
5935
      }
5936
      throw new IllegalStateException();
5937
    }
5938
 
5939
    public Object getFieldValue(int fieldId) {
5940
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5941
    }
5942
 
5943
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5944
    public boolean isSet(_Fields field) {
5945
      switch (field) {
5946
      case SUCCESS:
5947
        return isSetSuccess();
5948
      case EX:
5949
        return isSetEx();
5950
      }
5951
      throw new IllegalStateException();
5952
    }
5953
 
5954
    public boolean isSet(int fieldID) {
5955
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5956
    }
5957
 
5958
    @Override
5959
    public boolean equals(Object that) {
5960
      if (that == null)
5961
        return false;
5962
      if (that instanceof getTransactionsForShoppingCartId_result)
5963
        return this.equals((getTransactionsForShoppingCartId_result)that);
5964
      return false;
5965
    }
5966
 
5967
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5968
      if (that == null)
5969
        return false;
5970
 
5971
      boolean this_present_success = true && this.isSetSuccess();
5972
      boolean that_present_success = true && that.isSetSuccess();
5973
      if (this_present_success || that_present_success) {
5974
        if (!(this_present_success && that_present_success))
5975
          return false;
5976
        if (!this.success.equals(that.success))
5977
          return false;
5978
      }
5979
 
5980
      boolean this_present_ex = true && this.isSetEx();
5981
      boolean that_present_ex = true && that.isSetEx();
5982
      if (this_present_ex || that_present_ex) {
5983
        if (!(this_present_ex && that_present_ex))
5984
          return false;
5985
        if (!this.ex.equals(that.ex))
5986
          return false;
5987
      }
5988
 
5989
      return true;
5990
    }
5991
 
5992
    @Override
5993
    public int hashCode() {
5994
      return 0;
5995
    }
5996
 
684 chandransh 5997
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5998
      if (!getClass().equals(other.getClass())) {
5999
        return getClass().getName().compareTo(other.getClass().getName());
6000
      }
6001
 
6002
      int lastComparison = 0;
6003
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
6004
 
6005
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6006
      if (lastComparison != 0) {
6007
        return lastComparison;
6008
      }
6009
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6010
      if (lastComparison != 0) {
6011
        return lastComparison;
6012
      }
6013
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6014
      if (lastComparison != 0) {
6015
        return lastComparison;
6016
      }
6017
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6018
      if (lastComparison != 0) {
6019
        return lastComparison;
6020
      }
6021
      return 0;
6022
    }
6023
 
132 ashish 6024
    public void read(TProtocol iprot) throws TException {
6025
      TField field;
6026
      iprot.readStructBegin();
6027
      while (true)
6028
      {
6029
        field = iprot.readFieldBegin();
6030
        if (field.type == TType.STOP) { 
6031
          break;
6032
        }
6033
        _Fields fieldId = _Fields.findByThriftId(field.id);
6034
        if (fieldId == null) {
6035
          TProtocolUtil.skip(iprot, field.type);
6036
        } else {
6037
          switch (fieldId) {
6038
            case SUCCESS:
6039
              if (field.type == TType.LIST) {
6040
                {
684 chandransh 6041
                  TList _list12 = iprot.readListBegin();
6042
                  this.success = new ArrayList<Transaction>(_list12.size);
6043
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 6044
                  {
684 chandransh 6045
                    Transaction _elem14;
6046
                    _elem14 = new Transaction();
6047
                    _elem14.read(iprot);
6048
                    this.success.add(_elem14);
132 ashish 6049
                  }
6050
                  iprot.readListEnd();
6051
                }
6052
              } else { 
6053
                TProtocolUtil.skip(iprot, field.type);
6054
              }
6055
              break;
6056
            case EX:
6057
              if (field.type == TType.STRUCT) {
6058
                this.ex = new TransactionServiceException();
6059
                this.ex.read(iprot);
6060
              } else { 
6061
                TProtocolUtil.skip(iprot, field.type);
6062
              }
6063
              break;
6064
          }
6065
          iprot.readFieldEnd();
6066
        }
6067
      }
6068
      iprot.readStructEnd();
6069
      validate();
6070
    }
6071
 
6072
    public void write(TProtocol oprot) throws TException {
6073
      oprot.writeStructBegin(STRUCT_DESC);
6074
 
6075
      if (this.isSetSuccess()) {
6076
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6077
        {
6078
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 6079
          for (Transaction _iter15 : this.success)
132 ashish 6080
          {
684 chandransh 6081
            _iter15.write(oprot);
132 ashish 6082
          }
6083
          oprot.writeListEnd();
6084
        }
6085
        oprot.writeFieldEnd();
6086
      } else if (this.isSetEx()) {
6087
        oprot.writeFieldBegin(EX_FIELD_DESC);
6088
        this.ex.write(oprot);
6089
        oprot.writeFieldEnd();
6090
      }
6091
      oprot.writeFieldStop();
6092
      oprot.writeStructEnd();
6093
    }
6094
 
6095
    @Override
6096
    public String toString() {
6097
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
6098
      boolean first = true;
6099
 
6100
      sb.append("success:");
6101
      if (this.success == null) {
6102
        sb.append("null");
6103
      } else {
6104
        sb.append(this.success);
6105
      }
6106
      first = false;
6107
      if (!first) sb.append(", ");
6108
      sb.append("ex:");
6109
      if (this.ex == null) {
6110
        sb.append("null");
6111
      } else {
6112
        sb.append(this.ex);
6113
      }
6114
      first = false;
6115
      sb.append(")");
6116
      return sb.toString();
6117
    }
6118
 
6119
    public void validate() throws TException {
6120
      // check for required fields
6121
    }
6122
 
6123
  }
6124
 
68 ashish 6125
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
6126
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
6127
 
6128
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6129
 
6130
    private long transactionId;
6131
 
6132
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6133
    public enum _Fields implements TFieldIdEnum {
6134
      TRANSACTION_ID((short)1, "transactionId");
6135
 
6136
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6138
 
6139
      static {
6140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6141
          byId.put((int)field._thriftId, field);
6142
          byName.put(field.getFieldName(), field);
6143
        }
6144
      }
6145
 
6146
      /**
6147
       * Find the _Fields constant that matches fieldId, or null if its not found.
6148
       */
6149
      public static _Fields findByThriftId(int fieldId) {
6150
        return byId.get(fieldId);
6151
      }
6152
 
6153
      /**
6154
       * Find the _Fields constant that matches fieldId, throwing an exception
6155
       * if it is not found.
6156
       */
6157
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6158
        _Fields fields = findByThriftId(fieldId);
6159
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6160
        return fields;
6161
      }
6162
 
6163
      /**
6164
       * Find the _Fields constant that matches name, or null if its not found.
6165
       */
6166
      public static _Fields findByName(String name) {
6167
        return byName.get(name);
6168
      }
6169
 
6170
      private final short _thriftId;
6171
      private final String _fieldName;
6172
 
6173
      _Fields(short thriftId, String fieldName) {
6174
        _thriftId = thriftId;
6175
        _fieldName = fieldName;
6176
      }
6177
 
6178
      public short getThriftFieldId() {
6179
        return _thriftId;
6180
      }
6181
 
6182
      public String getFieldName() {
6183
        return _fieldName;
6184
      }
6185
    }
6186
 
6187
    // isset id assignments
6188
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6189
    private BitSet __isset_bit_vector = new BitSet(1);
6190
 
6191
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6192
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6193
          new FieldValueMetaData(TType.I64)));
6194
    }});
6195
 
6196
    static {
6197
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
6198
    }
6199
 
6200
    public getTransactionStatus_args() {
6201
    }
6202
 
6203
    public getTransactionStatus_args(
6204
      long transactionId)
6205
    {
6206
      this();
6207
      this.transactionId = transactionId;
6208
      setTransactionIdIsSet(true);
6209
    }
6210
 
6211
    /**
6212
     * Performs a deep copy on <i>other</i>.
6213
     */
6214
    public getTransactionStatus_args(getTransactionStatus_args other) {
6215
      __isset_bit_vector.clear();
6216
      __isset_bit_vector.or(other.__isset_bit_vector);
6217
      this.transactionId = other.transactionId;
6218
    }
6219
 
6220
    public getTransactionStatus_args deepCopy() {
6221
      return new getTransactionStatus_args(this);
6222
    }
6223
 
6224
    @Deprecated
6225
    public getTransactionStatus_args clone() {
6226
      return new getTransactionStatus_args(this);
6227
    }
6228
 
6229
    public long getTransactionId() {
6230
      return this.transactionId;
6231
    }
6232
 
6233
    public getTransactionStatus_args setTransactionId(long transactionId) {
6234
      this.transactionId = transactionId;
6235
      setTransactionIdIsSet(true);
6236
      return this;
6237
    }
6238
 
6239
    public void unsetTransactionId() {
6240
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6241
    }
6242
 
6243
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6244
    public boolean isSetTransactionId() {
6245
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6246
    }
6247
 
6248
    public void setTransactionIdIsSet(boolean value) {
6249
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6250
    }
6251
 
6252
    public void setFieldValue(_Fields field, Object value) {
6253
      switch (field) {
6254
      case TRANSACTION_ID:
6255
        if (value == null) {
6256
          unsetTransactionId();
6257
        } else {
6258
          setTransactionId((Long)value);
6259
        }
6260
        break;
6261
 
6262
      }
6263
    }
6264
 
6265
    public void setFieldValue(int fieldID, Object value) {
6266
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6267
    }
6268
 
6269
    public Object getFieldValue(_Fields field) {
6270
      switch (field) {
6271
      case TRANSACTION_ID:
6272
        return new Long(getTransactionId());
6273
 
6274
      }
6275
      throw new IllegalStateException();
6276
    }
6277
 
6278
    public Object getFieldValue(int fieldId) {
6279
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6280
    }
6281
 
6282
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6283
    public boolean isSet(_Fields field) {
6284
      switch (field) {
6285
      case TRANSACTION_ID:
6286
        return isSetTransactionId();
6287
      }
6288
      throw new IllegalStateException();
6289
    }
6290
 
6291
    public boolean isSet(int fieldID) {
6292
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6293
    }
6294
 
6295
    @Override
6296
    public boolean equals(Object that) {
6297
      if (that == null)
6298
        return false;
6299
      if (that instanceof getTransactionStatus_args)
6300
        return this.equals((getTransactionStatus_args)that);
6301
      return false;
6302
    }
6303
 
6304
    public boolean equals(getTransactionStatus_args that) {
6305
      if (that == null)
6306
        return false;
6307
 
6308
      boolean this_present_transactionId = true;
6309
      boolean that_present_transactionId = true;
6310
      if (this_present_transactionId || that_present_transactionId) {
6311
        if (!(this_present_transactionId && that_present_transactionId))
6312
          return false;
6313
        if (this.transactionId != that.transactionId)
6314
          return false;
6315
      }
6316
 
6317
      return true;
6318
    }
6319
 
6320
    @Override
6321
    public int hashCode() {
6322
      return 0;
6323
    }
6324
 
6325
    public int compareTo(getTransactionStatus_args other) {
6326
      if (!getClass().equals(other.getClass())) {
6327
        return getClass().getName().compareTo(other.getClass().getName());
6328
      }
6329
 
6330
      int lastComparison = 0;
6331
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
6332
 
6333
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6334
      if (lastComparison != 0) {
6335
        return lastComparison;
6336
      }
6337
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6338
      if (lastComparison != 0) {
6339
        return lastComparison;
6340
      }
6341
      return 0;
6342
    }
6343
 
6344
    public void read(TProtocol iprot) throws TException {
6345
      TField field;
6346
      iprot.readStructBegin();
6347
      while (true)
6348
      {
6349
        field = iprot.readFieldBegin();
6350
        if (field.type == TType.STOP) { 
6351
          break;
6352
        }
6353
        _Fields fieldId = _Fields.findByThriftId(field.id);
6354
        if (fieldId == null) {
6355
          TProtocolUtil.skip(iprot, field.type);
6356
        } else {
6357
          switch (fieldId) {
6358
            case TRANSACTION_ID:
6359
              if (field.type == TType.I64) {
6360
                this.transactionId = iprot.readI64();
6361
                setTransactionIdIsSet(true);
6362
              } else { 
6363
                TProtocolUtil.skip(iprot, field.type);
6364
              }
6365
              break;
6366
          }
6367
          iprot.readFieldEnd();
6368
        }
6369
      }
6370
      iprot.readStructEnd();
6371
      validate();
6372
    }
6373
 
6374
    public void write(TProtocol oprot) throws TException {
6375
      validate();
6376
 
6377
      oprot.writeStructBegin(STRUCT_DESC);
6378
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6379
      oprot.writeI64(this.transactionId);
6380
      oprot.writeFieldEnd();
6381
      oprot.writeFieldStop();
6382
      oprot.writeStructEnd();
6383
    }
6384
 
6385
    @Override
6386
    public String toString() {
6387
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
6388
      boolean first = true;
6389
 
6390
      sb.append("transactionId:");
6391
      sb.append(this.transactionId);
6392
      first = false;
6393
      sb.append(")");
6394
      return sb.toString();
6395
    }
6396
 
6397
    public void validate() throws TException {
6398
      // check for required fields
6399
    }
6400
 
6401
  }
6402
 
6403
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
6404
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
6405
 
6406
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
6407
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6408
 
6409
    private TransactionStatus success;
6410
    private TransactionServiceException ex;
6411
 
6412
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6413
    public enum _Fields implements TFieldIdEnum {
6414
      /**
6415
       * 
6416
       * @see TransactionStatus
6417
       */
6418
      SUCCESS((short)0, "success"),
6419
      EX((short)1, "ex");
6420
 
6421
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6422
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6423
 
6424
      static {
6425
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6426
          byId.put((int)field._thriftId, field);
6427
          byName.put(field.getFieldName(), field);
6428
        }
6429
      }
6430
 
6431
      /**
6432
       * Find the _Fields constant that matches fieldId, or null if its not found.
6433
       */
6434
      public static _Fields findByThriftId(int fieldId) {
6435
        return byId.get(fieldId);
6436
      }
6437
 
6438
      /**
6439
       * Find the _Fields constant that matches fieldId, throwing an exception
6440
       * if it is not found.
6441
       */
6442
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6443
        _Fields fields = findByThriftId(fieldId);
6444
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6445
        return fields;
6446
      }
6447
 
6448
      /**
6449
       * Find the _Fields constant that matches name, or null if its not found.
6450
       */
6451
      public static _Fields findByName(String name) {
6452
        return byName.get(name);
6453
      }
6454
 
6455
      private final short _thriftId;
6456
      private final String _fieldName;
6457
 
6458
      _Fields(short thriftId, String fieldName) {
6459
        _thriftId = thriftId;
6460
        _fieldName = fieldName;
6461
      }
6462
 
6463
      public short getThriftFieldId() {
6464
        return _thriftId;
6465
      }
6466
 
6467
      public String getFieldName() {
6468
        return _fieldName;
6469
      }
6470
    }
6471
 
6472
    // isset id assignments
6473
 
6474
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6475
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6476
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6477
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6478
          new FieldValueMetaData(TType.STRUCT)));
6479
    }});
6480
 
6481
    static {
6482
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
6483
    }
6484
 
6485
    public getTransactionStatus_result() {
6486
    }
6487
 
6488
    public getTransactionStatus_result(
6489
      TransactionStatus success,
6490
      TransactionServiceException ex)
6491
    {
6492
      this();
6493
      this.success = success;
6494
      this.ex = ex;
6495
    }
6496
 
6497
    /**
6498
     * Performs a deep copy on <i>other</i>.
6499
     */
6500
    public getTransactionStatus_result(getTransactionStatus_result other) {
6501
      if (other.isSetSuccess()) {
6502
        this.success = other.success;
6503
      }
6504
      if (other.isSetEx()) {
6505
        this.ex = new TransactionServiceException(other.ex);
6506
      }
6507
    }
6508
 
6509
    public getTransactionStatus_result deepCopy() {
6510
      return new getTransactionStatus_result(this);
6511
    }
6512
 
6513
    @Deprecated
6514
    public getTransactionStatus_result clone() {
6515
      return new getTransactionStatus_result(this);
6516
    }
6517
 
6518
    /**
6519
     * 
6520
     * @see TransactionStatus
6521
     */
6522
    public TransactionStatus getSuccess() {
6523
      return this.success;
6524
    }
6525
 
6526
    /**
6527
     * 
6528
     * @see TransactionStatus
6529
     */
6530
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
6531
      this.success = success;
6532
      return this;
6533
    }
6534
 
6535
    public void unsetSuccess() {
6536
      this.success = null;
6537
    }
6538
 
6539
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6540
    public boolean isSetSuccess() {
6541
      return this.success != null;
6542
    }
6543
 
6544
    public void setSuccessIsSet(boolean value) {
6545
      if (!value) {
6546
        this.success = null;
6547
      }
6548
    }
6549
 
6550
    public TransactionServiceException getEx() {
6551
      return this.ex;
6552
    }
6553
 
6554
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6555
      this.ex = ex;
6556
      return this;
6557
    }
6558
 
6559
    public void unsetEx() {
6560
      this.ex = null;
6561
    }
6562
 
6563
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6564
    public boolean isSetEx() {
6565
      return this.ex != null;
6566
    }
6567
 
6568
    public void setExIsSet(boolean value) {
6569
      if (!value) {
6570
        this.ex = null;
6571
      }
6572
    }
6573
 
6574
    public void setFieldValue(_Fields field, Object value) {
6575
      switch (field) {
6576
      case SUCCESS:
6577
        if (value == null) {
6578
          unsetSuccess();
6579
        } else {
6580
          setSuccess((TransactionStatus)value);
6581
        }
6582
        break;
6583
 
6584
      case EX:
6585
        if (value == null) {
6586
          unsetEx();
6587
        } else {
6588
          setEx((TransactionServiceException)value);
6589
        }
6590
        break;
6591
 
6592
      }
6593
    }
6594
 
6595
    public void setFieldValue(int fieldID, Object value) {
6596
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6597
    }
6598
 
6599
    public Object getFieldValue(_Fields field) {
6600
      switch (field) {
6601
      case SUCCESS:
6602
        return getSuccess();
6603
 
6604
      case EX:
6605
        return getEx();
6606
 
6607
      }
6608
      throw new IllegalStateException();
6609
    }
6610
 
6611
    public Object getFieldValue(int fieldId) {
6612
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6613
    }
6614
 
6615
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6616
    public boolean isSet(_Fields field) {
6617
      switch (field) {
6618
      case SUCCESS:
6619
        return isSetSuccess();
6620
      case EX:
6621
        return isSetEx();
6622
      }
6623
      throw new IllegalStateException();
6624
    }
6625
 
6626
    public boolean isSet(int fieldID) {
6627
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6628
    }
6629
 
6630
    @Override
6631
    public boolean equals(Object that) {
6632
      if (that == null)
6633
        return false;
6634
      if (that instanceof getTransactionStatus_result)
6635
        return this.equals((getTransactionStatus_result)that);
6636
      return false;
6637
    }
6638
 
6639
    public boolean equals(getTransactionStatus_result that) {
6640
      if (that == null)
6641
        return false;
6642
 
6643
      boolean this_present_success = true && this.isSetSuccess();
6644
      boolean that_present_success = true && that.isSetSuccess();
6645
      if (this_present_success || that_present_success) {
6646
        if (!(this_present_success && that_present_success))
6647
          return false;
6648
        if (!this.success.equals(that.success))
6649
          return false;
6650
      }
6651
 
6652
      boolean this_present_ex = true && this.isSetEx();
6653
      boolean that_present_ex = true && that.isSetEx();
6654
      if (this_present_ex || that_present_ex) {
6655
        if (!(this_present_ex && that_present_ex))
6656
          return false;
6657
        if (!this.ex.equals(that.ex))
6658
          return false;
6659
      }
6660
 
6661
      return true;
6662
    }
6663
 
6664
    @Override
6665
    public int hashCode() {
6666
      return 0;
6667
    }
6668
 
6669
    public int compareTo(getTransactionStatus_result other) {
6670
      if (!getClass().equals(other.getClass())) {
6671
        return getClass().getName().compareTo(other.getClass().getName());
6672
      }
6673
 
6674
      int lastComparison = 0;
6675
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6676
 
6677
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6678
      if (lastComparison != 0) {
6679
        return lastComparison;
6680
      }
6681
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6682
      if (lastComparison != 0) {
6683
        return lastComparison;
6684
      }
6685
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6686
      if (lastComparison != 0) {
6687
        return lastComparison;
6688
      }
6689
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6690
      if (lastComparison != 0) {
6691
        return lastComparison;
6692
      }
6693
      return 0;
6694
    }
6695
 
6696
    public void read(TProtocol iprot) throws TException {
6697
      TField field;
6698
      iprot.readStructBegin();
6699
      while (true)
6700
      {
6701
        field = iprot.readFieldBegin();
6702
        if (field.type == TType.STOP) { 
6703
          break;
6704
        }
6705
        _Fields fieldId = _Fields.findByThriftId(field.id);
6706
        if (fieldId == null) {
6707
          TProtocolUtil.skip(iprot, field.type);
6708
        } else {
6709
          switch (fieldId) {
6710
            case SUCCESS:
6711
              if (field.type == TType.I32) {
6712
                this.success = TransactionStatus.findByValue(iprot.readI32());
6713
              } else { 
6714
                TProtocolUtil.skip(iprot, field.type);
6715
              }
6716
              break;
6717
            case EX:
6718
              if (field.type == TType.STRUCT) {
6719
                this.ex = new TransactionServiceException();
6720
                this.ex.read(iprot);
6721
              } else { 
6722
                TProtocolUtil.skip(iprot, field.type);
6723
              }
6724
              break;
6725
          }
6726
          iprot.readFieldEnd();
6727
        }
6728
      }
6729
      iprot.readStructEnd();
6730
      validate();
6731
    }
6732
 
6733
    public void write(TProtocol oprot) throws TException {
6734
      oprot.writeStructBegin(STRUCT_DESC);
6735
 
6736
      if (this.isSetSuccess()) {
6737
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6738
        oprot.writeI32(this.success.getValue());
6739
        oprot.writeFieldEnd();
6740
      } else if (this.isSetEx()) {
6741
        oprot.writeFieldBegin(EX_FIELD_DESC);
6742
        this.ex.write(oprot);
6743
        oprot.writeFieldEnd();
6744
      }
6745
      oprot.writeFieldStop();
6746
      oprot.writeStructEnd();
6747
    }
6748
 
6749
    @Override
6750
    public String toString() {
6751
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6752
      boolean first = true;
6753
 
6754
      sb.append("success:");
6755
      if (this.success == null) {
6756
        sb.append("null");
6757
      } else {
6758
        String success_name = success.name();
6759
        if (success_name != null) {
6760
          sb.append(success_name);
6761
          sb.append(" (");
6762
        }
6763
        sb.append(this.success);
6764
        if (success_name != null) {
6765
          sb.append(")");
6766
        }
6767
      }
6768
      first = false;
6769
      if (!first) sb.append(", ");
6770
      sb.append("ex:");
6771
      if (this.ex == null) {
6772
        sb.append("null");
6773
      } else {
6774
        sb.append(this.ex);
6775
      }
6776
      first = false;
6777
      sb.append(")");
6778
      return sb.toString();
6779
    }
6780
 
6781
    public void validate() throws TException {
6782
      // check for required fields
6783
    }
6784
 
6785
  }
6786
 
6787
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6788
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6789
 
6790
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6791
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6792
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6793
 
6794
    private long transactionId;
6795
    private TransactionStatus status;
6796
    private String description;
6797
 
6798
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6799
    public enum _Fields implements TFieldIdEnum {
6800
      TRANSACTION_ID((short)1, "transactionId"),
6801
      /**
6802
       * 
6803
       * @see TransactionStatus
6804
       */
6805
      STATUS((short)2, "status"),
6806
      DESCRIPTION((short)3, "description");
6807
 
6808
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6809
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6810
 
6811
      static {
6812
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6813
          byId.put((int)field._thriftId, field);
6814
          byName.put(field.getFieldName(), field);
6815
        }
6816
      }
6817
 
6818
      /**
6819
       * Find the _Fields constant that matches fieldId, or null if its not found.
6820
       */
6821
      public static _Fields findByThriftId(int fieldId) {
6822
        return byId.get(fieldId);
6823
      }
6824
 
6825
      /**
6826
       * Find the _Fields constant that matches fieldId, throwing an exception
6827
       * if it is not found.
6828
       */
6829
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6830
        _Fields fields = findByThriftId(fieldId);
6831
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6832
        return fields;
6833
      }
6834
 
6835
      /**
6836
       * Find the _Fields constant that matches name, or null if its not found.
6837
       */
6838
      public static _Fields findByName(String name) {
6839
        return byName.get(name);
6840
      }
6841
 
6842
      private final short _thriftId;
6843
      private final String _fieldName;
6844
 
6845
      _Fields(short thriftId, String fieldName) {
6846
        _thriftId = thriftId;
6847
        _fieldName = fieldName;
6848
      }
6849
 
6850
      public short getThriftFieldId() {
6851
        return _thriftId;
6852
      }
6853
 
6854
      public String getFieldName() {
6855
        return _fieldName;
6856
      }
6857
    }
6858
 
6859
    // isset id assignments
6860
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6861
    private BitSet __isset_bit_vector = new BitSet(1);
6862
 
6863
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6864
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6865
          new FieldValueMetaData(TType.I64)));
6866
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6867
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6868
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6869
          new FieldValueMetaData(TType.STRING)));
6870
    }});
6871
 
6872
    static {
6873
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6874
    }
6875
 
6876
    public changeTransactionStatus_args() {
6877
    }
6878
 
6879
    public changeTransactionStatus_args(
6880
      long transactionId,
6881
      TransactionStatus status,
6882
      String description)
6883
    {
6884
      this();
6885
      this.transactionId = transactionId;
6886
      setTransactionIdIsSet(true);
6887
      this.status = status;
6888
      this.description = description;
6889
    }
6890
 
6891
    /**
6892
     * Performs a deep copy on <i>other</i>.
6893
     */
6894
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6895
      __isset_bit_vector.clear();
6896
      __isset_bit_vector.or(other.__isset_bit_vector);
6897
      this.transactionId = other.transactionId;
6898
      if (other.isSetStatus()) {
6899
        this.status = other.status;
6900
      }
6901
      if (other.isSetDescription()) {
6902
        this.description = other.description;
6903
      }
6904
    }
6905
 
6906
    public changeTransactionStatus_args deepCopy() {
6907
      return new changeTransactionStatus_args(this);
6908
    }
6909
 
6910
    @Deprecated
6911
    public changeTransactionStatus_args clone() {
6912
      return new changeTransactionStatus_args(this);
6913
    }
6914
 
6915
    public long getTransactionId() {
6916
      return this.transactionId;
6917
    }
6918
 
6919
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6920
      this.transactionId = transactionId;
6921
      setTransactionIdIsSet(true);
6922
      return this;
6923
    }
6924
 
6925
    public void unsetTransactionId() {
6926
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6927
    }
6928
 
6929
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6930
    public boolean isSetTransactionId() {
6931
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6932
    }
6933
 
6934
    public void setTransactionIdIsSet(boolean value) {
6935
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6936
    }
6937
 
6938
    /**
6939
     * 
6940
     * @see TransactionStatus
6941
     */
6942
    public TransactionStatus getStatus() {
6943
      return this.status;
6944
    }
6945
 
6946
    /**
6947
     * 
6948
     * @see TransactionStatus
6949
     */
6950
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6951
      this.status = status;
6952
      return this;
6953
    }
6954
 
6955
    public void unsetStatus() {
6956
      this.status = null;
6957
    }
6958
 
6959
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6960
    public boolean isSetStatus() {
6961
      return this.status != null;
6962
    }
6963
 
6964
    public void setStatusIsSet(boolean value) {
6965
      if (!value) {
6966
        this.status = null;
6967
      }
6968
    }
6969
 
6970
    public String getDescription() {
6971
      return this.description;
6972
    }
6973
 
6974
    public changeTransactionStatus_args setDescription(String description) {
6975
      this.description = description;
6976
      return this;
6977
    }
6978
 
6979
    public void unsetDescription() {
6980
      this.description = null;
6981
    }
6982
 
6983
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6984
    public boolean isSetDescription() {
6985
      return this.description != null;
6986
    }
6987
 
6988
    public void setDescriptionIsSet(boolean value) {
6989
      if (!value) {
6990
        this.description = null;
6991
      }
6992
    }
6993
 
6994
    public void setFieldValue(_Fields field, Object value) {
6995
      switch (field) {
6996
      case TRANSACTION_ID:
6997
        if (value == null) {
6998
          unsetTransactionId();
6999
        } else {
7000
          setTransactionId((Long)value);
7001
        }
7002
        break;
7003
 
7004
      case STATUS:
7005
        if (value == null) {
7006
          unsetStatus();
7007
        } else {
7008
          setStatus((TransactionStatus)value);
7009
        }
7010
        break;
7011
 
7012
      case DESCRIPTION:
7013
        if (value == null) {
7014
          unsetDescription();
7015
        } else {
7016
          setDescription((String)value);
7017
        }
7018
        break;
7019
 
7020
      }
7021
    }
7022
 
7023
    public void setFieldValue(int fieldID, Object value) {
7024
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7025
    }
7026
 
7027
    public Object getFieldValue(_Fields field) {
7028
      switch (field) {
7029
      case TRANSACTION_ID:
7030
        return new Long(getTransactionId());
7031
 
7032
      case STATUS:
7033
        return getStatus();
7034
 
7035
      case DESCRIPTION:
7036
        return getDescription();
7037
 
7038
      }
7039
      throw new IllegalStateException();
7040
    }
7041
 
7042
    public Object getFieldValue(int fieldId) {
7043
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7044
    }
7045
 
7046
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7047
    public boolean isSet(_Fields field) {
7048
      switch (field) {
7049
      case TRANSACTION_ID:
7050
        return isSetTransactionId();
7051
      case STATUS:
7052
        return isSetStatus();
7053
      case DESCRIPTION:
7054
        return isSetDescription();
7055
      }
7056
      throw new IllegalStateException();
7057
    }
7058
 
7059
    public boolean isSet(int fieldID) {
7060
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7061
    }
7062
 
7063
    @Override
7064
    public boolean equals(Object that) {
7065
      if (that == null)
7066
        return false;
7067
      if (that instanceof changeTransactionStatus_args)
7068
        return this.equals((changeTransactionStatus_args)that);
7069
      return false;
7070
    }
7071
 
7072
    public boolean equals(changeTransactionStatus_args that) {
7073
      if (that == null)
7074
        return false;
7075
 
7076
      boolean this_present_transactionId = true;
7077
      boolean that_present_transactionId = true;
7078
      if (this_present_transactionId || that_present_transactionId) {
7079
        if (!(this_present_transactionId && that_present_transactionId))
7080
          return false;
7081
        if (this.transactionId != that.transactionId)
7082
          return false;
7083
      }
7084
 
7085
      boolean this_present_status = true && this.isSetStatus();
7086
      boolean that_present_status = true && that.isSetStatus();
7087
      if (this_present_status || that_present_status) {
7088
        if (!(this_present_status && that_present_status))
7089
          return false;
7090
        if (!this.status.equals(that.status))
7091
          return false;
7092
      }
7093
 
7094
      boolean this_present_description = true && this.isSetDescription();
7095
      boolean that_present_description = true && that.isSetDescription();
7096
      if (this_present_description || that_present_description) {
7097
        if (!(this_present_description && that_present_description))
7098
          return false;
7099
        if (!this.description.equals(that.description))
7100
          return false;
7101
      }
7102
 
7103
      return true;
7104
    }
7105
 
7106
    @Override
7107
    public int hashCode() {
7108
      return 0;
7109
    }
7110
 
7111
    public int compareTo(changeTransactionStatus_args other) {
7112
      if (!getClass().equals(other.getClass())) {
7113
        return getClass().getName().compareTo(other.getClass().getName());
7114
      }
7115
 
7116
      int lastComparison = 0;
7117
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
7118
 
7119
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7120
      if (lastComparison != 0) {
7121
        return lastComparison;
7122
      }
7123
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7124
      if (lastComparison != 0) {
7125
        return lastComparison;
7126
      }
7127
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
7128
      if (lastComparison != 0) {
7129
        return lastComparison;
7130
      }
7131
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
7132
      if (lastComparison != 0) {
7133
        return lastComparison;
7134
      }
7135
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
7136
      if (lastComparison != 0) {
7137
        return lastComparison;
7138
      }
7139
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
7140
      if (lastComparison != 0) {
7141
        return lastComparison;
7142
      }
7143
      return 0;
7144
    }
7145
 
7146
    public void read(TProtocol iprot) throws TException {
7147
      TField field;
7148
      iprot.readStructBegin();
7149
      while (true)
7150
      {
7151
        field = iprot.readFieldBegin();
7152
        if (field.type == TType.STOP) { 
7153
          break;
7154
        }
7155
        _Fields fieldId = _Fields.findByThriftId(field.id);
7156
        if (fieldId == null) {
7157
          TProtocolUtil.skip(iprot, field.type);
7158
        } else {
7159
          switch (fieldId) {
7160
            case TRANSACTION_ID:
7161
              if (field.type == TType.I64) {
7162
                this.transactionId = iprot.readI64();
7163
                setTransactionIdIsSet(true);
7164
              } else { 
7165
                TProtocolUtil.skip(iprot, field.type);
7166
              }
7167
              break;
7168
            case STATUS:
7169
              if (field.type == TType.I32) {
7170
                this.status = TransactionStatus.findByValue(iprot.readI32());
7171
              } else { 
7172
                TProtocolUtil.skip(iprot, field.type);
7173
              }
7174
              break;
7175
            case DESCRIPTION:
7176
              if (field.type == TType.STRING) {
7177
                this.description = iprot.readString();
7178
              } else { 
7179
                TProtocolUtil.skip(iprot, field.type);
7180
              }
7181
              break;
7182
          }
7183
          iprot.readFieldEnd();
7184
        }
7185
      }
7186
      iprot.readStructEnd();
7187
      validate();
7188
    }
7189
 
7190
    public void write(TProtocol oprot) throws TException {
7191
      validate();
7192
 
7193
      oprot.writeStructBegin(STRUCT_DESC);
7194
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7195
      oprot.writeI64(this.transactionId);
7196
      oprot.writeFieldEnd();
7197
      if (this.status != null) {
7198
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
7199
        oprot.writeI32(this.status.getValue());
7200
        oprot.writeFieldEnd();
7201
      }
7202
      if (this.description != null) {
7203
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
7204
        oprot.writeString(this.description);
7205
        oprot.writeFieldEnd();
7206
      }
7207
      oprot.writeFieldStop();
7208
      oprot.writeStructEnd();
7209
    }
7210
 
7211
    @Override
7212
    public String toString() {
7213
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
7214
      boolean first = true;
7215
 
7216
      sb.append("transactionId:");
7217
      sb.append(this.transactionId);
7218
      first = false;
7219
      if (!first) sb.append(", ");
7220
      sb.append("status:");
7221
      if (this.status == null) {
7222
        sb.append("null");
7223
      } else {
7224
        String status_name = status.name();
7225
        if (status_name != null) {
7226
          sb.append(status_name);
7227
          sb.append(" (");
7228
        }
7229
        sb.append(this.status);
7230
        if (status_name != null) {
7231
          sb.append(")");
7232
        }
7233
      }
7234
      first = false;
7235
      if (!first) sb.append(", ");
7236
      sb.append("description:");
7237
      if (this.description == null) {
7238
        sb.append("null");
7239
      } else {
7240
        sb.append(this.description);
7241
      }
7242
      first = false;
7243
      sb.append(")");
7244
      return sb.toString();
7245
    }
7246
 
7247
    public void validate() throws TException {
7248
      // check for required fields
7249
    }
7250
 
7251
  }
7252
 
7253
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
7254
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
7255
 
7256
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7257
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7258
 
7259
    private boolean success;
7260
    private TransactionServiceException ex;
7261
 
7262
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7263
    public enum _Fields implements TFieldIdEnum {
7264
      SUCCESS((short)0, "success"),
7265
      EX((short)1, "ex");
7266
 
7267
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7268
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7269
 
7270
      static {
7271
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7272
          byId.put((int)field._thriftId, field);
7273
          byName.put(field.getFieldName(), field);
7274
        }
7275
      }
7276
 
7277
      /**
7278
       * Find the _Fields constant that matches fieldId, or null if its not found.
7279
       */
7280
      public static _Fields findByThriftId(int fieldId) {
7281
        return byId.get(fieldId);
7282
      }
7283
 
7284
      /**
7285
       * Find the _Fields constant that matches fieldId, throwing an exception
7286
       * if it is not found.
7287
       */
7288
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7289
        _Fields fields = findByThriftId(fieldId);
7290
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7291
        return fields;
7292
      }
7293
 
7294
      /**
7295
       * Find the _Fields constant that matches name, or null if its not found.
7296
       */
7297
      public static _Fields findByName(String name) {
7298
        return byName.get(name);
7299
      }
7300
 
7301
      private final short _thriftId;
7302
      private final String _fieldName;
7303
 
7304
      _Fields(short thriftId, String fieldName) {
7305
        _thriftId = thriftId;
7306
        _fieldName = fieldName;
7307
      }
7308
 
7309
      public short getThriftFieldId() {
7310
        return _thriftId;
7311
      }
7312
 
7313
      public String getFieldName() {
7314
        return _fieldName;
7315
      }
7316
    }
7317
 
7318
    // isset id assignments
7319
    private static final int __SUCCESS_ISSET_ID = 0;
7320
    private BitSet __isset_bit_vector = new BitSet(1);
7321
 
7322
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7323
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7324
          new FieldValueMetaData(TType.BOOL)));
7325
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7326
          new FieldValueMetaData(TType.STRUCT)));
7327
    }});
7328
 
7329
    static {
7330
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
7331
    }
7332
 
7333
    public changeTransactionStatus_result() {
7334
    }
7335
 
7336
    public changeTransactionStatus_result(
7337
      boolean success,
7338
      TransactionServiceException ex)
7339
    {
7340
      this();
7341
      this.success = success;
7342
      setSuccessIsSet(true);
7343
      this.ex = ex;
7344
    }
7345
 
7346
    /**
7347
     * Performs a deep copy on <i>other</i>.
7348
     */
7349
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
7350
      __isset_bit_vector.clear();
7351
      __isset_bit_vector.or(other.__isset_bit_vector);
7352
      this.success = other.success;
7353
      if (other.isSetEx()) {
7354
        this.ex = new TransactionServiceException(other.ex);
7355
      }
7356
    }
7357
 
7358
    public changeTransactionStatus_result deepCopy() {
7359
      return new changeTransactionStatus_result(this);
7360
    }
7361
 
7362
    @Deprecated
7363
    public changeTransactionStatus_result clone() {
7364
      return new changeTransactionStatus_result(this);
7365
    }
7366
 
7367
    public boolean isSuccess() {
7368
      return this.success;
7369
    }
7370
 
7371
    public changeTransactionStatus_result setSuccess(boolean success) {
7372
      this.success = success;
7373
      setSuccessIsSet(true);
7374
      return this;
7375
    }
7376
 
7377
    public void unsetSuccess() {
7378
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7379
    }
7380
 
7381
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7382
    public boolean isSetSuccess() {
7383
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7384
    }
7385
 
7386
    public void setSuccessIsSet(boolean value) {
7387
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7388
    }
7389
 
7390
    public TransactionServiceException getEx() {
7391
      return this.ex;
7392
    }
7393
 
7394
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
7395
      this.ex = ex;
7396
      return this;
7397
    }
7398
 
7399
    public void unsetEx() {
7400
      this.ex = null;
7401
    }
7402
 
7403
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7404
    public boolean isSetEx() {
7405
      return this.ex != null;
7406
    }
7407
 
7408
    public void setExIsSet(boolean value) {
7409
      if (!value) {
7410
        this.ex = null;
7411
      }
7412
    }
7413
 
7414
    public void setFieldValue(_Fields field, Object value) {
7415
      switch (field) {
7416
      case SUCCESS:
7417
        if (value == null) {
7418
          unsetSuccess();
7419
        } else {
7420
          setSuccess((Boolean)value);
7421
        }
7422
        break;
7423
 
7424
      case EX:
7425
        if (value == null) {
7426
          unsetEx();
7427
        } else {
7428
          setEx((TransactionServiceException)value);
7429
        }
7430
        break;
7431
 
7432
      }
7433
    }
7434
 
7435
    public void setFieldValue(int fieldID, Object value) {
7436
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7437
    }
7438
 
7439
    public Object getFieldValue(_Fields field) {
7440
      switch (field) {
7441
      case SUCCESS:
7442
        return new Boolean(isSuccess());
7443
 
7444
      case EX:
7445
        return getEx();
7446
 
7447
      }
7448
      throw new IllegalStateException();
7449
    }
7450
 
7451
    public Object getFieldValue(int fieldId) {
7452
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7453
    }
7454
 
7455
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7456
    public boolean isSet(_Fields field) {
7457
      switch (field) {
7458
      case SUCCESS:
7459
        return isSetSuccess();
7460
      case EX:
7461
        return isSetEx();
7462
      }
7463
      throw new IllegalStateException();
7464
    }
7465
 
7466
    public boolean isSet(int fieldID) {
7467
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7468
    }
7469
 
7470
    @Override
7471
    public boolean equals(Object that) {
7472
      if (that == null)
7473
        return false;
7474
      if (that instanceof changeTransactionStatus_result)
7475
        return this.equals((changeTransactionStatus_result)that);
7476
      return false;
7477
    }
7478
 
7479
    public boolean equals(changeTransactionStatus_result that) {
7480
      if (that == null)
7481
        return false;
7482
 
7483
      boolean this_present_success = true;
7484
      boolean that_present_success = true;
7485
      if (this_present_success || that_present_success) {
7486
        if (!(this_present_success && that_present_success))
7487
          return false;
7488
        if (this.success != that.success)
7489
          return false;
7490
      }
7491
 
7492
      boolean this_present_ex = true && this.isSetEx();
7493
      boolean that_present_ex = true && that.isSetEx();
7494
      if (this_present_ex || that_present_ex) {
7495
        if (!(this_present_ex && that_present_ex))
7496
          return false;
7497
        if (!this.ex.equals(that.ex))
7498
          return false;
7499
      }
7500
 
7501
      return true;
7502
    }
7503
 
7504
    @Override
7505
    public int hashCode() {
7506
      return 0;
7507
    }
7508
 
7509
    public int compareTo(changeTransactionStatus_result other) {
7510
      if (!getClass().equals(other.getClass())) {
7511
        return getClass().getName().compareTo(other.getClass().getName());
7512
      }
7513
 
7514
      int lastComparison = 0;
7515
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
7516
 
7517
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7518
      if (lastComparison != 0) {
7519
        return lastComparison;
7520
      }
7521
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7522
      if (lastComparison != 0) {
7523
        return lastComparison;
7524
      }
7525
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7526
      if (lastComparison != 0) {
7527
        return lastComparison;
7528
      }
7529
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7530
      if (lastComparison != 0) {
7531
        return lastComparison;
7532
      }
7533
      return 0;
7534
    }
7535
 
7536
    public void read(TProtocol iprot) throws TException {
7537
      TField field;
7538
      iprot.readStructBegin();
7539
      while (true)
7540
      {
7541
        field = iprot.readFieldBegin();
7542
        if (field.type == TType.STOP) { 
7543
          break;
7544
        }
7545
        _Fields fieldId = _Fields.findByThriftId(field.id);
7546
        if (fieldId == null) {
7547
          TProtocolUtil.skip(iprot, field.type);
7548
        } else {
7549
          switch (fieldId) {
7550
            case SUCCESS:
7551
              if (field.type == TType.BOOL) {
7552
                this.success = iprot.readBool();
7553
                setSuccessIsSet(true);
7554
              } else { 
7555
                TProtocolUtil.skip(iprot, field.type);
7556
              }
7557
              break;
7558
            case EX:
7559
              if (field.type == TType.STRUCT) {
7560
                this.ex = new TransactionServiceException();
7561
                this.ex.read(iprot);
7562
              } else { 
7563
                TProtocolUtil.skip(iprot, field.type);
7564
              }
7565
              break;
7566
          }
7567
          iprot.readFieldEnd();
7568
        }
7569
      }
7570
      iprot.readStructEnd();
7571
      validate();
7572
    }
7573
 
7574
    public void write(TProtocol oprot) throws TException {
7575
      oprot.writeStructBegin(STRUCT_DESC);
7576
 
7577
      if (this.isSetSuccess()) {
7578
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7579
        oprot.writeBool(this.success);
7580
        oprot.writeFieldEnd();
7581
      } else if (this.isSetEx()) {
7582
        oprot.writeFieldBegin(EX_FIELD_DESC);
7583
        this.ex.write(oprot);
7584
        oprot.writeFieldEnd();
7585
      }
7586
      oprot.writeFieldStop();
7587
      oprot.writeStructEnd();
7588
    }
7589
 
7590
    @Override
7591
    public String toString() {
7592
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7593
      boolean first = true;
7594
 
7595
      sb.append("success:");
7596
      sb.append(this.success);
7597
      first = false;
7598
      if (!first) sb.append(", ");
7599
      sb.append("ex:");
7600
      if (this.ex == null) {
7601
        sb.append("null");
7602
      } else {
7603
        sb.append(this.ex);
7604
      }
7605
      first = false;
7606
      sb.append(")");
7607
      return sb.toString();
7608
    }
7609
 
7610
    public void validate() throws TException {
7611
      // check for required fields
7612
    }
7613
 
7614
  }
7615
 
1398 varun.gupt 7616
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7617
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7618
 
7619
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7620
 
7621
    private long transactionId;
7622
 
7623
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7624
    public enum _Fields implements TFieldIdEnum {
7625
      TRANSACTION_ID((short)1, "transactionId");
7626
 
7627
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7628
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7629
 
7630
      static {
7631
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7632
          byId.put((int)field._thriftId, field);
7633
          byName.put(field.getFieldName(), field);
7634
        }
7635
      }
7636
 
7637
      /**
7638
       * Find the _Fields constant that matches fieldId, or null if its not found.
7639
       */
7640
      public static _Fields findByThriftId(int fieldId) {
7641
        return byId.get(fieldId);
7642
      }
7643
 
7644
      /**
7645
       * Find the _Fields constant that matches fieldId, throwing an exception
7646
       * if it is not found.
7647
       */
7648
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7649
        _Fields fields = findByThriftId(fieldId);
7650
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7651
        return fields;
7652
      }
7653
 
7654
      /**
7655
       * Find the _Fields constant that matches name, or null if its not found.
7656
       */
7657
      public static _Fields findByName(String name) {
7658
        return byName.get(name);
7659
      }
7660
 
7661
      private final short _thriftId;
7662
      private final String _fieldName;
7663
 
7664
      _Fields(short thriftId, String fieldName) {
7665
        _thriftId = thriftId;
7666
        _fieldName = fieldName;
7667
      }
7668
 
7669
      public short getThriftFieldId() {
7670
        return _thriftId;
7671
      }
7672
 
7673
      public String getFieldName() {
7674
        return _fieldName;
7675
      }
7676
    }
7677
 
7678
    // isset id assignments
7679
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7680
    private BitSet __isset_bit_vector = new BitSet(1);
7681
 
7682
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7683
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7684
          new FieldValueMetaData(TType.I64)));
7685
    }});
7686
 
7687
    static {
1398 varun.gupt 7688
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7689
    }
7690
 
1398 varun.gupt 7691
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7692
    }
7693
 
1398 varun.gupt 7694
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7695
      long transactionId)
7696
    {
7697
      this();
7698
      this.transactionId = transactionId;
7699
      setTransactionIdIsSet(true);
7700
    }
7701
 
7702
    /**
7703
     * Performs a deep copy on <i>other</i>.
7704
     */
1398 varun.gupt 7705
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7706
      __isset_bit_vector.clear();
7707
      __isset_bit_vector.or(other.__isset_bit_vector);
7708
      this.transactionId = other.transactionId;
7709
    }
7710
 
1398 varun.gupt 7711
    public enqueueTransactionInfoEmail_args deepCopy() {
7712
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7713
    }
7714
 
7715
    @Deprecated
1398 varun.gupt 7716
    public enqueueTransactionInfoEmail_args clone() {
7717
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7718
    }
7719
 
7720
    public long getTransactionId() {
7721
      return this.transactionId;
7722
    }
7723
 
1398 varun.gupt 7724
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7725
      this.transactionId = transactionId;
7726
      setTransactionIdIsSet(true);
7727
      return this;
7728
    }
7729
 
7730
    public void unsetTransactionId() {
7731
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7732
    }
7733
 
7734
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7735
    public boolean isSetTransactionId() {
7736
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7737
    }
7738
 
7739
    public void setTransactionIdIsSet(boolean value) {
7740
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7741
    }
7742
 
7743
    public void setFieldValue(_Fields field, Object value) {
7744
      switch (field) {
7745
      case TRANSACTION_ID:
7746
        if (value == null) {
7747
          unsetTransactionId();
7748
        } else {
7749
          setTransactionId((Long)value);
7750
        }
7751
        break;
7752
 
7753
      }
7754
    }
7755
 
7756
    public void setFieldValue(int fieldID, Object value) {
7757
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7758
    }
7759
 
7760
    public Object getFieldValue(_Fields field) {
7761
      switch (field) {
7762
      case TRANSACTION_ID:
7763
        return new Long(getTransactionId());
7764
 
7765
      }
7766
      throw new IllegalStateException();
7767
    }
7768
 
7769
    public Object getFieldValue(int fieldId) {
7770
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7771
    }
7772
 
7773
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7774
    public boolean isSet(_Fields field) {
7775
      switch (field) {
7776
      case TRANSACTION_ID:
7777
        return isSetTransactionId();
7778
      }
7779
      throw new IllegalStateException();
7780
    }
7781
 
7782
    public boolean isSet(int fieldID) {
7783
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7784
    }
7785
 
7786
    @Override
7787
    public boolean equals(Object that) {
7788
      if (that == null)
7789
        return false;
1398 varun.gupt 7790
      if (that instanceof enqueueTransactionInfoEmail_args)
7791
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7792
      return false;
7793
    }
7794
 
1398 varun.gupt 7795
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7796
      if (that == null)
7797
        return false;
7798
 
7799
      boolean this_present_transactionId = true;
7800
      boolean that_present_transactionId = true;
7801
      if (this_present_transactionId || that_present_transactionId) {
7802
        if (!(this_present_transactionId && that_present_transactionId))
7803
          return false;
7804
        if (this.transactionId != that.transactionId)
7805
          return false;
7806
      }
7807
 
7808
      return true;
7809
    }
7810
 
7811
    @Override
7812
    public int hashCode() {
7813
      return 0;
7814
    }
7815
 
1398 varun.gupt 7816
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7817
      if (!getClass().equals(other.getClass())) {
7818
        return getClass().getName().compareTo(other.getClass().getName());
7819
      }
7820
 
7821
      int lastComparison = 0;
1398 varun.gupt 7822
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7823
 
7824
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7825
      if (lastComparison != 0) {
7826
        return lastComparison;
7827
      }
7828
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7829
      if (lastComparison != 0) {
7830
        return lastComparison;
7831
      }
7832
      return 0;
7833
    }
7834
 
7835
    public void read(TProtocol iprot) throws TException {
7836
      TField field;
7837
      iprot.readStructBegin();
7838
      while (true)
7839
      {
7840
        field = iprot.readFieldBegin();
7841
        if (field.type == TType.STOP) { 
7842
          break;
7843
        }
7844
        _Fields fieldId = _Fields.findByThriftId(field.id);
7845
        if (fieldId == null) {
7846
          TProtocolUtil.skip(iprot, field.type);
7847
        } else {
7848
          switch (fieldId) {
7849
            case TRANSACTION_ID:
7850
              if (field.type == TType.I64) {
7851
                this.transactionId = iprot.readI64();
7852
                setTransactionIdIsSet(true);
7853
              } else { 
7854
                TProtocolUtil.skip(iprot, field.type);
7855
              }
7856
              break;
7857
          }
7858
          iprot.readFieldEnd();
7859
        }
7860
      }
7861
      iprot.readStructEnd();
7862
      validate();
7863
    }
7864
 
7865
    public void write(TProtocol oprot) throws TException {
7866
      validate();
7867
 
7868
      oprot.writeStructBegin(STRUCT_DESC);
7869
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7870
      oprot.writeI64(this.transactionId);
7871
      oprot.writeFieldEnd();
7872
      oprot.writeFieldStop();
7873
      oprot.writeStructEnd();
7874
    }
7875
 
7876
    @Override
7877
    public String toString() {
1398 varun.gupt 7878
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 7879
      boolean first = true;
7880
 
7881
      sb.append("transactionId:");
7882
      sb.append(this.transactionId);
7883
      first = false;
7884
      sb.append(")");
7885
      return sb.toString();
7886
    }
7887
 
7888
    public void validate() throws TException {
7889
      // check for required fields
7890
    }
7891
 
7892
  }
7893
 
1398 varun.gupt 7894
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
7895
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 7896
 
7897
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7898
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7899
 
7900
    private boolean success;
7901
    private TransactionServiceException ex;
7902
 
7903
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7904
    public enum _Fields implements TFieldIdEnum {
7905
      SUCCESS((short)0, "success"),
7906
      EX((short)1, "ex");
7907
 
7908
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7909
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7910
 
7911
      static {
7912
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7913
          byId.put((int)field._thriftId, field);
7914
          byName.put(field.getFieldName(), field);
7915
        }
7916
      }
7917
 
7918
      /**
7919
       * Find the _Fields constant that matches fieldId, or null if its not found.
7920
       */
7921
      public static _Fields findByThriftId(int fieldId) {
7922
        return byId.get(fieldId);
7923
      }
7924
 
7925
      /**
7926
       * Find the _Fields constant that matches fieldId, throwing an exception
7927
       * if it is not found.
7928
       */
7929
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7930
        _Fields fields = findByThriftId(fieldId);
7931
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7932
        return fields;
7933
      }
7934
 
7935
      /**
7936
       * Find the _Fields constant that matches name, or null if its not found.
7937
       */
7938
      public static _Fields findByName(String name) {
7939
        return byName.get(name);
7940
      }
7941
 
7942
      private final short _thriftId;
7943
      private final String _fieldName;
7944
 
7945
      _Fields(short thriftId, String fieldName) {
7946
        _thriftId = thriftId;
7947
        _fieldName = fieldName;
7948
      }
7949
 
7950
      public short getThriftFieldId() {
7951
        return _thriftId;
7952
      }
7953
 
7954
      public String getFieldName() {
7955
        return _fieldName;
7956
      }
7957
    }
7958
 
7959
    // isset id assignments
7960
    private static final int __SUCCESS_ISSET_ID = 0;
7961
    private BitSet __isset_bit_vector = new BitSet(1);
7962
 
7963
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7964
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7965
          new FieldValueMetaData(TType.BOOL)));
7966
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7967
          new FieldValueMetaData(TType.STRUCT)));
7968
    }});
7969
 
7970
    static {
1398 varun.gupt 7971
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 7972
    }
7973
 
1398 varun.gupt 7974
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 7975
    }
7976
 
1398 varun.gupt 7977
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 7978
      boolean success,
7979
      TransactionServiceException ex)
7980
    {
7981
      this();
7982
      this.success = success;
7983
      setSuccessIsSet(true);
7984
      this.ex = ex;
7985
    }
7986
 
7987
    /**
7988
     * Performs a deep copy on <i>other</i>.
7989
     */
1398 varun.gupt 7990
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7991
      __isset_bit_vector.clear();
7992
      __isset_bit_vector.or(other.__isset_bit_vector);
7993
      this.success = other.success;
7994
      if (other.isSetEx()) {
7995
        this.ex = new TransactionServiceException(other.ex);
7996
      }
7997
    }
7998
 
1398 varun.gupt 7999
    public enqueueTransactionInfoEmail_result deepCopy() {
8000
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8001
    }
8002
 
8003
    @Deprecated
1398 varun.gupt 8004
    public enqueueTransactionInfoEmail_result clone() {
8005
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 8006
    }
8007
 
8008
    public boolean isSuccess() {
8009
      return this.success;
8010
    }
8011
 
1398 varun.gupt 8012
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 8013
      this.success = success;
8014
      setSuccessIsSet(true);
8015
      return this;
8016
    }
8017
 
8018
    public void unsetSuccess() {
8019
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
8020
    }
8021
 
8022
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8023
    public boolean isSetSuccess() {
8024
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
8025
    }
8026
 
8027
    public void setSuccessIsSet(boolean value) {
8028
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
8029
    }
8030
 
8031
    public TransactionServiceException getEx() {
8032
      return this.ex;
8033
    }
8034
 
1398 varun.gupt 8035
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 8036
      this.ex = ex;
8037
      return this;
8038
    }
8039
 
8040
    public void unsetEx() {
8041
      this.ex = null;
8042
    }
8043
 
8044
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8045
    public boolean isSetEx() {
8046
      return this.ex != null;
8047
    }
8048
 
8049
    public void setExIsSet(boolean value) {
8050
      if (!value) {
8051
        this.ex = null;
8052
      }
8053
    }
8054
 
8055
    public void setFieldValue(_Fields field, Object value) {
8056
      switch (field) {
8057
      case SUCCESS:
8058
        if (value == null) {
8059
          unsetSuccess();
8060
        } else {
8061
          setSuccess((Boolean)value);
8062
        }
8063
        break;
8064
 
8065
      case EX:
8066
        if (value == null) {
8067
          unsetEx();
8068
        } else {
8069
          setEx((TransactionServiceException)value);
8070
        }
8071
        break;
8072
 
8073
      }
8074
    }
8075
 
8076
    public void setFieldValue(int fieldID, Object value) {
8077
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8078
    }
8079
 
8080
    public Object getFieldValue(_Fields field) {
8081
      switch (field) {
8082
      case SUCCESS:
8083
        return new Boolean(isSuccess());
8084
 
8085
      case EX:
8086
        return getEx();
8087
 
8088
      }
8089
      throw new IllegalStateException();
8090
    }
8091
 
8092
    public Object getFieldValue(int fieldId) {
8093
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8094
    }
8095
 
8096
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8097
    public boolean isSet(_Fields field) {
8098
      switch (field) {
8099
      case SUCCESS:
8100
        return isSetSuccess();
8101
      case EX:
8102
        return isSetEx();
8103
      }
8104
      throw new IllegalStateException();
8105
    }
8106
 
8107
    public boolean isSet(int fieldID) {
8108
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8109
    }
8110
 
8111
    @Override
8112
    public boolean equals(Object that) {
8113
      if (that == null)
8114
        return false;
1398 varun.gupt 8115
      if (that instanceof enqueueTransactionInfoEmail_result)
8116
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 8117
      return false;
8118
    }
8119
 
1398 varun.gupt 8120
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 8121
      if (that == null)
8122
        return false;
8123
 
8124
      boolean this_present_success = true;
8125
      boolean that_present_success = true;
8126
      if (this_present_success || that_present_success) {
8127
        if (!(this_present_success && that_present_success))
8128
          return false;
8129
        if (this.success != that.success)
8130
          return false;
8131
      }
8132
 
8133
      boolean this_present_ex = true && this.isSetEx();
8134
      boolean that_present_ex = true && that.isSetEx();
8135
      if (this_present_ex || that_present_ex) {
8136
        if (!(this_present_ex && that_present_ex))
8137
          return false;
8138
        if (!this.ex.equals(that.ex))
8139
          return false;
8140
      }
8141
 
8142
      return true;
8143
    }
8144
 
8145
    @Override
8146
    public int hashCode() {
8147
      return 0;
8148
    }
8149
 
1398 varun.gupt 8150
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 8151
      if (!getClass().equals(other.getClass())) {
8152
        return getClass().getName().compareTo(other.getClass().getName());
8153
      }
8154
 
8155
      int lastComparison = 0;
1398 varun.gupt 8156
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 8157
 
8158
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8159
      if (lastComparison != 0) {
8160
        return lastComparison;
8161
      }
8162
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8163
      if (lastComparison != 0) {
8164
        return lastComparison;
8165
      }
8166
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8167
      if (lastComparison != 0) {
8168
        return lastComparison;
8169
      }
8170
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8171
      if (lastComparison != 0) {
8172
        return lastComparison;
8173
      }
8174
      return 0;
8175
    }
8176
 
8177
    public void read(TProtocol iprot) throws TException {
8178
      TField field;
8179
      iprot.readStructBegin();
8180
      while (true)
8181
      {
8182
        field = iprot.readFieldBegin();
8183
        if (field.type == TType.STOP) { 
8184
          break;
8185
        }
8186
        _Fields fieldId = _Fields.findByThriftId(field.id);
8187
        if (fieldId == null) {
8188
          TProtocolUtil.skip(iprot, field.type);
8189
        } else {
8190
          switch (fieldId) {
8191
            case SUCCESS:
8192
              if (field.type == TType.BOOL) {
8193
                this.success = iprot.readBool();
8194
                setSuccessIsSet(true);
8195
              } else { 
8196
                TProtocolUtil.skip(iprot, field.type);
8197
              }
8198
              break;
8199
            case EX:
8200
              if (field.type == TType.STRUCT) {
8201
                this.ex = new TransactionServiceException();
8202
                this.ex.read(iprot);
8203
              } else { 
8204
                TProtocolUtil.skip(iprot, field.type);
8205
              }
8206
              break;
8207
          }
8208
          iprot.readFieldEnd();
8209
        }
8210
      }
8211
      iprot.readStructEnd();
8212
      validate();
8213
    }
8214
 
8215
    public void write(TProtocol oprot) throws TException {
8216
      oprot.writeStructBegin(STRUCT_DESC);
8217
 
8218
      if (this.isSetSuccess()) {
8219
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
8220
        oprot.writeBool(this.success);
8221
        oprot.writeFieldEnd();
8222
      } else if (this.isSetEx()) {
8223
        oprot.writeFieldBegin(EX_FIELD_DESC);
8224
        this.ex.write(oprot);
8225
        oprot.writeFieldEnd();
8226
      }
8227
      oprot.writeFieldStop();
8228
      oprot.writeStructEnd();
8229
    }
8230
 
8231
    @Override
8232
    public String toString() {
1398 varun.gupt 8233
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 8234
      boolean first = true;
8235
 
8236
      sb.append("success:");
8237
      sb.append(this.success);
8238
      first = false;
8239
      if (!first) sb.append(", ");
8240
      sb.append("ex:");
8241
      if (this.ex == null) {
8242
        sb.append("null");
8243
      } else {
8244
        sb.append(this.ex);
8245
      }
8246
      first = false;
8247
      sb.append(")");
8248
      return sb.toString();
8249
    }
8250
 
8251
    public void validate() throws TException {
8252
      // check for required fields
8253
    }
8254
 
8255
  }
8256
 
483 rajveer 8257
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
8258
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 8259
 
483 rajveer 8260
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8261
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
8262
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
8263
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 8264
 
483 rajveer 8265
    private OrderStatus status;
8266
    private long from_date;
8267
    private long to_date;
8268
    private long warehouse_id;
68 ashish 8269
 
8270
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8271
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8272
      /**
8273
       * 
8274
       * @see OrderStatus
8275
       */
8276
      STATUS((short)1, "status"),
8277
      FROM_DATE((short)2, "from_date"),
8278
      TO_DATE((short)3, "to_date"),
8279
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 8280
 
8281
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8282
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8283
 
8284
      static {
8285
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8286
          byId.put((int)field._thriftId, field);
8287
          byName.put(field.getFieldName(), field);
8288
        }
8289
      }
8290
 
8291
      /**
8292
       * Find the _Fields constant that matches fieldId, or null if its not found.
8293
       */
8294
      public static _Fields findByThriftId(int fieldId) {
8295
        return byId.get(fieldId);
8296
      }
8297
 
8298
      /**
8299
       * Find the _Fields constant that matches fieldId, throwing an exception
8300
       * if it is not found.
8301
       */
8302
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8303
        _Fields fields = findByThriftId(fieldId);
8304
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8305
        return fields;
8306
      }
8307
 
8308
      /**
8309
       * Find the _Fields constant that matches name, or null if its not found.
8310
       */
8311
      public static _Fields findByName(String name) {
8312
        return byName.get(name);
8313
      }
8314
 
8315
      private final short _thriftId;
8316
      private final String _fieldName;
8317
 
8318
      _Fields(short thriftId, String fieldName) {
8319
        _thriftId = thriftId;
8320
        _fieldName = fieldName;
8321
      }
8322
 
8323
      public short getThriftFieldId() {
8324
        return _thriftId;
8325
      }
8326
 
8327
      public String getFieldName() {
8328
        return _fieldName;
8329
      }
8330
    }
8331
 
8332
    // isset id assignments
483 rajveer 8333
    private static final int __FROM_DATE_ISSET_ID = 0;
8334
    private static final int __TO_DATE_ISSET_ID = 1;
8335
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8336
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 8337
 
8338
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8339
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8340
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8341
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 8342
          new FieldValueMetaData(TType.I64)));
483 rajveer 8343
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
8344
          new FieldValueMetaData(TType.I64)));
8345
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8346
          new FieldValueMetaData(TType.I64)));
68 ashish 8347
    }});
8348
 
8349
    static {
483 rajveer 8350
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 8351
    }
8352
 
483 rajveer 8353
    public getAllOrders_args() {
68 ashish 8354
    }
8355
 
483 rajveer 8356
    public getAllOrders_args(
8357
      OrderStatus status,
8358
      long from_date,
8359
      long to_date,
8360
      long warehouse_id)
68 ashish 8361
    {
8362
      this();
483 rajveer 8363
      this.status = status;
8364
      this.from_date = from_date;
8365
      setFrom_dateIsSet(true);
8366
      this.to_date = to_date;
8367
      setTo_dateIsSet(true);
8368
      this.warehouse_id = warehouse_id;
8369
      setWarehouse_idIsSet(true);
68 ashish 8370
    }
8371
 
8372
    /**
8373
     * Performs a deep copy on <i>other</i>.
8374
     */
483 rajveer 8375
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 8376
      __isset_bit_vector.clear();
8377
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8378
      if (other.isSetStatus()) {
8379
        this.status = other.status;
8380
      }
8381
      this.from_date = other.from_date;
8382
      this.to_date = other.to_date;
8383
      this.warehouse_id = other.warehouse_id;
68 ashish 8384
    }
8385
 
483 rajveer 8386
    public getAllOrders_args deepCopy() {
8387
      return new getAllOrders_args(this);
68 ashish 8388
    }
8389
 
8390
    @Deprecated
483 rajveer 8391
    public getAllOrders_args clone() {
8392
      return new getAllOrders_args(this);
68 ashish 8393
    }
8394
 
483 rajveer 8395
    /**
8396
     * 
8397
     * @see OrderStatus
8398
     */
8399
    public OrderStatus getStatus() {
8400
      return this.status;
68 ashish 8401
    }
8402
 
483 rajveer 8403
    /**
8404
     * 
8405
     * @see OrderStatus
8406
     */
8407
    public getAllOrders_args setStatus(OrderStatus status) {
8408
      this.status = status;
68 ashish 8409
      return this;
8410
    }
8411
 
483 rajveer 8412
    public void unsetStatus() {
8413
      this.status = null;
68 ashish 8414
    }
8415
 
483 rajveer 8416
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8417
    public boolean isSetStatus() {
8418
      return this.status != null;
68 ashish 8419
    }
8420
 
483 rajveer 8421
    public void setStatusIsSet(boolean value) {
8422
      if (!value) {
8423
        this.status = null;
68 ashish 8424
      }
8425
    }
8426
 
483 rajveer 8427
    public long getFrom_date() {
8428
      return this.from_date;
68 ashish 8429
    }
8430
 
483 rajveer 8431
    public getAllOrders_args setFrom_date(long from_date) {
8432
      this.from_date = from_date;
8433
      setFrom_dateIsSet(true);
8434
      return this;
68 ashish 8435
    }
8436
 
483 rajveer 8437
    public void unsetFrom_date() {
8438
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 8439
    }
8440
 
483 rajveer 8441
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
8442
    public boolean isSetFrom_date() {
8443
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 8444
    }
8445
 
483 rajveer 8446
    public void setFrom_dateIsSet(boolean value) {
8447
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 8448
    }
8449
 
483 rajveer 8450
    public long getTo_date() {
8451
      return this.to_date;
68 ashish 8452
    }
8453
 
483 rajveer 8454
    public getAllOrders_args setTo_date(long to_date) {
8455
      this.to_date = to_date;
8456
      setTo_dateIsSet(true);
68 ashish 8457
      return this;
8458
    }
8459
 
483 rajveer 8460
    public void unsetTo_date() {
8461
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 8462
    }
8463
 
483 rajveer 8464
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
8465
    public boolean isSetTo_date() {
8466
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 8467
    }
8468
 
483 rajveer 8469
    public void setTo_dateIsSet(boolean value) {
8470
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 8471
    }
8472
 
483 rajveer 8473
    public long getWarehouse_id() {
8474
      return this.warehouse_id;
68 ashish 8475
    }
8476
 
483 rajveer 8477
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
8478
      this.warehouse_id = warehouse_id;
8479
      setWarehouse_idIsSet(true);
68 ashish 8480
      return this;
8481
    }
8482
 
483 rajveer 8483
    public void unsetWarehouse_id() {
8484
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8485
    }
8486
 
483 rajveer 8487
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8488
    public boolean isSetWarehouse_id() {
8489
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8490
    }
8491
 
483 rajveer 8492
    public void setWarehouse_idIsSet(boolean value) {
8493
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 8494
    }
8495
 
8496
    public void setFieldValue(_Fields field, Object value) {
8497
      switch (field) {
483 rajveer 8498
      case STATUS:
68 ashish 8499
        if (value == null) {
483 rajveer 8500
          unsetStatus();
68 ashish 8501
        } else {
483 rajveer 8502
          setStatus((OrderStatus)value);
68 ashish 8503
        }
8504
        break;
8505
 
483 rajveer 8506
      case FROM_DATE:
68 ashish 8507
        if (value == null) {
483 rajveer 8508
          unsetFrom_date();
68 ashish 8509
        } else {
483 rajveer 8510
          setFrom_date((Long)value);
68 ashish 8511
        }
8512
        break;
8513
 
483 rajveer 8514
      case TO_DATE:
8515
        if (value == null) {
8516
          unsetTo_date();
8517
        } else {
8518
          setTo_date((Long)value);
8519
        }
8520
        break;
8521
 
8522
      case WAREHOUSE_ID:
8523
        if (value == null) {
8524
          unsetWarehouse_id();
8525
        } else {
8526
          setWarehouse_id((Long)value);
8527
        }
8528
        break;
8529
 
68 ashish 8530
      }
8531
    }
8532
 
8533
    public void setFieldValue(int fieldID, Object value) {
8534
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8535
    }
8536
 
8537
    public Object getFieldValue(_Fields field) {
8538
      switch (field) {
483 rajveer 8539
      case STATUS:
8540
        return getStatus();
68 ashish 8541
 
483 rajveer 8542
      case FROM_DATE:
8543
        return new Long(getFrom_date());
68 ashish 8544
 
483 rajveer 8545
      case TO_DATE:
8546
        return new Long(getTo_date());
8547
 
8548
      case WAREHOUSE_ID:
8549
        return new Long(getWarehouse_id());
8550
 
68 ashish 8551
      }
8552
      throw new IllegalStateException();
8553
    }
8554
 
8555
    public Object getFieldValue(int fieldId) {
8556
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8557
    }
8558
 
8559
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8560
    public boolean isSet(_Fields field) {
8561
      switch (field) {
483 rajveer 8562
      case STATUS:
8563
        return isSetStatus();
8564
      case FROM_DATE:
8565
        return isSetFrom_date();
8566
      case TO_DATE:
8567
        return isSetTo_date();
8568
      case WAREHOUSE_ID:
8569
        return isSetWarehouse_id();
68 ashish 8570
      }
8571
      throw new IllegalStateException();
8572
    }
8573
 
8574
    public boolean isSet(int fieldID) {
8575
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8576
    }
8577
 
8578
    @Override
8579
    public boolean equals(Object that) {
8580
      if (that == null)
8581
        return false;
483 rajveer 8582
      if (that instanceof getAllOrders_args)
8583
        return this.equals((getAllOrders_args)that);
68 ashish 8584
      return false;
8585
    }
8586
 
483 rajveer 8587
    public boolean equals(getAllOrders_args that) {
68 ashish 8588
      if (that == null)
8589
        return false;
8590
 
483 rajveer 8591
      boolean this_present_status = true && this.isSetStatus();
8592
      boolean that_present_status = true && that.isSetStatus();
8593
      if (this_present_status || that_present_status) {
8594
        if (!(this_present_status && that_present_status))
68 ashish 8595
          return false;
483 rajveer 8596
        if (!this.status.equals(that.status))
68 ashish 8597
          return false;
8598
      }
8599
 
483 rajveer 8600
      boolean this_present_from_date = true;
8601
      boolean that_present_from_date = true;
8602
      if (this_present_from_date || that_present_from_date) {
8603
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8604
          return false;
483 rajveer 8605
        if (this.from_date != that.from_date)
68 ashish 8606
          return false;
8607
      }
8608
 
483 rajveer 8609
      boolean this_present_to_date = true;
8610
      boolean that_present_to_date = true;
8611
      if (this_present_to_date || that_present_to_date) {
8612
        if (!(this_present_to_date && that_present_to_date))
8613
          return false;
8614
        if (this.to_date != that.to_date)
8615
          return false;
68 ashish 8616
      }
8617
 
483 rajveer 8618
      boolean this_present_warehouse_id = true;
8619
      boolean that_present_warehouse_id = true;
8620
      if (this_present_warehouse_id || that_present_warehouse_id) {
8621
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8622
          return false;
483 rajveer 8623
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8624
          return false;
8625
      }
8626
 
8627
      return true;
8628
    }
8629
 
8630
    @Override
8631
    public int hashCode() {
8632
      return 0;
8633
    }
8634
 
483 rajveer 8635
    public int compareTo(getAllOrders_args other) {
68 ashish 8636
      if (!getClass().equals(other.getClass())) {
8637
        return getClass().getName().compareTo(other.getClass().getName());
8638
      }
8639
 
8640
      int lastComparison = 0;
483 rajveer 8641
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8642
 
483 rajveer 8643
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8644
      if (lastComparison != 0) {
8645
        return lastComparison;
8646
      }
483 rajveer 8647
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8648
      if (lastComparison != 0) {
8649
        return lastComparison;
8650
      }
483 rajveer 8651
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8652
      if (lastComparison != 0) {
8653
        return lastComparison;
8654
      }
8655
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8656
      if (lastComparison != 0) {
8657
        return lastComparison;
8658
      }
8659
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8660
      if (lastComparison != 0) {
8661
        return lastComparison;
8662
      }
8663
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8664
      if (lastComparison != 0) {
8665
        return lastComparison;
8666
      }
8667
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8668
      if (lastComparison != 0) {
8669
        return lastComparison;
8670
      }
8671
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8672
      if (lastComparison != 0) {
8673
        return lastComparison;
8674
      }
68 ashish 8675
      return 0;
8676
    }
8677
 
8678
    public void read(TProtocol iprot) throws TException {
8679
      TField field;
8680
      iprot.readStructBegin();
8681
      while (true)
8682
      {
8683
        field = iprot.readFieldBegin();
8684
        if (field.type == TType.STOP) { 
8685
          break;
8686
        }
8687
        _Fields fieldId = _Fields.findByThriftId(field.id);
8688
        if (fieldId == null) {
8689
          TProtocolUtil.skip(iprot, field.type);
8690
        } else {
8691
          switch (fieldId) {
483 rajveer 8692
            case STATUS:
8693
              if (field.type == TType.I32) {
8694
                this.status = OrderStatus.findByValue(iprot.readI32());
8695
              } else { 
8696
                TProtocolUtil.skip(iprot, field.type);
8697
              }
8698
              break;
8699
            case FROM_DATE:
68 ashish 8700
              if (field.type == TType.I64) {
483 rajveer 8701
                this.from_date = iprot.readI64();
8702
                setFrom_dateIsSet(true);
68 ashish 8703
              } else { 
8704
                TProtocolUtil.skip(iprot, field.type);
8705
              }
8706
              break;
483 rajveer 8707
            case TO_DATE:
8708
              if (field.type == TType.I64) {
8709
                this.to_date = iprot.readI64();
8710
                setTo_dateIsSet(true);
8711
              } else { 
8712
                TProtocolUtil.skip(iprot, field.type);
8713
              }
8714
              break;
8715
            case WAREHOUSE_ID:
8716
              if (field.type == TType.I64) {
8717
                this.warehouse_id = iprot.readI64();
8718
                setWarehouse_idIsSet(true);
8719
              } else { 
8720
                TProtocolUtil.skip(iprot, field.type);
8721
              }
8722
              break;
68 ashish 8723
          }
8724
          iprot.readFieldEnd();
8725
        }
8726
      }
8727
      iprot.readStructEnd();
8728
      validate();
8729
    }
8730
 
8731
    public void write(TProtocol oprot) throws TException {
8732
      validate();
8733
 
8734
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8735
      if (this.status != null) {
8736
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8737
        oprot.writeI32(this.status.getValue());
8738
        oprot.writeFieldEnd();
8739
      }
8740
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8741
      oprot.writeI64(this.from_date);
68 ashish 8742
      oprot.writeFieldEnd();
483 rajveer 8743
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8744
      oprot.writeI64(this.to_date);
8745
      oprot.writeFieldEnd();
8746
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8747
      oprot.writeI64(this.warehouse_id);
8748
      oprot.writeFieldEnd();
68 ashish 8749
      oprot.writeFieldStop();
8750
      oprot.writeStructEnd();
8751
    }
8752
 
8753
    @Override
8754
    public String toString() {
483 rajveer 8755
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8756
      boolean first = true;
8757
 
483 rajveer 8758
      sb.append("status:");
8759
      if (this.status == null) {
8760
        sb.append("null");
8761
      } else {
8762
        String status_name = status.name();
8763
        if (status_name != null) {
8764
          sb.append(status_name);
8765
          sb.append(" (");
8766
        }
8767
        sb.append(this.status);
8768
        if (status_name != null) {
8769
          sb.append(")");
8770
        }
8771
      }
68 ashish 8772
      first = false;
483 rajveer 8773
      if (!first) sb.append(", ");
8774
      sb.append("from_date:");
8775
      sb.append(this.from_date);
8776
      first = false;
8777
      if (!first) sb.append(", ");
8778
      sb.append("to_date:");
8779
      sb.append(this.to_date);
8780
      first = false;
8781
      if (!first) sb.append(", ");
8782
      sb.append("warehouse_id:");
8783
      sb.append(this.warehouse_id);
8784
      first = false;
68 ashish 8785
      sb.append(")");
8786
      return sb.toString();
8787
    }
8788
 
8789
    public void validate() throws TException {
8790
      // check for required fields
8791
    }
8792
 
8793
  }
8794
 
483 rajveer 8795
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8796
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8797
 
483 rajveer 8798
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8799
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8800
 
483 rajveer 8801
    private List<Order> success;
68 ashish 8802
    private TransactionServiceException ex;
8803
 
8804
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8805
    public enum _Fields implements TFieldIdEnum {
8806
      SUCCESS((short)0, "success"),
8807
      EX((short)1, "ex");
8808
 
8809
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8810
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8811
 
8812
      static {
8813
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8814
          byId.put((int)field._thriftId, field);
8815
          byName.put(field.getFieldName(), field);
8816
        }
8817
      }
8818
 
8819
      /**
8820
       * Find the _Fields constant that matches fieldId, or null if its not found.
8821
       */
8822
      public static _Fields findByThriftId(int fieldId) {
8823
        return byId.get(fieldId);
8824
      }
8825
 
8826
      /**
8827
       * Find the _Fields constant that matches fieldId, throwing an exception
8828
       * if it is not found.
8829
       */
8830
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8831
        _Fields fields = findByThriftId(fieldId);
8832
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8833
        return fields;
8834
      }
8835
 
8836
      /**
8837
       * Find the _Fields constant that matches name, or null if its not found.
8838
       */
8839
      public static _Fields findByName(String name) {
8840
        return byName.get(name);
8841
      }
8842
 
8843
      private final short _thriftId;
8844
      private final String _fieldName;
8845
 
8846
      _Fields(short thriftId, String fieldName) {
8847
        _thriftId = thriftId;
8848
        _fieldName = fieldName;
8849
      }
8850
 
8851
      public short getThriftFieldId() {
8852
        return _thriftId;
8853
      }
8854
 
8855
      public String getFieldName() {
8856
        return _fieldName;
8857
      }
8858
    }
8859
 
8860
    // isset id assignments
8861
 
8862
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8863
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 8864
          new ListMetaData(TType.LIST, 
8865
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 8866
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8867
          new FieldValueMetaData(TType.STRUCT)));
8868
    }});
8869
 
8870
    static {
483 rajveer 8871
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 8872
    }
8873
 
483 rajveer 8874
    public getAllOrders_result() {
68 ashish 8875
    }
8876
 
483 rajveer 8877
    public getAllOrders_result(
8878
      List<Order> success,
68 ashish 8879
      TransactionServiceException ex)
8880
    {
8881
      this();
8882
      this.success = success;
8883
      this.ex = ex;
8884
    }
8885
 
8886
    /**
8887
     * Performs a deep copy on <i>other</i>.
8888
     */
483 rajveer 8889
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 8890
      if (other.isSetSuccess()) {
483 rajveer 8891
        List<Order> __this__success = new ArrayList<Order>();
8892
        for (Order other_element : other.success) {
8893
          __this__success.add(new Order(other_element));
8894
        }
8895
        this.success = __this__success;
68 ashish 8896
      }
8897
      if (other.isSetEx()) {
8898
        this.ex = new TransactionServiceException(other.ex);
8899
      }
8900
    }
8901
 
483 rajveer 8902
    public getAllOrders_result deepCopy() {
8903
      return new getAllOrders_result(this);
68 ashish 8904
    }
8905
 
8906
    @Deprecated
483 rajveer 8907
    public getAllOrders_result clone() {
8908
      return new getAllOrders_result(this);
68 ashish 8909
    }
8910
 
483 rajveer 8911
    public int getSuccessSize() {
8912
      return (this.success == null) ? 0 : this.success.size();
8913
    }
8914
 
8915
    public java.util.Iterator<Order> getSuccessIterator() {
8916
      return (this.success == null) ? null : this.success.iterator();
8917
    }
8918
 
8919
    public void addToSuccess(Order elem) {
8920
      if (this.success == null) {
8921
        this.success = new ArrayList<Order>();
8922
      }
8923
      this.success.add(elem);
8924
    }
8925
 
8926
    public List<Order> getSuccess() {
68 ashish 8927
      return this.success;
8928
    }
8929
 
483 rajveer 8930
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 8931
      this.success = success;
8932
      return this;
8933
    }
8934
 
8935
    public void unsetSuccess() {
8936
      this.success = null;
8937
    }
8938
 
8939
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8940
    public boolean isSetSuccess() {
8941
      return this.success != null;
8942
    }
8943
 
8944
    public void setSuccessIsSet(boolean value) {
8945
      if (!value) {
8946
        this.success = null;
8947
      }
8948
    }
8949
 
8950
    public TransactionServiceException getEx() {
8951
      return this.ex;
8952
    }
8953
 
483 rajveer 8954
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 8955
      this.ex = ex;
8956
      return this;
8957
    }
8958
 
8959
    public void unsetEx() {
8960
      this.ex = null;
8961
    }
8962
 
8963
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8964
    public boolean isSetEx() {
8965
      return this.ex != null;
8966
    }
8967
 
8968
    public void setExIsSet(boolean value) {
8969
      if (!value) {
8970
        this.ex = null;
8971
      }
8972
    }
8973
 
8974
    public void setFieldValue(_Fields field, Object value) {
8975
      switch (field) {
8976
      case SUCCESS:
8977
        if (value == null) {
8978
          unsetSuccess();
8979
        } else {
483 rajveer 8980
          setSuccess((List<Order>)value);
68 ashish 8981
        }
8982
        break;
8983
 
8984
      case EX:
8985
        if (value == null) {
8986
          unsetEx();
8987
        } else {
8988
          setEx((TransactionServiceException)value);
8989
        }
8990
        break;
8991
 
8992
      }
8993
    }
8994
 
8995
    public void setFieldValue(int fieldID, Object value) {
8996
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8997
    }
8998
 
8999
    public Object getFieldValue(_Fields field) {
9000
      switch (field) {
9001
      case SUCCESS:
9002
        return getSuccess();
9003
 
9004
      case EX:
9005
        return getEx();
9006
 
9007
      }
9008
      throw new IllegalStateException();
9009
    }
9010
 
9011
    public Object getFieldValue(int fieldId) {
9012
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9013
    }
9014
 
9015
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9016
    public boolean isSet(_Fields field) {
9017
      switch (field) {
9018
      case SUCCESS:
9019
        return isSetSuccess();
9020
      case EX:
9021
        return isSetEx();
9022
      }
9023
      throw new IllegalStateException();
9024
    }
9025
 
9026
    public boolean isSet(int fieldID) {
9027
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9028
    }
9029
 
9030
    @Override
9031
    public boolean equals(Object that) {
9032
      if (that == null)
9033
        return false;
483 rajveer 9034
      if (that instanceof getAllOrders_result)
9035
        return this.equals((getAllOrders_result)that);
68 ashish 9036
      return false;
9037
    }
9038
 
483 rajveer 9039
    public boolean equals(getAllOrders_result that) {
68 ashish 9040
      if (that == null)
9041
        return false;
9042
 
9043
      boolean this_present_success = true && this.isSetSuccess();
9044
      boolean that_present_success = true && that.isSetSuccess();
9045
      if (this_present_success || that_present_success) {
9046
        if (!(this_present_success && that_present_success))
9047
          return false;
9048
        if (!this.success.equals(that.success))
9049
          return false;
9050
      }
9051
 
9052
      boolean this_present_ex = true && this.isSetEx();
9053
      boolean that_present_ex = true && that.isSetEx();
9054
      if (this_present_ex || that_present_ex) {
9055
        if (!(this_present_ex && that_present_ex))
9056
          return false;
9057
        if (!this.ex.equals(that.ex))
9058
          return false;
9059
      }
9060
 
9061
      return true;
9062
    }
9063
 
9064
    @Override
9065
    public int hashCode() {
9066
      return 0;
9067
    }
9068
 
483 rajveer 9069
    public int compareTo(getAllOrders_result other) {
9070
      if (!getClass().equals(other.getClass())) {
9071
        return getClass().getName().compareTo(other.getClass().getName());
9072
      }
9073
 
9074
      int lastComparison = 0;
9075
      getAllOrders_result typedOther = (getAllOrders_result)other;
9076
 
9077
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9078
      if (lastComparison != 0) {
9079
        return lastComparison;
9080
      }
9081
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9082
      if (lastComparison != 0) {
9083
        return lastComparison;
9084
      }
9085
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9086
      if (lastComparison != 0) {
9087
        return lastComparison;
9088
      }
9089
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9090
      if (lastComparison != 0) {
9091
        return lastComparison;
9092
      }
9093
      return 0;
9094
    }
9095
 
68 ashish 9096
    public void read(TProtocol iprot) throws TException {
9097
      TField field;
9098
      iprot.readStructBegin();
9099
      while (true)
9100
      {
9101
        field = iprot.readFieldBegin();
9102
        if (field.type == TType.STOP) { 
9103
          break;
9104
        }
9105
        _Fields fieldId = _Fields.findByThriftId(field.id);
9106
        if (fieldId == null) {
9107
          TProtocolUtil.skip(iprot, field.type);
9108
        } else {
9109
          switch (fieldId) {
9110
            case SUCCESS:
483 rajveer 9111
              if (field.type == TType.LIST) {
9112
                {
684 chandransh 9113
                  TList _list16 = iprot.readListBegin();
9114
                  this.success = new ArrayList<Order>(_list16.size);
9115
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 9116
                  {
684 chandransh 9117
                    Order _elem18;
9118
                    _elem18 = new Order();
9119
                    _elem18.read(iprot);
9120
                    this.success.add(_elem18);
483 rajveer 9121
                  }
9122
                  iprot.readListEnd();
9123
                }
68 ashish 9124
              } else { 
9125
                TProtocolUtil.skip(iprot, field.type);
9126
              }
9127
              break;
9128
            case EX:
9129
              if (field.type == TType.STRUCT) {
9130
                this.ex = new TransactionServiceException();
9131
                this.ex.read(iprot);
9132
              } else { 
9133
                TProtocolUtil.skip(iprot, field.type);
9134
              }
9135
              break;
9136
          }
9137
          iprot.readFieldEnd();
9138
        }
9139
      }
9140
      iprot.readStructEnd();
9141
      validate();
9142
    }
9143
 
9144
    public void write(TProtocol oprot) throws TException {
9145
      oprot.writeStructBegin(STRUCT_DESC);
9146
 
9147
      if (this.isSetSuccess()) {
9148
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 9149
        {
9150
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 9151
          for (Order _iter19 : this.success)
483 rajveer 9152
          {
684 chandransh 9153
            _iter19.write(oprot);
483 rajveer 9154
          }
9155
          oprot.writeListEnd();
9156
        }
68 ashish 9157
        oprot.writeFieldEnd();
9158
      } else if (this.isSetEx()) {
9159
        oprot.writeFieldBegin(EX_FIELD_DESC);
9160
        this.ex.write(oprot);
9161
        oprot.writeFieldEnd();
9162
      }
9163
      oprot.writeFieldStop();
9164
      oprot.writeStructEnd();
9165
    }
9166
 
9167
    @Override
9168
    public String toString() {
483 rajveer 9169
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 9170
      boolean first = true;
9171
 
9172
      sb.append("success:");
9173
      if (this.success == null) {
9174
        sb.append("null");
9175
      } else {
9176
        sb.append(this.success);
9177
      }
9178
      first = false;
9179
      if (!first) sb.append(", ");
9180
      sb.append("ex:");
9181
      if (this.ex == null) {
9182
        sb.append("null");
9183
      } else {
9184
        sb.append(this.ex);
9185
      }
9186
      first = false;
9187
      sb.append(")");
9188
      return sb.toString();
9189
    }
9190
 
9191
    public void validate() throws TException {
9192
      // check for required fields
9193
    }
9194
 
9195
  }
9196
 
1022 varun.gupt 9197
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
9198
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
9199
 
9200
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
9201
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
9202
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
9203
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
9204
 
9205
    private OrderStatus status;
9206
    private long start_billing_date;
9207
    private long end_billing_date;
9208
    private long warehouse_id;
9209
 
9210
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9211
    public enum _Fields implements TFieldIdEnum {
9212
      /**
9213
       * 
9214
       * @see OrderStatus
9215
       */
9216
      STATUS((short)1, "status"),
9217
      START_BILLING_DATE((short)2, "start_billing_date"),
9218
      END_BILLING_DATE((short)3, "end_billing_date"),
9219
      WAREHOUSE_ID((short)4, "warehouse_id");
9220
 
9221
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9222
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9223
 
9224
      static {
9225
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9226
          byId.put((int)field._thriftId, field);
9227
          byName.put(field.getFieldName(), field);
9228
        }
9229
      }
9230
 
9231
      /**
9232
       * Find the _Fields constant that matches fieldId, or null if its not found.
9233
       */
9234
      public static _Fields findByThriftId(int fieldId) {
9235
        return byId.get(fieldId);
9236
      }
9237
 
9238
      /**
9239
       * Find the _Fields constant that matches fieldId, throwing an exception
9240
       * if it is not found.
9241
       */
9242
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9243
        _Fields fields = findByThriftId(fieldId);
9244
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9245
        return fields;
9246
      }
9247
 
9248
      /**
9249
       * Find the _Fields constant that matches name, or null if its not found.
9250
       */
9251
      public static _Fields findByName(String name) {
9252
        return byName.get(name);
9253
      }
9254
 
9255
      private final short _thriftId;
9256
      private final String _fieldName;
9257
 
9258
      _Fields(short thriftId, String fieldName) {
9259
        _thriftId = thriftId;
9260
        _fieldName = fieldName;
9261
      }
9262
 
9263
      public short getThriftFieldId() {
9264
        return _thriftId;
9265
      }
9266
 
9267
      public String getFieldName() {
9268
        return _fieldName;
9269
      }
9270
    }
9271
 
9272
    // isset id assignments
9273
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
9274
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
9275
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
9276
    private BitSet __isset_bit_vector = new BitSet(3);
9277
 
9278
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9279
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
9280
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
9281
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
9282
          new FieldValueMetaData(TType.I64)));
9283
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
9284
          new FieldValueMetaData(TType.I64)));
9285
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
9286
          new FieldValueMetaData(TType.I64)));
9287
    }});
9288
 
9289
    static {
9290
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
9291
    }
9292
 
9293
    public getOrdersByBillingDate_args() {
9294
    }
9295
 
9296
    public getOrdersByBillingDate_args(
9297
      OrderStatus status,
9298
      long start_billing_date,
9299
      long end_billing_date,
9300
      long warehouse_id)
9301
    {
9302
      this();
9303
      this.status = status;
9304
      this.start_billing_date = start_billing_date;
9305
      setStart_billing_dateIsSet(true);
9306
      this.end_billing_date = end_billing_date;
9307
      setEnd_billing_dateIsSet(true);
9308
      this.warehouse_id = warehouse_id;
9309
      setWarehouse_idIsSet(true);
9310
    }
9311
 
9312
    /**
9313
     * Performs a deep copy on <i>other</i>.
9314
     */
9315
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
9316
      __isset_bit_vector.clear();
9317
      __isset_bit_vector.or(other.__isset_bit_vector);
9318
      if (other.isSetStatus()) {
9319
        this.status = other.status;
9320
      }
9321
      this.start_billing_date = other.start_billing_date;
9322
      this.end_billing_date = other.end_billing_date;
9323
      this.warehouse_id = other.warehouse_id;
9324
    }
9325
 
9326
    public getOrdersByBillingDate_args deepCopy() {
9327
      return new getOrdersByBillingDate_args(this);
9328
    }
9329
 
9330
    @Deprecated
9331
    public getOrdersByBillingDate_args clone() {
9332
      return new getOrdersByBillingDate_args(this);
9333
    }
9334
 
9335
    /**
9336
     * 
9337
     * @see OrderStatus
9338
     */
9339
    public OrderStatus getStatus() {
9340
      return this.status;
9341
    }
9342
 
9343
    /**
9344
     * 
9345
     * @see OrderStatus
9346
     */
9347
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
9348
      this.status = status;
9349
      return this;
9350
    }
9351
 
9352
    public void unsetStatus() {
9353
      this.status = null;
9354
    }
9355
 
9356
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9357
    public boolean isSetStatus() {
9358
      return this.status != null;
9359
    }
9360
 
9361
    public void setStatusIsSet(boolean value) {
9362
      if (!value) {
9363
        this.status = null;
9364
      }
9365
    }
9366
 
9367
    public long getStart_billing_date() {
9368
      return this.start_billing_date;
9369
    }
9370
 
9371
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
9372
      this.start_billing_date = start_billing_date;
9373
      setStart_billing_dateIsSet(true);
9374
      return this;
9375
    }
9376
 
9377
    public void unsetStart_billing_date() {
9378
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
9379
    }
9380
 
9381
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
9382
    public boolean isSetStart_billing_date() {
9383
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
9384
    }
9385
 
9386
    public void setStart_billing_dateIsSet(boolean value) {
9387
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
9388
    }
9389
 
9390
    public long getEnd_billing_date() {
9391
      return this.end_billing_date;
9392
    }
9393
 
9394
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
9395
      this.end_billing_date = end_billing_date;
9396
      setEnd_billing_dateIsSet(true);
9397
      return this;
9398
    }
9399
 
9400
    public void unsetEnd_billing_date() {
9401
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
9402
    }
9403
 
9404
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
9405
    public boolean isSetEnd_billing_date() {
9406
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
9407
    }
9408
 
9409
    public void setEnd_billing_dateIsSet(boolean value) {
9410
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
9411
    }
9412
 
9413
    public long getWarehouse_id() {
9414
      return this.warehouse_id;
9415
    }
9416
 
9417
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
9418
      this.warehouse_id = warehouse_id;
9419
      setWarehouse_idIsSet(true);
9420
      return this;
9421
    }
9422
 
9423
    public void unsetWarehouse_id() {
9424
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
9425
    }
9426
 
9427
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9428
    public boolean isSetWarehouse_id() {
9429
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
9430
    }
9431
 
9432
    public void setWarehouse_idIsSet(boolean value) {
9433
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
9434
    }
9435
 
9436
    public void setFieldValue(_Fields field, Object value) {
9437
      switch (field) {
9438
      case STATUS:
9439
        if (value == null) {
9440
          unsetStatus();
9441
        } else {
9442
          setStatus((OrderStatus)value);
9443
        }
9444
        break;
9445
 
9446
      case START_BILLING_DATE:
9447
        if (value == null) {
9448
          unsetStart_billing_date();
9449
        } else {
9450
          setStart_billing_date((Long)value);
9451
        }
9452
        break;
9453
 
9454
      case END_BILLING_DATE:
9455
        if (value == null) {
9456
          unsetEnd_billing_date();
9457
        } else {
9458
          setEnd_billing_date((Long)value);
9459
        }
9460
        break;
9461
 
9462
      case WAREHOUSE_ID:
9463
        if (value == null) {
9464
          unsetWarehouse_id();
9465
        } else {
9466
          setWarehouse_id((Long)value);
9467
        }
9468
        break;
9469
 
9470
      }
9471
    }
9472
 
9473
    public void setFieldValue(int fieldID, Object value) {
9474
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9475
    }
9476
 
9477
    public Object getFieldValue(_Fields field) {
9478
      switch (field) {
9479
      case STATUS:
9480
        return getStatus();
9481
 
9482
      case START_BILLING_DATE:
9483
        return new Long(getStart_billing_date());
9484
 
9485
      case END_BILLING_DATE:
9486
        return new Long(getEnd_billing_date());
9487
 
9488
      case WAREHOUSE_ID:
9489
        return new Long(getWarehouse_id());
9490
 
9491
      }
9492
      throw new IllegalStateException();
9493
    }
9494
 
9495
    public Object getFieldValue(int fieldId) {
9496
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9497
    }
9498
 
9499
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9500
    public boolean isSet(_Fields field) {
9501
      switch (field) {
9502
      case STATUS:
9503
        return isSetStatus();
9504
      case START_BILLING_DATE:
9505
        return isSetStart_billing_date();
9506
      case END_BILLING_DATE:
9507
        return isSetEnd_billing_date();
9508
      case WAREHOUSE_ID:
9509
        return isSetWarehouse_id();
9510
      }
9511
      throw new IllegalStateException();
9512
    }
9513
 
9514
    public boolean isSet(int fieldID) {
9515
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9516
    }
9517
 
9518
    @Override
9519
    public boolean equals(Object that) {
9520
      if (that == null)
9521
        return false;
9522
      if (that instanceof getOrdersByBillingDate_args)
9523
        return this.equals((getOrdersByBillingDate_args)that);
9524
      return false;
9525
    }
9526
 
9527
    public boolean equals(getOrdersByBillingDate_args that) {
9528
      if (that == null)
9529
        return false;
9530
 
9531
      boolean this_present_status = true && this.isSetStatus();
9532
      boolean that_present_status = true && that.isSetStatus();
9533
      if (this_present_status || that_present_status) {
9534
        if (!(this_present_status && that_present_status))
9535
          return false;
9536
        if (!this.status.equals(that.status))
9537
          return false;
9538
      }
9539
 
9540
      boolean this_present_start_billing_date = true;
9541
      boolean that_present_start_billing_date = true;
9542
      if (this_present_start_billing_date || that_present_start_billing_date) {
9543
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9544
          return false;
9545
        if (this.start_billing_date != that.start_billing_date)
9546
          return false;
9547
      }
9548
 
9549
      boolean this_present_end_billing_date = true;
9550
      boolean that_present_end_billing_date = true;
9551
      if (this_present_end_billing_date || that_present_end_billing_date) {
9552
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9553
          return false;
9554
        if (this.end_billing_date != that.end_billing_date)
9555
          return false;
9556
      }
9557
 
9558
      boolean this_present_warehouse_id = true;
9559
      boolean that_present_warehouse_id = true;
9560
      if (this_present_warehouse_id || that_present_warehouse_id) {
9561
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9562
          return false;
9563
        if (this.warehouse_id != that.warehouse_id)
9564
          return false;
9565
      }
9566
 
9567
      return true;
9568
    }
9569
 
9570
    @Override
9571
    public int hashCode() {
9572
      return 0;
9573
    }
9574
 
9575
    public int compareTo(getOrdersByBillingDate_args other) {
9576
      if (!getClass().equals(other.getClass())) {
9577
        return getClass().getName().compareTo(other.getClass().getName());
9578
      }
9579
 
9580
      int lastComparison = 0;
9581
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9582
 
9583
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9584
      if (lastComparison != 0) {
9585
        return lastComparison;
9586
      }
9587
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9588
      if (lastComparison != 0) {
9589
        return lastComparison;
9590
      }
9591
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9592
      if (lastComparison != 0) {
9593
        return lastComparison;
9594
      }
9595
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9596
      if (lastComparison != 0) {
9597
        return lastComparison;
9598
      }
9599
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9600
      if (lastComparison != 0) {
9601
        return lastComparison;
9602
      }
9603
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9604
      if (lastComparison != 0) {
9605
        return lastComparison;
9606
      }
9607
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9608
      if (lastComparison != 0) {
9609
        return lastComparison;
9610
      }
9611
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9612
      if (lastComparison != 0) {
9613
        return lastComparison;
9614
      }
9615
      return 0;
9616
    }
9617
 
9618
    public void read(TProtocol iprot) throws TException {
9619
      TField field;
9620
      iprot.readStructBegin();
9621
      while (true)
9622
      {
9623
        field = iprot.readFieldBegin();
9624
        if (field.type == TType.STOP) { 
9625
          break;
9626
        }
9627
        _Fields fieldId = _Fields.findByThriftId(field.id);
9628
        if (fieldId == null) {
9629
          TProtocolUtil.skip(iprot, field.type);
9630
        } else {
9631
          switch (fieldId) {
9632
            case STATUS:
9633
              if (field.type == TType.I32) {
9634
                this.status = OrderStatus.findByValue(iprot.readI32());
9635
              } else { 
9636
                TProtocolUtil.skip(iprot, field.type);
9637
              }
9638
              break;
9639
            case START_BILLING_DATE:
9640
              if (field.type == TType.I64) {
9641
                this.start_billing_date = iprot.readI64();
9642
                setStart_billing_dateIsSet(true);
9643
              } else { 
9644
                TProtocolUtil.skip(iprot, field.type);
9645
              }
9646
              break;
9647
            case END_BILLING_DATE:
9648
              if (field.type == TType.I64) {
9649
                this.end_billing_date = iprot.readI64();
9650
                setEnd_billing_dateIsSet(true);
9651
              } else { 
9652
                TProtocolUtil.skip(iprot, field.type);
9653
              }
9654
              break;
9655
            case WAREHOUSE_ID:
9656
              if (field.type == TType.I64) {
9657
                this.warehouse_id = iprot.readI64();
9658
                setWarehouse_idIsSet(true);
9659
              } else { 
9660
                TProtocolUtil.skip(iprot, field.type);
9661
              }
9662
              break;
9663
          }
9664
          iprot.readFieldEnd();
9665
        }
9666
      }
9667
      iprot.readStructEnd();
9668
      validate();
9669
    }
9670
 
9671
    public void write(TProtocol oprot) throws TException {
9672
      validate();
9673
 
9674
      oprot.writeStructBegin(STRUCT_DESC);
9675
      if (this.status != null) {
9676
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9677
        oprot.writeI32(this.status.getValue());
9678
        oprot.writeFieldEnd();
9679
      }
9680
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9681
      oprot.writeI64(this.start_billing_date);
9682
      oprot.writeFieldEnd();
9683
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9684
      oprot.writeI64(this.end_billing_date);
9685
      oprot.writeFieldEnd();
9686
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9687
      oprot.writeI64(this.warehouse_id);
9688
      oprot.writeFieldEnd();
9689
      oprot.writeFieldStop();
9690
      oprot.writeStructEnd();
9691
    }
9692
 
9693
    @Override
9694
    public String toString() {
9695
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9696
      boolean first = true;
9697
 
9698
      sb.append("status:");
9699
      if (this.status == null) {
9700
        sb.append("null");
9701
      } else {
9702
        String status_name = status.name();
9703
        if (status_name != null) {
9704
          sb.append(status_name);
9705
          sb.append(" (");
9706
        }
9707
        sb.append(this.status);
9708
        if (status_name != null) {
9709
          sb.append(")");
9710
        }
9711
      }
9712
      first = false;
9713
      if (!first) sb.append(", ");
9714
      sb.append("start_billing_date:");
9715
      sb.append(this.start_billing_date);
9716
      first = false;
9717
      if (!first) sb.append(", ");
9718
      sb.append("end_billing_date:");
9719
      sb.append(this.end_billing_date);
9720
      first = false;
9721
      if (!first) sb.append(", ");
9722
      sb.append("warehouse_id:");
9723
      sb.append(this.warehouse_id);
9724
      first = false;
9725
      sb.append(")");
9726
      return sb.toString();
9727
    }
9728
 
9729
    public void validate() throws TException {
9730
      // check for required fields
9731
    }
9732
 
9733
  }
9734
 
9735
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9736
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9737
 
9738
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9739
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9740
 
9741
    private List<Order> success;
9742
    private TransactionServiceException ex;
9743
 
9744
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9745
    public enum _Fields implements TFieldIdEnum {
9746
      SUCCESS((short)0, "success"),
9747
      EX((short)1, "ex");
9748
 
9749
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9750
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9751
 
9752
      static {
9753
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9754
          byId.put((int)field._thriftId, field);
9755
          byName.put(field.getFieldName(), field);
9756
        }
9757
      }
9758
 
9759
      /**
9760
       * Find the _Fields constant that matches fieldId, or null if its not found.
9761
       */
9762
      public static _Fields findByThriftId(int fieldId) {
9763
        return byId.get(fieldId);
9764
      }
9765
 
9766
      /**
9767
       * Find the _Fields constant that matches fieldId, throwing an exception
9768
       * if it is not found.
9769
       */
9770
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9771
        _Fields fields = findByThriftId(fieldId);
9772
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9773
        return fields;
9774
      }
9775
 
9776
      /**
9777
       * Find the _Fields constant that matches name, or null if its not found.
9778
       */
9779
      public static _Fields findByName(String name) {
9780
        return byName.get(name);
9781
      }
9782
 
9783
      private final short _thriftId;
9784
      private final String _fieldName;
9785
 
9786
      _Fields(short thriftId, String fieldName) {
9787
        _thriftId = thriftId;
9788
        _fieldName = fieldName;
9789
      }
9790
 
9791
      public short getThriftFieldId() {
9792
        return _thriftId;
9793
      }
9794
 
9795
      public String getFieldName() {
9796
        return _fieldName;
9797
      }
9798
    }
9799
 
9800
    // isset id assignments
9801
 
9802
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9803
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9804
          new ListMetaData(TType.LIST, 
9805
              new StructMetaData(TType.STRUCT, Order.class))));
9806
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9807
          new FieldValueMetaData(TType.STRUCT)));
9808
    }});
9809
 
9810
    static {
9811
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9812
    }
9813
 
9814
    public getOrdersByBillingDate_result() {
9815
    }
9816
 
9817
    public getOrdersByBillingDate_result(
9818
      List<Order> success,
9819
      TransactionServiceException ex)
9820
    {
9821
      this();
9822
      this.success = success;
9823
      this.ex = ex;
9824
    }
9825
 
9826
    /**
9827
     * Performs a deep copy on <i>other</i>.
9828
     */
9829
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9830
      if (other.isSetSuccess()) {
9831
        List<Order> __this__success = new ArrayList<Order>();
9832
        for (Order other_element : other.success) {
9833
          __this__success.add(new Order(other_element));
9834
        }
9835
        this.success = __this__success;
9836
      }
9837
      if (other.isSetEx()) {
9838
        this.ex = new TransactionServiceException(other.ex);
9839
      }
9840
    }
9841
 
9842
    public getOrdersByBillingDate_result deepCopy() {
9843
      return new getOrdersByBillingDate_result(this);
9844
    }
9845
 
9846
    @Deprecated
9847
    public getOrdersByBillingDate_result clone() {
9848
      return new getOrdersByBillingDate_result(this);
9849
    }
9850
 
9851
    public int getSuccessSize() {
9852
      return (this.success == null) ? 0 : this.success.size();
9853
    }
9854
 
9855
    public java.util.Iterator<Order> getSuccessIterator() {
9856
      return (this.success == null) ? null : this.success.iterator();
9857
    }
9858
 
9859
    public void addToSuccess(Order elem) {
9860
      if (this.success == null) {
9861
        this.success = new ArrayList<Order>();
9862
      }
9863
      this.success.add(elem);
9864
    }
9865
 
9866
    public List<Order> getSuccess() {
9867
      return this.success;
9868
    }
9869
 
9870
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
9871
      this.success = success;
9872
      return this;
9873
    }
9874
 
9875
    public void unsetSuccess() {
9876
      this.success = null;
9877
    }
9878
 
9879
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9880
    public boolean isSetSuccess() {
9881
      return this.success != null;
9882
    }
9883
 
9884
    public void setSuccessIsSet(boolean value) {
9885
      if (!value) {
9886
        this.success = null;
9887
      }
9888
    }
9889
 
9890
    public TransactionServiceException getEx() {
9891
      return this.ex;
9892
    }
9893
 
9894
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
9895
      this.ex = ex;
9896
      return this;
9897
    }
9898
 
9899
    public void unsetEx() {
9900
      this.ex = null;
9901
    }
9902
 
9903
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9904
    public boolean isSetEx() {
9905
      return this.ex != null;
9906
    }
9907
 
9908
    public void setExIsSet(boolean value) {
9909
      if (!value) {
9910
        this.ex = null;
9911
      }
9912
    }
9913
 
9914
    public void setFieldValue(_Fields field, Object value) {
9915
      switch (field) {
9916
      case SUCCESS:
9917
        if (value == null) {
9918
          unsetSuccess();
9919
        } else {
9920
          setSuccess((List<Order>)value);
9921
        }
9922
        break;
9923
 
9924
      case EX:
9925
        if (value == null) {
9926
          unsetEx();
9927
        } else {
9928
          setEx((TransactionServiceException)value);
9929
        }
9930
        break;
9931
 
9932
      }
9933
    }
9934
 
9935
    public void setFieldValue(int fieldID, Object value) {
9936
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9937
    }
9938
 
9939
    public Object getFieldValue(_Fields field) {
9940
      switch (field) {
9941
      case SUCCESS:
9942
        return getSuccess();
9943
 
9944
      case EX:
9945
        return getEx();
9946
 
9947
      }
9948
      throw new IllegalStateException();
9949
    }
9950
 
9951
    public Object getFieldValue(int fieldId) {
9952
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9953
    }
9954
 
9955
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9956
    public boolean isSet(_Fields field) {
9957
      switch (field) {
9958
      case SUCCESS:
9959
        return isSetSuccess();
9960
      case EX:
9961
        return isSetEx();
9962
      }
9963
      throw new IllegalStateException();
9964
    }
9965
 
9966
    public boolean isSet(int fieldID) {
9967
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9968
    }
9969
 
9970
    @Override
9971
    public boolean equals(Object that) {
9972
      if (that == null)
9973
        return false;
9974
      if (that instanceof getOrdersByBillingDate_result)
9975
        return this.equals((getOrdersByBillingDate_result)that);
9976
      return false;
9977
    }
9978
 
9979
    public boolean equals(getOrdersByBillingDate_result that) {
9980
      if (that == null)
9981
        return false;
9982
 
9983
      boolean this_present_success = true && this.isSetSuccess();
9984
      boolean that_present_success = true && that.isSetSuccess();
9985
      if (this_present_success || that_present_success) {
9986
        if (!(this_present_success && that_present_success))
9987
          return false;
9988
        if (!this.success.equals(that.success))
9989
          return false;
9990
      }
9991
 
9992
      boolean this_present_ex = true && this.isSetEx();
9993
      boolean that_present_ex = true && that.isSetEx();
9994
      if (this_present_ex || that_present_ex) {
9995
        if (!(this_present_ex && that_present_ex))
9996
          return false;
9997
        if (!this.ex.equals(that.ex))
9998
          return false;
9999
      }
10000
 
10001
      return true;
10002
    }
10003
 
10004
    @Override
10005
    public int hashCode() {
10006
      return 0;
10007
    }
10008
 
10009
    public int compareTo(getOrdersByBillingDate_result other) {
10010
      if (!getClass().equals(other.getClass())) {
10011
        return getClass().getName().compareTo(other.getClass().getName());
10012
      }
10013
 
10014
      int lastComparison = 0;
10015
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
10016
 
10017
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10018
      if (lastComparison != 0) {
10019
        return lastComparison;
10020
      }
10021
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10022
      if (lastComparison != 0) {
10023
        return lastComparison;
10024
      }
10025
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10026
      if (lastComparison != 0) {
10027
        return lastComparison;
10028
      }
10029
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10030
      if (lastComparison != 0) {
10031
        return lastComparison;
10032
      }
10033
      return 0;
10034
    }
10035
 
10036
    public void read(TProtocol iprot) throws TException {
10037
      TField field;
10038
      iprot.readStructBegin();
10039
      while (true)
10040
      {
10041
        field = iprot.readFieldBegin();
10042
        if (field.type == TType.STOP) { 
10043
          break;
10044
        }
10045
        _Fields fieldId = _Fields.findByThriftId(field.id);
10046
        if (fieldId == null) {
10047
          TProtocolUtil.skip(iprot, field.type);
10048
        } else {
10049
          switch (fieldId) {
10050
            case SUCCESS:
10051
              if (field.type == TType.LIST) {
10052
                {
10053
                  TList _list20 = iprot.readListBegin();
10054
                  this.success = new ArrayList<Order>(_list20.size);
10055
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
10056
                  {
10057
                    Order _elem22;
10058
                    _elem22 = new Order();
10059
                    _elem22.read(iprot);
10060
                    this.success.add(_elem22);
10061
                  }
10062
                  iprot.readListEnd();
10063
                }
10064
              } else { 
10065
                TProtocolUtil.skip(iprot, field.type);
10066
              }
10067
              break;
10068
            case EX:
10069
              if (field.type == TType.STRUCT) {
10070
                this.ex = new TransactionServiceException();
10071
                this.ex.read(iprot);
10072
              } else { 
10073
                TProtocolUtil.skip(iprot, field.type);
10074
              }
10075
              break;
10076
          }
10077
          iprot.readFieldEnd();
10078
        }
10079
      }
10080
      iprot.readStructEnd();
10081
      validate();
10082
    }
10083
 
10084
    public void write(TProtocol oprot) throws TException {
10085
      oprot.writeStructBegin(STRUCT_DESC);
10086
 
10087
      if (this.isSetSuccess()) {
10088
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10089
        {
10090
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
10091
          for (Order _iter23 : this.success)
10092
          {
10093
            _iter23.write(oprot);
10094
          }
10095
          oprot.writeListEnd();
10096
        }
10097
        oprot.writeFieldEnd();
10098
      } else if (this.isSetEx()) {
10099
        oprot.writeFieldBegin(EX_FIELD_DESC);
10100
        this.ex.write(oprot);
10101
        oprot.writeFieldEnd();
10102
      }
10103
      oprot.writeFieldStop();
10104
      oprot.writeStructEnd();
10105
    }
10106
 
10107
    @Override
10108
    public String toString() {
10109
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
10110
      boolean first = true;
10111
 
10112
      sb.append("success:");
10113
      if (this.success == null) {
10114
        sb.append("null");
10115
      } else {
10116
        sb.append(this.success);
10117
      }
10118
      first = false;
10119
      if (!first) sb.append(", ");
10120
      sb.append("ex:");
10121
      if (this.ex == null) {
10122
        sb.append("null");
10123
      } else {
10124
        sb.append(this.ex);
10125
      }
10126
      first = false;
10127
      sb.append(")");
10128
      return sb.toString();
10129
    }
10130
 
10131
    public void validate() throws TException {
10132
      // check for required fields
10133
    }
10134
 
10135
  }
10136
 
1382 varun.gupt 10137
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
10138
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
10139
 
10140
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10141
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10142
 
10143
    private long customer_id;
10144
    private long limit;
10145
 
10146
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10147
    public enum _Fields implements TFieldIdEnum {
10148
      CUSTOMER_ID((short)1, "customer_id"),
10149
      LIMIT((short)2, "limit");
10150
 
10151
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10152
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10153
 
10154
      static {
10155
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10156
          byId.put((int)field._thriftId, field);
10157
          byName.put(field.getFieldName(), field);
10158
        }
10159
      }
10160
 
10161
      /**
10162
       * Find the _Fields constant that matches fieldId, or null if its not found.
10163
       */
10164
      public static _Fields findByThriftId(int fieldId) {
10165
        return byId.get(fieldId);
10166
      }
10167
 
10168
      /**
10169
       * Find the _Fields constant that matches fieldId, throwing an exception
10170
       * if it is not found.
10171
       */
10172
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10173
        _Fields fields = findByThriftId(fieldId);
10174
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10175
        return fields;
10176
      }
10177
 
10178
      /**
10179
       * Find the _Fields constant that matches name, or null if its not found.
10180
       */
10181
      public static _Fields findByName(String name) {
10182
        return byName.get(name);
10183
      }
10184
 
10185
      private final short _thriftId;
10186
      private final String _fieldName;
10187
 
10188
      _Fields(short thriftId, String fieldName) {
10189
        _thriftId = thriftId;
10190
        _fieldName = fieldName;
10191
      }
10192
 
10193
      public short getThriftFieldId() {
10194
        return _thriftId;
10195
      }
10196
 
10197
      public String getFieldName() {
10198
        return _fieldName;
10199
      }
10200
    }
10201
 
10202
    // isset id assignments
10203
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10204
    private static final int __LIMIT_ISSET_ID = 1;
10205
    private BitSet __isset_bit_vector = new BitSet(2);
10206
 
10207
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10208
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10209
          new FieldValueMetaData(TType.I64)));
10210
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10211
          new FieldValueMetaData(TType.I64)));
10212
    }});
10213
 
10214
    static {
10215
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
10216
    }
10217
 
10218
    public getReturnableOrdersForCustomer_args() {
10219
    }
10220
 
10221
    public getReturnableOrdersForCustomer_args(
10222
      long customer_id,
10223
      long limit)
10224
    {
10225
      this();
10226
      this.customer_id = customer_id;
10227
      setCustomer_idIsSet(true);
10228
      this.limit = limit;
10229
      setLimitIsSet(true);
10230
    }
10231
 
10232
    /**
10233
     * Performs a deep copy on <i>other</i>.
10234
     */
10235
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
10236
      __isset_bit_vector.clear();
10237
      __isset_bit_vector.or(other.__isset_bit_vector);
10238
      this.customer_id = other.customer_id;
10239
      this.limit = other.limit;
10240
    }
10241
 
10242
    public getReturnableOrdersForCustomer_args deepCopy() {
10243
      return new getReturnableOrdersForCustomer_args(this);
10244
    }
10245
 
10246
    @Deprecated
10247
    public getReturnableOrdersForCustomer_args clone() {
10248
      return new getReturnableOrdersForCustomer_args(this);
10249
    }
10250
 
10251
    public long getCustomer_id() {
10252
      return this.customer_id;
10253
    }
10254
 
10255
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
10256
      this.customer_id = customer_id;
10257
      setCustomer_idIsSet(true);
10258
      return this;
10259
    }
10260
 
10261
    public void unsetCustomer_id() {
10262
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10263
    }
10264
 
10265
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10266
    public boolean isSetCustomer_id() {
10267
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10268
    }
10269
 
10270
    public void setCustomer_idIsSet(boolean value) {
10271
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10272
    }
10273
 
10274
    public long getLimit() {
10275
      return this.limit;
10276
    }
10277
 
10278
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
10279
      this.limit = limit;
10280
      setLimitIsSet(true);
10281
      return this;
10282
    }
10283
 
10284
    public void unsetLimit() {
10285
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10286
    }
10287
 
10288
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10289
    public boolean isSetLimit() {
10290
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10291
    }
10292
 
10293
    public void setLimitIsSet(boolean value) {
10294
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10295
    }
10296
 
10297
    public void setFieldValue(_Fields field, Object value) {
10298
      switch (field) {
10299
      case CUSTOMER_ID:
10300
        if (value == null) {
10301
          unsetCustomer_id();
10302
        } else {
10303
          setCustomer_id((Long)value);
10304
        }
10305
        break;
10306
 
10307
      case LIMIT:
10308
        if (value == null) {
10309
          unsetLimit();
10310
        } else {
10311
          setLimit((Long)value);
10312
        }
10313
        break;
10314
 
10315
      }
10316
    }
10317
 
10318
    public void setFieldValue(int fieldID, Object value) {
10319
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10320
    }
10321
 
10322
    public Object getFieldValue(_Fields field) {
10323
      switch (field) {
10324
      case CUSTOMER_ID:
10325
        return new Long(getCustomer_id());
10326
 
10327
      case LIMIT:
10328
        return new Long(getLimit());
10329
 
10330
      }
10331
      throw new IllegalStateException();
10332
    }
10333
 
10334
    public Object getFieldValue(int fieldId) {
10335
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10336
    }
10337
 
10338
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10339
    public boolean isSet(_Fields field) {
10340
      switch (field) {
10341
      case CUSTOMER_ID:
10342
        return isSetCustomer_id();
10343
      case LIMIT:
10344
        return isSetLimit();
10345
      }
10346
      throw new IllegalStateException();
10347
    }
10348
 
10349
    public boolean isSet(int fieldID) {
10350
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10351
    }
10352
 
10353
    @Override
10354
    public boolean equals(Object that) {
10355
      if (that == null)
10356
        return false;
10357
      if (that instanceof getReturnableOrdersForCustomer_args)
10358
        return this.equals((getReturnableOrdersForCustomer_args)that);
10359
      return false;
10360
    }
10361
 
10362
    public boolean equals(getReturnableOrdersForCustomer_args that) {
10363
      if (that == null)
10364
        return false;
10365
 
10366
      boolean this_present_customer_id = true;
10367
      boolean that_present_customer_id = true;
10368
      if (this_present_customer_id || that_present_customer_id) {
10369
        if (!(this_present_customer_id && that_present_customer_id))
10370
          return false;
10371
        if (this.customer_id != that.customer_id)
10372
          return false;
10373
      }
10374
 
10375
      boolean this_present_limit = true;
10376
      boolean that_present_limit = true;
10377
      if (this_present_limit || that_present_limit) {
10378
        if (!(this_present_limit && that_present_limit))
10379
          return false;
10380
        if (this.limit != that.limit)
10381
          return false;
10382
      }
10383
 
10384
      return true;
10385
    }
10386
 
10387
    @Override
10388
    public int hashCode() {
10389
      return 0;
10390
    }
10391
 
10392
    public int compareTo(getReturnableOrdersForCustomer_args other) {
10393
      if (!getClass().equals(other.getClass())) {
10394
        return getClass().getName().compareTo(other.getClass().getName());
10395
      }
10396
 
10397
      int lastComparison = 0;
10398
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
10399
 
10400
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10401
      if (lastComparison != 0) {
10402
        return lastComparison;
10403
      }
10404
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10405
      if (lastComparison != 0) {
10406
        return lastComparison;
10407
      }
10408
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10409
      if (lastComparison != 0) {
10410
        return lastComparison;
10411
      }
10412
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10413
      if (lastComparison != 0) {
10414
        return lastComparison;
10415
      }
10416
      return 0;
10417
    }
10418
 
10419
    public void read(TProtocol iprot) throws TException {
10420
      TField field;
10421
      iprot.readStructBegin();
10422
      while (true)
10423
      {
10424
        field = iprot.readFieldBegin();
10425
        if (field.type == TType.STOP) { 
10426
          break;
10427
        }
10428
        _Fields fieldId = _Fields.findByThriftId(field.id);
10429
        if (fieldId == null) {
10430
          TProtocolUtil.skip(iprot, field.type);
10431
        } else {
10432
          switch (fieldId) {
10433
            case CUSTOMER_ID:
10434
              if (field.type == TType.I64) {
10435
                this.customer_id = iprot.readI64();
10436
                setCustomer_idIsSet(true);
10437
              } else { 
10438
                TProtocolUtil.skip(iprot, field.type);
10439
              }
10440
              break;
10441
            case LIMIT:
10442
              if (field.type == TType.I64) {
10443
                this.limit = iprot.readI64();
10444
                setLimitIsSet(true);
10445
              } else { 
10446
                TProtocolUtil.skip(iprot, field.type);
10447
              }
10448
              break;
10449
          }
10450
          iprot.readFieldEnd();
10451
        }
10452
      }
10453
      iprot.readStructEnd();
10454
      validate();
10455
    }
10456
 
10457
    public void write(TProtocol oprot) throws TException {
10458
      validate();
10459
 
10460
      oprot.writeStructBegin(STRUCT_DESC);
10461
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10462
      oprot.writeI64(this.customer_id);
10463
      oprot.writeFieldEnd();
10464
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10465
      oprot.writeI64(this.limit);
10466
      oprot.writeFieldEnd();
10467
      oprot.writeFieldStop();
10468
      oprot.writeStructEnd();
10469
    }
10470
 
10471
    @Override
10472
    public String toString() {
10473
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
10474
      boolean first = true;
10475
 
10476
      sb.append("customer_id:");
10477
      sb.append(this.customer_id);
10478
      first = false;
10479
      if (!first) sb.append(", ");
10480
      sb.append("limit:");
10481
      sb.append(this.limit);
10482
      first = false;
10483
      sb.append(")");
10484
      return sb.toString();
10485
    }
10486
 
10487
    public void validate() throws TException {
10488
      // check for required fields
10489
    }
10490
 
10491
  }
10492
 
10493
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
10494
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
10495
 
10496
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10497
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10498
 
10499
    private List<Long> success;
10500
    private TransactionServiceException ex;
10501
 
10502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10503
    public enum _Fields implements TFieldIdEnum {
10504
      SUCCESS((short)0, "success"),
10505
      EX((short)1, "ex");
10506
 
10507
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10508
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10509
 
10510
      static {
10511
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10512
          byId.put((int)field._thriftId, field);
10513
          byName.put(field.getFieldName(), field);
10514
        }
10515
      }
10516
 
10517
      /**
10518
       * Find the _Fields constant that matches fieldId, or null if its not found.
10519
       */
10520
      public static _Fields findByThriftId(int fieldId) {
10521
        return byId.get(fieldId);
10522
      }
10523
 
10524
      /**
10525
       * Find the _Fields constant that matches fieldId, throwing an exception
10526
       * if it is not found.
10527
       */
10528
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10529
        _Fields fields = findByThriftId(fieldId);
10530
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10531
        return fields;
10532
      }
10533
 
10534
      /**
10535
       * Find the _Fields constant that matches name, or null if its not found.
10536
       */
10537
      public static _Fields findByName(String name) {
10538
        return byName.get(name);
10539
      }
10540
 
10541
      private final short _thriftId;
10542
      private final String _fieldName;
10543
 
10544
      _Fields(short thriftId, String fieldName) {
10545
        _thriftId = thriftId;
10546
        _fieldName = fieldName;
10547
      }
10548
 
10549
      public short getThriftFieldId() {
10550
        return _thriftId;
10551
      }
10552
 
10553
      public String getFieldName() {
10554
        return _fieldName;
10555
      }
10556
    }
10557
 
10558
    // isset id assignments
10559
 
10560
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10561
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10562
          new ListMetaData(TType.LIST, 
10563
              new FieldValueMetaData(TType.I64))));
10564
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10565
          new FieldValueMetaData(TType.STRUCT)));
10566
    }});
10567
 
10568
    static {
10569
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10570
    }
10571
 
10572
    public getReturnableOrdersForCustomer_result() {
10573
    }
10574
 
10575
    public getReturnableOrdersForCustomer_result(
10576
      List<Long> success,
10577
      TransactionServiceException ex)
10578
    {
10579
      this();
10580
      this.success = success;
10581
      this.ex = ex;
10582
    }
10583
 
10584
    /**
10585
     * Performs a deep copy on <i>other</i>.
10586
     */
10587
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10588
      if (other.isSetSuccess()) {
10589
        List<Long> __this__success = new ArrayList<Long>();
10590
        for (Long other_element : other.success) {
10591
          __this__success.add(other_element);
10592
        }
10593
        this.success = __this__success;
10594
      }
10595
      if (other.isSetEx()) {
10596
        this.ex = new TransactionServiceException(other.ex);
10597
      }
10598
    }
10599
 
10600
    public getReturnableOrdersForCustomer_result deepCopy() {
10601
      return new getReturnableOrdersForCustomer_result(this);
10602
    }
10603
 
10604
    @Deprecated
10605
    public getReturnableOrdersForCustomer_result clone() {
10606
      return new getReturnableOrdersForCustomer_result(this);
10607
    }
10608
 
10609
    public int getSuccessSize() {
10610
      return (this.success == null) ? 0 : this.success.size();
10611
    }
10612
 
10613
    public java.util.Iterator<Long> getSuccessIterator() {
10614
      return (this.success == null) ? null : this.success.iterator();
10615
    }
10616
 
10617
    public void addToSuccess(long elem) {
10618
      if (this.success == null) {
10619
        this.success = new ArrayList<Long>();
10620
      }
10621
      this.success.add(elem);
10622
    }
10623
 
10624
    public List<Long> getSuccess() {
10625
      return this.success;
10626
    }
10627
 
10628
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10629
      this.success = success;
10630
      return this;
10631
    }
10632
 
10633
    public void unsetSuccess() {
10634
      this.success = null;
10635
    }
10636
 
10637
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10638
    public boolean isSetSuccess() {
10639
      return this.success != null;
10640
    }
10641
 
10642
    public void setSuccessIsSet(boolean value) {
10643
      if (!value) {
10644
        this.success = null;
10645
      }
10646
    }
10647
 
10648
    public TransactionServiceException getEx() {
10649
      return this.ex;
10650
    }
10651
 
10652
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10653
      this.ex = ex;
10654
      return this;
10655
    }
10656
 
10657
    public void unsetEx() {
10658
      this.ex = null;
10659
    }
10660
 
10661
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10662
    public boolean isSetEx() {
10663
      return this.ex != null;
10664
    }
10665
 
10666
    public void setExIsSet(boolean value) {
10667
      if (!value) {
10668
        this.ex = null;
10669
      }
10670
    }
10671
 
10672
    public void setFieldValue(_Fields field, Object value) {
10673
      switch (field) {
10674
      case SUCCESS:
10675
        if (value == null) {
10676
          unsetSuccess();
10677
        } else {
10678
          setSuccess((List<Long>)value);
10679
        }
10680
        break;
10681
 
10682
      case EX:
10683
        if (value == null) {
10684
          unsetEx();
10685
        } else {
10686
          setEx((TransactionServiceException)value);
10687
        }
10688
        break;
10689
 
10690
      }
10691
    }
10692
 
10693
    public void setFieldValue(int fieldID, Object value) {
10694
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10695
    }
10696
 
10697
    public Object getFieldValue(_Fields field) {
10698
      switch (field) {
10699
      case SUCCESS:
10700
        return getSuccess();
10701
 
10702
      case EX:
10703
        return getEx();
10704
 
10705
      }
10706
      throw new IllegalStateException();
10707
    }
10708
 
10709
    public Object getFieldValue(int fieldId) {
10710
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10711
    }
10712
 
10713
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10714
    public boolean isSet(_Fields field) {
10715
      switch (field) {
10716
      case SUCCESS:
10717
        return isSetSuccess();
10718
      case EX:
10719
        return isSetEx();
10720
      }
10721
      throw new IllegalStateException();
10722
    }
10723
 
10724
    public boolean isSet(int fieldID) {
10725
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10726
    }
10727
 
10728
    @Override
10729
    public boolean equals(Object that) {
10730
      if (that == null)
10731
        return false;
10732
      if (that instanceof getReturnableOrdersForCustomer_result)
10733
        return this.equals((getReturnableOrdersForCustomer_result)that);
10734
      return false;
10735
    }
10736
 
10737
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10738
      if (that == null)
10739
        return false;
10740
 
10741
      boolean this_present_success = true && this.isSetSuccess();
10742
      boolean that_present_success = true && that.isSetSuccess();
10743
      if (this_present_success || that_present_success) {
10744
        if (!(this_present_success && that_present_success))
10745
          return false;
10746
        if (!this.success.equals(that.success))
10747
          return false;
10748
      }
10749
 
10750
      boolean this_present_ex = true && this.isSetEx();
10751
      boolean that_present_ex = true && that.isSetEx();
10752
      if (this_present_ex || that_present_ex) {
10753
        if (!(this_present_ex && that_present_ex))
10754
          return false;
10755
        if (!this.ex.equals(that.ex))
10756
          return false;
10757
      }
10758
 
10759
      return true;
10760
    }
10761
 
10762
    @Override
10763
    public int hashCode() {
10764
      return 0;
10765
    }
10766
 
10767
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10768
      if (!getClass().equals(other.getClass())) {
10769
        return getClass().getName().compareTo(other.getClass().getName());
10770
      }
10771
 
10772
      int lastComparison = 0;
10773
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10774
 
10775
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10776
      if (lastComparison != 0) {
10777
        return lastComparison;
10778
      }
10779
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10780
      if (lastComparison != 0) {
10781
        return lastComparison;
10782
      }
10783
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10784
      if (lastComparison != 0) {
10785
        return lastComparison;
10786
      }
10787
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10788
      if (lastComparison != 0) {
10789
        return lastComparison;
10790
      }
10791
      return 0;
10792
    }
10793
 
10794
    public void read(TProtocol iprot) throws TException {
10795
      TField field;
10796
      iprot.readStructBegin();
10797
      while (true)
10798
      {
10799
        field = iprot.readFieldBegin();
10800
        if (field.type == TType.STOP) { 
10801
          break;
10802
        }
10803
        _Fields fieldId = _Fields.findByThriftId(field.id);
10804
        if (fieldId == null) {
10805
          TProtocolUtil.skip(iprot, field.type);
10806
        } else {
10807
          switch (fieldId) {
10808
            case SUCCESS:
10809
              if (field.type == TType.LIST) {
10810
                {
10811
                  TList _list24 = iprot.readListBegin();
10812
                  this.success = new ArrayList<Long>(_list24.size);
10813
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10814
                  {
10815
                    long _elem26;
10816
                    _elem26 = iprot.readI64();
10817
                    this.success.add(_elem26);
10818
                  }
10819
                  iprot.readListEnd();
10820
                }
10821
              } else { 
10822
                TProtocolUtil.skip(iprot, field.type);
10823
              }
10824
              break;
10825
            case EX:
10826
              if (field.type == TType.STRUCT) {
10827
                this.ex = new TransactionServiceException();
10828
                this.ex.read(iprot);
10829
              } else { 
10830
                TProtocolUtil.skip(iprot, field.type);
10831
              }
10832
              break;
10833
          }
10834
          iprot.readFieldEnd();
10835
        }
10836
      }
10837
      iprot.readStructEnd();
10838
      validate();
10839
    }
10840
 
10841
    public void write(TProtocol oprot) throws TException {
10842
      oprot.writeStructBegin(STRUCT_DESC);
10843
 
10844
      if (this.isSetSuccess()) {
10845
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10846
        {
10847
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
10848
          for (long _iter27 : this.success)
10849
          {
10850
            oprot.writeI64(_iter27);
10851
          }
10852
          oprot.writeListEnd();
10853
        }
10854
        oprot.writeFieldEnd();
10855
      } else if (this.isSetEx()) {
10856
        oprot.writeFieldBegin(EX_FIELD_DESC);
10857
        this.ex.write(oprot);
10858
        oprot.writeFieldEnd();
10859
      }
10860
      oprot.writeFieldStop();
10861
      oprot.writeStructEnd();
10862
    }
10863
 
10864
    @Override
10865
    public String toString() {
10866
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
10867
      boolean first = true;
10868
 
10869
      sb.append("success:");
10870
      if (this.success == null) {
10871
        sb.append("null");
10872
      } else {
10873
        sb.append(this.success);
10874
      }
10875
      first = false;
10876
      if (!first) sb.append(", ");
10877
      sb.append("ex:");
10878
      if (this.ex == null) {
10879
        sb.append("null");
10880
      } else {
10881
        sb.append(this.ex);
10882
      }
10883
      first = false;
10884
      sb.append(")");
10885
      return sb.toString();
10886
    }
10887
 
10888
    public void validate() throws TException {
10889
      // check for required fields
10890
    }
10891
 
10892
  }
10893
 
10894
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
10895
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
10896
 
10897
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10898
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10899
 
10900
    private long customer_id;
10901
    private long limit;
10902
 
10903
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10904
    public enum _Fields implements TFieldIdEnum {
10905
      CUSTOMER_ID((short)1, "customer_id"),
10906
      LIMIT((short)2, "limit");
10907
 
10908
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10909
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10910
 
10911
      static {
10912
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10913
          byId.put((int)field._thriftId, field);
10914
          byName.put(field.getFieldName(), field);
10915
        }
10916
      }
10917
 
10918
      /**
10919
       * Find the _Fields constant that matches fieldId, or null if its not found.
10920
       */
10921
      public static _Fields findByThriftId(int fieldId) {
10922
        return byId.get(fieldId);
10923
      }
10924
 
10925
      /**
10926
       * Find the _Fields constant that matches fieldId, throwing an exception
10927
       * if it is not found.
10928
       */
10929
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10930
        _Fields fields = findByThriftId(fieldId);
10931
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10932
        return fields;
10933
      }
10934
 
10935
      /**
10936
       * Find the _Fields constant that matches name, or null if its not found.
10937
       */
10938
      public static _Fields findByName(String name) {
10939
        return byName.get(name);
10940
      }
10941
 
10942
      private final short _thriftId;
10943
      private final String _fieldName;
10944
 
10945
      _Fields(short thriftId, String fieldName) {
10946
        _thriftId = thriftId;
10947
        _fieldName = fieldName;
10948
      }
10949
 
10950
      public short getThriftFieldId() {
10951
        return _thriftId;
10952
      }
10953
 
10954
      public String getFieldName() {
10955
        return _fieldName;
10956
      }
10957
    }
10958
 
10959
    // isset id assignments
10960
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10961
    private static final int __LIMIT_ISSET_ID = 1;
10962
    private BitSet __isset_bit_vector = new BitSet(2);
10963
 
10964
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10965
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10966
          new FieldValueMetaData(TType.I64)));
10967
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10968
          new FieldValueMetaData(TType.I64)));
10969
    }});
10970
 
10971
    static {
10972
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
10973
    }
10974
 
10975
    public getCancellableOrdersForCustomer_args() {
10976
    }
10977
 
10978
    public getCancellableOrdersForCustomer_args(
10979
      long customer_id,
10980
      long limit)
10981
    {
10982
      this();
10983
      this.customer_id = customer_id;
10984
      setCustomer_idIsSet(true);
10985
      this.limit = limit;
10986
      setLimitIsSet(true);
10987
    }
10988
 
10989
    /**
10990
     * Performs a deep copy on <i>other</i>.
10991
     */
10992
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
10993
      __isset_bit_vector.clear();
10994
      __isset_bit_vector.or(other.__isset_bit_vector);
10995
      this.customer_id = other.customer_id;
10996
      this.limit = other.limit;
10997
    }
10998
 
10999
    public getCancellableOrdersForCustomer_args deepCopy() {
11000
      return new getCancellableOrdersForCustomer_args(this);
11001
    }
11002
 
11003
    @Deprecated
11004
    public getCancellableOrdersForCustomer_args clone() {
11005
      return new getCancellableOrdersForCustomer_args(this);
11006
    }
11007
 
11008
    public long getCustomer_id() {
11009
      return this.customer_id;
11010
    }
11011
 
11012
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
11013
      this.customer_id = customer_id;
11014
      setCustomer_idIsSet(true);
11015
      return this;
11016
    }
11017
 
11018
    public void unsetCustomer_id() {
11019
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
11020
    }
11021
 
11022
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
11023
    public boolean isSetCustomer_id() {
11024
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
11025
    }
11026
 
11027
    public void setCustomer_idIsSet(boolean value) {
11028
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
11029
    }
11030
 
11031
    public long getLimit() {
11032
      return this.limit;
11033
    }
11034
 
11035
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
11036
      this.limit = limit;
11037
      setLimitIsSet(true);
11038
      return this;
11039
    }
11040
 
11041
    public void unsetLimit() {
11042
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
11043
    }
11044
 
11045
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
11046
    public boolean isSetLimit() {
11047
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
11048
    }
11049
 
11050
    public void setLimitIsSet(boolean value) {
11051
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
11052
    }
11053
 
11054
    public void setFieldValue(_Fields field, Object value) {
11055
      switch (field) {
11056
      case CUSTOMER_ID:
11057
        if (value == null) {
11058
          unsetCustomer_id();
11059
        } else {
11060
          setCustomer_id((Long)value);
11061
        }
11062
        break;
11063
 
11064
      case LIMIT:
11065
        if (value == null) {
11066
          unsetLimit();
11067
        } else {
11068
          setLimit((Long)value);
11069
        }
11070
        break;
11071
 
11072
      }
11073
    }
11074
 
11075
    public void setFieldValue(int fieldID, Object value) {
11076
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11077
    }
11078
 
11079
    public Object getFieldValue(_Fields field) {
11080
      switch (field) {
11081
      case CUSTOMER_ID:
11082
        return new Long(getCustomer_id());
11083
 
11084
      case LIMIT:
11085
        return new Long(getLimit());
11086
 
11087
      }
11088
      throw new IllegalStateException();
11089
    }
11090
 
11091
    public Object getFieldValue(int fieldId) {
11092
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11093
    }
11094
 
11095
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11096
    public boolean isSet(_Fields field) {
11097
      switch (field) {
11098
      case CUSTOMER_ID:
11099
        return isSetCustomer_id();
11100
      case LIMIT:
11101
        return isSetLimit();
11102
      }
11103
      throw new IllegalStateException();
11104
    }
11105
 
11106
    public boolean isSet(int fieldID) {
11107
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11108
    }
11109
 
11110
    @Override
11111
    public boolean equals(Object that) {
11112
      if (that == null)
11113
        return false;
11114
      if (that instanceof getCancellableOrdersForCustomer_args)
11115
        return this.equals((getCancellableOrdersForCustomer_args)that);
11116
      return false;
11117
    }
11118
 
11119
    public boolean equals(getCancellableOrdersForCustomer_args that) {
11120
      if (that == null)
11121
        return false;
11122
 
11123
      boolean this_present_customer_id = true;
11124
      boolean that_present_customer_id = true;
11125
      if (this_present_customer_id || that_present_customer_id) {
11126
        if (!(this_present_customer_id && that_present_customer_id))
11127
          return false;
11128
        if (this.customer_id != that.customer_id)
11129
          return false;
11130
      }
11131
 
11132
      boolean this_present_limit = true;
11133
      boolean that_present_limit = true;
11134
      if (this_present_limit || that_present_limit) {
11135
        if (!(this_present_limit && that_present_limit))
11136
          return false;
11137
        if (this.limit != that.limit)
11138
          return false;
11139
      }
11140
 
11141
      return true;
11142
    }
11143
 
11144
    @Override
11145
    public int hashCode() {
11146
      return 0;
11147
    }
11148
 
11149
    public int compareTo(getCancellableOrdersForCustomer_args other) {
11150
      if (!getClass().equals(other.getClass())) {
11151
        return getClass().getName().compareTo(other.getClass().getName());
11152
      }
11153
 
11154
      int lastComparison = 0;
11155
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
11156
 
11157
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
11158
      if (lastComparison != 0) {
11159
        return lastComparison;
11160
      }
11161
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
11162
      if (lastComparison != 0) {
11163
        return lastComparison;
11164
      }
11165
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
11166
      if (lastComparison != 0) {
11167
        return lastComparison;
11168
      }
11169
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
11170
      if (lastComparison != 0) {
11171
        return lastComparison;
11172
      }
11173
      return 0;
11174
    }
11175
 
11176
    public void read(TProtocol iprot) throws TException {
11177
      TField field;
11178
      iprot.readStructBegin();
11179
      while (true)
11180
      {
11181
        field = iprot.readFieldBegin();
11182
        if (field.type == TType.STOP) { 
11183
          break;
11184
        }
11185
        _Fields fieldId = _Fields.findByThriftId(field.id);
11186
        if (fieldId == null) {
11187
          TProtocolUtil.skip(iprot, field.type);
11188
        } else {
11189
          switch (fieldId) {
11190
            case CUSTOMER_ID:
11191
              if (field.type == TType.I64) {
11192
                this.customer_id = iprot.readI64();
11193
                setCustomer_idIsSet(true);
11194
              } else { 
11195
                TProtocolUtil.skip(iprot, field.type);
11196
              }
11197
              break;
11198
            case LIMIT:
11199
              if (field.type == TType.I64) {
11200
                this.limit = iprot.readI64();
11201
                setLimitIsSet(true);
11202
              } else { 
11203
                TProtocolUtil.skip(iprot, field.type);
11204
              }
11205
              break;
11206
          }
11207
          iprot.readFieldEnd();
11208
        }
11209
      }
11210
      iprot.readStructEnd();
11211
      validate();
11212
    }
11213
 
11214
    public void write(TProtocol oprot) throws TException {
11215
      validate();
11216
 
11217
      oprot.writeStructBegin(STRUCT_DESC);
11218
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
11219
      oprot.writeI64(this.customer_id);
11220
      oprot.writeFieldEnd();
11221
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
11222
      oprot.writeI64(this.limit);
11223
      oprot.writeFieldEnd();
11224
      oprot.writeFieldStop();
11225
      oprot.writeStructEnd();
11226
    }
11227
 
11228
    @Override
11229
    public String toString() {
11230
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
11231
      boolean first = true;
11232
 
11233
      sb.append("customer_id:");
11234
      sb.append(this.customer_id);
11235
      first = false;
11236
      if (!first) sb.append(", ");
11237
      sb.append("limit:");
11238
      sb.append(this.limit);
11239
      first = false;
11240
      sb.append(")");
11241
      return sb.toString();
11242
    }
11243
 
11244
    public void validate() throws TException {
11245
      // check for required fields
11246
    }
11247
 
11248
  }
11249
 
11250
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
11251
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
11252
 
11253
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11254
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11255
 
11256
    private List<Long> success;
11257
    private TransactionServiceException ex;
11258
 
11259
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11260
    public enum _Fields implements TFieldIdEnum {
11261
      SUCCESS((short)0, "success"),
11262
      EX((short)1, "ex");
11263
 
11264
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11265
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11266
 
11267
      static {
11268
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11269
          byId.put((int)field._thriftId, field);
11270
          byName.put(field.getFieldName(), field);
11271
        }
11272
      }
11273
 
11274
      /**
11275
       * Find the _Fields constant that matches fieldId, or null if its not found.
11276
       */
11277
      public static _Fields findByThriftId(int fieldId) {
11278
        return byId.get(fieldId);
11279
      }
11280
 
11281
      /**
11282
       * Find the _Fields constant that matches fieldId, throwing an exception
11283
       * if it is not found.
11284
       */
11285
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11286
        _Fields fields = findByThriftId(fieldId);
11287
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11288
        return fields;
11289
      }
11290
 
11291
      /**
11292
       * Find the _Fields constant that matches name, or null if its not found.
11293
       */
11294
      public static _Fields findByName(String name) {
11295
        return byName.get(name);
11296
      }
11297
 
11298
      private final short _thriftId;
11299
      private final String _fieldName;
11300
 
11301
      _Fields(short thriftId, String fieldName) {
11302
        _thriftId = thriftId;
11303
        _fieldName = fieldName;
11304
      }
11305
 
11306
      public short getThriftFieldId() {
11307
        return _thriftId;
11308
      }
11309
 
11310
      public String getFieldName() {
11311
        return _fieldName;
11312
      }
11313
    }
11314
 
11315
    // isset id assignments
11316
 
11317
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11318
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11319
          new ListMetaData(TType.LIST, 
11320
              new FieldValueMetaData(TType.I64))));
11321
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11322
          new FieldValueMetaData(TType.STRUCT)));
11323
    }});
11324
 
11325
    static {
11326
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
11327
    }
11328
 
11329
    public getCancellableOrdersForCustomer_result() {
11330
    }
11331
 
11332
    public getCancellableOrdersForCustomer_result(
11333
      List<Long> success,
11334
      TransactionServiceException ex)
11335
    {
11336
      this();
11337
      this.success = success;
11338
      this.ex = ex;
11339
    }
11340
 
11341
    /**
11342
     * Performs a deep copy on <i>other</i>.
11343
     */
11344
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
11345
      if (other.isSetSuccess()) {
11346
        List<Long> __this__success = new ArrayList<Long>();
11347
        for (Long other_element : other.success) {
11348
          __this__success.add(other_element);
11349
        }
11350
        this.success = __this__success;
11351
      }
11352
      if (other.isSetEx()) {
11353
        this.ex = new TransactionServiceException(other.ex);
11354
      }
11355
    }
11356
 
11357
    public getCancellableOrdersForCustomer_result deepCopy() {
11358
      return new getCancellableOrdersForCustomer_result(this);
11359
    }
11360
 
11361
    @Deprecated
11362
    public getCancellableOrdersForCustomer_result clone() {
11363
      return new getCancellableOrdersForCustomer_result(this);
11364
    }
11365
 
11366
    public int getSuccessSize() {
11367
      return (this.success == null) ? 0 : this.success.size();
11368
    }
11369
 
11370
    public java.util.Iterator<Long> getSuccessIterator() {
11371
      return (this.success == null) ? null : this.success.iterator();
11372
    }
11373
 
11374
    public void addToSuccess(long elem) {
11375
      if (this.success == null) {
11376
        this.success = new ArrayList<Long>();
11377
      }
11378
      this.success.add(elem);
11379
    }
11380
 
11381
    public List<Long> getSuccess() {
11382
      return this.success;
11383
    }
11384
 
11385
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
11386
      this.success = success;
11387
      return this;
11388
    }
11389
 
11390
    public void unsetSuccess() {
11391
      this.success = null;
11392
    }
11393
 
11394
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11395
    public boolean isSetSuccess() {
11396
      return this.success != null;
11397
    }
11398
 
11399
    public void setSuccessIsSet(boolean value) {
11400
      if (!value) {
11401
        this.success = null;
11402
      }
11403
    }
11404
 
11405
    public TransactionServiceException getEx() {
11406
      return this.ex;
11407
    }
11408
 
11409
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11410
      this.ex = ex;
11411
      return this;
11412
    }
11413
 
11414
    public void unsetEx() {
11415
      this.ex = null;
11416
    }
11417
 
11418
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11419
    public boolean isSetEx() {
11420
      return this.ex != null;
11421
    }
11422
 
11423
    public void setExIsSet(boolean value) {
11424
      if (!value) {
11425
        this.ex = null;
11426
      }
11427
    }
11428
 
11429
    public void setFieldValue(_Fields field, Object value) {
11430
      switch (field) {
11431
      case SUCCESS:
11432
        if (value == null) {
11433
          unsetSuccess();
11434
        } else {
11435
          setSuccess((List<Long>)value);
11436
        }
11437
        break;
11438
 
11439
      case EX:
11440
        if (value == null) {
11441
          unsetEx();
11442
        } else {
11443
          setEx((TransactionServiceException)value);
11444
        }
11445
        break;
11446
 
11447
      }
11448
    }
11449
 
11450
    public void setFieldValue(int fieldID, Object value) {
11451
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11452
    }
11453
 
11454
    public Object getFieldValue(_Fields field) {
11455
      switch (field) {
11456
      case SUCCESS:
11457
        return getSuccess();
11458
 
11459
      case EX:
11460
        return getEx();
11461
 
11462
      }
11463
      throw new IllegalStateException();
11464
    }
11465
 
11466
    public Object getFieldValue(int fieldId) {
11467
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11468
    }
11469
 
11470
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11471
    public boolean isSet(_Fields field) {
11472
      switch (field) {
11473
      case SUCCESS:
11474
        return isSetSuccess();
11475
      case EX:
11476
        return isSetEx();
11477
      }
11478
      throw new IllegalStateException();
11479
    }
11480
 
11481
    public boolean isSet(int fieldID) {
11482
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11483
    }
11484
 
11485
    @Override
11486
    public boolean equals(Object that) {
11487
      if (that == null)
11488
        return false;
11489
      if (that instanceof getCancellableOrdersForCustomer_result)
11490
        return this.equals((getCancellableOrdersForCustomer_result)that);
11491
      return false;
11492
    }
11493
 
11494
    public boolean equals(getCancellableOrdersForCustomer_result that) {
11495
      if (that == null)
11496
        return false;
11497
 
11498
      boolean this_present_success = true && this.isSetSuccess();
11499
      boolean that_present_success = true && that.isSetSuccess();
11500
      if (this_present_success || that_present_success) {
11501
        if (!(this_present_success && that_present_success))
11502
          return false;
11503
        if (!this.success.equals(that.success))
11504
          return false;
11505
      }
11506
 
11507
      boolean this_present_ex = true && this.isSetEx();
11508
      boolean that_present_ex = true && that.isSetEx();
11509
      if (this_present_ex || that_present_ex) {
11510
        if (!(this_present_ex && that_present_ex))
11511
          return false;
11512
        if (!this.ex.equals(that.ex))
11513
          return false;
11514
      }
11515
 
11516
      return true;
11517
    }
11518
 
11519
    @Override
11520
    public int hashCode() {
11521
      return 0;
11522
    }
11523
 
11524
    public int compareTo(getCancellableOrdersForCustomer_result other) {
11525
      if (!getClass().equals(other.getClass())) {
11526
        return getClass().getName().compareTo(other.getClass().getName());
11527
      }
11528
 
11529
      int lastComparison = 0;
11530
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
11531
 
11532
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11533
      if (lastComparison != 0) {
11534
        return lastComparison;
11535
      }
11536
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11537
      if (lastComparison != 0) {
11538
        return lastComparison;
11539
      }
11540
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11541
      if (lastComparison != 0) {
11542
        return lastComparison;
11543
      }
11544
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11545
      if (lastComparison != 0) {
11546
        return lastComparison;
11547
      }
11548
      return 0;
11549
    }
11550
 
11551
    public void read(TProtocol iprot) throws TException {
11552
      TField field;
11553
      iprot.readStructBegin();
11554
      while (true)
11555
      {
11556
        field = iprot.readFieldBegin();
11557
        if (field.type == TType.STOP) { 
11558
          break;
11559
        }
11560
        _Fields fieldId = _Fields.findByThriftId(field.id);
11561
        if (fieldId == null) {
11562
          TProtocolUtil.skip(iprot, field.type);
11563
        } else {
11564
          switch (fieldId) {
11565
            case SUCCESS:
11566
              if (field.type == TType.LIST) {
11567
                {
11568
                  TList _list28 = iprot.readListBegin();
11569
                  this.success = new ArrayList<Long>(_list28.size);
11570
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11571
                  {
11572
                    long _elem30;
11573
                    _elem30 = iprot.readI64();
11574
                    this.success.add(_elem30);
11575
                  }
11576
                  iprot.readListEnd();
11577
                }
11578
              } else { 
11579
                TProtocolUtil.skip(iprot, field.type);
11580
              }
11581
              break;
11582
            case EX:
11583
              if (field.type == TType.STRUCT) {
11584
                this.ex = new TransactionServiceException();
11585
                this.ex.read(iprot);
11586
              } else { 
11587
                TProtocolUtil.skip(iprot, field.type);
11588
              }
11589
              break;
11590
          }
11591
          iprot.readFieldEnd();
11592
        }
11593
      }
11594
      iprot.readStructEnd();
11595
      validate();
11596
    }
11597
 
11598
    public void write(TProtocol oprot) throws TException {
11599
      oprot.writeStructBegin(STRUCT_DESC);
11600
 
11601
      if (this.isSetSuccess()) {
11602
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11603
        {
11604
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11605
          for (long _iter31 : this.success)
11606
          {
11607
            oprot.writeI64(_iter31);
11608
          }
11609
          oprot.writeListEnd();
11610
        }
11611
        oprot.writeFieldEnd();
11612
      } else if (this.isSetEx()) {
11613
        oprot.writeFieldBegin(EX_FIELD_DESC);
11614
        this.ex.write(oprot);
11615
        oprot.writeFieldEnd();
11616
      }
11617
      oprot.writeFieldStop();
11618
      oprot.writeStructEnd();
11619
    }
11620
 
11621
    @Override
11622
    public String toString() {
11623
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11624
      boolean first = true;
11625
 
11626
      sb.append("success:");
11627
      if (this.success == null) {
11628
        sb.append("null");
11629
      } else {
11630
        sb.append(this.success);
11631
      }
11632
      first = false;
11633
      if (!first) sb.append(", ");
11634
      sb.append("ex:");
11635
      if (this.ex == null) {
11636
        sb.append("null");
11637
      } else {
11638
        sb.append(this.ex);
11639
      }
11640
      first = false;
11641
      sb.append(")");
11642
      return sb.toString();
11643
    }
11644
 
11645
    public void validate() throws TException {
11646
      // check for required fields
11647
    }
11648
 
11649
  }
11650
 
483 rajveer 11651
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11652
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11653
 
483 rajveer 11654
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11655
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11656
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11657
 
483 rajveer 11658
    private long orderId;
11659
    private OrderStatus status;
11660
    private String description;
68 ashish 11661
 
11662
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11663
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11664
      ORDER_ID((short)1, "orderId"),
11665
      /**
11666
       * 
11667
       * @see OrderStatus
11668
       */
11669
      STATUS((short)2, "status"),
11670
      DESCRIPTION((short)3, "description");
68 ashish 11671
 
11672
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11673
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11674
 
11675
      static {
11676
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11677
          byId.put((int)field._thriftId, field);
11678
          byName.put(field.getFieldName(), field);
11679
        }
11680
      }
11681
 
11682
      /**
11683
       * Find the _Fields constant that matches fieldId, or null if its not found.
11684
       */
11685
      public static _Fields findByThriftId(int fieldId) {
11686
        return byId.get(fieldId);
11687
      }
11688
 
11689
      /**
11690
       * Find the _Fields constant that matches fieldId, throwing an exception
11691
       * if it is not found.
11692
       */
11693
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11694
        _Fields fields = findByThriftId(fieldId);
11695
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11696
        return fields;
11697
      }
11698
 
11699
      /**
11700
       * Find the _Fields constant that matches name, or null if its not found.
11701
       */
11702
      public static _Fields findByName(String name) {
11703
        return byName.get(name);
11704
      }
11705
 
11706
      private final short _thriftId;
11707
      private final String _fieldName;
11708
 
11709
      _Fields(short thriftId, String fieldName) {
11710
        _thriftId = thriftId;
11711
        _fieldName = fieldName;
11712
      }
11713
 
11714
      public short getThriftFieldId() {
11715
        return _thriftId;
11716
      }
11717
 
11718
      public String getFieldName() {
11719
        return _fieldName;
11720
      }
11721
    }
11722
 
11723
    // isset id assignments
483 rajveer 11724
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11725
    private BitSet __isset_bit_vector = new BitSet(1);
11726
 
11727
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11728
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11729
          new FieldValueMetaData(TType.I64)));
483 rajveer 11730
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11731
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11732
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11733
          new FieldValueMetaData(TType.STRING)));
68 ashish 11734
    }});
11735
 
11736
    static {
483 rajveer 11737
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11738
    }
11739
 
483 rajveer 11740
    public changeOrderStatus_args() {
68 ashish 11741
    }
11742
 
483 rajveer 11743
    public changeOrderStatus_args(
11744
      long orderId,
11745
      OrderStatus status,
11746
      String description)
68 ashish 11747
    {
11748
      this();
483 rajveer 11749
      this.orderId = orderId;
11750
      setOrderIdIsSet(true);
11751
      this.status = status;
11752
      this.description = description;
68 ashish 11753
    }
11754
 
11755
    /**
11756
     * Performs a deep copy on <i>other</i>.
11757
     */
483 rajveer 11758
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11759
      __isset_bit_vector.clear();
11760
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11761
      this.orderId = other.orderId;
11762
      if (other.isSetStatus()) {
11763
        this.status = other.status;
11764
      }
11765
      if (other.isSetDescription()) {
11766
        this.description = other.description;
11767
      }
68 ashish 11768
    }
11769
 
483 rajveer 11770
    public changeOrderStatus_args deepCopy() {
11771
      return new changeOrderStatus_args(this);
68 ashish 11772
    }
11773
 
11774
    @Deprecated
483 rajveer 11775
    public changeOrderStatus_args clone() {
11776
      return new changeOrderStatus_args(this);
68 ashish 11777
    }
11778
 
483 rajveer 11779
    public long getOrderId() {
11780
      return this.orderId;
68 ashish 11781
    }
11782
 
483 rajveer 11783
    public changeOrderStatus_args setOrderId(long orderId) {
11784
      this.orderId = orderId;
11785
      setOrderIdIsSet(true);
68 ashish 11786
      return this;
11787
    }
11788
 
483 rajveer 11789
    public void unsetOrderId() {
11790
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11791
    }
11792
 
483 rajveer 11793
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11794
    public boolean isSetOrderId() {
11795
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11796
    }
11797
 
483 rajveer 11798
    public void setOrderIdIsSet(boolean value) {
11799
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11800
    }
11801
 
483 rajveer 11802
    /**
11803
     * 
11804
     * @see OrderStatus
11805
     */
11806
    public OrderStatus getStatus() {
11807
      return this.status;
68 ashish 11808
    }
11809
 
11810
    /**
483 rajveer 11811
     * 
11812
     * @see OrderStatus
68 ashish 11813
     */
483 rajveer 11814
    public changeOrderStatus_args setStatus(OrderStatus status) {
11815
      this.status = status;
68 ashish 11816
      return this;
11817
    }
11818
 
483 rajveer 11819
    public void unsetStatus() {
11820
      this.status = null;
68 ashish 11821
    }
11822
 
483 rajveer 11823
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11824
    public boolean isSetStatus() {
11825
      return this.status != null;
68 ashish 11826
    }
11827
 
483 rajveer 11828
    public void setStatusIsSet(boolean value) {
68 ashish 11829
      if (!value) {
483 rajveer 11830
        this.status = null;
68 ashish 11831
      }
11832
    }
11833
 
483 rajveer 11834
    public String getDescription() {
11835
      return this.description;
68 ashish 11836
    }
11837
 
483 rajveer 11838
    public changeOrderStatus_args setDescription(String description) {
11839
      this.description = description;
68 ashish 11840
      return this;
11841
    }
11842
 
483 rajveer 11843
    public void unsetDescription() {
11844
      this.description = null;
68 ashish 11845
    }
11846
 
483 rajveer 11847
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
11848
    public boolean isSetDescription() {
11849
      return this.description != null;
68 ashish 11850
    }
11851
 
483 rajveer 11852
    public void setDescriptionIsSet(boolean value) {
68 ashish 11853
      if (!value) {
483 rajveer 11854
        this.description = null;
68 ashish 11855
      }
11856
    }
11857
 
11858
    public void setFieldValue(_Fields field, Object value) {
11859
      switch (field) {
483 rajveer 11860
      case ORDER_ID:
68 ashish 11861
        if (value == null) {
483 rajveer 11862
          unsetOrderId();
68 ashish 11863
        } else {
483 rajveer 11864
          setOrderId((Long)value);
68 ashish 11865
        }
11866
        break;
11867
 
483 rajveer 11868
      case STATUS:
68 ashish 11869
        if (value == null) {
483 rajveer 11870
          unsetStatus();
68 ashish 11871
        } else {
483 rajveer 11872
          setStatus((OrderStatus)value);
68 ashish 11873
        }
11874
        break;
11875
 
483 rajveer 11876
      case DESCRIPTION:
11877
        if (value == null) {
11878
          unsetDescription();
11879
        } else {
11880
          setDescription((String)value);
11881
        }
11882
        break;
11883
 
68 ashish 11884
      }
11885
    }
11886
 
11887
    public void setFieldValue(int fieldID, Object value) {
11888
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11889
    }
11890
 
11891
    public Object getFieldValue(_Fields field) {
11892
      switch (field) {
483 rajveer 11893
      case ORDER_ID:
11894
        return new Long(getOrderId());
68 ashish 11895
 
483 rajveer 11896
      case STATUS:
11897
        return getStatus();
68 ashish 11898
 
483 rajveer 11899
      case DESCRIPTION:
11900
        return getDescription();
11901
 
68 ashish 11902
      }
11903
      throw new IllegalStateException();
11904
    }
11905
 
11906
    public Object getFieldValue(int fieldId) {
11907
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11908
    }
11909
 
11910
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11911
    public boolean isSet(_Fields field) {
11912
      switch (field) {
483 rajveer 11913
      case ORDER_ID:
11914
        return isSetOrderId();
11915
      case STATUS:
11916
        return isSetStatus();
11917
      case DESCRIPTION:
11918
        return isSetDescription();
68 ashish 11919
      }
11920
      throw new IllegalStateException();
11921
    }
11922
 
11923
    public boolean isSet(int fieldID) {
11924
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11925
    }
11926
 
11927
    @Override
11928
    public boolean equals(Object that) {
11929
      if (that == null)
11930
        return false;
483 rajveer 11931
      if (that instanceof changeOrderStatus_args)
11932
        return this.equals((changeOrderStatus_args)that);
68 ashish 11933
      return false;
11934
    }
11935
 
483 rajveer 11936
    public boolean equals(changeOrderStatus_args that) {
68 ashish 11937
      if (that == null)
11938
        return false;
11939
 
483 rajveer 11940
      boolean this_present_orderId = true;
11941
      boolean that_present_orderId = true;
11942
      if (this_present_orderId || that_present_orderId) {
11943
        if (!(this_present_orderId && that_present_orderId))
68 ashish 11944
          return false;
483 rajveer 11945
        if (this.orderId != that.orderId)
68 ashish 11946
          return false;
11947
      }
11948
 
483 rajveer 11949
      boolean this_present_status = true && this.isSetStatus();
11950
      boolean that_present_status = true && that.isSetStatus();
11951
      if (this_present_status || that_present_status) {
11952
        if (!(this_present_status && that_present_status))
68 ashish 11953
          return false;
483 rajveer 11954
        if (!this.status.equals(that.status))
68 ashish 11955
          return false;
11956
      }
11957
 
483 rajveer 11958
      boolean this_present_description = true && this.isSetDescription();
11959
      boolean that_present_description = true && that.isSetDescription();
11960
      if (this_present_description || that_present_description) {
11961
        if (!(this_present_description && that_present_description))
11962
          return false;
11963
        if (!this.description.equals(that.description))
11964
          return false;
11965
      }
11966
 
68 ashish 11967
      return true;
11968
    }
11969
 
11970
    @Override
11971
    public int hashCode() {
11972
      return 0;
11973
    }
11974
 
483 rajveer 11975
    public int compareTo(changeOrderStatus_args other) {
11976
      if (!getClass().equals(other.getClass())) {
11977
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 11978
      }
11979
 
483 rajveer 11980
      int lastComparison = 0;
11981
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 11982
 
483 rajveer 11983
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11984
      if (lastComparison != 0) {
11985
        return lastComparison;
68 ashish 11986
      }
483 rajveer 11987
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11988
      if (lastComparison != 0) {
11989
        return lastComparison;
68 ashish 11990
      }
483 rajveer 11991
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11992
      if (lastComparison != 0) {
11993
        return lastComparison;
68 ashish 11994
      }
483 rajveer 11995
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11996
      if (lastComparison != 0) {
11997
        return lastComparison;
68 ashish 11998
      }
483 rajveer 11999
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
12000
      if (lastComparison != 0) {
12001
        return lastComparison;
68 ashish 12002
      }
483 rajveer 12003
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
12004
      if (lastComparison != 0) {
12005
        return lastComparison;
68 ashish 12006
      }
12007
      return 0;
12008
    }
12009
 
12010
    public void read(TProtocol iprot) throws TException {
12011
      TField field;
12012
      iprot.readStructBegin();
12013
      while (true)
12014
      {
12015
        field = iprot.readFieldBegin();
12016
        if (field.type == TType.STOP) { 
12017
          break;
12018
        }
12019
        _Fields fieldId = _Fields.findByThriftId(field.id);
12020
        if (fieldId == null) {
12021
          TProtocolUtil.skip(iprot, field.type);
12022
        } else {
12023
          switch (fieldId) {
483 rajveer 12024
            case ORDER_ID:
68 ashish 12025
              if (field.type == TType.I64) {
483 rajveer 12026
                this.orderId = iprot.readI64();
12027
                setOrderIdIsSet(true);
68 ashish 12028
              } else { 
12029
                TProtocolUtil.skip(iprot, field.type);
12030
              }
12031
              break;
483 rajveer 12032
            case STATUS:
12033
              if (field.type == TType.I32) {
12034
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 12035
              } else { 
12036
                TProtocolUtil.skip(iprot, field.type);
12037
              }
12038
              break;
483 rajveer 12039
            case DESCRIPTION:
12040
              if (field.type == TType.STRING) {
12041
                this.description = iprot.readString();
12042
              } else { 
12043
                TProtocolUtil.skip(iprot, field.type);
12044
              }
12045
              break;
68 ashish 12046
          }
12047
          iprot.readFieldEnd();
12048
        }
12049
      }
12050
      iprot.readStructEnd();
12051
      validate();
12052
    }
12053
 
12054
    public void write(TProtocol oprot) throws TException {
12055
      validate();
12056
 
12057
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 12058
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12059
      oprot.writeI64(this.orderId);
68 ashish 12060
      oprot.writeFieldEnd();
483 rajveer 12061
      if (this.status != null) {
12062
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
12063
        oprot.writeI32(this.status.getValue());
68 ashish 12064
        oprot.writeFieldEnd();
12065
      }
483 rajveer 12066
      if (this.description != null) {
12067
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
12068
        oprot.writeString(this.description);
12069
        oprot.writeFieldEnd();
12070
      }
68 ashish 12071
      oprot.writeFieldStop();
12072
      oprot.writeStructEnd();
12073
    }
12074
 
12075
    @Override
12076
    public String toString() {
483 rajveer 12077
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 12078
      boolean first = true;
12079
 
483 rajveer 12080
      sb.append("orderId:");
12081
      sb.append(this.orderId);
68 ashish 12082
      first = false;
12083
      if (!first) sb.append(", ");
483 rajveer 12084
      sb.append("status:");
12085
      if (this.status == null) {
68 ashish 12086
        sb.append("null");
12087
      } else {
483 rajveer 12088
        String status_name = status.name();
12089
        if (status_name != null) {
12090
          sb.append(status_name);
12091
          sb.append(" (");
12092
        }
12093
        sb.append(this.status);
12094
        if (status_name != null) {
12095
          sb.append(")");
12096
        }
68 ashish 12097
      }
12098
      first = false;
483 rajveer 12099
      if (!first) sb.append(", ");
12100
      sb.append("description:");
12101
      if (this.description == null) {
12102
        sb.append("null");
12103
      } else {
12104
        sb.append(this.description);
12105
      }
12106
      first = false;
68 ashish 12107
      sb.append(")");
12108
      return sb.toString();
12109
    }
12110
 
12111
    public void validate() throws TException {
12112
      // check for required fields
12113
    }
12114
 
12115
  }
12116
 
483 rajveer 12117
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
12118
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 12119
 
12120
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12121
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12122
 
12123
    private boolean success;
12124
    private TransactionServiceException ex;
12125
 
12126
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12127
    public enum _Fields implements TFieldIdEnum {
12128
      SUCCESS((short)0, "success"),
12129
      EX((short)1, "ex");
12130
 
12131
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12132
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12133
 
12134
      static {
12135
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12136
          byId.put((int)field._thriftId, field);
12137
          byName.put(field.getFieldName(), field);
12138
        }
12139
      }
12140
 
12141
      /**
12142
       * Find the _Fields constant that matches fieldId, or null if its not found.
12143
       */
12144
      public static _Fields findByThriftId(int fieldId) {
12145
        return byId.get(fieldId);
12146
      }
12147
 
12148
      /**
12149
       * Find the _Fields constant that matches fieldId, throwing an exception
12150
       * if it is not found.
12151
       */
12152
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12153
        _Fields fields = findByThriftId(fieldId);
12154
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12155
        return fields;
12156
      }
12157
 
12158
      /**
12159
       * Find the _Fields constant that matches name, or null if its not found.
12160
       */
12161
      public static _Fields findByName(String name) {
12162
        return byName.get(name);
12163
      }
12164
 
12165
      private final short _thriftId;
12166
      private final String _fieldName;
12167
 
12168
      _Fields(short thriftId, String fieldName) {
12169
        _thriftId = thriftId;
12170
        _fieldName = fieldName;
12171
      }
12172
 
12173
      public short getThriftFieldId() {
12174
        return _thriftId;
12175
      }
12176
 
12177
      public String getFieldName() {
12178
        return _fieldName;
12179
      }
12180
    }
12181
 
12182
    // isset id assignments
12183
    private static final int __SUCCESS_ISSET_ID = 0;
12184
    private BitSet __isset_bit_vector = new BitSet(1);
12185
 
12186
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12187
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12188
          new FieldValueMetaData(TType.BOOL)));
12189
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12190
          new FieldValueMetaData(TType.STRUCT)));
12191
    }});
12192
 
12193
    static {
483 rajveer 12194
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 12195
    }
12196
 
483 rajveer 12197
    public changeOrderStatus_result() {
68 ashish 12198
    }
12199
 
483 rajveer 12200
    public changeOrderStatus_result(
68 ashish 12201
      boolean success,
12202
      TransactionServiceException ex)
12203
    {
12204
      this();
12205
      this.success = success;
12206
      setSuccessIsSet(true);
12207
      this.ex = ex;
12208
    }
12209
 
12210
    /**
12211
     * Performs a deep copy on <i>other</i>.
12212
     */
483 rajveer 12213
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 12214
      __isset_bit_vector.clear();
12215
      __isset_bit_vector.or(other.__isset_bit_vector);
12216
      this.success = other.success;
12217
      if (other.isSetEx()) {
12218
        this.ex = new TransactionServiceException(other.ex);
12219
      }
12220
    }
12221
 
483 rajveer 12222
    public changeOrderStatus_result deepCopy() {
12223
      return new changeOrderStatus_result(this);
68 ashish 12224
    }
12225
 
12226
    @Deprecated
483 rajveer 12227
    public changeOrderStatus_result clone() {
12228
      return new changeOrderStatus_result(this);
68 ashish 12229
    }
12230
 
12231
    public boolean isSuccess() {
12232
      return this.success;
12233
    }
12234
 
483 rajveer 12235
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 12236
      this.success = success;
12237
      setSuccessIsSet(true);
12238
      return this;
12239
    }
12240
 
12241
    public void unsetSuccess() {
12242
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12243
    }
12244
 
12245
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12246
    public boolean isSetSuccess() {
12247
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12248
    }
12249
 
12250
    public void setSuccessIsSet(boolean value) {
12251
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12252
    }
12253
 
12254
    public TransactionServiceException getEx() {
12255
      return this.ex;
12256
    }
12257
 
483 rajveer 12258
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 12259
      this.ex = ex;
12260
      return this;
12261
    }
12262
 
12263
    public void unsetEx() {
12264
      this.ex = null;
12265
    }
12266
 
12267
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12268
    public boolean isSetEx() {
12269
      return this.ex != null;
12270
    }
12271
 
12272
    public void setExIsSet(boolean value) {
12273
      if (!value) {
12274
        this.ex = null;
12275
      }
12276
    }
12277
 
12278
    public void setFieldValue(_Fields field, Object value) {
12279
      switch (field) {
12280
      case SUCCESS:
12281
        if (value == null) {
12282
          unsetSuccess();
12283
        } else {
12284
          setSuccess((Boolean)value);
12285
        }
12286
        break;
12287
 
12288
      case EX:
12289
        if (value == null) {
12290
          unsetEx();
12291
        } else {
12292
          setEx((TransactionServiceException)value);
12293
        }
12294
        break;
12295
 
12296
      }
12297
    }
12298
 
12299
    public void setFieldValue(int fieldID, Object value) {
12300
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12301
    }
12302
 
12303
    public Object getFieldValue(_Fields field) {
12304
      switch (field) {
12305
      case SUCCESS:
12306
        return new Boolean(isSuccess());
12307
 
12308
      case EX:
12309
        return getEx();
12310
 
12311
      }
12312
      throw new IllegalStateException();
12313
    }
12314
 
12315
    public Object getFieldValue(int fieldId) {
12316
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12317
    }
12318
 
12319
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12320
    public boolean isSet(_Fields field) {
12321
      switch (field) {
12322
      case SUCCESS:
12323
        return isSetSuccess();
12324
      case EX:
12325
        return isSetEx();
12326
      }
12327
      throw new IllegalStateException();
12328
    }
12329
 
12330
    public boolean isSet(int fieldID) {
12331
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12332
    }
12333
 
12334
    @Override
12335
    public boolean equals(Object that) {
12336
      if (that == null)
12337
        return false;
483 rajveer 12338
      if (that instanceof changeOrderStatus_result)
12339
        return this.equals((changeOrderStatus_result)that);
68 ashish 12340
      return false;
12341
    }
12342
 
483 rajveer 12343
    public boolean equals(changeOrderStatus_result that) {
68 ashish 12344
      if (that == null)
12345
        return false;
12346
 
12347
      boolean this_present_success = true;
12348
      boolean that_present_success = true;
12349
      if (this_present_success || that_present_success) {
12350
        if (!(this_present_success && that_present_success))
12351
          return false;
12352
        if (this.success != that.success)
12353
          return false;
12354
      }
12355
 
12356
      boolean this_present_ex = true && this.isSetEx();
12357
      boolean that_present_ex = true && that.isSetEx();
12358
      if (this_present_ex || that_present_ex) {
12359
        if (!(this_present_ex && that_present_ex))
12360
          return false;
12361
        if (!this.ex.equals(that.ex))
12362
          return false;
12363
      }
12364
 
12365
      return true;
12366
    }
12367
 
12368
    @Override
12369
    public int hashCode() {
12370
      return 0;
12371
    }
12372
 
483 rajveer 12373
    public int compareTo(changeOrderStatus_result other) {
68 ashish 12374
      if (!getClass().equals(other.getClass())) {
12375
        return getClass().getName().compareTo(other.getClass().getName());
12376
      }
12377
 
12378
      int lastComparison = 0;
483 rajveer 12379
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 12380
 
12381
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12382
      if (lastComparison != 0) {
12383
        return lastComparison;
12384
      }
12385
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12386
      if (lastComparison != 0) {
12387
        return lastComparison;
12388
      }
12389
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12390
      if (lastComparison != 0) {
12391
        return lastComparison;
12392
      }
12393
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12394
      if (lastComparison != 0) {
12395
        return lastComparison;
12396
      }
12397
      return 0;
12398
    }
12399
 
12400
    public void read(TProtocol iprot) throws TException {
12401
      TField field;
12402
      iprot.readStructBegin();
12403
      while (true)
12404
      {
12405
        field = iprot.readFieldBegin();
12406
        if (field.type == TType.STOP) { 
12407
          break;
12408
        }
12409
        _Fields fieldId = _Fields.findByThriftId(field.id);
12410
        if (fieldId == null) {
12411
          TProtocolUtil.skip(iprot, field.type);
12412
        } else {
12413
          switch (fieldId) {
12414
            case SUCCESS:
12415
              if (field.type == TType.BOOL) {
12416
                this.success = iprot.readBool();
12417
                setSuccessIsSet(true);
12418
              } else { 
12419
                TProtocolUtil.skip(iprot, field.type);
12420
              }
12421
              break;
12422
            case EX:
12423
              if (field.type == TType.STRUCT) {
12424
                this.ex = new TransactionServiceException();
12425
                this.ex.read(iprot);
12426
              } else { 
12427
                TProtocolUtil.skip(iprot, field.type);
12428
              }
12429
              break;
12430
          }
12431
          iprot.readFieldEnd();
12432
        }
12433
      }
12434
      iprot.readStructEnd();
12435
      validate();
12436
    }
12437
 
12438
    public void write(TProtocol oprot) throws TException {
12439
      oprot.writeStructBegin(STRUCT_DESC);
12440
 
12441
      if (this.isSetSuccess()) {
12442
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12443
        oprot.writeBool(this.success);
12444
        oprot.writeFieldEnd();
12445
      } else if (this.isSetEx()) {
12446
        oprot.writeFieldBegin(EX_FIELD_DESC);
12447
        this.ex.write(oprot);
12448
        oprot.writeFieldEnd();
12449
      }
12450
      oprot.writeFieldStop();
12451
      oprot.writeStructEnd();
12452
    }
12453
 
12454
    @Override
12455
    public String toString() {
483 rajveer 12456
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 12457
      boolean first = true;
12458
 
12459
      sb.append("success:");
12460
      sb.append(this.success);
12461
      first = false;
12462
      if (!first) sb.append(", ");
12463
      sb.append("ex:");
12464
      if (this.ex == null) {
12465
        sb.append("null");
12466
      } else {
12467
        sb.append(this.ex);
12468
      }
12469
      first = false;
12470
      sb.append(")");
12471
      return sb.toString();
12472
    }
12473
 
12474
    public void validate() throws TException {
12475
      // check for required fields
12476
    }
12477
 
12478
  }
12479
 
495 rajveer 12480
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
12481
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
12482
 
12483
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12484
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 12485
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 12486
 
12487
    private long orderId;
12488
    private String invoice_number;
12489
    private String billed_by;
12490
 
12491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12492
    public enum _Fields implements TFieldIdEnum {
12493
      ORDER_ID((short)1, "orderId"),
12494
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 12495
      BILLED_BY((short)3, "billed_by");
495 rajveer 12496
 
12497
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12498
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12499
 
12500
      static {
12501
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12502
          byId.put((int)field._thriftId, field);
12503
          byName.put(field.getFieldName(), field);
12504
        }
12505
      }
12506
 
12507
      /**
12508
       * Find the _Fields constant that matches fieldId, or null if its not found.
12509
       */
12510
      public static _Fields findByThriftId(int fieldId) {
12511
        return byId.get(fieldId);
12512
      }
12513
 
12514
      /**
12515
       * Find the _Fields constant that matches fieldId, throwing an exception
12516
       * if it is not found.
12517
       */
12518
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12519
        _Fields fields = findByThriftId(fieldId);
12520
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12521
        return fields;
12522
      }
12523
 
12524
      /**
12525
       * Find the _Fields constant that matches name, or null if its not found.
12526
       */
12527
      public static _Fields findByName(String name) {
12528
        return byName.get(name);
12529
      }
12530
 
12531
      private final short _thriftId;
12532
      private final String _fieldName;
12533
 
12534
      _Fields(short thriftId, String fieldName) {
12535
        _thriftId = thriftId;
12536
        _fieldName = fieldName;
12537
      }
12538
 
12539
      public short getThriftFieldId() {
12540
        return _thriftId;
12541
      }
12542
 
12543
      public String getFieldName() {
12544
        return _fieldName;
12545
      }
12546
    }
12547
 
12548
    // isset id assignments
12549
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12550
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12551
 
12552
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12553
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12554
          new FieldValueMetaData(TType.I64)));
12555
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12556
          new FieldValueMetaData(TType.STRING)));
12557
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12558
          new FieldValueMetaData(TType.STRING)));
12559
    }});
12560
 
12561
    static {
12562
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12563
    }
12564
 
12565
    public addBillingDetails_args() {
12566
    }
12567
 
12568
    public addBillingDetails_args(
12569
      long orderId,
12570
      String invoice_number,
12571
      String billed_by)
12572
    {
12573
      this();
12574
      this.orderId = orderId;
12575
      setOrderIdIsSet(true);
12576
      this.invoice_number = invoice_number;
12577
      this.billed_by = billed_by;
12578
    }
12579
 
12580
    /**
12581
     * Performs a deep copy on <i>other</i>.
12582
     */
12583
    public addBillingDetails_args(addBillingDetails_args other) {
12584
      __isset_bit_vector.clear();
12585
      __isset_bit_vector.or(other.__isset_bit_vector);
12586
      this.orderId = other.orderId;
12587
      if (other.isSetInvoice_number()) {
12588
        this.invoice_number = other.invoice_number;
12589
      }
12590
      if (other.isSetBilled_by()) {
12591
        this.billed_by = other.billed_by;
12592
      }
12593
    }
12594
 
12595
    public addBillingDetails_args deepCopy() {
12596
      return new addBillingDetails_args(this);
12597
    }
12598
 
12599
    @Deprecated
12600
    public addBillingDetails_args clone() {
12601
      return new addBillingDetails_args(this);
12602
    }
12603
 
12604
    public long getOrderId() {
12605
      return this.orderId;
12606
    }
12607
 
12608
    public addBillingDetails_args setOrderId(long orderId) {
12609
      this.orderId = orderId;
12610
      setOrderIdIsSet(true);
12611
      return this;
12612
    }
12613
 
12614
    public void unsetOrderId() {
12615
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12616
    }
12617
 
12618
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12619
    public boolean isSetOrderId() {
12620
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12621
    }
12622
 
12623
    public void setOrderIdIsSet(boolean value) {
12624
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12625
    }
12626
 
12627
    public String getInvoice_number() {
12628
      return this.invoice_number;
12629
    }
12630
 
12631
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12632
      this.invoice_number = invoice_number;
12633
      return this;
12634
    }
12635
 
12636
    public void unsetInvoice_number() {
12637
      this.invoice_number = null;
12638
    }
12639
 
12640
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12641
    public boolean isSetInvoice_number() {
12642
      return this.invoice_number != null;
12643
    }
12644
 
12645
    public void setInvoice_numberIsSet(boolean value) {
12646
      if (!value) {
12647
        this.invoice_number = null;
12648
      }
12649
    }
12650
 
12651
    public String getBilled_by() {
12652
      return this.billed_by;
12653
    }
12654
 
12655
    public addBillingDetails_args setBilled_by(String billed_by) {
12656
      this.billed_by = billed_by;
12657
      return this;
12658
    }
12659
 
12660
    public void unsetBilled_by() {
12661
      this.billed_by = null;
12662
    }
12663
 
12664
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12665
    public boolean isSetBilled_by() {
12666
      return this.billed_by != null;
12667
    }
12668
 
12669
    public void setBilled_byIsSet(boolean value) {
12670
      if (!value) {
12671
        this.billed_by = null;
12672
      }
12673
    }
12674
 
12675
    public void setFieldValue(_Fields field, Object value) {
12676
      switch (field) {
12677
      case ORDER_ID:
12678
        if (value == null) {
12679
          unsetOrderId();
12680
        } else {
12681
          setOrderId((Long)value);
12682
        }
12683
        break;
12684
 
12685
      case INVOICE_NUMBER:
12686
        if (value == null) {
12687
          unsetInvoice_number();
12688
        } else {
12689
          setInvoice_number((String)value);
12690
        }
12691
        break;
12692
 
12693
      case BILLED_BY:
12694
        if (value == null) {
12695
          unsetBilled_by();
12696
        } else {
12697
          setBilled_by((String)value);
12698
        }
12699
        break;
12700
 
12701
      }
12702
    }
12703
 
12704
    public void setFieldValue(int fieldID, Object value) {
12705
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12706
    }
12707
 
12708
    public Object getFieldValue(_Fields field) {
12709
      switch (field) {
12710
      case ORDER_ID:
12711
        return new Long(getOrderId());
12712
 
12713
      case INVOICE_NUMBER:
12714
        return getInvoice_number();
12715
 
12716
      case BILLED_BY:
12717
        return getBilled_by();
12718
 
12719
      }
12720
      throw new IllegalStateException();
12721
    }
12722
 
12723
    public Object getFieldValue(int fieldId) {
12724
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12725
    }
12726
 
12727
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12728
    public boolean isSet(_Fields field) {
12729
      switch (field) {
12730
      case ORDER_ID:
12731
        return isSetOrderId();
12732
      case INVOICE_NUMBER:
12733
        return isSetInvoice_number();
12734
      case BILLED_BY:
12735
        return isSetBilled_by();
12736
      }
12737
      throw new IllegalStateException();
12738
    }
12739
 
12740
    public boolean isSet(int fieldID) {
12741
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12742
    }
12743
 
12744
    @Override
12745
    public boolean equals(Object that) {
12746
      if (that == null)
12747
        return false;
12748
      if (that instanceof addBillingDetails_args)
12749
        return this.equals((addBillingDetails_args)that);
12750
      return false;
12751
    }
12752
 
12753
    public boolean equals(addBillingDetails_args that) {
12754
      if (that == null)
12755
        return false;
12756
 
12757
      boolean this_present_orderId = true;
12758
      boolean that_present_orderId = true;
12759
      if (this_present_orderId || that_present_orderId) {
12760
        if (!(this_present_orderId && that_present_orderId))
12761
          return false;
12762
        if (this.orderId != that.orderId)
12763
          return false;
12764
      }
12765
 
12766
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12767
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12768
      if (this_present_invoice_number || that_present_invoice_number) {
12769
        if (!(this_present_invoice_number && that_present_invoice_number))
12770
          return false;
12771
        if (!this.invoice_number.equals(that.invoice_number))
12772
          return false;
12773
      }
12774
 
12775
      boolean this_present_billed_by = true && this.isSetBilled_by();
12776
      boolean that_present_billed_by = true && that.isSetBilled_by();
12777
      if (this_present_billed_by || that_present_billed_by) {
12778
        if (!(this_present_billed_by && that_present_billed_by))
12779
          return false;
12780
        if (!this.billed_by.equals(that.billed_by))
12781
          return false;
12782
      }
12783
 
12784
      return true;
12785
    }
12786
 
12787
    @Override
12788
    public int hashCode() {
12789
      return 0;
12790
    }
12791
 
12792
    public int compareTo(addBillingDetails_args other) {
12793
      if (!getClass().equals(other.getClass())) {
12794
        return getClass().getName().compareTo(other.getClass().getName());
12795
      }
12796
 
12797
      int lastComparison = 0;
12798
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12799
 
12800
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12801
      if (lastComparison != 0) {
12802
        return lastComparison;
12803
      }
12804
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12805
      if (lastComparison != 0) {
12806
        return lastComparison;
12807
      }
12808
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12809
      if (lastComparison != 0) {
12810
        return lastComparison;
12811
      }
12812
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12813
      if (lastComparison != 0) {
12814
        return lastComparison;
12815
      }
12816
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12817
      if (lastComparison != 0) {
12818
        return lastComparison;
12819
      }
12820
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12821
      if (lastComparison != 0) {
12822
        return lastComparison;
12823
      }
12824
      return 0;
12825
    }
12826
 
12827
    public void read(TProtocol iprot) throws TException {
12828
      TField field;
12829
      iprot.readStructBegin();
12830
      while (true)
12831
      {
12832
        field = iprot.readFieldBegin();
12833
        if (field.type == TType.STOP) { 
12834
          break;
12835
        }
12836
        _Fields fieldId = _Fields.findByThriftId(field.id);
12837
        if (fieldId == null) {
12838
          TProtocolUtil.skip(iprot, field.type);
12839
        } else {
12840
          switch (fieldId) {
12841
            case ORDER_ID:
12842
              if (field.type == TType.I64) {
12843
                this.orderId = iprot.readI64();
12844
                setOrderIdIsSet(true);
12845
              } else { 
12846
                TProtocolUtil.skip(iprot, field.type);
12847
              }
12848
              break;
12849
            case INVOICE_NUMBER:
12850
              if (field.type == TType.STRING) {
12851
                this.invoice_number = iprot.readString();
12852
              } else { 
12853
                TProtocolUtil.skip(iprot, field.type);
12854
              }
12855
              break;
12856
            case BILLED_BY:
12857
              if (field.type == TType.STRING) {
12858
                this.billed_by = iprot.readString();
12859
              } else { 
12860
                TProtocolUtil.skip(iprot, field.type);
12861
              }
12862
              break;
12863
          }
12864
          iprot.readFieldEnd();
12865
        }
12866
      }
12867
      iprot.readStructEnd();
12868
      validate();
12869
    }
12870
 
12871
    public void write(TProtocol oprot) throws TException {
12872
      validate();
12873
 
12874
      oprot.writeStructBegin(STRUCT_DESC);
12875
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12876
      oprot.writeI64(this.orderId);
12877
      oprot.writeFieldEnd();
12878
      if (this.invoice_number != null) {
12879
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
12880
        oprot.writeString(this.invoice_number);
12881
        oprot.writeFieldEnd();
12882
      }
12883
      if (this.billed_by != null) {
12884
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
12885
        oprot.writeString(this.billed_by);
12886
        oprot.writeFieldEnd();
12887
      }
12888
      oprot.writeFieldStop();
12889
      oprot.writeStructEnd();
12890
    }
12891
 
12892
    @Override
12893
    public String toString() {
12894
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
12895
      boolean first = true;
12896
 
12897
      sb.append("orderId:");
12898
      sb.append(this.orderId);
12899
      first = false;
12900
      if (!first) sb.append(", ");
12901
      sb.append("invoice_number:");
12902
      if (this.invoice_number == null) {
12903
        sb.append("null");
12904
      } else {
12905
        sb.append(this.invoice_number);
12906
      }
12907
      first = false;
12908
      if (!first) sb.append(", ");
12909
      sb.append("billed_by:");
12910
      if (this.billed_by == null) {
12911
        sb.append("null");
12912
      } else {
12913
        sb.append(this.billed_by);
12914
      }
12915
      first = false;
12916
      sb.append(")");
12917
      return sb.toString();
12918
    }
12919
 
12920
    public void validate() throws TException {
12921
      // check for required fields
12922
    }
12923
 
12924
  }
12925
 
12926
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
12927
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
12928
 
12929
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12930
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12931
 
12932
    private boolean success;
12933
    private TransactionServiceException ex;
12934
 
12935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12936
    public enum _Fields implements TFieldIdEnum {
12937
      SUCCESS((short)0, "success"),
12938
      EX((short)1, "ex");
12939
 
12940
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12942
 
12943
      static {
12944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12945
          byId.put((int)field._thriftId, field);
12946
          byName.put(field.getFieldName(), field);
12947
        }
12948
      }
12949
 
12950
      /**
12951
       * Find the _Fields constant that matches fieldId, or null if its not found.
12952
       */
12953
      public static _Fields findByThriftId(int fieldId) {
12954
        return byId.get(fieldId);
12955
      }
12956
 
12957
      /**
12958
       * Find the _Fields constant that matches fieldId, throwing an exception
12959
       * if it is not found.
12960
       */
12961
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12962
        _Fields fields = findByThriftId(fieldId);
12963
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12964
        return fields;
12965
      }
12966
 
12967
      /**
12968
       * Find the _Fields constant that matches name, or null if its not found.
12969
       */
12970
      public static _Fields findByName(String name) {
12971
        return byName.get(name);
12972
      }
12973
 
12974
      private final short _thriftId;
12975
      private final String _fieldName;
12976
 
12977
      _Fields(short thriftId, String fieldName) {
12978
        _thriftId = thriftId;
12979
        _fieldName = fieldName;
12980
      }
12981
 
12982
      public short getThriftFieldId() {
12983
        return _thriftId;
12984
      }
12985
 
12986
      public String getFieldName() {
12987
        return _fieldName;
12988
      }
12989
    }
12990
 
12991
    // isset id assignments
12992
    private static final int __SUCCESS_ISSET_ID = 0;
12993
    private BitSet __isset_bit_vector = new BitSet(1);
12994
 
12995
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12996
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12997
          new FieldValueMetaData(TType.BOOL)));
12998
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12999
          new FieldValueMetaData(TType.STRUCT)));
13000
    }});
13001
 
13002
    static {
13003
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
13004
    }
13005
 
13006
    public addBillingDetails_result() {
13007
    }
13008
 
13009
    public addBillingDetails_result(
13010
      boolean success,
13011
      TransactionServiceException ex)
13012
    {
13013
      this();
13014
      this.success = success;
13015
      setSuccessIsSet(true);
13016
      this.ex = ex;
13017
    }
13018
 
13019
    /**
13020
     * Performs a deep copy on <i>other</i>.
13021
     */
13022
    public addBillingDetails_result(addBillingDetails_result other) {
13023
      __isset_bit_vector.clear();
13024
      __isset_bit_vector.or(other.__isset_bit_vector);
13025
      this.success = other.success;
13026
      if (other.isSetEx()) {
13027
        this.ex = new TransactionServiceException(other.ex);
13028
      }
13029
    }
13030
 
13031
    public addBillingDetails_result deepCopy() {
13032
      return new addBillingDetails_result(this);
13033
    }
13034
 
13035
    @Deprecated
13036
    public addBillingDetails_result clone() {
13037
      return new addBillingDetails_result(this);
13038
    }
13039
 
13040
    public boolean isSuccess() {
13041
      return this.success;
13042
    }
13043
 
13044
    public addBillingDetails_result setSuccess(boolean success) {
13045
      this.success = success;
13046
      setSuccessIsSet(true);
13047
      return this;
13048
    }
13049
 
13050
    public void unsetSuccess() {
13051
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13052
    }
13053
 
13054
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13055
    public boolean isSetSuccess() {
13056
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13057
    }
13058
 
13059
    public void setSuccessIsSet(boolean value) {
13060
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13061
    }
13062
 
13063
    public TransactionServiceException getEx() {
13064
      return this.ex;
13065
    }
13066
 
13067
    public addBillingDetails_result setEx(TransactionServiceException ex) {
13068
      this.ex = ex;
13069
      return this;
13070
    }
13071
 
13072
    public void unsetEx() {
13073
      this.ex = null;
13074
    }
13075
 
13076
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13077
    public boolean isSetEx() {
13078
      return this.ex != null;
13079
    }
13080
 
13081
    public void setExIsSet(boolean value) {
13082
      if (!value) {
13083
        this.ex = null;
13084
      }
13085
    }
13086
 
13087
    public void setFieldValue(_Fields field, Object value) {
13088
      switch (field) {
13089
      case SUCCESS:
13090
        if (value == null) {
13091
          unsetSuccess();
13092
        } else {
13093
          setSuccess((Boolean)value);
13094
        }
13095
        break;
13096
 
13097
      case EX:
13098
        if (value == null) {
13099
          unsetEx();
13100
        } else {
13101
          setEx((TransactionServiceException)value);
13102
        }
13103
        break;
13104
 
13105
      }
13106
    }
13107
 
13108
    public void setFieldValue(int fieldID, Object value) {
13109
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13110
    }
13111
 
13112
    public Object getFieldValue(_Fields field) {
13113
      switch (field) {
13114
      case SUCCESS:
13115
        return new Boolean(isSuccess());
13116
 
13117
      case EX:
13118
        return getEx();
13119
 
13120
      }
13121
      throw new IllegalStateException();
13122
    }
13123
 
13124
    public Object getFieldValue(int fieldId) {
13125
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13126
    }
13127
 
13128
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13129
    public boolean isSet(_Fields field) {
13130
      switch (field) {
13131
      case SUCCESS:
13132
        return isSetSuccess();
13133
      case EX:
13134
        return isSetEx();
13135
      }
13136
      throw new IllegalStateException();
13137
    }
13138
 
13139
    public boolean isSet(int fieldID) {
13140
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13141
    }
13142
 
13143
    @Override
13144
    public boolean equals(Object that) {
13145
      if (that == null)
13146
        return false;
13147
      if (that instanceof addBillingDetails_result)
13148
        return this.equals((addBillingDetails_result)that);
13149
      return false;
13150
    }
13151
 
13152
    public boolean equals(addBillingDetails_result that) {
13153
      if (that == null)
13154
        return false;
13155
 
13156
      boolean this_present_success = true;
13157
      boolean that_present_success = true;
13158
      if (this_present_success || that_present_success) {
13159
        if (!(this_present_success && that_present_success))
13160
          return false;
13161
        if (this.success != that.success)
13162
          return false;
13163
      }
13164
 
13165
      boolean this_present_ex = true && this.isSetEx();
13166
      boolean that_present_ex = true && that.isSetEx();
13167
      if (this_present_ex || that_present_ex) {
13168
        if (!(this_present_ex && that_present_ex))
13169
          return false;
13170
        if (!this.ex.equals(that.ex))
13171
          return false;
13172
      }
13173
 
13174
      return true;
13175
    }
13176
 
13177
    @Override
13178
    public int hashCode() {
13179
      return 0;
13180
    }
13181
 
13182
    public int compareTo(addBillingDetails_result other) {
13183
      if (!getClass().equals(other.getClass())) {
13184
        return getClass().getName().compareTo(other.getClass().getName());
13185
      }
13186
 
13187
      int lastComparison = 0;
13188
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
13189
 
13190
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13191
      if (lastComparison != 0) {
13192
        return lastComparison;
13193
      }
13194
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13195
      if (lastComparison != 0) {
13196
        return lastComparison;
13197
      }
13198
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13199
      if (lastComparison != 0) {
13200
        return lastComparison;
13201
      }
13202
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13203
      if (lastComparison != 0) {
13204
        return lastComparison;
13205
      }
13206
      return 0;
13207
    }
13208
 
13209
    public void read(TProtocol iprot) throws TException {
13210
      TField field;
13211
      iprot.readStructBegin();
13212
      while (true)
13213
      {
13214
        field = iprot.readFieldBegin();
13215
        if (field.type == TType.STOP) { 
13216
          break;
13217
        }
13218
        _Fields fieldId = _Fields.findByThriftId(field.id);
13219
        if (fieldId == null) {
13220
          TProtocolUtil.skip(iprot, field.type);
13221
        } else {
13222
          switch (fieldId) {
13223
            case SUCCESS:
13224
              if (field.type == TType.BOOL) {
13225
                this.success = iprot.readBool();
13226
                setSuccessIsSet(true);
13227
              } else { 
13228
                TProtocolUtil.skip(iprot, field.type);
13229
              }
13230
              break;
13231
            case EX:
13232
              if (field.type == TType.STRUCT) {
13233
                this.ex = new TransactionServiceException();
13234
                this.ex.read(iprot);
13235
              } else { 
13236
                TProtocolUtil.skip(iprot, field.type);
13237
              }
13238
              break;
13239
          }
13240
          iprot.readFieldEnd();
13241
        }
13242
      }
13243
      iprot.readStructEnd();
13244
      validate();
13245
    }
13246
 
13247
    public void write(TProtocol oprot) throws TException {
13248
      oprot.writeStructBegin(STRUCT_DESC);
13249
 
13250
      if (this.isSetSuccess()) {
13251
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13252
        oprot.writeBool(this.success);
13253
        oprot.writeFieldEnd();
13254
      } else if (this.isSetEx()) {
13255
        oprot.writeFieldBegin(EX_FIELD_DESC);
13256
        this.ex.write(oprot);
13257
        oprot.writeFieldEnd();
13258
      }
13259
      oprot.writeFieldStop();
13260
      oprot.writeStructEnd();
13261
    }
13262
 
13263
    @Override
13264
    public String toString() {
13265
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
13266
      boolean first = true;
13267
 
13268
      sb.append("success:");
13269
      sb.append(this.success);
13270
      first = false;
13271
      if (!first) sb.append(", ");
13272
      sb.append("ex:");
13273
      if (this.ex == null) {
13274
        sb.append("null");
13275
      } else {
13276
        sb.append(this.ex);
13277
      }
13278
      first = false;
13279
      sb.append(")");
13280
      return sb.toString();
13281
    }
13282
 
13283
    public void validate() throws TException {
13284
      // check for required fields
13285
    }
13286
 
13287
  }
13288
 
1148 chandransh 13289
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
13290
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
13291
 
13292
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13293
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
13294
 
13295
    private long orderId;
13296
    private long jacketNumber;
13297
 
13298
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13299
    public enum _Fields implements TFieldIdEnum {
13300
      ORDER_ID((short)1, "orderId"),
2383 rajveer 13301
      JACKET_NUMBER((short)2, "jacketNumber");
1148 chandransh 13302
 
13303
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13304
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13305
 
13306
      static {
13307
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13308
          byId.put((int)field._thriftId, field);
13309
          byName.put(field.getFieldName(), field);
13310
        }
13311
      }
13312
 
13313
      /**
13314
       * Find the _Fields constant that matches fieldId, or null if its not found.
13315
       */
13316
      public static _Fields findByThriftId(int fieldId) {
13317
        return byId.get(fieldId);
13318
      }
13319
 
13320
      /**
13321
       * Find the _Fields constant that matches fieldId, throwing an exception
13322
       * if it is not found.
13323
       */
13324
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13325
        _Fields fields = findByThriftId(fieldId);
13326
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13327
        return fields;
13328
      }
13329
 
13330
      /**
13331
       * Find the _Fields constant that matches name, or null if its not found.
13332
       */
13333
      public static _Fields findByName(String name) {
13334
        return byName.get(name);
13335
      }
13336
 
13337
      private final short _thriftId;
13338
      private final String _fieldName;
13339
 
13340
      _Fields(short thriftId, String fieldName) {
13341
        _thriftId = thriftId;
13342
        _fieldName = fieldName;
13343
      }
13344
 
13345
      public short getThriftFieldId() {
13346
        return _thriftId;
13347
      }
13348
 
13349
      public String getFieldName() {
13350
        return _fieldName;
13351
      }
13352
    }
13353
 
13354
    // isset id assignments
13355
    private static final int __ORDERID_ISSET_ID = 0;
13356
    private static final int __JACKETNUMBER_ISSET_ID = 1;
2383 rajveer 13357
    private BitSet __isset_bit_vector = new BitSet(2);
1148 chandransh 13358
 
13359
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13360
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13361
          new FieldValueMetaData(TType.I64)));
13362
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
13363
          new FieldValueMetaData(TType.I64)));
13364
    }});
13365
 
13366
    static {
13367
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
13368
    }
13369
 
13370
    public addJacketNumber_args() {
13371
    }
13372
 
13373
    public addJacketNumber_args(
13374
      long orderId,
2383 rajveer 13375
      long jacketNumber)
1148 chandransh 13376
    {
13377
      this();
13378
      this.orderId = orderId;
13379
      setOrderIdIsSet(true);
13380
      this.jacketNumber = jacketNumber;
13381
      setJacketNumberIsSet(true);
13382
    }
13383
 
13384
    /**
13385
     * Performs a deep copy on <i>other</i>.
13386
     */
13387
    public addJacketNumber_args(addJacketNumber_args other) {
13388
      __isset_bit_vector.clear();
13389
      __isset_bit_vector.or(other.__isset_bit_vector);
13390
      this.orderId = other.orderId;
13391
      this.jacketNumber = other.jacketNumber;
13392
    }
13393
 
13394
    public addJacketNumber_args deepCopy() {
13395
      return new addJacketNumber_args(this);
13396
    }
13397
 
13398
    @Deprecated
13399
    public addJacketNumber_args clone() {
13400
      return new addJacketNumber_args(this);
13401
    }
13402
 
13403
    public long getOrderId() {
13404
      return this.orderId;
13405
    }
13406
 
13407
    public addJacketNumber_args setOrderId(long orderId) {
13408
      this.orderId = orderId;
13409
      setOrderIdIsSet(true);
13410
      return this;
13411
    }
13412
 
13413
    public void unsetOrderId() {
13414
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13415
    }
13416
 
13417
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13418
    public boolean isSetOrderId() {
13419
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13420
    }
13421
 
13422
    public void setOrderIdIsSet(boolean value) {
13423
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13424
    }
13425
 
13426
    public long getJacketNumber() {
13427
      return this.jacketNumber;
13428
    }
13429
 
13430
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
13431
      this.jacketNumber = jacketNumber;
13432
      setJacketNumberIsSet(true);
13433
      return this;
13434
    }
13435
 
13436
    public void unsetJacketNumber() {
13437
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
13438
    }
13439
 
13440
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
13441
    public boolean isSetJacketNumber() {
13442
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
13443
    }
13444
 
13445
    public void setJacketNumberIsSet(boolean value) {
13446
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
13447
    }
13448
 
13449
    public void setFieldValue(_Fields field, Object value) {
13450
      switch (field) {
13451
      case ORDER_ID:
13452
        if (value == null) {
13453
          unsetOrderId();
13454
        } else {
13455
          setOrderId((Long)value);
13456
        }
13457
        break;
13458
 
13459
      case JACKET_NUMBER:
13460
        if (value == null) {
13461
          unsetJacketNumber();
13462
        } else {
13463
          setJacketNumber((Long)value);
13464
        }
13465
        break;
13466
 
13467
      }
13468
    }
13469
 
13470
    public void setFieldValue(int fieldID, Object value) {
13471
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13472
    }
13473
 
13474
    public Object getFieldValue(_Fields field) {
13475
      switch (field) {
13476
      case ORDER_ID:
13477
        return new Long(getOrderId());
13478
 
13479
      case JACKET_NUMBER:
13480
        return new Long(getJacketNumber());
13481
 
13482
      }
13483
      throw new IllegalStateException();
13484
    }
13485
 
13486
    public Object getFieldValue(int fieldId) {
13487
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13488
    }
13489
 
13490
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13491
    public boolean isSet(_Fields field) {
13492
      switch (field) {
13493
      case ORDER_ID:
13494
        return isSetOrderId();
13495
      case JACKET_NUMBER:
13496
        return isSetJacketNumber();
13497
      }
13498
      throw new IllegalStateException();
13499
    }
13500
 
13501
    public boolean isSet(int fieldID) {
13502
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13503
    }
13504
 
13505
    @Override
13506
    public boolean equals(Object that) {
13507
      if (that == null)
13508
        return false;
13509
      if (that instanceof addJacketNumber_args)
13510
        return this.equals((addJacketNumber_args)that);
13511
      return false;
13512
    }
13513
 
13514
    public boolean equals(addJacketNumber_args that) {
13515
      if (that == null)
13516
        return false;
13517
 
13518
      boolean this_present_orderId = true;
13519
      boolean that_present_orderId = true;
13520
      if (this_present_orderId || that_present_orderId) {
13521
        if (!(this_present_orderId && that_present_orderId))
13522
          return false;
13523
        if (this.orderId != that.orderId)
13524
          return false;
13525
      }
13526
 
13527
      boolean this_present_jacketNumber = true;
13528
      boolean that_present_jacketNumber = true;
13529
      if (this_present_jacketNumber || that_present_jacketNumber) {
13530
        if (!(this_present_jacketNumber && that_present_jacketNumber))
13531
          return false;
13532
        if (this.jacketNumber != that.jacketNumber)
13533
          return false;
13534
      }
13535
 
13536
      return true;
13537
    }
13538
 
13539
    @Override
13540
    public int hashCode() {
13541
      return 0;
13542
    }
13543
 
13544
    public int compareTo(addJacketNumber_args other) {
13545
      if (!getClass().equals(other.getClass())) {
13546
        return getClass().getName().compareTo(other.getClass().getName());
13547
      }
13548
 
13549
      int lastComparison = 0;
13550
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13551
 
13552
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13553
      if (lastComparison != 0) {
13554
        return lastComparison;
13555
      }
13556
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13557
      if (lastComparison != 0) {
13558
        return lastComparison;
13559
      }
13560
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13561
      if (lastComparison != 0) {
13562
        return lastComparison;
13563
      }
13564
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13565
      if (lastComparison != 0) {
13566
        return lastComparison;
13567
      }
13568
      return 0;
13569
    }
13570
 
13571
    public void read(TProtocol iprot) throws TException {
13572
      TField field;
13573
      iprot.readStructBegin();
13574
      while (true)
13575
      {
13576
        field = iprot.readFieldBegin();
13577
        if (field.type == TType.STOP) { 
13578
          break;
13579
        }
13580
        _Fields fieldId = _Fields.findByThriftId(field.id);
13581
        if (fieldId == null) {
13582
          TProtocolUtil.skip(iprot, field.type);
13583
        } else {
13584
          switch (fieldId) {
13585
            case ORDER_ID:
13586
              if (field.type == TType.I64) {
13587
                this.orderId = iprot.readI64();
13588
                setOrderIdIsSet(true);
13589
              } else { 
13590
                TProtocolUtil.skip(iprot, field.type);
13591
              }
13592
              break;
13593
            case JACKET_NUMBER:
13594
              if (field.type == TType.I64) {
13595
                this.jacketNumber = iprot.readI64();
13596
                setJacketNumberIsSet(true);
13597
              } else { 
13598
                TProtocolUtil.skip(iprot, field.type);
13599
              }
13600
              break;
13601
          }
13602
          iprot.readFieldEnd();
13603
        }
13604
      }
13605
      iprot.readStructEnd();
13606
      validate();
13607
    }
13608
 
13609
    public void write(TProtocol oprot) throws TException {
13610
      validate();
13611
 
13612
      oprot.writeStructBegin(STRUCT_DESC);
13613
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13614
      oprot.writeI64(this.orderId);
13615
      oprot.writeFieldEnd();
13616
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13617
      oprot.writeI64(this.jacketNumber);
13618
      oprot.writeFieldEnd();
13619
      oprot.writeFieldStop();
13620
      oprot.writeStructEnd();
13621
    }
13622
 
13623
    @Override
13624
    public String toString() {
13625
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13626
      boolean first = true;
13627
 
13628
      sb.append("orderId:");
13629
      sb.append(this.orderId);
13630
      first = false;
13631
      if (!first) sb.append(", ");
13632
      sb.append("jacketNumber:");
13633
      sb.append(this.jacketNumber);
13634
      first = false;
13635
      sb.append(")");
13636
      return sb.toString();
13637
    }
13638
 
13639
    public void validate() throws TException {
13640
      // check for required fields
13641
    }
13642
 
13643
  }
13644
 
13645
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13646
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13647
 
13648
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13649
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13650
 
13651
    private boolean success;
13652
    private TransactionServiceException ex;
13653
 
13654
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13655
    public enum _Fields implements TFieldIdEnum {
13656
      SUCCESS((short)0, "success"),
13657
      EX((short)1, "ex");
13658
 
13659
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13660
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13661
 
13662
      static {
13663
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13664
          byId.put((int)field._thriftId, field);
13665
          byName.put(field.getFieldName(), field);
13666
        }
13667
      }
13668
 
13669
      /**
13670
       * Find the _Fields constant that matches fieldId, or null if its not found.
13671
       */
13672
      public static _Fields findByThriftId(int fieldId) {
13673
        return byId.get(fieldId);
13674
      }
13675
 
13676
      /**
13677
       * Find the _Fields constant that matches fieldId, throwing an exception
13678
       * if it is not found.
13679
       */
13680
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13681
        _Fields fields = findByThriftId(fieldId);
13682
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13683
        return fields;
13684
      }
13685
 
13686
      /**
13687
       * Find the _Fields constant that matches name, or null if its not found.
13688
       */
13689
      public static _Fields findByName(String name) {
13690
        return byName.get(name);
13691
      }
13692
 
13693
      private final short _thriftId;
13694
      private final String _fieldName;
13695
 
13696
      _Fields(short thriftId, String fieldName) {
13697
        _thriftId = thriftId;
13698
        _fieldName = fieldName;
13699
      }
13700
 
13701
      public short getThriftFieldId() {
13702
        return _thriftId;
13703
      }
13704
 
13705
      public String getFieldName() {
13706
        return _fieldName;
13707
      }
13708
    }
13709
 
13710
    // isset id assignments
13711
    private static final int __SUCCESS_ISSET_ID = 0;
13712
    private BitSet __isset_bit_vector = new BitSet(1);
13713
 
13714
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13715
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13716
          new FieldValueMetaData(TType.BOOL)));
13717
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13718
          new FieldValueMetaData(TType.STRUCT)));
13719
    }});
13720
 
13721
    static {
13722
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13723
    }
13724
 
13725
    public addJacketNumber_result() {
13726
    }
13727
 
13728
    public addJacketNumber_result(
13729
      boolean success,
13730
      TransactionServiceException ex)
13731
    {
13732
      this();
13733
      this.success = success;
13734
      setSuccessIsSet(true);
13735
      this.ex = ex;
13736
    }
13737
 
13738
    /**
13739
     * Performs a deep copy on <i>other</i>.
13740
     */
13741
    public addJacketNumber_result(addJacketNumber_result other) {
13742
      __isset_bit_vector.clear();
13743
      __isset_bit_vector.or(other.__isset_bit_vector);
13744
      this.success = other.success;
13745
      if (other.isSetEx()) {
13746
        this.ex = new TransactionServiceException(other.ex);
13747
      }
13748
    }
13749
 
13750
    public addJacketNumber_result deepCopy() {
13751
      return new addJacketNumber_result(this);
13752
    }
13753
 
13754
    @Deprecated
13755
    public addJacketNumber_result clone() {
13756
      return new addJacketNumber_result(this);
13757
    }
13758
 
13759
    public boolean isSuccess() {
13760
      return this.success;
13761
    }
13762
 
13763
    public addJacketNumber_result setSuccess(boolean success) {
13764
      this.success = success;
13765
      setSuccessIsSet(true);
13766
      return this;
13767
    }
13768
 
13769
    public void unsetSuccess() {
13770
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13771
    }
13772
 
13773
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13774
    public boolean isSetSuccess() {
13775
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13776
    }
13777
 
13778
    public void setSuccessIsSet(boolean value) {
13779
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13780
    }
13781
 
13782
    public TransactionServiceException getEx() {
13783
      return this.ex;
13784
    }
13785
 
13786
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13787
      this.ex = ex;
13788
      return this;
13789
    }
13790
 
13791
    public void unsetEx() {
13792
      this.ex = null;
13793
    }
13794
 
13795
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13796
    public boolean isSetEx() {
13797
      return this.ex != null;
13798
    }
13799
 
13800
    public void setExIsSet(boolean value) {
13801
      if (!value) {
13802
        this.ex = null;
13803
      }
13804
    }
13805
 
13806
    public void setFieldValue(_Fields field, Object value) {
13807
      switch (field) {
13808
      case SUCCESS:
13809
        if (value == null) {
13810
          unsetSuccess();
13811
        } else {
13812
          setSuccess((Boolean)value);
13813
        }
13814
        break;
13815
 
13816
      case EX:
13817
        if (value == null) {
13818
          unsetEx();
13819
        } else {
13820
          setEx((TransactionServiceException)value);
13821
        }
13822
        break;
13823
 
13824
      }
13825
    }
13826
 
13827
    public void setFieldValue(int fieldID, Object value) {
13828
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13829
    }
13830
 
13831
    public Object getFieldValue(_Fields field) {
13832
      switch (field) {
13833
      case SUCCESS:
13834
        return new Boolean(isSuccess());
13835
 
13836
      case EX:
13837
        return getEx();
13838
 
13839
      }
13840
      throw new IllegalStateException();
13841
    }
13842
 
13843
    public Object getFieldValue(int fieldId) {
13844
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13845
    }
13846
 
13847
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13848
    public boolean isSet(_Fields field) {
13849
      switch (field) {
13850
      case SUCCESS:
13851
        return isSetSuccess();
13852
      case EX:
13853
        return isSetEx();
13854
      }
13855
      throw new IllegalStateException();
13856
    }
13857
 
13858
    public boolean isSet(int fieldID) {
13859
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13860
    }
13861
 
13862
    @Override
13863
    public boolean equals(Object that) {
13864
      if (that == null)
13865
        return false;
13866
      if (that instanceof addJacketNumber_result)
13867
        return this.equals((addJacketNumber_result)that);
13868
      return false;
13869
    }
13870
 
13871
    public boolean equals(addJacketNumber_result that) {
13872
      if (that == null)
13873
        return false;
13874
 
13875
      boolean this_present_success = true;
13876
      boolean that_present_success = true;
13877
      if (this_present_success || that_present_success) {
13878
        if (!(this_present_success && that_present_success))
13879
          return false;
13880
        if (this.success != that.success)
13881
          return false;
13882
      }
13883
 
13884
      boolean this_present_ex = true && this.isSetEx();
13885
      boolean that_present_ex = true && that.isSetEx();
13886
      if (this_present_ex || that_present_ex) {
13887
        if (!(this_present_ex && that_present_ex))
13888
          return false;
13889
        if (!this.ex.equals(that.ex))
13890
          return false;
13891
      }
13892
 
13893
      return true;
13894
    }
13895
 
13896
    @Override
13897
    public int hashCode() {
13898
      return 0;
13899
    }
13900
 
13901
    public int compareTo(addJacketNumber_result other) {
13902
      if (!getClass().equals(other.getClass())) {
13903
        return getClass().getName().compareTo(other.getClass().getName());
13904
      }
13905
 
13906
      int lastComparison = 0;
13907
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
13908
 
13909
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13910
      if (lastComparison != 0) {
13911
        return lastComparison;
13912
      }
13913
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13914
      if (lastComparison != 0) {
13915
        return lastComparison;
13916
      }
13917
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13918
      if (lastComparison != 0) {
13919
        return lastComparison;
13920
      }
13921
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13922
      if (lastComparison != 0) {
13923
        return lastComparison;
13924
      }
13925
      return 0;
13926
    }
13927
 
13928
    public void read(TProtocol iprot) throws TException {
13929
      TField field;
13930
      iprot.readStructBegin();
13931
      while (true)
13932
      {
13933
        field = iprot.readFieldBegin();
13934
        if (field.type == TType.STOP) { 
13935
          break;
13936
        }
13937
        _Fields fieldId = _Fields.findByThriftId(field.id);
13938
        if (fieldId == null) {
13939
          TProtocolUtil.skip(iprot, field.type);
13940
        } else {
13941
          switch (fieldId) {
13942
            case SUCCESS:
13943
              if (field.type == TType.BOOL) {
13944
                this.success = iprot.readBool();
13945
                setSuccessIsSet(true);
13946
              } else { 
13947
                TProtocolUtil.skip(iprot, field.type);
13948
              }
13949
              break;
13950
            case EX:
13951
              if (field.type == TType.STRUCT) {
13952
                this.ex = new TransactionServiceException();
13953
                this.ex.read(iprot);
13954
              } else { 
13955
                TProtocolUtil.skip(iprot, field.type);
13956
              }
13957
              break;
13958
          }
13959
          iprot.readFieldEnd();
13960
        }
13961
      }
13962
      iprot.readStructEnd();
13963
      validate();
13964
    }
13965
 
13966
    public void write(TProtocol oprot) throws TException {
13967
      oprot.writeStructBegin(STRUCT_DESC);
13968
 
13969
      if (this.isSetSuccess()) {
13970
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13971
        oprot.writeBool(this.success);
13972
        oprot.writeFieldEnd();
13973
      } else if (this.isSetEx()) {
13974
        oprot.writeFieldBegin(EX_FIELD_DESC);
13975
        this.ex.write(oprot);
13976
        oprot.writeFieldEnd();
13977
      }
13978
      oprot.writeFieldStop();
13979
      oprot.writeStructEnd();
13980
    }
13981
 
13982
    @Override
13983
    public String toString() {
13984
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
13985
      boolean first = true;
13986
 
13987
      sb.append("success:");
13988
      sb.append(this.success);
13989
      first = false;
13990
      if (!first) sb.append(", ");
13991
      sb.append("ex:");
13992
      if (this.ex == null) {
13993
        sb.append("null");
13994
      } else {
13995
        sb.append(this.ex);
13996
      }
13997
      first = false;
13998
      sb.append(")");
13999
      return sb.toString();
14000
    }
14001
 
14002
    public void validate() throws TException {
14003
      // check for required fields
14004
    }
14005
 
14006
  }
14007
 
923 rajveer 14008
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
14009
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
14010
 
14011
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14012
 
14013
    private long orderId;
14014
 
14015
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14016
    public enum _Fields implements TFieldIdEnum {
14017
      ORDER_ID((short)1, "orderId");
14018
 
14019
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14020
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14021
 
14022
      static {
14023
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14024
          byId.put((int)field._thriftId, field);
14025
          byName.put(field.getFieldName(), field);
14026
        }
14027
      }
14028
 
14029
      /**
14030
       * Find the _Fields constant that matches fieldId, or null if its not found.
14031
       */
14032
      public static _Fields findByThriftId(int fieldId) {
14033
        return byId.get(fieldId);
14034
      }
14035
 
14036
      /**
14037
       * Find the _Fields constant that matches fieldId, throwing an exception
14038
       * if it is not found.
14039
       */
14040
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14041
        _Fields fields = findByThriftId(fieldId);
14042
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14043
        return fields;
14044
      }
14045
 
14046
      /**
14047
       * Find the _Fields constant that matches name, or null if its not found.
14048
       */
14049
      public static _Fields findByName(String name) {
14050
        return byName.get(name);
14051
      }
14052
 
14053
      private final short _thriftId;
14054
      private final String _fieldName;
14055
 
14056
      _Fields(short thriftId, String fieldName) {
14057
        _thriftId = thriftId;
14058
        _fieldName = fieldName;
14059
      }
14060
 
14061
      public short getThriftFieldId() {
14062
        return _thriftId;
14063
      }
14064
 
14065
      public String getFieldName() {
14066
        return _fieldName;
14067
      }
14068
    }
14069
 
14070
    // isset id assignments
14071
    private static final int __ORDERID_ISSET_ID = 0;
14072
    private BitSet __isset_bit_vector = new BitSet(1);
14073
 
14074
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14075
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14076
          new FieldValueMetaData(TType.I64)));
14077
    }});
14078
 
14079
    static {
14080
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
14081
    }
14082
 
14083
    public acceptOrder_args() {
14084
    }
14085
 
14086
    public acceptOrder_args(
14087
      long orderId)
14088
    {
14089
      this();
14090
      this.orderId = orderId;
14091
      setOrderIdIsSet(true);
14092
    }
14093
 
14094
    /**
14095
     * Performs a deep copy on <i>other</i>.
14096
     */
14097
    public acceptOrder_args(acceptOrder_args other) {
14098
      __isset_bit_vector.clear();
14099
      __isset_bit_vector.or(other.__isset_bit_vector);
14100
      this.orderId = other.orderId;
14101
    }
14102
 
14103
    public acceptOrder_args deepCopy() {
14104
      return new acceptOrder_args(this);
14105
    }
14106
 
14107
    @Deprecated
14108
    public acceptOrder_args clone() {
14109
      return new acceptOrder_args(this);
14110
    }
14111
 
14112
    public long getOrderId() {
14113
      return this.orderId;
14114
    }
14115
 
14116
    public acceptOrder_args setOrderId(long orderId) {
14117
      this.orderId = orderId;
14118
      setOrderIdIsSet(true);
14119
      return this;
14120
    }
14121
 
14122
    public void unsetOrderId() {
14123
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14124
    }
14125
 
14126
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14127
    public boolean isSetOrderId() {
14128
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14129
    }
14130
 
14131
    public void setOrderIdIsSet(boolean value) {
14132
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14133
    }
14134
 
14135
    public void setFieldValue(_Fields field, Object value) {
14136
      switch (field) {
14137
      case ORDER_ID:
14138
        if (value == null) {
14139
          unsetOrderId();
14140
        } else {
14141
          setOrderId((Long)value);
14142
        }
14143
        break;
14144
 
14145
      }
14146
    }
14147
 
14148
    public void setFieldValue(int fieldID, Object value) {
14149
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14150
    }
14151
 
14152
    public Object getFieldValue(_Fields field) {
14153
      switch (field) {
14154
      case ORDER_ID:
14155
        return new Long(getOrderId());
14156
 
14157
      }
14158
      throw new IllegalStateException();
14159
    }
14160
 
14161
    public Object getFieldValue(int fieldId) {
14162
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14163
    }
14164
 
14165
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14166
    public boolean isSet(_Fields field) {
14167
      switch (field) {
14168
      case ORDER_ID:
14169
        return isSetOrderId();
14170
      }
14171
      throw new IllegalStateException();
14172
    }
14173
 
14174
    public boolean isSet(int fieldID) {
14175
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14176
    }
14177
 
14178
    @Override
14179
    public boolean equals(Object that) {
14180
      if (that == null)
14181
        return false;
14182
      if (that instanceof acceptOrder_args)
14183
        return this.equals((acceptOrder_args)that);
14184
      return false;
14185
    }
14186
 
14187
    public boolean equals(acceptOrder_args that) {
14188
      if (that == null)
14189
        return false;
14190
 
14191
      boolean this_present_orderId = true;
14192
      boolean that_present_orderId = true;
14193
      if (this_present_orderId || that_present_orderId) {
14194
        if (!(this_present_orderId && that_present_orderId))
14195
          return false;
14196
        if (this.orderId != that.orderId)
14197
          return false;
14198
      }
14199
 
14200
      return true;
14201
    }
14202
 
14203
    @Override
14204
    public int hashCode() {
14205
      return 0;
14206
    }
14207
 
14208
    public int compareTo(acceptOrder_args other) {
14209
      if (!getClass().equals(other.getClass())) {
14210
        return getClass().getName().compareTo(other.getClass().getName());
14211
      }
14212
 
14213
      int lastComparison = 0;
14214
      acceptOrder_args typedOther = (acceptOrder_args)other;
14215
 
14216
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14217
      if (lastComparison != 0) {
14218
        return lastComparison;
14219
      }
14220
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14221
      if (lastComparison != 0) {
14222
        return lastComparison;
14223
      }
14224
      return 0;
14225
    }
14226
 
14227
    public void read(TProtocol iprot) throws TException {
14228
      TField field;
14229
      iprot.readStructBegin();
14230
      while (true)
14231
      {
14232
        field = iprot.readFieldBegin();
14233
        if (field.type == TType.STOP) { 
14234
          break;
14235
        }
14236
        _Fields fieldId = _Fields.findByThriftId(field.id);
14237
        if (fieldId == null) {
14238
          TProtocolUtil.skip(iprot, field.type);
14239
        } else {
14240
          switch (fieldId) {
14241
            case ORDER_ID:
14242
              if (field.type == TType.I64) {
14243
                this.orderId = iprot.readI64();
14244
                setOrderIdIsSet(true);
14245
              } else { 
14246
                TProtocolUtil.skip(iprot, field.type);
14247
              }
14248
              break;
14249
          }
14250
          iprot.readFieldEnd();
14251
        }
14252
      }
14253
      iprot.readStructEnd();
14254
      validate();
14255
    }
14256
 
14257
    public void write(TProtocol oprot) throws TException {
14258
      validate();
14259
 
14260
      oprot.writeStructBegin(STRUCT_DESC);
14261
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14262
      oprot.writeI64(this.orderId);
14263
      oprot.writeFieldEnd();
14264
      oprot.writeFieldStop();
14265
      oprot.writeStructEnd();
14266
    }
14267
 
14268
    @Override
14269
    public String toString() {
14270
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
14271
      boolean first = true;
14272
 
14273
      sb.append("orderId:");
14274
      sb.append(this.orderId);
14275
      first = false;
14276
      sb.append(")");
14277
      return sb.toString();
14278
    }
14279
 
14280
    public void validate() throws TException {
14281
      // check for required fields
14282
    }
14283
 
14284
  }
14285
 
14286
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
14287
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
14288
 
14289
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14290
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14291
 
14292
    private boolean success;
14293
    private TransactionServiceException ex;
14294
 
14295
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14296
    public enum _Fields implements TFieldIdEnum {
14297
      SUCCESS((short)0, "success"),
14298
      EX((short)1, "ex");
14299
 
14300
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14301
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14302
 
14303
      static {
14304
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14305
          byId.put((int)field._thriftId, field);
14306
          byName.put(field.getFieldName(), field);
14307
        }
14308
      }
14309
 
14310
      /**
14311
       * Find the _Fields constant that matches fieldId, or null if its not found.
14312
       */
14313
      public static _Fields findByThriftId(int fieldId) {
14314
        return byId.get(fieldId);
14315
      }
14316
 
14317
      /**
14318
       * Find the _Fields constant that matches fieldId, throwing an exception
14319
       * if it is not found.
14320
       */
14321
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14322
        _Fields fields = findByThriftId(fieldId);
14323
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14324
        return fields;
14325
      }
14326
 
14327
      /**
14328
       * Find the _Fields constant that matches name, or null if its not found.
14329
       */
14330
      public static _Fields findByName(String name) {
14331
        return byName.get(name);
14332
      }
14333
 
14334
      private final short _thriftId;
14335
      private final String _fieldName;
14336
 
14337
      _Fields(short thriftId, String fieldName) {
14338
        _thriftId = thriftId;
14339
        _fieldName = fieldName;
14340
      }
14341
 
14342
      public short getThriftFieldId() {
14343
        return _thriftId;
14344
      }
14345
 
14346
      public String getFieldName() {
14347
        return _fieldName;
14348
      }
14349
    }
14350
 
14351
    // isset id assignments
14352
    private static final int __SUCCESS_ISSET_ID = 0;
14353
    private BitSet __isset_bit_vector = new BitSet(1);
14354
 
14355
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14356
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14357
          new FieldValueMetaData(TType.BOOL)));
14358
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14359
          new FieldValueMetaData(TType.STRUCT)));
14360
    }});
14361
 
14362
    static {
14363
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
14364
    }
14365
 
14366
    public acceptOrder_result() {
14367
    }
14368
 
14369
    public acceptOrder_result(
14370
      boolean success,
14371
      TransactionServiceException ex)
14372
    {
14373
      this();
14374
      this.success = success;
14375
      setSuccessIsSet(true);
14376
      this.ex = ex;
14377
    }
14378
 
14379
    /**
14380
     * Performs a deep copy on <i>other</i>.
14381
     */
14382
    public acceptOrder_result(acceptOrder_result other) {
14383
      __isset_bit_vector.clear();
14384
      __isset_bit_vector.or(other.__isset_bit_vector);
14385
      this.success = other.success;
14386
      if (other.isSetEx()) {
14387
        this.ex = new TransactionServiceException(other.ex);
14388
      }
14389
    }
14390
 
14391
    public acceptOrder_result deepCopy() {
14392
      return new acceptOrder_result(this);
14393
    }
14394
 
14395
    @Deprecated
14396
    public acceptOrder_result clone() {
14397
      return new acceptOrder_result(this);
14398
    }
14399
 
14400
    public boolean isSuccess() {
14401
      return this.success;
14402
    }
14403
 
14404
    public acceptOrder_result setSuccess(boolean success) {
14405
      this.success = success;
14406
      setSuccessIsSet(true);
14407
      return this;
14408
    }
14409
 
14410
    public void unsetSuccess() {
14411
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14412
    }
14413
 
14414
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14415
    public boolean isSetSuccess() {
14416
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14417
    }
14418
 
14419
    public void setSuccessIsSet(boolean value) {
14420
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14421
    }
14422
 
14423
    public TransactionServiceException getEx() {
14424
      return this.ex;
14425
    }
14426
 
14427
    public acceptOrder_result setEx(TransactionServiceException ex) {
14428
      this.ex = ex;
14429
      return this;
14430
    }
14431
 
14432
    public void unsetEx() {
14433
      this.ex = null;
14434
    }
14435
 
14436
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14437
    public boolean isSetEx() {
14438
      return this.ex != null;
14439
    }
14440
 
14441
    public void setExIsSet(boolean value) {
14442
      if (!value) {
14443
        this.ex = null;
14444
      }
14445
    }
14446
 
14447
    public void setFieldValue(_Fields field, Object value) {
14448
      switch (field) {
14449
      case SUCCESS:
14450
        if (value == null) {
14451
          unsetSuccess();
14452
        } else {
14453
          setSuccess((Boolean)value);
14454
        }
14455
        break;
14456
 
14457
      case EX:
14458
        if (value == null) {
14459
          unsetEx();
14460
        } else {
14461
          setEx((TransactionServiceException)value);
14462
        }
14463
        break;
14464
 
14465
      }
14466
    }
14467
 
14468
    public void setFieldValue(int fieldID, Object value) {
14469
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14470
    }
14471
 
14472
    public Object getFieldValue(_Fields field) {
14473
      switch (field) {
14474
      case SUCCESS:
14475
        return new Boolean(isSuccess());
14476
 
14477
      case EX:
14478
        return getEx();
14479
 
14480
      }
14481
      throw new IllegalStateException();
14482
    }
14483
 
14484
    public Object getFieldValue(int fieldId) {
14485
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14486
    }
14487
 
14488
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14489
    public boolean isSet(_Fields field) {
14490
      switch (field) {
14491
      case SUCCESS:
14492
        return isSetSuccess();
14493
      case EX:
14494
        return isSetEx();
14495
      }
14496
      throw new IllegalStateException();
14497
    }
14498
 
14499
    public boolean isSet(int fieldID) {
14500
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14501
    }
14502
 
14503
    @Override
14504
    public boolean equals(Object that) {
14505
      if (that == null)
14506
        return false;
14507
      if (that instanceof acceptOrder_result)
14508
        return this.equals((acceptOrder_result)that);
14509
      return false;
14510
    }
14511
 
14512
    public boolean equals(acceptOrder_result that) {
14513
      if (that == null)
14514
        return false;
14515
 
14516
      boolean this_present_success = true;
14517
      boolean that_present_success = true;
14518
      if (this_present_success || that_present_success) {
14519
        if (!(this_present_success && that_present_success))
14520
          return false;
14521
        if (this.success != that.success)
14522
          return false;
14523
      }
14524
 
14525
      boolean this_present_ex = true && this.isSetEx();
14526
      boolean that_present_ex = true && that.isSetEx();
14527
      if (this_present_ex || that_present_ex) {
14528
        if (!(this_present_ex && that_present_ex))
14529
          return false;
14530
        if (!this.ex.equals(that.ex))
14531
          return false;
14532
      }
14533
 
14534
      return true;
14535
    }
14536
 
14537
    @Override
14538
    public int hashCode() {
14539
      return 0;
14540
    }
14541
 
14542
    public int compareTo(acceptOrder_result other) {
14543
      if (!getClass().equals(other.getClass())) {
14544
        return getClass().getName().compareTo(other.getClass().getName());
14545
      }
14546
 
14547
      int lastComparison = 0;
14548
      acceptOrder_result typedOther = (acceptOrder_result)other;
14549
 
14550
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14551
      if (lastComparison != 0) {
14552
        return lastComparison;
14553
      }
14554
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14555
      if (lastComparison != 0) {
14556
        return lastComparison;
14557
      }
14558
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14559
      if (lastComparison != 0) {
14560
        return lastComparison;
14561
      }
14562
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14563
      if (lastComparison != 0) {
14564
        return lastComparison;
14565
      }
14566
      return 0;
14567
    }
14568
 
14569
    public void read(TProtocol iprot) throws TException {
14570
      TField field;
14571
      iprot.readStructBegin();
14572
      while (true)
14573
      {
14574
        field = iprot.readFieldBegin();
14575
        if (field.type == TType.STOP) { 
14576
          break;
14577
        }
14578
        _Fields fieldId = _Fields.findByThriftId(field.id);
14579
        if (fieldId == null) {
14580
          TProtocolUtil.skip(iprot, field.type);
14581
        } else {
14582
          switch (fieldId) {
14583
            case SUCCESS:
14584
              if (field.type == TType.BOOL) {
14585
                this.success = iprot.readBool();
14586
                setSuccessIsSet(true);
14587
              } else { 
14588
                TProtocolUtil.skip(iprot, field.type);
14589
              }
14590
              break;
14591
            case EX:
14592
              if (field.type == TType.STRUCT) {
14593
                this.ex = new TransactionServiceException();
14594
                this.ex.read(iprot);
14595
              } else { 
14596
                TProtocolUtil.skip(iprot, field.type);
14597
              }
14598
              break;
14599
          }
14600
          iprot.readFieldEnd();
14601
        }
14602
      }
14603
      iprot.readStructEnd();
14604
      validate();
14605
    }
14606
 
14607
    public void write(TProtocol oprot) throws TException {
14608
      oprot.writeStructBegin(STRUCT_DESC);
14609
 
14610
      if (this.isSetSuccess()) {
14611
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14612
        oprot.writeBool(this.success);
14613
        oprot.writeFieldEnd();
14614
      } else if (this.isSetEx()) {
14615
        oprot.writeFieldBegin(EX_FIELD_DESC);
14616
        this.ex.write(oprot);
14617
        oprot.writeFieldEnd();
14618
      }
14619
      oprot.writeFieldStop();
14620
      oprot.writeStructEnd();
14621
    }
14622
 
14623
    @Override
14624
    public String toString() {
14625
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14626
      boolean first = true;
14627
 
14628
      sb.append("success:");
14629
      sb.append(this.success);
14630
      first = false;
14631
      if (!first) sb.append(", ");
14632
      sb.append("ex:");
14633
      if (this.ex == null) {
14634
        sb.append("null");
14635
      } else {
14636
        sb.append(this.ex);
14637
      }
14638
      first = false;
14639
      sb.append(")");
14640
      return sb.toString();
14641
    }
14642
 
14643
    public void validate() throws TException {
14644
      // check for required fields
14645
    }
14646
 
14647
  }
14648
 
14649
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14650
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14651
 
14652
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14653
 
14654
    private long orderId;
14655
 
14656
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14657
    public enum _Fields implements TFieldIdEnum {
14658
      ORDER_ID((short)1, "orderId");
14659
 
14660
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14661
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14662
 
14663
      static {
14664
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14665
          byId.put((int)field._thriftId, field);
14666
          byName.put(field.getFieldName(), field);
14667
        }
14668
      }
14669
 
14670
      /**
14671
       * Find the _Fields constant that matches fieldId, or null if its not found.
14672
       */
14673
      public static _Fields findByThriftId(int fieldId) {
14674
        return byId.get(fieldId);
14675
      }
14676
 
14677
      /**
14678
       * Find the _Fields constant that matches fieldId, throwing an exception
14679
       * if it is not found.
14680
       */
14681
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14682
        _Fields fields = findByThriftId(fieldId);
14683
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14684
        return fields;
14685
      }
14686
 
14687
      /**
14688
       * Find the _Fields constant that matches name, or null if its not found.
14689
       */
14690
      public static _Fields findByName(String name) {
14691
        return byName.get(name);
14692
      }
14693
 
14694
      private final short _thriftId;
14695
      private final String _fieldName;
14696
 
14697
      _Fields(short thriftId, String fieldName) {
14698
        _thriftId = thriftId;
14699
        _fieldName = fieldName;
14700
      }
14701
 
14702
      public short getThriftFieldId() {
14703
        return _thriftId;
14704
      }
14705
 
14706
      public String getFieldName() {
14707
        return _fieldName;
14708
      }
14709
    }
14710
 
14711
    // isset id assignments
14712
    private static final int __ORDERID_ISSET_ID = 0;
14713
    private BitSet __isset_bit_vector = new BitSet(1);
14714
 
14715
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14716
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14717
          new FieldValueMetaData(TType.I64)));
14718
    }});
14719
 
14720
    static {
14721
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14722
    }
14723
 
14724
    public billOrder_args() {
14725
    }
14726
 
14727
    public billOrder_args(
14728
      long orderId)
14729
    {
14730
      this();
14731
      this.orderId = orderId;
14732
      setOrderIdIsSet(true);
14733
    }
14734
 
14735
    /**
14736
     * Performs a deep copy on <i>other</i>.
14737
     */
14738
    public billOrder_args(billOrder_args other) {
14739
      __isset_bit_vector.clear();
14740
      __isset_bit_vector.or(other.__isset_bit_vector);
14741
      this.orderId = other.orderId;
14742
    }
14743
 
14744
    public billOrder_args deepCopy() {
14745
      return new billOrder_args(this);
14746
    }
14747
 
14748
    @Deprecated
14749
    public billOrder_args clone() {
14750
      return new billOrder_args(this);
14751
    }
14752
 
14753
    public long getOrderId() {
14754
      return this.orderId;
14755
    }
14756
 
14757
    public billOrder_args setOrderId(long orderId) {
14758
      this.orderId = orderId;
14759
      setOrderIdIsSet(true);
14760
      return this;
14761
    }
14762
 
14763
    public void unsetOrderId() {
14764
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14765
    }
14766
 
14767
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14768
    public boolean isSetOrderId() {
14769
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14770
    }
14771
 
14772
    public void setOrderIdIsSet(boolean value) {
14773
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14774
    }
14775
 
14776
    public void setFieldValue(_Fields field, Object value) {
14777
      switch (field) {
14778
      case ORDER_ID:
14779
        if (value == null) {
14780
          unsetOrderId();
14781
        } else {
14782
          setOrderId((Long)value);
14783
        }
14784
        break;
14785
 
14786
      }
14787
    }
14788
 
14789
    public void setFieldValue(int fieldID, Object value) {
14790
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14791
    }
14792
 
14793
    public Object getFieldValue(_Fields field) {
14794
      switch (field) {
14795
      case ORDER_ID:
14796
        return new Long(getOrderId());
14797
 
14798
      }
14799
      throw new IllegalStateException();
14800
    }
14801
 
14802
    public Object getFieldValue(int fieldId) {
14803
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14804
    }
14805
 
14806
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14807
    public boolean isSet(_Fields field) {
14808
      switch (field) {
14809
      case ORDER_ID:
14810
        return isSetOrderId();
14811
      }
14812
      throw new IllegalStateException();
14813
    }
14814
 
14815
    public boolean isSet(int fieldID) {
14816
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14817
    }
14818
 
14819
    @Override
14820
    public boolean equals(Object that) {
14821
      if (that == null)
14822
        return false;
14823
      if (that instanceof billOrder_args)
14824
        return this.equals((billOrder_args)that);
14825
      return false;
14826
    }
14827
 
14828
    public boolean equals(billOrder_args that) {
14829
      if (that == null)
14830
        return false;
14831
 
14832
      boolean this_present_orderId = true;
14833
      boolean that_present_orderId = true;
14834
      if (this_present_orderId || that_present_orderId) {
14835
        if (!(this_present_orderId && that_present_orderId))
14836
          return false;
14837
        if (this.orderId != that.orderId)
14838
          return false;
14839
      }
14840
 
14841
      return true;
14842
    }
14843
 
14844
    @Override
14845
    public int hashCode() {
14846
      return 0;
14847
    }
14848
 
14849
    public int compareTo(billOrder_args other) {
14850
      if (!getClass().equals(other.getClass())) {
14851
        return getClass().getName().compareTo(other.getClass().getName());
14852
      }
14853
 
14854
      int lastComparison = 0;
14855
      billOrder_args typedOther = (billOrder_args)other;
14856
 
14857
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14858
      if (lastComparison != 0) {
14859
        return lastComparison;
14860
      }
14861
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14862
      if (lastComparison != 0) {
14863
        return lastComparison;
14864
      }
14865
      return 0;
14866
    }
14867
 
14868
    public void read(TProtocol iprot) throws TException {
14869
      TField field;
14870
      iprot.readStructBegin();
14871
      while (true)
14872
      {
14873
        field = iprot.readFieldBegin();
14874
        if (field.type == TType.STOP) { 
14875
          break;
14876
        }
14877
        _Fields fieldId = _Fields.findByThriftId(field.id);
14878
        if (fieldId == null) {
14879
          TProtocolUtil.skip(iprot, field.type);
14880
        } else {
14881
          switch (fieldId) {
14882
            case ORDER_ID:
14883
              if (field.type == TType.I64) {
14884
                this.orderId = iprot.readI64();
14885
                setOrderIdIsSet(true);
14886
              } else { 
14887
                TProtocolUtil.skip(iprot, field.type);
14888
              }
14889
              break;
14890
          }
14891
          iprot.readFieldEnd();
14892
        }
14893
      }
14894
      iprot.readStructEnd();
14895
      validate();
14896
    }
14897
 
14898
    public void write(TProtocol oprot) throws TException {
14899
      validate();
14900
 
14901
      oprot.writeStructBegin(STRUCT_DESC);
14902
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14903
      oprot.writeI64(this.orderId);
14904
      oprot.writeFieldEnd();
14905
      oprot.writeFieldStop();
14906
      oprot.writeStructEnd();
14907
    }
14908
 
14909
    @Override
14910
    public String toString() {
14911
      StringBuilder sb = new StringBuilder("billOrder_args(");
14912
      boolean first = true;
14913
 
14914
      sb.append("orderId:");
14915
      sb.append(this.orderId);
14916
      first = false;
14917
      sb.append(")");
14918
      return sb.toString();
14919
    }
14920
 
14921
    public void validate() throws TException {
14922
      // check for required fields
14923
    }
14924
 
14925
  }
14926
 
14927
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
14928
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
14929
 
14930
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14931
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14932
 
14933
    private boolean success;
14934
    private TransactionServiceException ex;
14935
 
14936
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14937
    public enum _Fields implements TFieldIdEnum {
14938
      SUCCESS((short)0, "success"),
14939
      EX((short)1, "ex");
14940
 
14941
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14942
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14943
 
14944
      static {
14945
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14946
          byId.put((int)field._thriftId, field);
14947
          byName.put(field.getFieldName(), field);
14948
        }
14949
      }
14950
 
14951
      /**
14952
       * Find the _Fields constant that matches fieldId, or null if its not found.
14953
       */
14954
      public static _Fields findByThriftId(int fieldId) {
14955
        return byId.get(fieldId);
14956
      }
14957
 
14958
      /**
14959
       * Find the _Fields constant that matches fieldId, throwing an exception
14960
       * if it is not found.
14961
       */
14962
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14963
        _Fields fields = findByThriftId(fieldId);
14964
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14965
        return fields;
14966
      }
14967
 
14968
      /**
14969
       * Find the _Fields constant that matches name, or null if its not found.
14970
       */
14971
      public static _Fields findByName(String name) {
14972
        return byName.get(name);
14973
      }
14974
 
14975
      private final short _thriftId;
14976
      private final String _fieldName;
14977
 
14978
      _Fields(short thriftId, String fieldName) {
14979
        _thriftId = thriftId;
14980
        _fieldName = fieldName;
14981
      }
14982
 
14983
      public short getThriftFieldId() {
14984
        return _thriftId;
14985
      }
14986
 
14987
      public String getFieldName() {
14988
        return _fieldName;
14989
      }
14990
    }
14991
 
14992
    // isset id assignments
14993
    private static final int __SUCCESS_ISSET_ID = 0;
14994
    private BitSet __isset_bit_vector = new BitSet(1);
14995
 
14996
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14997
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14998
          new FieldValueMetaData(TType.BOOL)));
14999
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15000
          new FieldValueMetaData(TType.STRUCT)));
15001
    }});
15002
 
15003
    static {
15004
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
15005
    }
15006
 
15007
    public billOrder_result() {
15008
    }
15009
 
15010
    public billOrder_result(
15011
      boolean success,
15012
      TransactionServiceException ex)
15013
    {
15014
      this();
15015
      this.success = success;
15016
      setSuccessIsSet(true);
15017
      this.ex = ex;
15018
    }
15019
 
15020
    /**
15021
     * Performs a deep copy on <i>other</i>.
15022
     */
15023
    public billOrder_result(billOrder_result other) {
15024
      __isset_bit_vector.clear();
15025
      __isset_bit_vector.or(other.__isset_bit_vector);
15026
      this.success = other.success;
15027
      if (other.isSetEx()) {
15028
        this.ex = new TransactionServiceException(other.ex);
15029
      }
15030
    }
15031
 
15032
    public billOrder_result deepCopy() {
15033
      return new billOrder_result(this);
15034
    }
15035
 
15036
    @Deprecated
15037
    public billOrder_result clone() {
15038
      return new billOrder_result(this);
15039
    }
15040
 
15041
    public boolean isSuccess() {
15042
      return this.success;
15043
    }
15044
 
15045
    public billOrder_result setSuccess(boolean success) {
15046
      this.success = success;
15047
      setSuccessIsSet(true);
15048
      return this;
15049
    }
15050
 
15051
    public void unsetSuccess() {
15052
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
15053
    }
15054
 
15055
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15056
    public boolean isSetSuccess() {
15057
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
15058
    }
15059
 
15060
    public void setSuccessIsSet(boolean value) {
15061
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
15062
    }
15063
 
15064
    public TransactionServiceException getEx() {
15065
      return this.ex;
15066
    }
15067
 
15068
    public billOrder_result setEx(TransactionServiceException ex) {
15069
      this.ex = ex;
15070
      return this;
15071
    }
15072
 
15073
    public void unsetEx() {
15074
      this.ex = null;
15075
    }
15076
 
15077
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15078
    public boolean isSetEx() {
15079
      return this.ex != null;
15080
    }
15081
 
15082
    public void setExIsSet(boolean value) {
15083
      if (!value) {
15084
        this.ex = null;
15085
      }
15086
    }
15087
 
15088
    public void setFieldValue(_Fields field, Object value) {
15089
      switch (field) {
15090
      case SUCCESS:
15091
        if (value == null) {
15092
          unsetSuccess();
15093
        } else {
15094
          setSuccess((Boolean)value);
15095
        }
15096
        break;
15097
 
15098
      case EX:
15099
        if (value == null) {
15100
          unsetEx();
15101
        } else {
15102
          setEx((TransactionServiceException)value);
15103
        }
15104
        break;
15105
 
15106
      }
15107
    }
15108
 
15109
    public void setFieldValue(int fieldID, Object value) {
15110
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15111
    }
15112
 
15113
    public Object getFieldValue(_Fields field) {
15114
      switch (field) {
15115
      case SUCCESS:
15116
        return new Boolean(isSuccess());
15117
 
15118
      case EX:
15119
        return getEx();
15120
 
15121
      }
15122
      throw new IllegalStateException();
15123
    }
15124
 
15125
    public Object getFieldValue(int fieldId) {
15126
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15127
    }
15128
 
15129
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15130
    public boolean isSet(_Fields field) {
15131
      switch (field) {
15132
      case SUCCESS:
15133
        return isSetSuccess();
15134
      case EX:
15135
        return isSetEx();
15136
      }
15137
      throw new IllegalStateException();
15138
    }
15139
 
15140
    public boolean isSet(int fieldID) {
15141
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15142
    }
15143
 
15144
    @Override
15145
    public boolean equals(Object that) {
15146
      if (that == null)
15147
        return false;
15148
      if (that instanceof billOrder_result)
15149
        return this.equals((billOrder_result)that);
15150
      return false;
15151
    }
15152
 
15153
    public boolean equals(billOrder_result that) {
15154
      if (that == null)
15155
        return false;
15156
 
15157
      boolean this_present_success = true;
15158
      boolean that_present_success = true;
15159
      if (this_present_success || that_present_success) {
15160
        if (!(this_present_success && that_present_success))
15161
          return false;
15162
        if (this.success != that.success)
15163
          return false;
15164
      }
15165
 
15166
      boolean this_present_ex = true && this.isSetEx();
15167
      boolean that_present_ex = true && that.isSetEx();
15168
      if (this_present_ex || that_present_ex) {
15169
        if (!(this_present_ex && that_present_ex))
15170
          return false;
15171
        if (!this.ex.equals(that.ex))
15172
          return false;
15173
      }
15174
 
15175
      return true;
15176
    }
15177
 
15178
    @Override
15179
    public int hashCode() {
15180
      return 0;
15181
    }
15182
 
15183
    public int compareTo(billOrder_result other) {
15184
      if (!getClass().equals(other.getClass())) {
15185
        return getClass().getName().compareTo(other.getClass().getName());
15186
      }
15187
 
15188
      int lastComparison = 0;
15189
      billOrder_result typedOther = (billOrder_result)other;
15190
 
15191
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15192
      if (lastComparison != 0) {
15193
        return lastComparison;
15194
      }
15195
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15196
      if (lastComparison != 0) {
15197
        return lastComparison;
15198
      }
15199
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15200
      if (lastComparison != 0) {
15201
        return lastComparison;
15202
      }
15203
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15204
      if (lastComparison != 0) {
15205
        return lastComparison;
15206
      }
15207
      return 0;
15208
    }
15209
 
15210
    public void read(TProtocol iprot) throws TException {
15211
      TField field;
15212
      iprot.readStructBegin();
15213
      while (true)
15214
      {
15215
        field = iprot.readFieldBegin();
15216
        if (field.type == TType.STOP) { 
15217
          break;
15218
        }
15219
        _Fields fieldId = _Fields.findByThriftId(field.id);
15220
        if (fieldId == null) {
15221
          TProtocolUtil.skip(iprot, field.type);
15222
        } else {
15223
          switch (fieldId) {
15224
            case SUCCESS:
15225
              if (field.type == TType.BOOL) {
15226
                this.success = iprot.readBool();
15227
                setSuccessIsSet(true);
15228
              } else { 
15229
                TProtocolUtil.skip(iprot, field.type);
15230
              }
15231
              break;
15232
            case EX:
15233
              if (field.type == TType.STRUCT) {
15234
                this.ex = new TransactionServiceException();
15235
                this.ex.read(iprot);
15236
              } else { 
15237
                TProtocolUtil.skip(iprot, field.type);
15238
              }
15239
              break;
15240
          }
15241
          iprot.readFieldEnd();
15242
        }
15243
      }
15244
      iprot.readStructEnd();
15245
      validate();
15246
    }
15247
 
15248
    public void write(TProtocol oprot) throws TException {
15249
      oprot.writeStructBegin(STRUCT_DESC);
15250
 
15251
      if (this.isSetSuccess()) {
15252
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15253
        oprot.writeBool(this.success);
15254
        oprot.writeFieldEnd();
15255
      } else if (this.isSetEx()) {
15256
        oprot.writeFieldBegin(EX_FIELD_DESC);
15257
        this.ex.write(oprot);
15258
        oprot.writeFieldEnd();
15259
      }
15260
      oprot.writeFieldStop();
15261
      oprot.writeStructEnd();
15262
    }
15263
 
15264
    @Override
15265
    public String toString() {
15266
      StringBuilder sb = new StringBuilder("billOrder_result(");
15267
      boolean first = true;
15268
 
15269
      sb.append("success:");
15270
      sb.append(this.success);
15271
      first = false;
15272
      if (!first) sb.append(", ");
15273
      sb.append("ex:");
15274
      if (this.ex == null) {
15275
        sb.append("null");
15276
      } else {
15277
        sb.append(this.ex);
15278
      }
15279
      first = false;
15280
      sb.append(")");
15281
      return sb.toString();
15282
    }
15283
 
15284
    public void validate() throws TException {
15285
      // check for required fields
15286
    }
15287
 
15288
  }
15289
 
483 rajveer 15290
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
15291
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 15292
 
15293
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 15294
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 15295
 
15296
    private long transactionId;
1529 ankur.sing 15297
    private long customerId;
68 ashish 15298
 
15299
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15300
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 15301
      TRANSACTION_ID((short)1, "transactionId"),
15302
      CUSTOMER_ID((short)2, "customerId");
68 ashish 15303
 
15304
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15305
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15306
 
15307
      static {
15308
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15309
          byId.put((int)field._thriftId, field);
15310
          byName.put(field.getFieldName(), field);
15311
        }
15312
      }
15313
 
15314
      /**
15315
       * Find the _Fields constant that matches fieldId, or null if its not found.
15316
       */
15317
      public static _Fields findByThriftId(int fieldId) {
15318
        return byId.get(fieldId);
15319
      }
15320
 
15321
      /**
15322
       * Find the _Fields constant that matches fieldId, throwing an exception
15323
       * if it is not found.
15324
       */
15325
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15326
        _Fields fields = findByThriftId(fieldId);
15327
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15328
        return fields;
15329
      }
15330
 
15331
      /**
15332
       * Find the _Fields constant that matches name, or null if its not found.
15333
       */
15334
      public static _Fields findByName(String name) {
15335
        return byName.get(name);
15336
      }
15337
 
15338
      private final short _thriftId;
15339
      private final String _fieldName;
15340
 
15341
      _Fields(short thriftId, String fieldName) {
15342
        _thriftId = thriftId;
15343
        _fieldName = fieldName;
15344
      }
15345
 
15346
      public short getThriftFieldId() {
15347
        return _thriftId;
15348
      }
15349
 
15350
      public String getFieldName() {
15351
        return _fieldName;
15352
      }
15353
    }
15354
 
15355
    // isset id assignments
15356
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 15357
    private static final int __CUSTOMERID_ISSET_ID = 1;
15358
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 15359
 
15360
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15361
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15362
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 15363
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
15364
          new FieldValueMetaData(TType.I64)));
68 ashish 15365
    }});
15366
 
15367
    static {
483 rajveer 15368
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 15369
    }
15370
 
483 rajveer 15371
    public getOrdersForTransaction_args() {
68 ashish 15372
    }
15373
 
483 rajveer 15374
    public getOrdersForTransaction_args(
1529 ankur.sing 15375
      long transactionId,
15376
      long customerId)
68 ashish 15377
    {
15378
      this();
15379
      this.transactionId = transactionId;
15380
      setTransactionIdIsSet(true);
1529 ankur.sing 15381
      this.customerId = customerId;
15382
      setCustomerIdIsSet(true);
68 ashish 15383
    }
15384
 
15385
    /**
15386
     * Performs a deep copy on <i>other</i>.
15387
     */
483 rajveer 15388
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 15389
      __isset_bit_vector.clear();
15390
      __isset_bit_vector.or(other.__isset_bit_vector);
15391
      this.transactionId = other.transactionId;
1529 ankur.sing 15392
      this.customerId = other.customerId;
68 ashish 15393
    }
15394
 
483 rajveer 15395
    public getOrdersForTransaction_args deepCopy() {
15396
      return new getOrdersForTransaction_args(this);
68 ashish 15397
    }
15398
 
15399
    @Deprecated
483 rajveer 15400
    public getOrdersForTransaction_args clone() {
15401
      return new getOrdersForTransaction_args(this);
68 ashish 15402
    }
15403
 
15404
    public long getTransactionId() {
15405
      return this.transactionId;
15406
    }
15407
 
483 rajveer 15408
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 15409
      this.transactionId = transactionId;
15410
      setTransactionIdIsSet(true);
15411
      return this;
15412
    }
15413
 
15414
    public void unsetTransactionId() {
15415
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15416
    }
15417
 
15418
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15419
    public boolean isSetTransactionId() {
15420
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15421
    }
15422
 
15423
    public void setTransactionIdIsSet(boolean value) {
15424
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15425
    }
15426
 
1529 ankur.sing 15427
    public long getCustomerId() {
15428
      return this.customerId;
15429
    }
15430
 
15431
    public getOrdersForTransaction_args setCustomerId(long customerId) {
15432
      this.customerId = customerId;
15433
      setCustomerIdIsSet(true);
15434
      return this;
15435
    }
15436
 
15437
    public void unsetCustomerId() {
15438
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
15439
    }
15440
 
15441
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15442
    public boolean isSetCustomerId() {
15443
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
15444
    }
15445
 
15446
    public void setCustomerIdIsSet(boolean value) {
15447
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
15448
    }
15449
 
68 ashish 15450
    public void setFieldValue(_Fields field, Object value) {
15451
      switch (field) {
15452
      case TRANSACTION_ID:
15453
        if (value == null) {
15454
          unsetTransactionId();
15455
        } else {
15456
          setTransactionId((Long)value);
15457
        }
15458
        break;
15459
 
1529 ankur.sing 15460
      case CUSTOMER_ID:
15461
        if (value == null) {
15462
          unsetCustomerId();
15463
        } else {
15464
          setCustomerId((Long)value);
15465
        }
15466
        break;
15467
 
68 ashish 15468
      }
15469
    }
15470
 
15471
    public void setFieldValue(int fieldID, Object value) {
15472
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15473
    }
15474
 
15475
    public Object getFieldValue(_Fields field) {
15476
      switch (field) {
15477
      case TRANSACTION_ID:
15478
        return new Long(getTransactionId());
15479
 
1529 ankur.sing 15480
      case CUSTOMER_ID:
15481
        return new Long(getCustomerId());
15482
 
68 ashish 15483
      }
15484
      throw new IllegalStateException();
15485
    }
15486
 
15487
    public Object getFieldValue(int fieldId) {
15488
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15489
    }
15490
 
15491
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15492
    public boolean isSet(_Fields field) {
15493
      switch (field) {
15494
      case TRANSACTION_ID:
15495
        return isSetTransactionId();
1529 ankur.sing 15496
      case CUSTOMER_ID:
15497
        return isSetCustomerId();
68 ashish 15498
      }
15499
      throw new IllegalStateException();
15500
    }
15501
 
15502
    public boolean isSet(int fieldID) {
15503
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15504
    }
15505
 
15506
    @Override
15507
    public boolean equals(Object that) {
15508
      if (that == null)
15509
        return false;
483 rajveer 15510
      if (that instanceof getOrdersForTransaction_args)
15511
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 15512
      return false;
15513
    }
15514
 
483 rajveer 15515
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 15516
      if (that == null)
15517
        return false;
15518
 
15519
      boolean this_present_transactionId = true;
15520
      boolean that_present_transactionId = true;
15521
      if (this_present_transactionId || that_present_transactionId) {
15522
        if (!(this_present_transactionId && that_present_transactionId))
15523
          return false;
15524
        if (this.transactionId != that.transactionId)
15525
          return false;
15526
      }
15527
 
1529 ankur.sing 15528
      boolean this_present_customerId = true;
15529
      boolean that_present_customerId = true;
15530
      if (this_present_customerId || that_present_customerId) {
15531
        if (!(this_present_customerId && that_present_customerId))
15532
          return false;
15533
        if (this.customerId != that.customerId)
15534
          return false;
15535
      }
15536
 
68 ashish 15537
      return true;
15538
    }
15539
 
15540
    @Override
15541
    public int hashCode() {
15542
      return 0;
15543
    }
15544
 
483 rajveer 15545
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 15546
      if (!getClass().equals(other.getClass())) {
15547
        return getClass().getName().compareTo(other.getClass().getName());
15548
      }
15549
 
15550
      int lastComparison = 0;
483 rajveer 15551
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 15552
 
15553
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15554
      if (lastComparison != 0) {
15555
        return lastComparison;
15556
      }
15557
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15558
      if (lastComparison != 0) {
15559
        return lastComparison;
15560
      }
1529 ankur.sing 15561
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
15562
      if (lastComparison != 0) {
15563
        return lastComparison;
15564
      }
15565
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
15566
      if (lastComparison != 0) {
15567
        return lastComparison;
15568
      }
68 ashish 15569
      return 0;
15570
    }
15571
 
15572
    public void read(TProtocol iprot) throws TException {
15573
      TField field;
15574
      iprot.readStructBegin();
15575
      while (true)
15576
      {
15577
        field = iprot.readFieldBegin();
15578
        if (field.type == TType.STOP) { 
15579
          break;
15580
        }
15581
        _Fields fieldId = _Fields.findByThriftId(field.id);
15582
        if (fieldId == null) {
15583
          TProtocolUtil.skip(iprot, field.type);
15584
        } else {
15585
          switch (fieldId) {
15586
            case TRANSACTION_ID:
15587
              if (field.type == TType.I64) {
15588
                this.transactionId = iprot.readI64();
15589
                setTransactionIdIsSet(true);
15590
              } else { 
15591
                TProtocolUtil.skip(iprot, field.type);
15592
              }
15593
              break;
1529 ankur.sing 15594
            case CUSTOMER_ID:
15595
              if (field.type == TType.I64) {
15596
                this.customerId = iprot.readI64();
15597
                setCustomerIdIsSet(true);
15598
              } else { 
15599
                TProtocolUtil.skip(iprot, field.type);
15600
              }
15601
              break;
68 ashish 15602
          }
15603
          iprot.readFieldEnd();
15604
        }
15605
      }
15606
      iprot.readStructEnd();
15607
      validate();
15608
    }
15609
 
15610
    public void write(TProtocol oprot) throws TException {
15611
      validate();
15612
 
15613
      oprot.writeStructBegin(STRUCT_DESC);
15614
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15615
      oprot.writeI64(this.transactionId);
15616
      oprot.writeFieldEnd();
1529 ankur.sing 15617
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15618
      oprot.writeI64(this.customerId);
15619
      oprot.writeFieldEnd();
68 ashish 15620
      oprot.writeFieldStop();
15621
      oprot.writeStructEnd();
15622
    }
15623
 
15624
    @Override
15625
    public String toString() {
483 rajveer 15626
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15627
      boolean first = true;
15628
 
15629
      sb.append("transactionId:");
15630
      sb.append(this.transactionId);
15631
      first = false;
1529 ankur.sing 15632
      if (!first) sb.append(", ");
15633
      sb.append("customerId:");
15634
      sb.append(this.customerId);
15635
      first = false;
68 ashish 15636
      sb.append(")");
15637
      return sb.toString();
15638
    }
15639
 
15640
    public void validate() throws TException {
15641
      // check for required fields
15642
    }
15643
 
15644
  }
15645
 
483 rajveer 15646
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15647
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15648
 
483 rajveer 15649
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15650
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15651
 
483 rajveer 15652
    private List<Order> success;
68 ashish 15653
    private TransactionServiceException ex;
15654
 
15655
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15656
    public enum _Fields implements TFieldIdEnum {
15657
      SUCCESS((short)0, "success"),
15658
      EX((short)1, "ex");
15659
 
15660
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15661
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15662
 
15663
      static {
15664
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15665
          byId.put((int)field._thriftId, field);
15666
          byName.put(field.getFieldName(), field);
15667
        }
15668
      }
15669
 
15670
      /**
15671
       * Find the _Fields constant that matches fieldId, or null if its not found.
15672
       */
15673
      public static _Fields findByThriftId(int fieldId) {
15674
        return byId.get(fieldId);
15675
      }
15676
 
15677
      /**
15678
       * Find the _Fields constant that matches fieldId, throwing an exception
15679
       * if it is not found.
15680
       */
15681
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15682
        _Fields fields = findByThriftId(fieldId);
15683
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15684
        return fields;
15685
      }
15686
 
15687
      /**
15688
       * Find the _Fields constant that matches name, or null if its not found.
15689
       */
15690
      public static _Fields findByName(String name) {
15691
        return byName.get(name);
15692
      }
15693
 
15694
      private final short _thriftId;
15695
      private final String _fieldName;
15696
 
15697
      _Fields(short thriftId, String fieldName) {
15698
        _thriftId = thriftId;
15699
        _fieldName = fieldName;
15700
      }
15701
 
15702
      public short getThriftFieldId() {
15703
        return _thriftId;
15704
      }
15705
 
15706
      public String getFieldName() {
15707
        return _fieldName;
15708
      }
15709
    }
15710
 
15711
    // isset id assignments
15712
 
15713
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15714
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15715
          new ListMetaData(TType.LIST, 
15716
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15717
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15718
          new FieldValueMetaData(TType.STRUCT)));
15719
    }});
15720
 
15721
    static {
483 rajveer 15722
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15723
    }
15724
 
483 rajveer 15725
    public getOrdersForTransaction_result() {
68 ashish 15726
    }
15727
 
483 rajveer 15728
    public getOrdersForTransaction_result(
15729
      List<Order> success,
68 ashish 15730
      TransactionServiceException ex)
15731
    {
15732
      this();
15733
      this.success = success;
15734
      this.ex = ex;
15735
    }
15736
 
15737
    /**
15738
     * Performs a deep copy on <i>other</i>.
15739
     */
483 rajveer 15740
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15741
      if (other.isSetSuccess()) {
15742
        List<Order> __this__success = new ArrayList<Order>();
15743
        for (Order other_element : other.success) {
15744
          __this__success.add(new Order(other_element));
15745
        }
15746
        this.success = __this__success;
15747
      }
68 ashish 15748
      if (other.isSetEx()) {
15749
        this.ex = new TransactionServiceException(other.ex);
15750
      }
15751
    }
15752
 
483 rajveer 15753
    public getOrdersForTransaction_result deepCopy() {
15754
      return new getOrdersForTransaction_result(this);
68 ashish 15755
    }
15756
 
15757
    @Deprecated
483 rajveer 15758
    public getOrdersForTransaction_result clone() {
15759
      return new getOrdersForTransaction_result(this);
68 ashish 15760
    }
15761
 
483 rajveer 15762
    public int getSuccessSize() {
15763
      return (this.success == null) ? 0 : this.success.size();
15764
    }
15765
 
15766
    public java.util.Iterator<Order> getSuccessIterator() {
15767
      return (this.success == null) ? null : this.success.iterator();
15768
    }
15769
 
15770
    public void addToSuccess(Order elem) {
15771
      if (this.success == null) {
15772
        this.success = new ArrayList<Order>();
15773
      }
15774
      this.success.add(elem);
15775
    }
15776
 
15777
    public List<Order> getSuccess() {
68 ashish 15778
      return this.success;
15779
    }
15780
 
483 rajveer 15781
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15782
      this.success = success;
15783
      return this;
15784
    }
15785
 
15786
    public void unsetSuccess() {
483 rajveer 15787
      this.success = null;
68 ashish 15788
    }
15789
 
15790
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15791
    public boolean isSetSuccess() {
483 rajveer 15792
      return this.success != null;
68 ashish 15793
    }
15794
 
15795
    public void setSuccessIsSet(boolean value) {
483 rajveer 15796
      if (!value) {
15797
        this.success = null;
15798
      }
68 ashish 15799
    }
15800
 
15801
    public TransactionServiceException getEx() {
15802
      return this.ex;
15803
    }
15804
 
483 rajveer 15805
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15806
      this.ex = ex;
15807
      return this;
15808
    }
15809
 
15810
    public void unsetEx() {
15811
      this.ex = null;
15812
    }
15813
 
15814
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15815
    public boolean isSetEx() {
15816
      return this.ex != null;
15817
    }
15818
 
15819
    public void setExIsSet(boolean value) {
15820
      if (!value) {
15821
        this.ex = null;
15822
      }
15823
    }
15824
 
15825
    public void setFieldValue(_Fields field, Object value) {
15826
      switch (field) {
15827
      case SUCCESS:
15828
        if (value == null) {
15829
          unsetSuccess();
15830
        } else {
483 rajveer 15831
          setSuccess((List<Order>)value);
68 ashish 15832
        }
15833
        break;
15834
 
15835
      case EX:
15836
        if (value == null) {
15837
          unsetEx();
15838
        } else {
15839
          setEx((TransactionServiceException)value);
15840
        }
15841
        break;
15842
 
15843
      }
15844
    }
15845
 
15846
    public void setFieldValue(int fieldID, Object value) {
15847
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15848
    }
15849
 
15850
    public Object getFieldValue(_Fields field) {
15851
      switch (field) {
15852
      case SUCCESS:
483 rajveer 15853
        return getSuccess();
68 ashish 15854
 
15855
      case EX:
15856
        return getEx();
15857
 
15858
      }
15859
      throw new IllegalStateException();
15860
    }
15861
 
15862
    public Object getFieldValue(int fieldId) {
15863
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15864
    }
15865
 
15866
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15867
    public boolean isSet(_Fields field) {
15868
      switch (field) {
15869
      case SUCCESS:
15870
        return isSetSuccess();
15871
      case EX:
15872
        return isSetEx();
15873
      }
15874
      throw new IllegalStateException();
15875
    }
15876
 
15877
    public boolean isSet(int fieldID) {
15878
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15879
    }
15880
 
15881
    @Override
15882
    public boolean equals(Object that) {
15883
      if (that == null)
15884
        return false;
483 rajveer 15885
      if (that instanceof getOrdersForTransaction_result)
15886
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 15887
      return false;
15888
    }
15889
 
483 rajveer 15890
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 15891
      if (that == null)
15892
        return false;
15893
 
483 rajveer 15894
      boolean this_present_success = true && this.isSetSuccess();
15895
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15896
      if (this_present_success || that_present_success) {
15897
        if (!(this_present_success && that_present_success))
15898
          return false;
483 rajveer 15899
        if (!this.success.equals(that.success))
68 ashish 15900
          return false;
15901
      }
15902
 
15903
      boolean this_present_ex = true && this.isSetEx();
15904
      boolean that_present_ex = true && that.isSetEx();
15905
      if (this_present_ex || that_present_ex) {
15906
        if (!(this_present_ex && that_present_ex))
15907
          return false;
15908
        if (!this.ex.equals(that.ex))
15909
          return false;
15910
      }
15911
 
15912
      return true;
15913
    }
15914
 
15915
    @Override
15916
    public int hashCode() {
15917
      return 0;
15918
    }
15919
 
483 rajveer 15920
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 15921
      if (!getClass().equals(other.getClass())) {
15922
        return getClass().getName().compareTo(other.getClass().getName());
15923
      }
15924
 
15925
      int lastComparison = 0;
483 rajveer 15926
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 15927
 
15928
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15929
      if (lastComparison != 0) {
15930
        return lastComparison;
15931
      }
15932
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15933
      if (lastComparison != 0) {
15934
        return lastComparison;
15935
      }
15936
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15937
      if (lastComparison != 0) {
15938
        return lastComparison;
15939
      }
15940
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15941
      if (lastComparison != 0) {
15942
        return lastComparison;
15943
      }
15944
      return 0;
15945
    }
15946
 
15947
    public void read(TProtocol iprot) throws TException {
15948
      TField field;
15949
      iprot.readStructBegin();
15950
      while (true)
15951
      {
15952
        field = iprot.readFieldBegin();
15953
        if (field.type == TType.STOP) { 
15954
          break;
15955
        }
15956
        _Fields fieldId = _Fields.findByThriftId(field.id);
15957
        if (fieldId == null) {
15958
          TProtocolUtil.skip(iprot, field.type);
15959
        } else {
15960
          switch (fieldId) {
15961
            case SUCCESS:
483 rajveer 15962
              if (field.type == TType.LIST) {
15963
                {
1382 varun.gupt 15964
                  TList _list32 = iprot.readListBegin();
15965
                  this.success = new ArrayList<Order>(_list32.size);
15966
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15967
                  {
1382 varun.gupt 15968
                    Order _elem34;
15969
                    _elem34 = new Order();
15970
                    _elem34.read(iprot);
15971
                    this.success.add(_elem34);
483 rajveer 15972
                  }
15973
                  iprot.readListEnd();
15974
                }
68 ashish 15975
              } else { 
15976
                TProtocolUtil.skip(iprot, field.type);
15977
              }
15978
              break;
15979
            case EX:
15980
              if (field.type == TType.STRUCT) {
15981
                this.ex = new TransactionServiceException();
15982
                this.ex.read(iprot);
15983
              } else { 
15984
                TProtocolUtil.skip(iprot, field.type);
15985
              }
15986
              break;
15987
          }
15988
          iprot.readFieldEnd();
15989
        }
15990
      }
15991
      iprot.readStructEnd();
15992
      validate();
15993
    }
15994
 
15995
    public void write(TProtocol oprot) throws TException {
15996
      oprot.writeStructBegin(STRUCT_DESC);
15997
 
15998
      if (this.isSetSuccess()) {
15999
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16000
        {
16001
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16002
          for (Order _iter35 : this.success)
483 rajveer 16003
          {
1382 varun.gupt 16004
            _iter35.write(oprot);
483 rajveer 16005
          }
16006
          oprot.writeListEnd();
16007
        }
68 ashish 16008
        oprot.writeFieldEnd();
16009
      } else if (this.isSetEx()) {
16010
        oprot.writeFieldBegin(EX_FIELD_DESC);
16011
        this.ex.write(oprot);
16012
        oprot.writeFieldEnd();
16013
      }
16014
      oprot.writeFieldStop();
16015
      oprot.writeStructEnd();
16016
    }
16017
 
16018
    @Override
16019
    public String toString() {
483 rajveer 16020
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 16021
      boolean first = true;
16022
 
16023
      sb.append("success:");
483 rajveer 16024
      if (this.success == null) {
16025
        sb.append("null");
16026
      } else {
16027
        sb.append(this.success);
16028
      }
68 ashish 16029
      first = false;
16030
      if (!first) sb.append(", ");
16031
      sb.append("ex:");
16032
      if (this.ex == null) {
16033
        sb.append("null");
16034
      } else {
16035
        sb.append(this.ex);
16036
      }
16037
      first = false;
16038
      sb.append(")");
16039
      return sb.toString();
16040
    }
16041
 
16042
    public void validate() throws TException {
16043
      // check for required fields
16044
    }
16045
 
16046
  }
16047
 
483 rajveer 16048
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
16049
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 16050
 
483 rajveer 16051
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
16052
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
16053
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
16054
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 16055
 
483 rajveer 16056
    private long customerId;
16057
    private long from_date;
16058
    private long to_date;
16059
    private OrderStatus status;
68 ashish 16060
 
16061
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16062
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16063
      CUSTOMER_ID((short)1, "customerId"),
16064
      FROM_DATE((short)2, "from_date"),
16065
      TO_DATE((short)3, "to_date"),
16066
      /**
16067
       * 
16068
       * @see OrderStatus
16069
       */
16070
      STATUS((short)4, "status");
68 ashish 16071
 
16072
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16073
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16074
 
16075
      static {
16076
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16077
          byId.put((int)field._thriftId, field);
16078
          byName.put(field.getFieldName(), field);
16079
        }
16080
      }
16081
 
16082
      /**
16083
       * Find the _Fields constant that matches fieldId, or null if its not found.
16084
       */
16085
      public static _Fields findByThriftId(int fieldId) {
16086
        return byId.get(fieldId);
16087
      }
16088
 
16089
      /**
16090
       * Find the _Fields constant that matches fieldId, throwing an exception
16091
       * if it is not found.
16092
       */
16093
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16094
        _Fields fields = findByThriftId(fieldId);
16095
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16096
        return fields;
16097
      }
16098
 
16099
      /**
16100
       * Find the _Fields constant that matches name, or null if its not found.
16101
       */
16102
      public static _Fields findByName(String name) {
16103
        return byName.get(name);
16104
      }
16105
 
16106
      private final short _thriftId;
16107
      private final String _fieldName;
16108
 
16109
      _Fields(short thriftId, String fieldName) {
16110
        _thriftId = thriftId;
16111
        _fieldName = fieldName;
16112
      }
16113
 
16114
      public short getThriftFieldId() {
16115
        return _thriftId;
16116
      }
16117
 
16118
      public String getFieldName() {
16119
        return _fieldName;
16120
      }
16121
    }
16122
 
16123
    // isset id assignments
483 rajveer 16124
    private static final int __CUSTOMERID_ISSET_ID = 0;
16125
    private static final int __FROM_DATE_ISSET_ID = 1;
16126
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 16127
    private BitSet __isset_bit_vector = new BitSet(3);
16128
 
16129
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16130
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 16131
          new FieldValueMetaData(TType.I64)));
483 rajveer 16132
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 16133
          new FieldValueMetaData(TType.I64)));
483 rajveer 16134
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 16135
          new FieldValueMetaData(TType.I64)));
483 rajveer 16136
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
16137
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 16138
    }});
16139
 
16140
    static {
483 rajveer 16141
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 16142
    }
16143
 
483 rajveer 16144
    public getOrdersForCustomer_args() {
68 ashish 16145
    }
16146
 
483 rajveer 16147
    public getOrdersForCustomer_args(
16148
      long customerId,
16149
      long from_date,
16150
      long to_date,
16151
      OrderStatus status)
68 ashish 16152
    {
16153
      this();
483 rajveer 16154
      this.customerId = customerId;
16155
      setCustomerIdIsSet(true);
16156
      this.from_date = from_date;
16157
      setFrom_dateIsSet(true);
16158
      this.to_date = to_date;
16159
      setTo_dateIsSet(true);
16160
      this.status = status;
68 ashish 16161
    }
16162
 
16163
    /**
16164
     * Performs a deep copy on <i>other</i>.
16165
     */
483 rajveer 16166
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 16167
      __isset_bit_vector.clear();
16168
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 16169
      this.customerId = other.customerId;
16170
      this.from_date = other.from_date;
16171
      this.to_date = other.to_date;
16172
      if (other.isSetStatus()) {
16173
        this.status = other.status;
16174
      }
68 ashish 16175
    }
16176
 
483 rajveer 16177
    public getOrdersForCustomer_args deepCopy() {
16178
      return new getOrdersForCustomer_args(this);
68 ashish 16179
    }
16180
 
16181
    @Deprecated
483 rajveer 16182
    public getOrdersForCustomer_args clone() {
16183
      return new getOrdersForCustomer_args(this);
68 ashish 16184
    }
16185
 
483 rajveer 16186
    public long getCustomerId() {
16187
      return this.customerId;
68 ashish 16188
    }
16189
 
483 rajveer 16190
    public getOrdersForCustomer_args setCustomerId(long customerId) {
16191
      this.customerId = customerId;
16192
      setCustomerIdIsSet(true);
68 ashish 16193
      return this;
16194
    }
16195
 
483 rajveer 16196
    public void unsetCustomerId() {
16197
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 16198
    }
16199
 
483 rajveer 16200
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
16201
    public boolean isSetCustomerId() {
16202
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 16203
    }
16204
 
483 rajveer 16205
    public void setCustomerIdIsSet(boolean value) {
16206
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 16207
    }
16208
 
483 rajveer 16209
    public long getFrom_date() {
16210
      return this.from_date;
68 ashish 16211
    }
16212
 
483 rajveer 16213
    public getOrdersForCustomer_args setFrom_date(long from_date) {
16214
      this.from_date = from_date;
16215
      setFrom_dateIsSet(true);
68 ashish 16216
      return this;
16217
    }
16218
 
483 rajveer 16219
    public void unsetFrom_date() {
16220
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 16221
    }
16222
 
483 rajveer 16223
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
16224
    public boolean isSetFrom_date() {
16225
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 16226
    }
16227
 
483 rajveer 16228
    public void setFrom_dateIsSet(boolean value) {
16229
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 16230
    }
16231
 
483 rajveer 16232
    public long getTo_date() {
16233
      return this.to_date;
68 ashish 16234
    }
16235
 
483 rajveer 16236
    public getOrdersForCustomer_args setTo_date(long to_date) {
16237
      this.to_date = to_date;
16238
      setTo_dateIsSet(true);
68 ashish 16239
      return this;
16240
    }
16241
 
483 rajveer 16242
    public void unsetTo_date() {
16243
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 16244
    }
16245
 
483 rajveer 16246
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
16247
    public boolean isSetTo_date() {
16248
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 16249
    }
16250
 
483 rajveer 16251
    public void setTo_dateIsSet(boolean value) {
16252
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 16253
    }
16254
 
483 rajveer 16255
    /**
16256
     * 
16257
     * @see OrderStatus
16258
     */
16259
    public OrderStatus getStatus() {
16260
      return this.status;
16261
    }
16262
 
16263
    /**
16264
     * 
16265
     * @see OrderStatus
16266
     */
16267
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
16268
      this.status = status;
16269
      return this;
16270
    }
16271
 
16272
    public void unsetStatus() {
16273
      this.status = null;
16274
    }
16275
 
16276
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16277
    public boolean isSetStatus() {
16278
      return this.status != null;
16279
    }
16280
 
16281
    public void setStatusIsSet(boolean value) {
16282
      if (!value) {
16283
        this.status = null;
16284
      }
16285
    }
16286
 
68 ashish 16287
    public void setFieldValue(_Fields field, Object value) {
16288
      switch (field) {
483 rajveer 16289
      case CUSTOMER_ID:
68 ashish 16290
        if (value == null) {
483 rajveer 16291
          unsetCustomerId();
68 ashish 16292
        } else {
483 rajveer 16293
          setCustomerId((Long)value);
68 ashish 16294
        }
16295
        break;
16296
 
483 rajveer 16297
      case FROM_DATE:
68 ashish 16298
        if (value == null) {
483 rajveer 16299
          unsetFrom_date();
68 ashish 16300
        } else {
483 rajveer 16301
          setFrom_date((Long)value);
68 ashish 16302
        }
16303
        break;
16304
 
483 rajveer 16305
      case TO_DATE:
68 ashish 16306
        if (value == null) {
483 rajveer 16307
          unsetTo_date();
68 ashish 16308
        } else {
483 rajveer 16309
          setTo_date((Long)value);
68 ashish 16310
        }
16311
        break;
16312
 
483 rajveer 16313
      case STATUS:
16314
        if (value == null) {
16315
          unsetStatus();
16316
        } else {
16317
          setStatus((OrderStatus)value);
16318
        }
16319
        break;
16320
 
68 ashish 16321
      }
16322
    }
16323
 
16324
    public void setFieldValue(int fieldID, Object value) {
16325
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16326
    }
16327
 
16328
    public Object getFieldValue(_Fields field) {
16329
      switch (field) {
483 rajveer 16330
      case CUSTOMER_ID:
16331
        return new Long(getCustomerId());
68 ashish 16332
 
483 rajveer 16333
      case FROM_DATE:
16334
        return new Long(getFrom_date());
68 ashish 16335
 
483 rajveer 16336
      case TO_DATE:
16337
        return new Long(getTo_date());
68 ashish 16338
 
483 rajveer 16339
      case STATUS:
16340
        return getStatus();
16341
 
68 ashish 16342
      }
16343
      throw new IllegalStateException();
16344
    }
16345
 
16346
    public Object getFieldValue(int fieldId) {
16347
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16348
    }
16349
 
16350
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16351
    public boolean isSet(_Fields field) {
16352
      switch (field) {
483 rajveer 16353
      case CUSTOMER_ID:
16354
        return isSetCustomerId();
16355
      case FROM_DATE:
16356
        return isSetFrom_date();
16357
      case TO_DATE:
16358
        return isSetTo_date();
16359
      case STATUS:
16360
        return isSetStatus();
68 ashish 16361
      }
16362
      throw new IllegalStateException();
16363
    }
16364
 
16365
    public boolean isSet(int fieldID) {
16366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16367
    }
16368
 
16369
    @Override
16370
    public boolean equals(Object that) {
16371
      if (that == null)
16372
        return false;
483 rajveer 16373
      if (that instanceof getOrdersForCustomer_args)
16374
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 16375
      return false;
16376
    }
16377
 
483 rajveer 16378
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 16379
      if (that == null)
16380
        return false;
16381
 
483 rajveer 16382
      boolean this_present_customerId = true;
16383
      boolean that_present_customerId = true;
16384
      if (this_present_customerId || that_present_customerId) {
16385
        if (!(this_present_customerId && that_present_customerId))
68 ashish 16386
          return false;
483 rajveer 16387
        if (this.customerId != that.customerId)
68 ashish 16388
          return false;
16389
      }
16390
 
483 rajveer 16391
      boolean this_present_from_date = true;
16392
      boolean that_present_from_date = true;
16393
      if (this_present_from_date || that_present_from_date) {
16394
        if (!(this_present_from_date && that_present_from_date))
68 ashish 16395
          return false;
483 rajveer 16396
        if (this.from_date != that.from_date)
68 ashish 16397
          return false;
16398
      }
16399
 
483 rajveer 16400
      boolean this_present_to_date = true;
16401
      boolean that_present_to_date = true;
16402
      if (this_present_to_date || that_present_to_date) {
16403
        if (!(this_present_to_date && that_present_to_date))
68 ashish 16404
          return false;
483 rajveer 16405
        if (this.to_date != that.to_date)
68 ashish 16406
          return false;
16407
      }
16408
 
483 rajveer 16409
      boolean this_present_status = true && this.isSetStatus();
16410
      boolean that_present_status = true && that.isSetStatus();
16411
      if (this_present_status || that_present_status) {
16412
        if (!(this_present_status && that_present_status))
16413
          return false;
16414
        if (!this.status.equals(that.status))
16415
          return false;
16416
      }
16417
 
68 ashish 16418
      return true;
16419
    }
16420
 
16421
    @Override
16422
    public int hashCode() {
16423
      return 0;
16424
    }
16425
 
483 rajveer 16426
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 16427
      if (!getClass().equals(other.getClass())) {
16428
        return getClass().getName().compareTo(other.getClass().getName());
16429
      }
16430
 
16431
      int lastComparison = 0;
483 rajveer 16432
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 16433
 
483 rajveer 16434
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 16435
      if (lastComparison != 0) {
16436
        return lastComparison;
16437
      }
483 rajveer 16438
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 16439
      if (lastComparison != 0) {
16440
        return lastComparison;
16441
      }
483 rajveer 16442
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 16443
      if (lastComparison != 0) {
16444
        return lastComparison;
16445
      }
483 rajveer 16446
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 16447
      if (lastComparison != 0) {
16448
        return lastComparison;
16449
      }
483 rajveer 16450
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 16451
      if (lastComparison != 0) {
16452
        return lastComparison;
16453
      }
483 rajveer 16454
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 16455
      if (lastComparison != 0) {
16456
        return lastComparison;
16457
      }
483 rajveer 16458
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16459
      if (lastComparison != 0) {
16460
        return lastComparison;
16461
      }
16462
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16463
      if (lastComparison != 0) {
16464
        return lastComparison;
16465
      }
68 ashish 16466
      return 0;
16467
    }
16468
 
16469
    public void read(TProtocol iprot) throws TException {
16470
      TField field;
16471
      iprot.readStructBegin();
16472
      while (true)
16473
      {
16474
        field = iprot.readFieldBegin();
16475
        if (field.type == TType.STOP) { 
16476
          break;
16477
        }
16478
        _Fields fieldId = _Fields.findByThriftId(field.id);
16479
        if (fieldId == null) {
16480
          TProtocolUtil.skip(iprot, field.type);
16481
        } else {
16482
          switch (fieldId) {
483 rajveer 16483
            case CUSTOMER_ID:
68 ashish 16484
              if (field.type == TType.I64) {
483 rajveer 16485
                this.customerId = iprot.readI64();
16486
                setCustomerIdIsSet(true);
68 ashish 16487
              } else { 
16488
                TProtocolUtil.skip(iprot, field.type);
16489
              }
16490
              break;
483 rajveer 16491
            case FROM_DATE:
68 ashish 16492
              if (field.type == TType.I64) {
483 rajveer 16493
                this.from_date = iprot.readI64();
16494
                setFrom_dateIsSet(true);
68 ashish 16495
              } else { 
16496
                TProtocolUtil.skip(iprot, field.type);
16497
              }
16498
              break;
483 rajveer 16499
            case TO_DATE:
68 ashish 16500
              if (field.type == TType.I64) {
483 rajveer 16501
                this.to_date = iprot.readI64();
16502
                setTo_dateIsSet(true);
68 ashish 16503
              } else { 
16504
                TProtocolUtil.skip(iprot, field.type);
16505
              }
16506
              break;
483 rajveer 16507
            case STATUS:
16508
              if (field.type == TType.I32) {
16509
                this.status = OrderStatus.findByValue(iprot.readI32());
16510
              } else { 
16511
                TProtocolUtil.skip(iprot, field.type);
16512
              }
16513
              break;
68 ashish 16514
          }
16515
          iprot.readFieldEnd();
16516
        }
16517
      }
16518
      iprot.readStructEnd();
16519
      validate();
16520
    }
16521
 
16522
    public void write(TProtocol oprot) throws TException {
16523
      validate();
16524
 
16525
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16526
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16527
      oprot.writeI64(this.customerId);
68 ashish 16528
      oprot.writeFieldEnd();
483 rajveer 16529
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
16530
      oprot.writeI64(this.from_date);
68 ashish 16531
      oprot.writeFieldEnd();
483 rajveer 16532
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
16533
      oprot.writeI64(this.to_date);
68 ashish 16534
      oprot.writeFieldEnd();
483 rajveer 16535
      if (this.status != null) {
16536
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16537
        oprot.writeI32(this.status.getValue());
16538
        oprot.writeFieldEnd();
16539
      }
68 ashish 16540
      oprot.writeFieldStop();
16541
      oprot.writeStructEnd();
16542
    }
16543
 
16544
    @Override
16545
    public String toString() {
483 rajveer 16546
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 16547
      boolean first = true;
16548
 
483 rajveer 16549
      sb.append("customerId:");
16550
      sb.append(this.customerId);
68 ashish 16551
      first = false;
16552
      if (!first) sb.append(", ");
483 rajveer 16553
      sb.append("from_date:");
16554
      sb.append(this.from_date);
68 ashish 16555
      first = false;
16556
      if (!first) sb.append(", ");
483 rajveer 16557
      sb.append("to_date:");
16558
      sb.append(this.to_date);
68 ashish 16559
      first = false;
483 rajveer 16560
      if (!first) sb.append(", ");
16561
      sb.append("status:");
16562
      if (this.status == null) {
16563
        sb.append("null");
16564
      } else {
16565
        String status_name = status.name();
16566
        if (status_name != null) {
16567
          sb.append(status_name);
16568
          sb.append(" (");
16569
        }
16570
        sb.append(this.status);
16571
        if (status_name != null) {
16572
          sb.append(")");
16573
        }
16574
      }
16575
      first = false;
68 ashish 16576
      sb.append(")");
16577
      return sb.toString();
16578
    }
16579
 
16580
    public void validate() throws TException {
16581
      // check for required fields
16582
    }
16583
 
16584
  }
16585
 
483 rajveer 16586
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
16587
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 16588
 
483 rajveer 16589
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16590
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16591
 
483 rajveer 16592
    private List<Order> success;
68 ashish 16593
    private TransactionServiceException ex;
16594
 
16595
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16596
    public enum _Fields implements TFieldIdEnum {
16597
      SUCCESS((short)0, "success"),
16598
      EX((short)1, "ex");
16599
 
16600
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16601
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16602
 
16603
      static {
16604
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16605
          byId.put((int)field._thriftId, field);
16606
          byName.put(field.getFieldName(), field);
16607
        }
16608
      }
16609
 
16610
      /**
16611
       * Find the _Fields constant that matches fieldId, or null if its not found.
16612
       */
16613
      public static _Fields findByThriftId(int fieldId) {
16614
        return byId.get(fieldId);
16615
      }
16616
 
16617
      /**
16618
       * Find the _Fields constant that matches fieldId, throwing an exception
16619
       * if it is not found.
16620
       */
16621
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16622
        _Fields fields = findByThriftId(fieldId);
16623
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16624
        return fields;
16625
      }
16626
 
16627
      /**
16628
       * Find the _Fields constant that matches name, or null if its not found.
16629
       */
16630
      public static _Fields findByName(String name) {
16631
        return byName.get(name);
16632
      }
16633
 
16634
      private final short _thriftId;
16635
      private final String _fieldName;
16636
 
16637
      _Fields(short thriftId, String fieldName) {
16638
        _thriftId = thriftId;
16639
        _fieldName = fieldName;
16640
      }
16641
 
16642
      public short getThriftFieldId() {
16643
        return _thriftId;
16644
      }
16645
 
16646
      public String getFieldName() {
16647
        return _fieldName;
16648
      }
16649
    }
16650
 
16651
    // isset id assignments
16652
 
16653
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16654
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16655
          new ListMetaData(TType.LIST, 
16656
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16657
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16658
          new FieldValueMetaData(TType.STRUCT)));
16659
    }});
16660
 
16661
    static {
483 rajveer 16662
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16663
    }
16664
 
483 rajveer 16665
    public getOrdersForCustomer_result() {
68 ashish 16666
    }
16667
 
483 rajveer 16668
    public getOrdersForCustomer_result(
16669
      List<Order> success,
68 ashish 16670
      TransactionServiceException ex)
16671
    {
16672
      this();
16673
      this.success = success;
16674
      this.ex = ex;
16675
    }
16676
 
16677
    /**
16678
     * Performs a deep copy on <i>other</i>.
16679
     */
483 rajveer 16680
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16681
      if (other.isSetSuccess()) {
16682
        List<Order> __this__success = new ArrayList<Order>();
16683
        for (Order other_element : other.success) {
16684
          __this__success.add(new Order(other_element));
16685
        }
16686
        this.success = __this__success;
16687
      }
68 ashish 16688
      if (other.isSetEx()) {
16689
        this.ex = new TransactionServiceException(other.ex);
16690
      }
16691
    }
16692
 
483 rajveer 16693
    public getOrdersForCustomer_result deepCopy() {
16694
      return new getOrdersForCustomer_result(this);
68 ashish 16695
    }
16696
 
16697
    @Deprecated
483 rajveer 16698
    public getOrdersForCustomer_result clone() {
16699
      return new getOrdersForCustomer_result(this);
68 ashish 16700
    }
16701
 
483 rajveer 16702
    public int getSuccessSize() {
16703
      return (this.success == null) ? 0 : this.success.size();
16704
    }
16705
 
16706
    public java.util.Iterator<Order> getSuccessIterator() {
16707
      return (this.success == null) ? null : this.success.iterator();
16708
    }
16709
 
16710
    public void addToSuccess(Order elem) {
16711
      if (this.success == null) {
16712
        this.success = new ArrayList<Order>();
16713
      }
16714
      this.success.add(elem);
16715
    }
16716
 
16717
    public List<Order> getSuccess() {
68 ashish 16718
      return this.success;
16719
    }
16720
 
483 rajveer 16721
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16722
      this.success = success;
16723
      return this;
16724
    }
16725
 
16726
    public void unsetSuccess() {
483 rajveer 16727
      this.success = null;
68 ashish 16728
    }
16729
 
16730
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16731
    public boolean isSetSuccess() {
483 rajveer 16732
      return this.success != null;
68 ashish 16733
    }
16734
 
16735
    public void setSuccessIsSet(boolean value) {
483 rajveer 16736
      if (!value) {
16737
        this.success = null;
16738
      }
68 ashish 16739
    }
16740
 
16741
    public TransactionServiceException getEx() {
16742
      return this.ex;
16743
    }
16744
 
483 rajveer 16745
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16746
      this.ex = ex;
16747
      return this;
16748
    }
16749
 
16750
    public void unsetEx() {
16751
      this.ex = null;
16752
    }
16753
 
16754
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16755
    public boolean isSetEx() {
16756
      return this.ex != null;
16757
    }
16758
 
16759
    public void setExIsSet(boolean value) {
16760
      if (!value) {
16761
        this.ex = null;
16762
      }
16763
    }
16764
 
16765
    public void setFieldValue(_Fields field, Object value) {
16766
      switch (field) {
16767
      case SUCCESS:
16768
        if (value == null) {
16769
          unsetSuccess();
16770
        } else {
483 rajveer 16771
          setSuccess((List<Order>)value);
68 ashish 16772
        }
16773
        break;
16774
 
16775
      case EX:
16776
        if (value == null) {
16777
          unsetEx();
16778
        } else {
16779
          setEx((TransactionServiceException)value);
16780
        }
16781
        break;
16782
 
16783
      }
16784
    }
16785
 
16786
    public void setFieldValue(int fieldID, Object value) {
16787
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16788
    }
16789
 
16790
    public Object getFieldValue(_Fields field) {
16791
      switch (field) {
16792
      case SUCCESS:
483 rajveer 16793
        return getSuccess();
68 ashish 16794
 
16795
      case EX:
16796
        return getEx();
16797
 
16798
      }
16799
      throw new IllegalStateException();
16800
    }
16801
 
16802
    public Object getFieldValue(int fieldId) {
16803
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16804
    }
16805
 
16806
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16807
    public boolean isSet(_Fields field) {
16808
      switch (field) {
16809
      case SUCCESS:
16810
        return isSetSuccess();
16811
      case EX:
16812
        return isSetEx();
16813
      }
16814
      throw new IllegalStateException();
16815
    }
16816
 
16817
    public boolean isSet(int fieldID) {
16818
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16819
    }
16820
 
16821
    @Override
16822
    public boolean equals(Object that) {
16823
      if (that == null)
16824
        return false;
483 rajveer 16825
      if (that instanceof getOrdersForCustomer_result)
16826
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16827
      return false;
16828
    }
16829
 
483 rajveer 16830
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16831
      if (that == null)
16832
        return false;
16833
 
483 rajveer 16834
      boolean this_present_success = true && this.isSetSuccess();
16835
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16836
      if (this_present_success || that_present_success) {
16837
        if (!(this_present_success && that_present_success))
16838
          return false;
483 rajveer 16839
        if (!this.success.equals(that.success))
68 ashish 16840
          return false;
16841
      }
16842
 
16843
      boolean this_present_ex = true && this.isSetEx();
16844
      boolean that_present_ex = true && that.isSetEx();
16845
      if (this_present_ex || that_present_ex) {
16846
        if (!(this_present_ex && that_present_ex))
16847
          return false;
16848
        if (!this.ex.equals(that.ex))
16849
          return false;
16850
      }
16851
 
16852
      return true;
16853
    }
16854
 
16855
    @Override
16856
    public int hashCode() {
16857
      return 0;
16858
    }
16859
 
483 rajveer 16860
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 16861
      if (!getClass().equals(other.getClass())) {
16862
        return getClass().getName().compareTo(other.getClass().getName());
16863
      }
16864
 
16865
      int lastComparison = 0;
483 rajveer 16866
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 16867
 
16868
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16869
      if (lastComparison != 0) {
16870
        return lastComparison;
16871
      }
16872
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16873
      if (lastComparison != 0) {
16874
        return lastComparison;
16875
      }
16876
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16877
      if (lastComparison != 0) {
16878
        return lastComparison;
16879
      }
16880
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16881
      if (lastComparison != 0) {
16882
        return lastComparison;
16883
      }
16884
      return 0;
16885
    }
16886
 
16887
    public void read(TProtocol iprot) throws TException {
16888
      TField field;
16889
      iprot.readStructBegin();
16890
      while (true)
16891
      {
16892
        field = iprot.readFieldBegin();
16893
        if (field.type == TType.STOP) { 
16894
          break;
16895
        }
16896
        _Fields fieldId = _Fields.findByThriftId(field.id);
16897
        if (fieldId == null) {
16898
          TProtocolUtil.skip(iprot, field.type);
16899
        } else {
16900
          switch (fieldId) {
16901
            case SUCCESS:
483 rajveer 16902
              if (field.type == TType.LIST) {
16903
                {
1382 varun.gupt 16904
                  TList _list36 = iprot.readListBegin();
16905
                  this.success = new ArrayList<Order>(_list36.size);
16906
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 16907
                  {
1382 varun.gupt 16908
                    Order _elem38;
16909
                    _elem38 = new Order();
16910
                    _elem38.read(iprot);
16911
                    this.success.add(_elem38);
483 rajveer 16912
                  }
16913
                  iprot.readListEnd();
16914
                }
68 ashish 16915
              } else { 
16916
                TProtocolUtil.skip(iprot, field.type);
16917
              }
16918
              break;
16919
            case EX:
16920
              if (field.type == TType.STRUCT) {
16921
                this.ex = new TransactionServiceException();
16922
                this.ex.read(iprot);
16923
              } else { 
16924
                TProtocolUtil.skip(iprot, field.type);
16925
              }
16926
              break;
16927
          }
16928
          iprot.readFieldEnd();
16929
        }
16930
      }
16931
      iprot.readStructEnd();
16932
      validate();
16933
    }
16934
 
16935
    public void write(TProtocol oprot) throws TException {
16936
      oprot.writeStructBegin(STRUCT_DESC);
16937
 
16938
      if (this.isSetSuccess()) {
16939
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16940
        {
16941
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16942
          for (Order _iter39 : this.success)
483 rajveer 16943
          {
1382 varun.gupt 16944
            _iter39.write(oprot);
483 rajveer 16945
          }
16946
          oprot.writeListEnd();
16947
        }
68 ashish 16948
        oprot.writeFieldEnd();
16949
      } else if (this.isSetEx()) {
16950
        oprot.writeFieldBegin(EX_FIELD_DESC);
16951
        this.ex.write(oprot);
16952
        oprot.writeFieldEnd();
16953
      }
16954
      oprot.writeFieldStop();
16955
      oprot.writeStructEnd();
16956
    }
16957
 
16958
    @Override
16959
    public String toString() {
483 rajveer 16960
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 16961
      boolean first = true;
16962
 
16963
      sb.append("success:");
483 rajveer 16964
      if (this.success == null) {
16965
        sb.append("null");
16966
      } else {
16967
        sb.append(this.success);
16968
      }
68 ashish 16969
      first = false;
16970
      if (!first) sb.append(", ");
16971
      sb.append("ex:");
16972
      if (this.ex == null) {
16973
        sb.append("null");
16974
      } else {
16975
        sb.append(this.ex);
16976
      }
16977
      first = false;
16978
      sb.append(")");
16979
      return sb.toString();
16980
    }
16981
 
16982
    public void validate() throws TException {
16983
      // check for required fields
16984
    }
16985
 
16986
  }
16987
 
483 rajveer 16988
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
16989
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 16990
 
483 rajveer 16991
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 16992
 
483 rajveer 16993
    private Order order;
68 ashish 16994
 
16995
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16996
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16997
      ORDER((short)1, "order");
68 ashish 16998
 
16999
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17000
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17001
 
17002
      static {
17003
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17004
          byId.put((int)field._thriftId, field);
17005
          byName.put(field.getFieldName(), field);
17006
        }
17007
      }
17008
 
17009
      /**
17010
       * Find the _Fields constant that matches fieldId, or null if its not found.
17011
       */
17012
      public static _Fields findByThriftId(int fieldId) {
17013
        return byId.get(fieldId);
17014
      }
17015
 
17016
      /**
17017
       * Find the _Fields constant that matches fieldId, throwing an exception
17018
       * if it is not found.
17019
       */
17020
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17021
        _Fields fields = findByThriftId(fieldId);
17022
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17023
        return fields;
17024
      }
17025
 
17026
      /**
17027
       * Find the _Fields constant that matches name, or null if its not found.
17028
       */
17029
      public static _Fields findByName(String name) {
17030
        return byName.get(name);
17031
      }
17032
 
17033
      private final short _thriftId;
17034
      private final String _fieldName;
17035
 
17036
      _Fields(short thriftId, String fieldName) {
17037
        _thriftId = thriftId;
17038
        _fieldName = fieldName;
17039
      }
17040
 
17041
      public short getThriftFieldId() {
17042
        return _thriftId;
17043
      }
17044
 
17045
      public String getFieldName() {
17046
        return _fieldName;
17047
      }
17048
    }
17049
 
17050
    // isset id assignments
17051
 
17052
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17053
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
17054
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17055
    }});
17056
 
17057
    static {
483 rajveer 17058
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 17059
    }
17060
 
483 rajveer 17061
    public createOrder_args() {
68 ashish 17062
    }
17063
 
483 rajveer 17064
    public createOrder_args(
17065
      Order order)
68 ashish 17066
    {
17067
      this();
483 rajveer 17068
      this.order = order;
68 ashish 17069
    }
17070
 
17071
    /**
17072
     * Performs a deep copy on <i>other</i>.
17073
     */
483 rajveer 17074
    public createOrder_args(createOrder_args other) {
17075
      if (other.isSetOrder()) {
17076
        this.order = new Order(other.order);
17077
      }
68 ashish 17078
    }
17079
 
483 rajveer 17080
    public createOrder_args deepCopy() {
17081
      return new createOrder_args(this);
68 ashish 17082
    }
17083
 
17084
    @Deprecated
483 rajveer 17085
    public createOrder_args clone() {
17086
      return new createOrder_args(this);
68 ashish 17087
    }
17088
 
483 rajveer 17089
    public Order getOrder() {
17090
      return this.order;
68 ashish 17091
    }
17092
 
483 rajveer 17093
    public createOrder_args setOrder(Order order) {
17094
      this.order = order;
68 ashish 17095
      return this;
17096
    }
17097
 
483 rajveer 17098
    public void unsetOrder() {
17099
      this.order = null;
68 ashish 17100
    }
17101
 
483 rajveer 17102
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
17103
    public boolean isSetOrder() {
17104
      return this.order != null;
68 ashish 17105
    }
17106
 
483 rajveer 17107
    public void setOrderIsSet(boolean value) {
17108
      if (!value) {
17109
        this.order = null;
17110
      }
68 ashish 17111
    }
17112
 
17113
    public void setFieldValue(_Fields field, Object value) {
17114
      switch (field) {
483 rajveer 17115
      case ORDER:
68 ashish 17116
        if (value == null) {
483 rajveer 17117
          unsetOrder();
68 ashish 17118
        } else {
483 rajveer 17119
          setOrder((Order)value);
68 ashish 17120
        }
17121
        break;
17122
 
17123
      }
17124
    }
17125
 
17126
    public void setFieldValue(int fieldID, Object value) {
17127
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17128
    }
17129
 
17130
    public Object getFieldValue(_Fields field) {
17131
      switch (field) {
483 rajveer 17132
      case ORDER:
17133
        return getOrder();
68 ashish 17134
 
17135
      }
17136
      throw new IllegalStateException();
17137
    }
17138
 
17139
    public Object getFieldValue(int fieldId) {
17140
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17141
    }
17142
 
17143
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17144
    public boolean isSet(_Fields field) {
17145
      switch (field) {
483 rajveer 17146
      case ORDER:
17147
        return isSetOrder();
68 ashish 17148
      }
17149
      throw new IllegalStateException();
17150
    }
17151
 
17152
    public boolean isSet(int fieldID) {
17153
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17154
    }
17155
 
17156
    @Override
17157
    public boolean equals(Object that) {
17158
      if (that == null)
17159
        return false;
483 rajveer 17160
      if (that instanceof createOrder_args)
17161
        return this.equals((createOrder_args)that);
68 ashish 17162
      return false;
17163
    }
17164
 
483 rajveer 17165
    public boolean equals(createOrder_args that) {
68 ashish 17166
      if (that == null)
17167
        return false;
17168
 
483 rajveer 17169
      boolean this_present_order = true && this.isSetOrder();
17170
      boolean that_present_order = true && that.isSetOrder();
17171
      if (this_present_order || that_present_order) {
17172
        if (!(this_present_order && that_present_order))
68 ashish 17173
          return false;
483 rajveer 17174
        if (!this.order.equals(that.order))
68 ashish 17175
          return false;
17176
      }
17177
 
17178
      return true;
17179
    }
17180
 
17181
    @Override
17182
    public int hashCode() {
17183
      return 0;
17184
    }
17185
 
483 rajveer 17186
    public int compareTo(createOrder_args other) {
68 ashish 17187
      if (!getClass().equals(other.getClass())) {
17188
        return getClass().getName().compareTo(other.getClass().getName());
17189
      }
17190
 
17191
      int lastComparison = 0;
483 rajveer 17192
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 17193
 
483 rajveer 17194
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 17195
      if (lastComparison != 0) {
17196
        return lastComparison;
17197
      }
483 rajveer 17198
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 17199
      if (lastComparison != 0) {
17200
        return lastComparison;
17201
      }
17202
      return 0;
17203
    }
17204
 
17205
    public void read(TProtocol iprot) throws TException {
17206
      TField field;
17207
      iprot.readStructBegin();
17208
      while (true)
17209
      {
17210
        field = iprot.readFieldBegin();
17211
        if (field.type == TType.STOP) { 
17212
          break;
17213
        }
17214
        _Fields fieldId = _Fields.findByThriftId(field.id);
17215
        if (fieldId == null) {
17216
          TProtocolUtil.skip(iprot, field.type);
17217
        } else {
17218
          switch (fieldId) {
483 rajveer 17219
            case ORDER:
17220
              if (field.type == TType.STRUCT) {
17221
                this.order = new Order();
17222
                this.order.read(iprot);
68 ashish 17223
              } else { 
17224
                TProtocolUtil.skip(iprot, field.type);
17225
              }
17226
              break;
17227
          }
17228
          iprot.readFieldEnd();
17229
        }
17230
      }
17231
      iprot.readStructEnd();
17232
      validate();
17233
    }
17234
 
17235
    public void write(TProtocol oprot) throws TException {
17236
      validate();
17237
 
17238
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17239
      if (this.order != null) {
17240
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
17241
        this.order.write(oprot);
17242
        oprot.writeFieldEnd();
17243
      }
68 ashish 17244
      oprot.writeFieldStop();
17245
      oprot.writeStructEnd();
17246
    }
17247
 
17248
    @Override
17249
    public String toString() {
483 rajveer 17250
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 17251
      boolean first = true;
17252
 
483 rajveer 17253
      sb.append("order:");
17254
      if (this.order == null) {
17255
        sb.append("null");
17256
      } else {
17257
        sb.append(this.order);
17258
      }
68 ashish 17259
      first = false;
17260
      sb.append(")");
17261
      return sb.toString();
17262
    }
17263
 
17264
    public void validate() throws TException {
17265
      // check for required fields
17266
    }
17267
 
17268
  }
17269
 
483 rajveer 17270
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
17271
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 17272
 
483 rajveer 17273
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 17274
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17275
 
483 rajveer 17276
    private long success;
68 ashish 17277
    private TransactionServiceException ex;
17278
 
17279
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17280
    public enum _Fields implements TFieldIdEnum {
17281
      SUCCESS((short)0, "success"),
17282
      EX((short)1, "ex");
17283
 
17284
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17285
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17286
 
17287
      static {
17288
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17289
          byId.put((int)field._thriftId, field);
17290
          byName.put(field.getFieldName(), field);
17291
        }
17292
      }
17293
 
17294
      /**
17295
       * Find the _Fields constant that matches fieldId, or null if its not found.
17296
       */
17297
      public static _Fields findByThriftId(int fieldId) {
17298
        return byId.get(fieldId);
17299
      }
17300
 
17301
      /**
17302
       * Find the _Fields constant that matches fieldId, throwing an exception
17303
       * if it is not found.
17304
       */
17305
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17306
        _Fields fields = findByThriftId(fieldId);
17307
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17308
        return fields;
17309
      }
17310
 
17311
      /**
17312
       * Find the _Fields constant that matches name, or null if its not found.
17313
       */
17314
      public static _Fields findByName(String name) {
17315
        return byName.get(name);
17316
      }
17317
 
17318
      private final short _thriftId;
17319
      private final String _fieldName;
17320
 
17321
      _Fields(short thriftId, String fieldName) {
17322
        _thriftId = thriftId;
17323
        _fieldName = fieldName;
17324
      }
17325
 
17326
      public short getThriftFieldId() {
17327
        return _thriftId;
17328
      }
17329
 
17330
      public String getFieldName() {
17331
        return _fieldName;
17332
      }
17333
    }
17334
 
17335
    // isset id assignments
17336
    private static final int __SUCCESS_ISSET_ID = 0;
17337
    private BitSet __isset_bit_vector = new BitSet(1);
17338
 
17339
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17340
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17341
          new FieldValueMetaData(TType.I64)));
68 ashish 17342
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17343
          new FieldValueMetaData(TType.STRUCT)));
17344
    }});
17345
 
17346
    static {
483 rajveer 17347
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 17348
    }
17349
 
483 rajveer 17350
    public createOrder_result() {
68 ashish 17351
    }
17352
 
483 rajveer 17353
    public createOrder_result(
17354
      long success,
68 ashish 17355
      TransactionServiceException ex)
17356
    {
17357
      this();
17358
      this.success = success;
17359
      setSuccessIsSet(true);
17360
      this.ex = ex;
17361
    }
17362
 
17363
    /**
17364
     * Performs a deep copy on <i>other</i>.
17365
     */
483 rajveer 17366
    public createOrder_result(createOrder_result other) {
68 ashish 17367
      __isset_bit_vector.clear();
17368
      __isset_bit_vector.or(other.__isset_bit_vector);
17369
      this.success = other.success;
17370
      if (other.isSetEx()) {
17371
        this.ex = new TransactionServiceException(other.ex);
17372
      }
17373
    }
17374
 
483 rajveer 17375
    public createOrder_result deepCopy() {
17376
      return new createOrder_result(this);
68 ashish 17377
    }
17378
 
17379
    @Deprecated
483 rajveer 17380
    public createOrder_result clone() {
17381
      return new createOrder_result(this);
68 ashish 17382
    }
17383
 
483 rajveer 17384
    public long getSuccess() {
68 ashish 17385
      return this.success;
17386
    }
17387
 
483 rajveer 17388
    public createOrder_result setSuccess(long success) {
68 ashish 17389
      this.success = success;
17390
      setSuccessIsSet(true);
17391
      return this;
17392
    }
17393
 
17394
    public void unsetSuccess() {
17395
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17396
    }
17397
 
17398
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17399
    public boolean isSetSuccess() {
17400
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17401
    }
17402
 
17403
    public void setSuccessIsSet(boolean value) {
17404
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17405
    }
17406
 
17407
    public TransactionServiceException getEx() {
17408
      return this.ex;
17409
    }
17410
 
483 rajveer 17411
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 17412
      this.ex = ex;
17413
      return this;
17414
    }
17415
 
17416
    public void unsetEx() {
17417
      this.ex = null;
17418
    }
17419
 
17420
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17421
    public boolean isSetEx() {
17422
      return this.ex != null;
17423
    }
17424
 
17425
    public void setExIsSet(boolean value) {
17426
      if (!value) {
17427
        this.ex = null;
17428
      }
17429
    }
17430
 
17431
    public void setFieldValue(_Fields field, Object value) {
17432
      switch (field) {
17433
      case SUCCESS:
17434
        if (value == null) {
17435
          unsetSuccess();
17436
        } else {
483 rajveer 17437
          setSuccess((Long)value);
68 ashish 17438
        }
17439
        break;
17440
 
17441
      case EX:
17442
        if (value == null) {
17443
          unsetEx();
17444
        } else {
17445
          setEx((TransactionServiceException)value);
17446
        }
17447
        break;
17448
 
17449
      }
17450
    }
17451
 
17452
    public void setFieldValue(int fieldID, Object value) {
17453
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17454
    }
17455
 
17456
    public Object getFieldValue(_Fields field) {
17457
      switch (field) {
17458
      case SUCCESS:
483 rajveer 17459
        return new Long(getSuccess());
68 ashish 17460
 
17461
      case EX:
17462
        return getEx();
17463
 
17464
      }
17465
      throw new IllegalStateException();
17466
    }
17467
 
17468
    public Object getFieldValue(int fieldId) {
17469
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17470
    }
17471
 
17472
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17473
    public boolean isSet(_Fields field) {
17474
      switch (field) {
17475
      case SUCCESS:
17476
        return isSetSuccess();
17477
      case EX:
17478
        return isSetEx();
17479
      }
17480
      throw new IllegalStateException();
17481
    }
17482
 
17483
    public boolean isSet(int fieldID) {
17484
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17485
    }
17486
 
17487
    @Override
17488
    public boolean equals(Object that) {
17489
      if (that == null)
17490
        return false;
483 rajveer 17491
      if (that instanceof createOrder_result)
17492
        return this.equals((createOrder_result)that);
68 ashish 17493
      return false;
17494
    }
17495
 
483 rajveer 17496
    public boolean equals(createOrder_result that) {
68 ashish 17497
      if (that == null)
17498
        return false;
17499
 
17500
      boolean this_present_success = true;
17501
      boolean that_present_success = true;
17502
      if (this_present_success || that_present_success) {
17503
        if (!(this_present_success && that_present_success))
17504
          return false;
17505
        if (this.success != that.success)
17506
          return false;
17507
      }
17508
 
17509
      boolean this_present_ex = true && this.isSetEx();
17510
      boolean that_present_ex = true && that.isSetEx();
17511
      if (this_present_ex || that_present_ex) {
17512
        if (!(this_present_ex && that_present_ex))
17513
          return false;
17514
        if (!this.ex.equals(that.ex))
17515
          return false;
17516
      }
17517
 
17518
      return true;
17519
    }
17520
 
17521
    @Override
17522
    public int hashCode() {
17523
      return 0;
17524
    }
17525
 
483 rajveer 17526
    public int compareTo(createOrder_result other) {
68 ashish 17527
      if (!getClass().equals(other.getClass())) {
17528
        return getClass().getName().compareTo(other.getClass().getName());
17529
      }
17530
 
17531
      int lastComparison = 0;
483 rajveer 17532
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 17533
 
17534
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17535
      if (lastComparison != 0) {
17536
        return lastComparison;
17537
      }
17538
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17539
      if (lastComparison != 0) {
17540
        return lastComparison;
17541
      }
17542
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17543
      if (lastComparison != 0) {
17544
        return lastComparison;
17545
      }
17546
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17547
      if (lastComparison != 0) {
17548
        return lastComparison;
17549
      }
17550
      return 0;
17551
    }
17552
 
17553
    public void read(TProtocol iprot) throws TException {
17554
      TField field;
17555
      iprot.readStructBegin();
17556
      while (true)
17557
      {
17558
        field = iprot.readFieldBegin();
17559
        if (field.type == TType.STOP) { 
17560
          break;
17561
        }
17562
        _Fields fieldId = _Fields.findByThriftId(field.id);
17563
        if (fieldId == null) {
17564
          TProtocolUtil.skip(iprot, field.type);
17565
        } else {
17566
          switch (fieldId) {
17567
            case SUCCESS:
483 rajveer 17568
              if (field.type == TType.I64) {
17569
                this.success = iprot.readI64();
68 ashish 17570
                setSuccessIsSet(true);
17571
              } else { 
17572
                TProtocolUtil.skip(iprot, field.type);
17573
              }
17574
              break;
17575
            case EX:
17576
              if (field.type == TType.STRUCT) {
17577
                this.ex = new TransactionServiceException();
17578
                this.ex.read(iprot);
17579
              } else { 
17580
                TProtocolUtil.skip(iprot, field.type);
17581
              }
17582
              break;
17583
          }
17584
          iprot.readFieldEnd();
17585
        }
17586
      }
17587
      iprot.readStructEnd();
17588
      validate();
17589
    }
17590
 
17591
    public void write(TProtocol oprot) throws TException {
17592
      oprot.writeStructBegin(STRUCT_DESC);
17593
 
17594
      if (this.isSetSuccess()) {
17595
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17596
        oprot.writeI64(this.success);
68 ashish 17597
        oprot.writeFieldEnd();
17598
      } else if (this.isSetEx()) {
17599
        oprot.writeFieldBegin(EX_FIELD_DESC);
17600
        this.ex.write(oprot);
17601
        oprot.writeFieldEnd();
17602
      }
17603
      oprot.writeFieldStop();
17604
      oprot.writeStructEnd();
17605
    }
17606
 
17607
    @Override
17608
    public String toString() {
483 rajveer 17609
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 17610
      boolean first = true;
17611
 
17612
      sb.append("success:");
17613
      sb.append(this.success);
17614
      first = false;
17615
      if (!first) sb.append(", ");
17616
      sb.append("ex:");
17617
      if (this.ex == null) {
17618
        sb.append("null");
17619
      } else {
17620
        sb.append(this.ex);
17621
      }
17622
      first = false;
17623
      sb.append(")");
17624
      return sb.toString();
17625
    }
17626
 
17627
    public void validate() throws TException {
17628
      // check for required fields
17629
    }
17630
 
17631
  }
17632
 
483 rajveer 17633
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17634
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17635
 
483 rajveer 17636
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17637
 
483 rajveer 17638
    private long id;
68 ashish 17639
 
17640
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17641
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17642
      ID((short)1, "id");
68 ashish 17643
 
17644
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17645
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17646
 
17647
      static {
17648
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17649
          byId.put((int)field._thriftId, field);
17650
          byName.put(field.getFieldName(), field);
17651
        }
17652
      }
17653
 
17654
      /**
17655
       * Find the _Fields constant that matches fieldId, or null if its not found.
17656
       */
17657
      public static _Fields findByThriftId(int fieldId) {
17658
        return byId.get(fieldId);
17659
      }
17660
 
17661
      /**
17662
       * Find the _Fields constant that matches fieldId, throwing an exception
17663
       * if it is not found.
17664
       */
17665
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17666
        _Fields fields = findByThriftId(fieldId);
17667
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17668
        return fields;
17669
      }
17670
 
17671
      /**
17672
       * Find the _Fields constant that matches name, or null if its not found.
17673
       */
17674
      public static _Fields findByName(String name) {
17675
        return byName.get(name);
17676
      }
17677
 
17678
      private final short _thriftId;
17679
      private final String _fieldName;
17680
 
17681
      _Fields(short thriftId, String fieldName) {
17682
        _thriftId = thriftId;
17683
        _fieldName = fieldName;
17684
      }
17685
 
17686
      public short getThriftFieldId() {
17687
        return _thriftId;
17688
      }
17689
 
17690
      public String getFieldName() {
17691
        return _fieldName;
17692
      }
17693
    }
17694
 
17695
    // isset id assignments
483 rajveer 17696
    private static final int __ID_ISSET_ID = 0;
17697
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17698
 
17699
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17700
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17701
          new FieldValueMetaData(TType.I64)));
17702
    }});
17703
 
17704
    static {
483 rajveer 17705
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17706
    }
17707
 
483 rajveer 17708
    public getOrder_args() {
68 ashish 17709
    }
17710
 
483 rajveer 17711
    public getOrder_args(
17712
      long id)
68 ashish 17713
    {
17714
      this();
483 rajveer 17715
      this.id = id;
17716
      setIdIsSet(true);
68 ashish 17717
    }
17718
 
17719
    /**
17720
     * Performs a deep copy on <i>other</i>.
17721
     */
483 rajveer 17722
    public getOrder_args(getOrder_args other) {
68 ashish 17723
      __isset_bit_vector.clear();
17724
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17725
      this.id = other.id;
68 ashish 17726
    }
17727
 
483 rajveer 17728
    public getOrder_args deepCopy() {
17729
      return new getOrder_args(this);
68 ashish 17730
    }
17731
 
17732
    @Deprecated
483 rajveer 17733
    public getOrder_args clone() {
17734
      return new getOrder_args(this);
68 ashish 17735
    }
17736
 
483 rajveer 17737
    public long getId() {
17738
      return this.id;
68 ashish 17739
    }
17740
 
483 rajveer 17741
    public getOrder_args setId(long id) {
17742
      this.id = id;
17743
      setIdIsSet(true);
68 ashish 17744
      return this;
17745
    }
17746
 
483 rajveer 17747
    public void unsetId() {
17748
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17749
    }
17750
 
483 rajveer 17751
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17752
    public boolean isSetId() {
17753
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17754
    }
17755
 
483 rajveer 17756
    public void setIdIsSet(boolean value) {
17757
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17758
    }
17759
 
17760
    public void setFieldValue(_Fields field, Object value) {
17761
      switch (field) {
483 rajveer 17762
      case ID:
68 ashish 17763
        if (value == null) {
483 rajveer 17764
          unsetId();
68 ashish 17765
        } else {
483 rajveer 17766
          setId((Long)value);
68 ashish 17767
        }
17768
        break;
17769
 
17770
      }
17771
    }
17772
 
17773
    public void setFieldValue(int fieldID, Object value) {
17774
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17775
    }
17776
 
17777
    public Object getFieldValue(_Fields field) {
17778
      switch (field) {
483 rajveer 17779
      case ID:
17780
        return new Long(getId());
68 ashish 17781
 
17782
      }
17783
      throw new IllegalStateException();
17784
    }
17785
 
17786
    public Object getFieldValue(int fieldId) {
17787
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17788
    }
17789
 
17790
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17791
    public boolean isSet(_Fields field) {
17792
      switch (field) {
483 rajveer 17793
      case ID:
17794
        return isSetId();
68 ashish 17795
      }
17796
      throw new IllegalStateException();
17797
    }
17798
 
17799
    public boolean isSet(int fieldID) {
17800
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17801
    }
17802
 
17803
    @Override
17804
    public boolean equals(Object that) {
17805
      if (that == null)
17806
        return false;
483 rajveer 17807
      if (that instanceof getOrder_args)
17808
        return this.equals((getOrder_args)that);
68 ashish 17809
      return false;
17810
    }
17811
 
483 rajveer 17812
    public boolean equals(getOrder_args that) {
68 ashish 17813
      if (that == null)
17814
        return false;
17815
 
483 rajveer 17816
      boolean this_present_id = true;
17817
      boolean that_present_id = true;
17818
      if (this_present_id || that_present_id) {
17819
        if (!(this_present_id && that_present_id))
68 ashish 17820
          return false;
483 rajveer 17821
        if (this.id != that.id)
68 ashish 17822
          return false;
17823
      }
17824
 
17825
      return true;
17826
    }
17827
 
17828
    @Override
17829
    public int hashCode() {
17830
      return 0;
17831
    }
17832
 
483 rajveer 17833
    public int compareTo(getOrder_args other) {
68 ashish 17834
      if (!getClass().equals(other.getClass())) {
17835
        return getClass().getName().compareTo(other.getClass().getName());
17836
      }
17837
 
17838
      int lastComparison = 0;
483 rajveer 17839
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17840
 
483 rajveer 17841
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17842
      if (lastComparison != 0) {
17843
        return lastComparison;
17844
      }
483 rajveer 17845
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 17846
      if (lastComparison != 0) {
17847
        return lastComparison;
17848
      }
17849
      return 0;
17850
    }
17851
 
17852
    public void read(TProtocol iprot) throws TException {
17853
      TField field;
17854
      iprot.readStructBegin();
17855
      while (true)
17856
      {
17857
        field = iprot.readFieldBegin();
17858
        if (field.type == TType.STOP) { 
17859
          break;
17860
        }
17861
        _Fields fieldId = _Fields.findByThriftId(field.id);
17862
        if (fieldId == null) {
17863
          TProtocolUtil.skip(iprot, field.type);
17864
        } else {
17865
          switch (fieldId) {
483 rajveer 17866
            case ID:
68 ashish 17867
              if (field.type == TType.I64) {
483 rajveer 17868
                this.id = iprot.readI64();
17869
                setIdIsSet(true);
68 ashish 17870
              } else { 
17871
                TProtocolUtil.skip(iprot, field.type);
17872
              }
17873
              break;
17874
          }
17875
          iprot.readFieldEnd();
17876
        }
17877
      }
17878
      iprot.readStructEnd();
17879
      validate();
17880
    }
17881
 
17882
    public void write(TProtocol oprot) throws TException {
17883
      validate();
17884
 
17885
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17886
      oprot.writeFieldBegin(ID_FIELD_DESC);
17887
      oprot.writeI64(this.id);
68 ashish 17888
      oprot.writeFieldEnd();
17889
      oprot.writeFieldStop();
17890
      oprot.writeStructEnd();
17891
    }
17892
 
17893
    @Override
17894
    public String toString() {
483 rajveer 17895
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 17896
      boolean first = true;
17897
 
483 rajveer 17898
      sb.append("id:");
17899
      sb.append(this.id);
68 ashish 17900
      first = false;
17901
      sb.append(")");
17902
      return sb.toString();
17903
    }
17904
 
17905
    public void validate() throws TException {
17906
      // check for required fields
17907
    }
17908
 
17909
  }
17910
 
483 rajveer 17911
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
17912
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 17913
 
483 rajveer 17914
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 17915
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17916
 
483 rajveer 17917
    private Order success;
68 ashish 17918
    private TransactionServiceException ex;
17919
 
17920
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17921
    public enum _Fields implements TFieldIdEnum {
17922
      SUCCESS((short)0, "success"),
17923
      EX((short)1, "ex");
17924
 
17925
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17926
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17927
 
17928
      static {
17929
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17930
          byId.put((int)field._thriftId, field);
17931
          byName.put(field.getFieldName(), field);
17932
        }
17933
      }
17934
 
17935
      /**
17936
       * Find the _Fields constant that matches fieldId, or null if its not found.
17937
       */
17938
      public static _Fields findByThriftId(int fieldId) {
17939
        return byId.get(fieldId);
17940
      }
17941
 
17942
      /**
17943
       * Find the _Fields constant that matches fieldId, throwing an exception
17944
       * if it is not found.
17945
       */
17946
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17947
        _Fields fields = findByThriftId(fieldId);
17948
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17949
        return fields;
17950
      }
17951
 
17952
      /**
17953
       * Find the _Fields constant that matches name, or null if its not found.
17954
       */
17955
      public static _Fields findByName(String name) {
17956
        return byName.get(name);
17957
      }
17958
 
17959
      private final short _thriftId;
17960
      private final String _fieldName;
17961
 
17962
      _Fields(short thriftId, String fieldName) {
17963
        _thriftId = thriftId;
17964
        _fieldName = fieldName;
17965
      }
17966
 
17967
      public short getThriftFieldId() {
17968
        return _thriftId;
17969
      }
17970
 
17971
      public String getFieldName() {
17972
        return _fieldName;
17973
      }
17974
    }
17975
 
17976
    // isset id assignments
17977
 
17978
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17979
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17980
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17981
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17982
          new FieldValueMetaData(TType.STRUCT)));
17983
    }});
17984
 
17985
    static {
483 rajveer 17986
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 17987
    }
17988
 
483 rajveer 17989
    public getOrder_result() {
68 ashish 17990
    }
17991
 
483 rajveer 17992
    public getOrder_result(
17993
      Order success,
68 ashish 17994
      TransactionServiceException ex)
17995
    {
17996
      this();
17997
      this.success = success;
17998
      this.ex = ex;
17999
    }
18000
 
18001
    /**
18002
     * Performs a deep copy on <i>other</i>.
18003
     */
483 rajveer 18004
    public getOrder_result(getOrder_result other) {
18005
      if (other.isSetSuccess()) {
18006
        this.success = new Order(other.success);
18007
      }
68 ashish 18008
      if (other.isSetEx()) {
18009
        this.ex = new TransactionServiceException(other.ex);
18010
      }
18011
    }
18012
 
483 rajveer 18013
    public getOrder_result deepCopy() {
18014
      return new getOrder_result(this);
68 ashish 18015
    }
18016
 
18017
    @Deprecated
483 rajveer 18018
    public getOrder_result clone() {
18019
      return new getOrder_result(this);
68 ashish 18020
    }
18021
 
483 rajveer 18022
    public Order getSuccess() {
68 ashish 18023
      return this.success;
18024
    }
18025
 
483 rajveer 18026
    public getOrder_result setSuccess(Order success) {
68 ashish 18027
      this.success = success;
18028
      return this;
18029
    }
18030
 
18031
    public void unsetSuccess() {
483 rajveer 18032
      this.success = null;
68 ashish 18033
    }
18034
 
18035
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18036
    public boolean isSetSuccess() {
483 rajveer 18037
      return this.success != null;
68 ashish 18038
    }
18039
 
18040
    public void setSuccessIsSet(boolean value) {
483 rajveer 18041
      if (!value) {
18042
        this.success = null;
18043
      }
68 ashish 18044
    }
18045
 
18046
    public TransactionServiceException getEx() {
18047
      return this.ex;
18048
    }
18049
 
483 rajveer 18050
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 18051
      this.ex = ex;
18052
      return this;
18053
    }
18054
 
18055
    public void unsetEx() {
18056
      this.ex = null;
18057
    }
18058
 
18059
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18060
    public boolean isSetEx() {
18061
      return this.ex != null;
18062
    }
18063
 
18064
    public void setExIsSet(boolean value) {
18065
      if (!value) {
18066
        this.ex = null;
18067
      }
18068
    }
18069
 
18070
    public void setFieldValue(_Fields field, Object value) {
18071
      switch (field) {
18072
      case SUCCESS:
18073
        if (value == null) {
18074
          unsetSuccess();
18075
        } else {
483 rajveer 18076
          setSuccess((Order)value);
68 ashish 18077
        }
18078
        break;
18079
 
18080
      case EX:
18081
        if (value == null) {
18082
          unsetEx();
18083
        } else {
18084
          setEx((TransactionServiceException)value);
18085
        }
18086
        break;
18087
 
18088
      }
18089
    }
18090
 
18091
    public void setFieldValue(int fieldID, Object value) {
18092
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18093
    }
18094
 
18095
    public Object getFieldValue(_Fields field) {
18096
      switch (field) {
18097
      case SUCCESS:
483 rajveer 18098
        return getSuccess();
68 ashish 18099
 
18100
      case EX:
18101
        return getEx();
18102
 
18103
      }
18104
      throw new IllegalStateException();
18105
    }
18106
 
18107
    public Object getFieldValue(int fieldId) {
18108
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18109
    }
18110
 
18111
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18112
    public boolean isSet(_Fields field) {
18113
      switch (field) {
18114
      case SUCCESS:
18115
        return isSetSuccess();
18116
      case EX:
18117
        return isSetEx();
18118
      }
18119
      throw new IllegalStateException();
18120
    }
18121
 
18122
    public boolean isSet(int fieldID) {
18123
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18124
    }
18125
 
18126
    @Override
18127
    public boolean equals(Object that) {
18128
      if (that == null)
18129
        return false;
483 rajveer 18130
      if (that instanceof getOrder_result)
18131
        return this.equals((getOrder_result)that);
68 ashish 18132
      return false;
18133
    }
18134
 
483 rajveer 18135
    public boolean equals(getOrder_result that) {
68 ashish 18136
      if (that == null)
18137
        return false;
18138
 
483 rajveer 18139
      boolean this_present_success = true && this.isSetSuccess();
18140
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18141
      if (this_present_success || that_present_success) {
18142
        if (!(this_present_success && that_present_success))
18143
          return false;
483 rajveer 18144
        if (!this.success.equals(that.success))
68 ashish 18145
          return false;
18146
      }
18147
 
18148
      boolean this_present_ex = true && this.isSetEx();
18149
      boolean that_present_ex = true && that.isSetEx();
18150
      if (this_present_ex || that_present_ex) {
18151
        if (!(this_present_ex && that_present_ex))
18152
          return false;
18153
        if (!this.ex.equals(that.ex))
18154
          return false;
18155
      }
18156
 
18157
      return true;
18158
    }
18159
 
18160
    @Override
18161
    public int hashCode() {
18162
      return 0;
18163
    }
18164
 
483 rajveer 18165
    public int compareTo(getOrder_result other) {
68 ashish 18166
      if (!getClass().equals(other.getClass())) {
18167
        return getClass().getName().compareTo(other.getClass().getName());
18168
      }
18169
 
18170
      int lastComparison = 0;
483 rajveer 18171
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 18172
 
18173
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18174
      if (lastComparison != 0) {
18175
        return lastComparison;
18176
      }
18177
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18178
      if (lastComparison != 0) {
18179
        return lastComparison;
18180
      }
18181
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18182
      if (lastComparison != 0) {
18183
        return lastComparison;
18184
      }
18185
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18186
      if (lastComparison != 0) {
18187
        return lastComparison;
18188
      }
18189
      return 0;
18190
    }
18191
 
18192
    public void read(TProtocol iprot) throws TException {
18193
      TField field;
18194
      iprot.readStructBegin();
18195
      while (true)
18196
      {
18197
        field = iprot.readFieldBegin();
18198
        if (field.type == TType.STOP) { 
18199
          break;
18200
        }
18201
        _Fields fieldId = _Fields.findByThriftId(field.id);
18202
        if (fieldId == null) {
18203
          TProtocolUtil.skip(iprot, field.type);
18204
        } else {
18205
          switch (fieldId) {
18206
            case SUCCESS:
483 rajveer 18207
              if (field.type == TType.STRUCT) {
18208
                this.success = new Order();
18209
                this.success.read(iprot);
68 ashish 18210
              } else { 
18211
                TProtocolUtil.skip(iprot, field.type);
18212
              }
18213
              break;
18214
            case EX:
18215
              if (field.type == TType.STRUCT) {
18216
                this.ex = new TransactionServiceException();
18217
                this.ex.read(iprot);
18218
              } else { 
18219
                TProtocolUtil.skip(iprot, field.type);
18220
              }
18221
              break;
18222
          }
18223
          iprot.readFieldEnd();
18224
        }
18225
      }
18226
      iprot.readStructEnd();
18227
      validate();
18228
    }
18229
 
18230
    public void write(TProtocol oprot) throws TException {
18231
      oprot.writeStructBegin(STRUCT_DESC);
18232
 
18233
      if (this.isSetSuccess()) {
18234
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18235
        this.success.write(oprot);
68 ashish 18236
        oprot.writeFieldEnd();
18237
      } else if (this.isSetEx()) {
18238
        oprot.writeFieldBegin(EX_FIELD_DESC);
18239
        this.ex.write(oprot);
18240
        oprot.writeFieldEnd();
18241
      }
18242
      oprot.writeFieldStop();
18243
      oprot.writeStructEnd();
18244
    }
18245
 
18246
    @Override
18247
    public String toString() {
483 rajveer 18248
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 18249
      boolean first = true;
18250
 
18251
      sb.append("success:");
483 rajveer 18252
      if (this.success == null) {
18253
        sb.append("null");
18254
      } else {
18255
        sb.append(this.success);
18256
      }
68 ashish 18257
      first = false;
18258
      if (!first) sb.append(", ");
18259
      sb.append("ex:");
18260
      if (this.ex == null) {
18261
        sb.append("null");
18262
      } else {
18263
        sb.append(this.ex);
18264
      }
18265
      first = false;
18266
      sb.append(")");
18267
      return sb.toString();
18268
    }
18269
 
18270
    public void validate() throws TException {
18271
      // check for required fields
18272
    }
18273
 
18274
  }
18275
 
483 rajveer 18276
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
18277
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 18278
 
483 rajveer 18279
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 18280
 
483 rajveer 18281
    private long orderId;
68 ashish 18282
 
18283
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18284
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18285
      ORDER_ID((short)1, "orderId");
68 ashish 18286
 
18287
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18288
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18289
 
18290
      static {
18291
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18292
          byId.put((int)field._thriftId, field);
18293
          byName.put(field.getFieldName(), field);
18294
        }
18295
      }
18296
 
18297
      /**
18298
       * Find the _Fields constant that matches fieldId, or null if its not found.
18299
       */
18300
      public static _Fields findByThriftId(int fieldId) {
18301
        return byId.get(fieldId);
18302
      }
18303
 
18304
      /**
18305
       * Find the _Fields constant that matches fieldId, throwing an exception
18306
       * if it is not found.
18307
       */
18308
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18309
        _Fields fields = findByThriftId(fieldId);
18310
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18311
        return fields;
18312
      }
18313
 
18314
      /**
18315
       * Find the _Fields constant that matches name, or null if its not found.
18316
       */
18317
      public static _Fields findByName(String name) {
18318
        return byName.get(name);
18319
      }
18320
 
18321
      private final short _thriftId;
18322
      private final String _fieldName;
18323
 
18324
      _Fields(short thriftId, String fieldName) {
18325
        _thriftId = thriftId;
18326
        _fieldName = fieldName;
18327
      }
18328
 
18329
      public short getThriftFieldId() {
18330
        return _thriftId;
18331
      }
18332
 
18333
      public String getFieldName() {
18334
        return _fieldName;
18335
      }
18336
    }
18337
 
18338
    // isset id assignments
483 rajveer 18339
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 18340
    private BitSet __isset_bit_vector = new BitSet(1);
18341
 
18342
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18343
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 18344
          new FieldValueMetaData(TType.I64)));
18345
    }});
18346
 
18347
    static {
483 rajveer 18348
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 18349
    }
18350
 
483 rajveer 18351
    public getLineItemsForOrder_args() {
68 ashish 18352
    }
18353
 
483 rajveer 18354
    public getLineItemsForOrder_args(
18355
      long orderId)
68 ashish 18356
    {
18357
      this();
483 rajveer 18358
      this.orderId = orderId;
18359
      setOrderIdIsSet(true);
68 ashish 18360
    }
18361
 
18362
    /**
18363
     * Performs a deep copy on <i>other</i>.
18364
     */
483 rajveer 18365
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 18366
      __isset_bit_vector.clear();
18367
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18368
      this.orderId = other.orderId;
68 ashish 18369
    }
18370
 
483 rajveer 18371
    public getLineItemsForOrder_args deepCopy() {
18372
      return new getLineItemsForOrder_args(this);
68 ashish 18373
    }
18374
 
18375
    @Deprecated
483 rajveer 18376
    public getLineItemsForOrder_args clone() {
18377
      return new getLineItemsForOrder_args(this);
68 ashish 18378
    }
18379
 
483 rajveer 18380
    public long getOrderId() {
18381
      return this.orderId;
68 ashish 18382
    }
18383
 
483 rajveer 18384
    public getLineItemsForOrder_args setOrderId(long orderId) {
18385
      this.orderId = orderId;
18386
      setOrderIdIsSet(true);
68 ashish 18387
      return this;
18388
    }
18389
 
483 rajveer 18390
    public void unsetOrderId() {
18391
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 18392
    }
18393
 
483 rajveer 18394
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18395
    public boolean isSetOrderId() {
18396
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 18397
    }
18398
 
483 rajveer 18399
    public void setOrderIdIsSet(boolean value) {
18400
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 18401
    }
18402
 
18403
    public void setFieldValue(_Fields field, Object value) {
18404
      switch (field) {
483 rajveer 18405
      case ORDER_ID:
68 ashish 18406
        if (value == null) {
483 rajveer 18407
          unsetOrderId();
68 ashish 18408
        } else {
483 rajveer 18409
          setOrderId((Long)value);
68 ashish 18410
        }
18411
        break;
18412
 
18413
      }
18414
    }
18415
 
18416
    public void setFieldValue(int fieldID, Object value) {
18417
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18418
    }
18419
 
18420
    public Object getFieldValue(_Fields field) {
18421
      switch (field) {
483 rajveer 18422
      case ORDER_ID:
18423
        return new Long(getOrderId());
68 ashish 18424
 
18425
      }
18426
      throw new IllegalStateException();
18427
    }
18428
 
18429
    public Object getFieldValue(int fieldId) {
18430
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18431
    }
18432
 
18433
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18434
    public boolean isSet(_Fields field) {
18435
      switch (field) {
483 rajveer 18436
      case ORDER_ID:
18437
        return isSetOrderId();
68 ashish 18438
      }
18439
      throw new IllegalStateException();
18440
    }
18441
 
18442
    public boolean isSet(int fieldID) {
18443
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18444
    }
18445
 
18446
    @Override
18447
    public boolean equals(Object that) {
18448
      if (that == null)
18449
        return false;
483 rajveer 18450
      if (that instanceof getLineItemsForOrder_args)
18451
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 18452
      return false;
18453
    }
18454
 
483 rajveer 18455
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 18456
      if (that == null)
18457
        return false;
18458
 
483 rajveer 18459
      boolean this_present_orderId = true;
18460
      boolean that_present_orderId = true;
18461
      if (this_present_orderId || that_present_orderId) {
18462
        if (!(this_present_orderId && that_present_orderId))
68 ashish 18463
          return false;
483 rajveer 18464
        if (this.orderId != that.orderId)
68 ashish 18465
          return false;
18466
      }
18467
 
18468
      return true;
18469
    }
18470
 
18471
    @Override
18472
    public int hashCode() {
18473
      return 0;
18474
    }
18475
 
483 rajveer 18476
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 18477
      if (!getClass().equals(other.getClass())) {
18478
        return getClass().getName().compareTo(other.getClass().getName());
18479
      }
18480
 
18481
      int lastComparison = 0;
483 rajveer 18482
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 18483
 
483 rajveer 18484
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 18485
      if (lastComparison != 0) {
18486
        return lastComparison;
18487
      }
483 rajveer 18488
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 18489
      if (lastComparison != 0) {
18490
        return lastComparison;
18491
      }
18492
      return 0;
18493
    }
18494
 
18495
    public void read(TProtocol iprot) throws TException {
18496
      TField field;
18497
      iprot.readStructBegin();
18498
      while (true)
18499
      {
18500
        field = iprot.readFieldBegin();
18501
        if (field.type == TType.STOP) { 
18502
          break;
18503
        }
18504
        _Fields fieldId = _Fields.findByThriftId(field.id);
18505
        if (fieldId == null) {
18506
          TProtocolUtil.skip(iprot, field.type);
18507
        } else {
18508
          switch (fieldId) {
483 rajveer 18509
            case ORDER_ID:
68 ashish 18510
              if (field.type == TType.I64) {
483 rajveer 18511
                this.orderId = iprot.readI64();
18512
                setOrderIdIsSet(true);
68 ashish 18513
              } else { 
18514
                TProtocolUtil.skip(iprot, field.type);
18515
              }
18516
              break;
18517
          }
18518
          iprot.readFieldEnd();
18519
        }
18520
      }
18521
      iprot.readStructEnd();
18522
      validate();
18523
    }
18524
 
18525
    public void write(TProtocol oprot) throws TException {
18526
      validate();
18527
 
18528
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18529
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18530
      oprot.writeI64(this.orderId);
68 ashish 18531
      oprot.writeFieldEnd();
18532
      oprot.writeFieldStop();
18533
      oprot.writeStructEnd();
18534
    }
18535
 
18536
    @Override
18537
    public String toString() {
483 rajveer 18538
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 18539
      boolean first = true;
18540
 
483 rajveer 18541
      sb.append("orderId:");
18542
      sb.append(this.orderId);
68 ashish 18543
      first = false;
18544
      sb.append(")");
18545
      return sb.toString();
18546
    }
18547
 
18548
    public void validate() throws TException {
18549
      // check for required fields
18550
    }
18551
 
18552
  }
18553
 
483 rajveer 18554
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
18555
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 18556
 
483 rajveer 18557
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 18558
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18559
 
483 rajveer 18560
    private List<LineItem> success;
68 ashish 18561
    private TransactionServiceException ex;
18562
 
18563
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18564
    public enum _Fields implements TFieldIdEnum {
18565
      SUCCESS((short)0, "success"),
18566
      EX((short)1, "ex");
18567
 
18568
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18569
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18570
 
18571
      static {
18572
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18573
          byId.put((int)field._thriftId, field);
18574
          byName.put(field.getFieldName(), field);
18575
        }
18576
      }
18577
 
18578
      /**
18579
       * Find the _Fields constant that matches fieldId, or null if its not found.
18580
       */
18581
      public static _Fields findByThriftId(int fieldId) {
18582
        return byId.get(fieldId);
18583
      }
18584
 
18585
      /**
18586
       * Find the _Fields constant that matches fieldId, throwing an exception
18587
       * if it is not found.
18588
       */
18589
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18590
        _Fields fields = findByThriftId(fieldId);
18591
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18592
        return fields;
18593
      }
18594
 
18595
      /**
18596
       * Find the _Fields constant that matches name, or null if its not found.
18597
       */
18598
      public static _Fields findByName(String name) {
18599
        return byName.get(name);
18600
      }
18601
 
18602
      private final short _thriftId;
18603
      private final String _fieldName;
18604
 
18605
      _Fields(short thriftId, String fieldName) {
18606
        _thriftId = thriftId;
18607
        _fieldName = fieldName;
18608
      }
18609
 
18610
      public short getThriftFieldId() {
18611
        return _thriftId;
18612
      }
18613
 
18614
      public String getFieldName() {
18615
        return _fieldName;
18616
      }
18617
    }
18618
 
18619
    // isset id assignments
18620
 
18621
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18622
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18623
          new ListMetaData(TType.LIST, 
18624
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18625
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18626
          new FieldValueMetaData(TType.STRUCT)));
18627
    }});
18628
 
18629
    static {
483 rajveer 18630
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18631
    }
18632
 
483 rajveer 18633
    public getLineItemsForOrder_result() {
68 ashish 18634
    }
18635
 
483 rajveer 18636
    public getLineItemsForOrder_result(
18637
      List<LineItem> success,
68 ashish 18638
      TransactionServiceException ex)
18639
    {
18640
      this();
18641
      this.success = success;
18642
      this.ex = ex;
18643
    }
18644
 
18645
    /**
18646
     * Performs a deep copy on <i>other</i>.
18647
     */
483 rajveer 18648
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18649
      if (other.isSetSuccess()) {
18650
        List<LineItem> __this__success = new ArrayList<LineItem>();
18651
        for (LineItem other_element : other.success) {
18652
          __this__success.add(new LineItem(other_element));
18653
        }
18654
        this.success = __this__success;
18655
      }
68 ashish 18656
      if (other.isSetEx()) {
18657
        this.ex = new TransactionServiceException(other.ex);
18658
      }
18659
    }
18660
 
483 rajveer 18661
    public getLineItemsForOrder_result deepCopy() {
18662
      return new getLineItemsForOrder_result(this);
68 ashish 18663
    }
18664
 
18665
    @Deprecated
483 rajveer 18666
    public getLineItemsForOrder_result clone() {
18667
      return new getLineItemsForOrder_result(this);
68 ashish 18668
    }
18669
 
483 rajveer 18670
    public int getSuccessSize() {
18671
      return (this.success == null) ? 0 : this.success.size();
18672
    }
18673
 
18674
    public java.util.Iterator<LineItem> getSuccessIterator() {
18675
      return (this.success == null) ? null : this.success.iterator();
18676
    }
18677
 
18678
    public void addToSuccess(LineItem elem) {
18679
      if (this.success == null) {
18680
        this.success = new ArrayList<LineItem>();
18681
      }
18682
      this.success.add(elem);
18683
    }
18684
 
18685
    public List<LineItem> getSuccess() {
68 ashish 18686
      return this.success;
18687
    }
18688
 
483 rajveer 18689
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18690
      this.success = success;
18691
      return this;
18692
    }
18693
 
18694
    public void unsetSuccess() {
483 rajveer 18695
      this.success = null;
68 ashish 18696
    }
18697
 
18698
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18699
    public boolean isSetSuccess() {
483 rajveer 18700
      return this.success != null;
68 ashish 18701
    }
18702
 
18703
    public void setSuccessIsSet(boolean value) {
483 rajveer 18704
      if (!value) {
18705
        this.success = null;
18706
      }
68 ashish 18707
    }
18708
 
18709
    public TransactionServiceException getEx() {
18710
      return this.ex;
18711
    }
18712
 
483 rajveer 18713
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18714
      this.ex = ex;
18715
      return this;
18716
    }
18717
 
18718
    public void unsetEx() {
18719
      this.ex = null;
18720
    }
18721
 
18722
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18723
    public boolean isSetEx() {
18724
      return this.ex != null;
18725
    }
18726
 
18727
    public void setExIsSet(boolean value) {
18728
      if (!value) {
18729
        this.ex = null;
18730
      }
18731
    }
18732
 
18733
    public void setFieldValue(_Fields field, Object value) {
18734
      switch (field) {
18735
      case SUCCESS:
18736
        if (value == null) {
18737
          unsetSuccess();
18738
        } else {
483 rajveer 18739
          setSuccess((List<LineItem>)value);
68 ashish 18740
        }
18741
        break;
18742
 
18743
      case EX:
18744
        if (value == null) {
18745
          unsetEx();
18746
        } else {
18747
          setEx((TransactionServiceException)value);
18748
        }
18749
        break;
18750
 
18751
      }
18752
    }
18753
 
18754
    public void setFieldValue(int fieldID, Object value) {
18755
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18756
    }
18757
 
18758
    public Object getFieldValue(_Fields field) {
18759
      switch (field) {
18760
      case SUCCESS:
483 rajveer 18761
        return getSuccess();
68 ashish 18762
 
18763
      case EX:
18764
        return getEx();
18765
 
18766
      }
18767
      throw new IllegalStateException();
18768
    }
18769
 
18770
    public Object getFieldValue(int fieldId) {
18771
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18772
    }
18773
 
18774
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18775
    public boolean isSet(_Fields field) {
18776
      switch (field) {
18777
      case SUCCESS:
18778
        return isSetSuccess();
18779
      case EX:
18780
        return isSetEx();
18781
      }
18782
      throw new IllegalStateException();
18783
    }
18784
 
18785
    public boolean isSet(int fieldID) {
18786
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18787
    }
18788
 
18789
    @Override
18790
    public boolean equals(Object that) {
18791
      if (that == null)
18792
        return false;
483 rajveer 18793
      if (that instanceof getLineItemsForOrder_result)
18794
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18795
      return false;
18796
    }
18797
 
483 rajveer 18798
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18799
      if (that == null)
18800
        return false;
18801
 
483 rajveer 18802
      boolean this_present_success = true && this.isSetSuccess();
18803
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18804
      if (this_present_success || that_present_success) {
18805
        if (!(this_present_success && that_present_success))
18806
          return false;
483 rajveer 18807
        if (!this.success.equals(that.success))
68 ashish 18808
          return false;
18809
      }
18810
 
18811
      boolean this_present_ex = true && this.isSetEx();
18812
      boolean that_present_ex = true && that.isSetEx();
18813
      if (this_present_ex || that_present_ex) {
18814
        if (!(this_present_ex && that_present_ex))
18815
          return false;
18816
        if (!this.ex.equals(that.ex))
18817
          return false;
18818
      }
18819
 
18820
      return true;
18821
    }
18822
 
18823
    @Override
18824
    public int hashCode() {
18825
      return 0;
18826
    }
18827
 
483 rajveer 18828
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18829
      if (!getClass().equals(other.getClass())) {
18830
        return getClass().getName().compareTo(other.getClass().getName());
18831
      }
18832
 
18833
      int lastComparison = 0;
483 rajveer 18834
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18835
 
18836
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18837
      if (lastComparison != 0) {
18838
        return lastComparison;
18839
      }
18840
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18841
      if (lastComparison != 0) {
18842
        return lastComparison;
18843
      }
18844
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18845
      if (lastComparison != 0) {
18846
        return lastComparison;
18847
      }
18848
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18849
      if (lastComparison != 0) {
18850
        return lastComparison;
18851
      }
18852
      return 0;
18853
    }
18854
 
18855
    public void read(TProtocol iprot) throws TException {
18856
      TField field;
18857
      iprot.readStructBegin();
18858
      while (true)
18859
      {
18860
        field = iprot.readFieldBegin();
18861
        if (field.type == TType.STOP) { 
18862
          break;
18863
        }
18864
        _Fields fieldId = _Fields.findByThriftId(field.id);
18865
        if (fieldId == null) {
18866
          TProtocolUtil.skip(iprot, field.type);
18867
        } else {
18868
          switch (fieldId) {
18869
            case SUCCESS:
483 rajveer 18870
              if (field.type == TType.LIST) {
18871
                {
1382 varun.gupt 18872
                  TList _list40 = iprot.readListBegin();
18873
                  this.success = new ArrayList<LineItem>(_list40.size);
18874
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 18875
                  {
1382 varun.gupt 18876
                    LineItem _elem42;
18877
                    _elem42 = new LineItem();
18878
                    _elem42.read(iprot);
18879
                    this.success.add(_elem42);
483 rajveer 18880
                  }
18881
                  iprot.readListEnd();
18882
                }
68 ashish 18883
              } else { 
18884
                TProtocolUtil.skip(iprot, field.type);
18885
              }
18886
              break;
18887
            case EX:
18888
              if (field.type == TType.STRUCT) {
18889
                this.ex = new TransactionServiceException();
18890
                this.ex.read(iprot);
18891
              } else { 
18892
                TProtocolUtil.skip(iprot, field.type);
18893
              }
18894
              break;
18895
          }
18896
          iprot.readFieldEnd();
18897
        }
18898
      }
18899
      iprot.readStructEnd();
18900
      validate();
18901
    }
18902
 
18903
    public void write(TProtocol oprot) throws TException {
18904
      oprot.writeStructBegin(STRUCT_DESC);
18905
 
18906
      if (this.isSetSuccess()) {
18907
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18908
        {
18909
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18910
          for (LineItem _iter43 : this.success)
483 rajveer 18911
          {
1382 varun.gupt 18912
            _iter43.write(oprot);
483 rajveer 18913
          }
18914
          oprot.writeListEnd();
18915
        }
68 ashish 18916
        oprot.writeFieldEnd();
18917
      } else if (this.isSetEx()) {
18918
        oprot.writeFieldBegin(EX_FIELD_DESC);
18919
        this.ex.write(oprot);
18920
        oprot.writeFieldEnd();
18921
      }
18922
      oprot.writeFieldStop();
18923
      oprot.writeStructEnd();
18924
    }
18925
 
18926
    @Override
18927
    public String toString() {
483 rajveer 18928
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 18929
      boolean first = true;
18930
 
18931
      sb.append("success:");
483 rajveer 18932
      if (this.success == null) {
18933
        sb.append("null");
18934
      } else {
18935
        sb.append(this.success);
18936
      }
68 ashish 18937
      first = false;
18938
      if (!first) sb.append(", ");
18939
      sb.append("ex:");
18940
      if (this.ex == null) {
18941
        sb.append("null");
18942
      } else {
18943
        sb.append(this.ex);
18944
      }
18945
      first = false;
18946
      sb.append(")");
18947
      return sb.toString();
18948
    }
18949
 
18950
    public void validate() throws TException {
18951
      // check for required fields
18952
    }
18953
 
18954
  }
18955
 
1529 ankur.sing 18956
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
18957
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
18958
 
18959
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
18960
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
18961
 
18962
    private long orderId;
18963
    private long customerId;
18964
 
18965
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18966
    public enum _Fields implements TFieldIdEnum {
18967
      ORDER_ID((short)1, "orderId"),
18968
      CUSTOMER_ID((short)2, "customerId");
18969
 
18970
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18971
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18972
 
18973
      static {
18974
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18975
          byId.put((int)field._thriftId, field);
18976
          byName.put(field.getFieldName(), field);
18977
        }
18978
      }
18979
 
18980
      /**
18981
       * Find the _Fields constant that matches fieldId, or null if its not found.
18982
       */
18983
      public static _Fields findByThriftId(int fieldId) {
18984
        return byId.get(fieldId);
18985
      }
18986
 
18987
      /**
18988
       * Find the _Fields constant that matches fieldId, throwing an exception
18989
       * if it is not found.
18990
       */
18991
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18992
        _Fields fields = findByThriftId(fieldId);
18993
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18994
        return fields;
18995
      }
18996
 
18997
      /**
18998
       * Find the _Fields constant that matches name, or null if its not found.
18999
       */
19000
      public static _Fields findByName(String name) {
19001
        return byName.get(name);
19002
      }
19003
 
19004
      private final short _thriftId;
19005
      private final String _fieldName;
19006
 
19007
      _Fields(short thriftId, String fieldName) {
19008
        _thriftId = thriftId;
19009
        _fieldName = fieldName;
19010
      }
19011
 
19012
      public short getThriftFieldId() {
19013
        return _thriftId;
19014
      }
19015
 
19016
      public String getFieldName() {
19017
        return _fieldName;
19018
      }
19019
    }
19020
 
19021
    // isset id assignments
19022
    private static final int __ORDERID_ISSET_ID = 0;
19023
    private static final int __CUSTOMERID_ISSET_ID = 1;
19024
    private BitSet __isset_bit_vector = new BitSet(2);
19025
 
19026
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19027
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
19028
          new FieldValueMetaData(TType.I64)));
19029
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
19030
          new FieldValueMetaData(TType.I64)));
19031
    }});
19032
 
19033
    static {
19034
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
19035
    }
19036
 
19037
    public getOrderForCustomer_args() {
19038
    }
19039
 
19040
    public getOrderForCustomer_args(
19041
      long orderId,
19042
      long customerId)
19043
    {
19044
      this();
19045
      this.orderId = orderId;
19046
      setOrderIdIsSet(true);
19047
      this.customerId = customerId;
19048
      setCustomerIdIsSet(true);
19049
    }
19050
 
19051
    /**
19052
     * Performs a deep copy on <i>other</i>.
19053
     */
19054
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
19055
      __isset_bit_vector.clear();
19056
      __isset_bit_vector.or(other.__isset_bit_vector);
19057
      this.orderId = other.orderId;
19058
      this.customerId = other.customerId;
19059
    }
19060
 
19061
    public getOrderForCustomer_args deepCopy() {
19062
      return new getOrderForCustomer_args(this);
19063
    }
19064
 
19065
    @Deprecated
19066
    public getOrderForCustomer_args clone() {
19067
      return new getOrderForCustomer_args(this);
19068
    }
19069
 
19070
    public long getOrderId() {
19071
      return this.orderId;
19072
    }
19073
 
19074
    public getOrderForCustomer_args setOrderId(long orderId) {
19075
      this.orderId = orderId;
19076
      setOrderIdIsSet(true);
19077
      return this;
19078
    }
19079
 
19080
    public void unsetOrderId() {
19081
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
19082
    }
19083
 
19084
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
19085
    public boolean isSetOrderId() {
19086
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
19087
    }
19088
 
19089
    public void setOrderIdIsSet(boolean value) {
19090
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
19091
    }
19092
 
19093
    public long getCustomerId() {
19094
      return this.customerId;
19095
    }
19096
 
19097
    public getOrderForCustomer_args setCustomerId(long customerId) {
19098
      this.customerId = customerId;
19099
      setCustomerIdIsSet(true);
19100
      return this;
19101
    }
19102
 
19103
    public void unsetCustomerId() {
19104
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
19105
    }
19106
 
19107
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
19108
    public boolean isSetCustomerId() {
19109
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
19110
    }
19111
 
19112
    public void setCustomerIdIsSet(boolean value) {
19113
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
19114
    }
19115
 
19116
    public void setFieldValue(_Fields field, Object value) {
19117
      switch (field) {
19118
      case ORDER_ID:
19119
        if (value == null) {
19120
          unsetOrderId();
19121
        } else {
19122
          setOrderId((Long)value);
19123
        }
19124
        break;
19125
 
19126
      case CUSTOMER_ID:
19127
        if (value == null) {
19128
          unsetCustomerId();
19129
        } else {
19130
          setCustomerId((Long)value);
19131
        }
19132
        break;
19133
 
19134
      }
19135
    }
19136
 
19137
    public void setFieldValue(int fieldID, Object value) {
19138
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19139
    }
19140
 
19141
    public Object getFieldValue(_Fields field) {
19142
      switch (field) {
19143
      case ORDER_ID:
19144
        return new Long(getOrderId());
19145
 
19146
      case CUSTOMER_ID:
19147
        return new Long(getCustomerId());
19148
 
19149
      }
19150
      throw new IllegalStateException();
19151
    }
19152
 
19153
    public Object getFieldValue(int fieldId) {
19154
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19155
    }
19156
 
19157
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19158
    public boolean isSet(_Fields field) {
19159
      switch (field) {
19160
      case ORDER_ID:
19161
        return isSetOrderId();
19162
      case CUSTOMER_ID:
19163
        return isSetCustomerId();
19164
      }
19165
      throw new IllegalStateException();
19166
    }
19167
 
19168
    public boolean isSet(int fieldID) {
19169
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19170
    }
19171
 
19172
    @Override
19173
    public boolean equals(Object that) {
19174
      if (that == null)
19175
        return false;
19176
      if (that instanceof getOrderForCustomer_args)
19177
        return this.equals((getOrderForCustomer_args)that);
19178
      return false;
19179
    }
19180
 
19181
    public boolean equals(getOrderForCustomer_args that) {
19182
      if (that == null)
19183
        return false;
19184
 
19185
      boolean this_present_orderId = true;
19186
      boolean that_present_orderId = true;
19187
      if (this_present_orderId || that_present_orderId) {
19188
        if (!(this_present_orderId && that_present_orderId))
19189
          return false;
19190
        if (this.orderId != that.orderId)
19191
          return false;
19192
      }
19193
 
19194
      boolean this_present_customerId = true;
19195
      boolean that_present_customerId = true;
19196
      if (this_present_customerId || that_present_customerId) {
19197
        if (!(this_present_customerId && that_present_customerId))
19198
          return false;
19199
        if (this.customerId != that.customerId)
19200
          return false;
19201
      }
19202
 
19203
      return true;
19204
    }
19205
 
19206
    @Override
19207
    public int hashCode() {
19208
      return 0;
19209
    }
19210
 
19211
    public int compareTo(getOrderForCustomer_args other) {
19212
      if (!getClass().equals(other.getClass())) {
19213
        return getClass().getName().compareTo(other.getClass().getName());
19214
      }
19215
 
19216
      int lastComparison = 0;
19217
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
19218
 
19219
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
19220
      if (lastComparison != 0) {
19221
        return lastComparison;
19222
      }
19223
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
19224
      if (lastComparison != 0) {
19225
        return lastComparison;
19226
      }
19227
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
19228
      if (lastComparison != 0) {
19229
        return lastComparison;
19230
      }
19231
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
19232
      if (lastComparison != 0) {
19233
        return lastComparison;
19234
      }
19235
      return 0;
19236
    }
19237
 
19238
    public void read(TProtocol iprot) throws TException {
19239
      TField field;
19240
      iprot.readStructBegin();
19241
      while (true)
19242
      {
19243
        field = iprot.readFieldBegin();
19244
        if (field.type == TType.STOP) { 
19245
          break;
19246
        }
19247
        _Fields fieldId = _Fields.findByThriftId(field.id);
19248
        if (fieldId == null) {
19249
          TProtocolUtil.skip(iprot, field.type);
19250
        } else {
19251
          switch (fieldId) {
19252
            case ORDER_ID:
19253
              if (field.type == TType.I64) {
19254
                this.orderId = iprot.readI64();
19255
                setOrderIdIsSet(true);
19256
              } else { 
19257
                TProtocolUtil.skip(iprot, field.type);
19258
              }
19259
              break;
19260
            case CUSTOMER_ID:
19261
              if (field.type == TType.I64) {
19262
                this.customerId = iprot.readI64();
19263
                setCustomerIdIsSet(true);
19264
              } else { 
19265
                TProtocolUtil.skip(iprot, field.type);
19266
              }
19267
              break;
19268
          }
19269
          iprot.readFieldEnd();
19270
        }
19271
      }
19272
      iprot.readStructEnd();
19273
      validate();
19274
    }
19275
 
19276
    public void write(TProtocol oprot) throws TException {
19277
      validate();
19278
 
19279
      oprot.writeStructBegin(STRUCT_DESC);
19280
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19281
      oprot.writeI64(this.orderId);
19282
      oprot.writeFieldEnd();
19283
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
19284
      oprot.writeI64(this.customerId);
19285
      oprot.writeFieldEnd();
19286
      oprot.writeFieldStop();
19287
      oprot.writeStructEnd();
19288
    }
19289
 
19290
    @Override
19291
    public String toString() {
19292
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
19293
      boolean first = true;
19294
 
19295
      sb.append("orderId:");
19296
      sb.append(this.orderId);
19297
      first = false;
19298
      if (!first) sb.append(", ");
19299
      sb.append("customerId:");
19300
      sb.append(this.customerId);
19301
      first = false;
19302
      sb.append(")");
19303
      return sb.toString();
19304
    }
19305
 
19306
    public void validate() throws TException {
19307
      // check for required fields
19308
    }
19309
 
19310
  }
19311
 
19312
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
19313
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
19314
 
19315
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
19316
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19317
 
19318
    private Order success;
19319
    private TransactionServiceException ex;
19320
 
19321
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19322
    public enum _Fields implements TFieldIdEnum {
19323
      SUCCESS((short)0, "success"),
19324
      EX((short)1, "ex");
19325
 
19326
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19327
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19328
 
19329
      static {
19330
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19331
          byId.put((int)field._thriftId, field);
19332
          byName.put(field.getFieldName(), field);
19333
        }
19334
      }
19335
 
19336
      /**
19337
       * Find the _Fields constant that matches fieldId, or null if its not found.
19338
       */
19339
      public static _Fields findByThriftId(int fieldId) {
19340
        return byId.get(fieldId);
19341
      }
19342
 
19343
      /**
19344
       * Find the _Fields constant that matches fieldId, throwing an exception
19345
       * if it is not found.
19346
       */
19347
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19348
        _Fields fields = findByThriftId(fieldId);
19349
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19350
        return fields;
19351
      }
19352
 
19353
      /**
19354
       * Find the _Fields constant that matches name, or null if its not found.
19355
       */
19356
      public static _Fields findByName(String name) {
19357
        return byName.get(name);
19358
      }
19359
 
19360
      private final short _thriftId;
19361
      private final String _fieldName;
19362
 
19363
      _Fields(short thriftId, String fieldName) {
19364
        _thriftId = thriftId;
19365
        _fieldName = fieldName;
19366
      }
19367
 
19368
      public short getThriftFieldId() {
19369
        return _thriftId;
19370
      }
19371
 
19372
      public String getFieldName() {
19373
        return _fieldName;
19374
      }
19375
    }
19376
 
19377
    // isset id assignments
19378
 
19379
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19380
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19381
          new StructMetaData(TType.STRUCT, Order.class)));
19382
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19383
          new FieldValueMetaData(TType.STRUCT)));
19384
    }});
19385
 
19386
    static {
19387
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
19388
    }
19389
 
19390
    public getOrderForCustomer_result() {
19391
    }
19392
 
19393
    public getOrderForCustomer_result(
19394
      Order success,
19395
      TransactionServiceException ex)
19396
    {
19397
      this();
19398
      this.success = success;
19399
      this.ex = ex;
19400
    }
19401
 
19402
    /**
19403
     * Performs a deep copy on <i>other</i>.
19404
     */
19405
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
19406
      if (other.isSetSuccess()) {
19407
        this.success = new Order(other.success);
19408
      }
19409
      if (other.isSetEx()) {
19410
        this.ex = new TransactionServiceException(other.ex);
19411
      }
19412
    }
19413
 
19414
    public getOrderForCustomer_result deepCopy() {
19415
      return new getOrderForCustomer_result(this);
19416
    }
19417
 
19418
    @Deprecated
19419
    public getOrderForCustomer_result clone() {
19420
      return new getOrderForCustomer_result(this);
19421
    }
19422
 
19423
    public Order getSuccess() {
19424
      return this.success;
19425
    }
19426
 
19427
    public getOrderForCustomer_result setSuccess(Order success) {
19428
      this.success = success;
19429
      return this;
19430
    }
19431
 
19432
    public void unsetSuccess() {
19433
      this.success = null;
19434
    }
19435
 
19436
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19437
    public boolean isSetSuccess() {
19438
      return this.success != null;
19439
    }
19440
 
19441
    public void setSuccessIsSet(boolean value) {
19442
      if (!value) {
19443
        this.success = null;
19444
      }
19445
    }
19446
 
19447
    public TransactionServiceException getEx() {
19448
      return this.ex;
19449
    }
19450
 
19451
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
19452
      this.ex = ex;
19453
      return this;
19454
    }
19455
 
19456
    public void unsetEx() {
19457
      this.ex = null;
19458
    }
19459
 
19460
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19461
    public boolean isSetEx() {
19462
      return this.ex != null;
19463
    }
19464
 
19465
    public void setExIsSet(boolean value) {
19466
      if (!value) {
19467
        this.ex = null;
19468
      }
19469
    }
19470
 
19471
    public void setFieldValue(_Fields field, Object value) {
19472
      switch (field) {
19473
      case SUCCESS:
19474
        if (value == null) {
19475
          unsetSuccess();
19476
        } else {
19477
          setSuccess((Order)value);
19478
        }
19479
        break;
19480
 
19481
      case EX:
19482
        if (value == null) {
19483
          unsetEx();
19484
        } else {
19485
          setEx((TransactionServiceException)value);
19486
        }
19487
        break;
19488
 
19489
      }
19490
    }
19491
 
19492
    public void setFieldValue(int fieldID, Object value) {
19493
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19494
    }
19495
 
19496
    public Object getFieldValue(_Fields field) {
19497
      switch (field) {
19498
      case SUCCESS:
19499
        return getSuccess();
19500
 
19501
      case EX:
19502
        return getEx();
19503
 
19504
      }
19505
      throw new IllegalStateException();
19506
    }
19507
 
19508
    public Object getFieldValue(int fieldId) {
19509
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19510
    }
19511
 
19512
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19513
    public boolean isSet(_Fields field) {
19514
      switch (field) {
19515
      case SUCCESS:
19516
        return isSetSuccess();
19517
      case EX:
19518
        return isSetEx();
19519
      }
19520
      throw new IllegalStateException();
19521
    }
19522
 
19523
    public boolean isSet(int fieldID) {
19524
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19525
    }
19526
 
19527
    @Override
19528
    public boolean equals(Object that) {
19529
      if (that == null)
19530
        return false;
19531
      if (that instanceof getOrderForCustomer_result)
19532
        return this.equals((getOrderForCustomer_result)that);
19533
      return false;
19534
    }
19535
 
19536
    public boolean equals(getOrderForCustomer_result that) {
19537
      if (that == null)
19538
        return false;
19539
 
19540
      boolean this_present_success = true && this.isSetSuccess();
19541
      boolean that_present_success = true && that.isSetSuccess();
19542
      if (this_present_success || that_present_success) {
19543
        if (!(this_present_success && that_present_success))
19544
          return false;
19545
        if (!this.success.equals(that.success))
19546
          return false;
19547
      }
19548
 
19549
      boolean this_present_ex = true && this.isSetEx();
19550
      boolean that_present_ex = true && that.isSetEx();
19551
      if (this_present_ex || that_present_ex) {
19552
        if (!(this_present_ex && that_present_ex))
19553
          return false;
19554
        if (!this.ex.equals(that.ex))
19555
          return false;
19556
      }
19557
 
19558
      return true;
19559
    }
19560
 
19561
    @Override
19562
    public int hashCode() {
19563
      return 0;
19564
    }
19565
 
19566
    public int compareTo(getOrderForCustomer_result other) {
19567
      if (!getClass().equals(other.getClass())) {
19568
        return getClass().getName().compareTo(other.getClass().getName());
19569
      }
19570
 
19571
      int lastComparison = 0;
19572
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
19573
 
19574
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19575
      if (lastComparison != 0) {
19576
        return lastComparison;
19577
      }
19578
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19579
      if (lastComparison != 0) {
19580
        return lastComparison;
19581
      }
19582
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19583
      if (lastComparison != 0) {
19584
        return lastComparison;
19585
      }
19586
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19587
      if (lastComparison != 0) {
19588
        return lastComparison;
19589
      }
19590
      return 0;
19591
    }
19592
 
19593
    public void read(TProtocol iprot) throws TException {
19594
      TField field;
19595
      iprot.readStructBegin();
19596
      while (true)
19597
      {
19598
        field = iprot.readFieldBegin();
19599
        if (field.type == TType.STOP) { 
19600
          break;
19601
        }
19602
        _Fields fieldId = _Fields.findByThriftId(field.id);
19603
        if (fieldId == null) {
19604
          TProtocolUtil.skip(iprot, field.type);
19605
        } else {
19606
          switch (fieldId) {
19607
            case SUCCESS:
19608
              if (field.type == TType.STRUCT) {
19609
                this.success = new Order();
19610
                this.success.read(iprot);
19611
              } else { 
19612
                TProtocolUtil.skip(iprot, field.type);
19613
              }
19614
              break;
19615
            case EX:
19616
              if (field.type == TType.STRUCT) {
19617
                this.ex = new TransactionServiceException();
19618
                this.ex.read(iprot);
19619
              } else { 
19620
                TProtocolUtil.skip(iprot, field.type);
19621
              }
19622
              break;
19623
          }
19624
          iprot.readFieldEnd();
19625
        }
19626
      }
19627
      iprot.readStructEnd();
19628
      validate();
19629
    }
19630
 
19631
    public void write(TProtocol oprot) throws TException {
19632
      oprot.writeStructBegin(STRUCT_DESC);
19633
 
19634
      if (this.isSetSuccess()) {
19635
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19636
        this.success.write(oprot);
19637
        oprot.writeFieldEnd();
19638
      } else if (this.isSetEx()) {
19639
        oprot.writeFieldBegin(EX_FIELD_DESC);
19640
        this.ex.write(oprot);
19641
        oprot.writeFieldEnd();
19642
      }
19643
      oprot.writeFieldStop();
19644
      oprot.writeStructEnd();
19645
    }
19646
 
19647
    @Override
19648
    public String toString() {
19649
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
19650
      boolean first = true;
19651
 
19652
      sb.append("success:");
19653
      if (this.success == null) {
19654
        sb.append("null");
19655
      } else {
19656
        sb.append(this.success);
19657
      }
19658
      first = false;
19659
      if (!first) sb.append(", ");
19660
      sb.append("ex:");
19661
      if (this.ex == null) {
19662
        sb.append("null");
19663
      } else {
19664
        sb.append(this.ex);
19665
      }
19666
      first = false;
19667
      sb.append(")");
19668
      return sb.toString();
19669
    }
19670
 
19671
    public void validate() throws TException {
19672
      // check for required fields
19673
    }
19674
 
19675
  }
19676
 
1221 chandransh 19677
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
19678
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
19679
 
19680
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19681
 
19682
    private long warehouseId;
19683
 
19684
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19685
    public enum _Fields implements TFieldIdEnum {
19686
      WAREHOUSE_ID((short)1, "warehouseId");
19687
 
19688
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19689
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19690
 
19691
      static {
19692
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19693
          byId.put((int)field._thriftId, field);
19694
          byName.put(field.getFieldName(), field);
19695
        }
19696
      }
19697
 
19698
      /**
19699
       * Find the _Fields constant that matches fieldId, or null if its not found.
19700
       */
19701
      public static _Fields findByThriftId(int fieldId) {
19702
        return byId.get(fieldId);
19703
      }
19704
 
19705
      /**
19706
       * Find the _Fields constant that matches fieldId, throwing an exception
19707
       * if it is not found.
19708
       */
19709
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19710
        _Fields fields = findByThriftId(fieldId);
19711
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19712
        return fields;
19713
      }
19714
 
19715
      /**
19716
       * Find the _Fields constant that matches name, or null if its not found.
19717
       */
19718
      public static _Fields findByName(String name) {
19719
        return byName.get(name);
19720
      }
19721
 
19722
      private final short _thriftId;
19723
      private final String _fieldName;
19724
 
19725
      _Fields(short thriftId, String fieldName) {
19726
        _thriftId = thriftId;
19727
        _fieldName = fieldName;
19728
      }
19729
 
19730
      public short getThriftFieldId() {
19731
        return _thriftId;
19732
      }
19733
 
19734
      public String getFieldName() {
19735
        return _fieldName;
19736
      }
19737
    }
19738
 
19739
    // isset id assignments
19740
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19741
    private BitSet __isset_bit_vector = new BitSet(1);
19742
 
19743
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19744
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19745
          new FieldValueMetaData(TType.I64)));
19746
    }});
19747
 
19748
    static {
19749
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
19750
    }
19751
 
19752
    public batchOrders_args() {
19753
    }
19754
 
19755
    public batchOrders_args(
19756
      long warehouseId)
19757
    {
19758
      this();
19759
      this.warehouseId = warehouseId;
19760
      setWarehouseIdIsSet(true);
19761
    }
19762
 
19763
    /**
19764
     * Performs a deep copy on <i>other</i>.
19765
     */
19766
    public batchOrders_args(batchOrders_args other) {
19767
      __isset_bit_vector.clear();
19768
      __isset_bit_vector.or(other.__isset_bit_vector);
19769
      this.warehouseId = other.warehouseId;
19770
    }
19771
 
19772
    public batchOrders_args deepCopy() {
19773
      return new batchOrders_args(this);
19774
    }
19775
 
19776
    @Deprecated
19777
    public batchOrders_args clone() {
19778
      return new batchOrders_args(this);
19779
    }
19780
 
19781
    public long getWarehouseId() {
19782
      return this.warehouseId;
19783
    }
19784
 
19785
    public batchOrders_args setWarehouseId(long warehouseId) {
19786
      this.warehouseId = warehouseId;
19787
      setWarehouseIdIsSet(true);
19788
      return this;
19789
    }
19790
 
19791
    public void unsetWarehouseId() {
19792
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19793
    }
19794
 
19795
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19796
    public boolean isSetWarehouseId() {
19797
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19798
    }
19799
 
19800
    public void setWarehouseIdIsSet(boolean value) {
19801
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19802
    }
19803
 
19804
    public void setFieldValue(_Fields field, Object value) {
19805
      switch (field) {
19806
      case WAREHOUSE_ID:
19807
        if (value == null) {
19808
          unsetWarehouseId();
19809
        } else {
19810
          setWarehouseId((Long)value);
19811
        }
19812
        break;
19813
 
19814
      }
19815
    }
19816
 
19817
    public void setFieldValue(int fieldID, Object value) {
19818
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19819
    }
19820
 
19821
    public Object getFieldValue(_Fields field) {
19822
      switch (field) {
19823
      case WAREHOUSE_ID:
19824
        return new Long(getWarehouseId());
19825
 
19826
      }
19827
      throw new IllegalStateException();
19828
    }
19829
 
19830
    public Object getFieldValue(int fieldId) {
19831
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19832
    }
19833
 
19834
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19835
    public boolean isSet(_Fields field) {
19836
      switch (field) {
19837
      case WAREHOUSE_ID:
19838
        return isSetWarehouseId();
19839
      }
19840
      throw new IllegalStateException();
19841
    }
19842
 
19843
    public boolean isSet(int fieldID) {
19844
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19845
    }
19846
 
19847
    @Override
19848
    public boolean equals(Object that) {
19849
      if (that == null)
19850
        return false;
19851
      if (that instanceof batchOrders_args)
19852
        return this.equals((batchOrders_args)that);
19853
      return false;
19854
    }
19855
 
19856
    public boolean equals(batchOrders_args that) {
19857
      if (that == null)
19858
        return false;
19859
 
19860
      boolean this_present_warehouseId = true;
19861
      boolean that_present_warehouseId = true;
19862
      if (this_present_warehouseId || that_present_warehouseId) {
19863
        if (!(this_present_warehouseId && that_present_warehouseId))
19864
          return false;
19865
        if (this.warehouseId != that.warehouseId)
19866
          return false;
19867
      }
19868
 
19869
      return true;
19870
    }
19871
 
19872
    @Override
19873
    public int hashCode() {
19874
      return 0;
19875
    }
19876
 
19877
    public int compareTo(batchOrders_args other) {
19878
      if (!getClass().equals(other.getClass())) {
19879
        return getClass().getName().compareTo(other.getClass().getName());
19880
      }
19881
 
19882
      int lastComparison = 0;
19883
      batchOrders_args typedOther = (batchOrders_args)other;
19884
 
19885
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
19886
      if (lastComparison != 0) {
19887
        return lastComparison;
19888
      }
19889
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
19890
      if (lastComparison != 0) {
19891
        return lastComparison;
19892
      }
19893
      return 0;
19894
    }
19895
 
19896
    public void read(TProtocol iprot) throws TException {
19897
      TField field;
19898
      iprot.readStructBegin();
19899
      while (true)
19900
      {
19901
        field = iprot.readFieldBegin();
19902
        if (field.type == TType.STOP) { 
19903
          break;
19904
        }
19905
        _Fields fieldId = _Fields.findByThriftId(field.id);
19906
        if (fieldId == null) {
19907
          TProtocolUtil.skip(iprot, field.type);
19908
        } else {
19909
          switch (fieldId) {
19910
            case WAREHOUSE_ID:
19911
              if (field.type == TType.I64) {
19912
                this.warehouseId = iprot.readI64();
19913
                setWarehouseIdIsSet(true);
19914
              } else { 
19915
                TProtocolUtil.skip(iprot, field.type);
19916
              }
19917
              break;
19918
          }
19919
          iprot.readFieldEnd();
19920
        }
19921
      }
19922
      iprot.readStructEnd();
19923
      validate();
19924
    }
19925
 
19926
    public void write(TProtocol oprot) throws TException {
19927
      validate();
19928
 
19929
      oprot.writeStructBegin(STRUCT_DESC);
19930
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19931
      oprot.writeI64(this.warehouseId);
19932
      oprot.writeFieldEnd();
19933
      oprot.writeFieldStop();
19934
      oprot.writeStructEnd();
19935
    }
19936
 
19937
    @Override
19938
    public String toString() {
19939
      StringBuilder sb = new StringBuilder("batchOrders_args(");
19940
      boolean first = true;
19941
 
19942
      sb.append("warehouseId:");
19943
      sb.append(this.warehouseId);
19944
      first = false;
19945
      sb.append(")");
19946
      return sb.toString();
19947
    }
19948
 
19949
    public void validate() throws TException {
19950
      // check for required fields
19951
    }
19952
 
19953
  }
19954
 
19955
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
19956
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
19957
 
19958
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19959
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19960
 
19961
    private List<Order> success;
19962
    private TransactionServiceException ex;
19963
 
19964
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19965
    public enum _Fields implements TFieldIdEnum {
19966
      SUCCESS((short)0, "success"),
19967
      EX((short)1, "ex");
19968
 
19969
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19970
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19971
 
19972
      static {
19973
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19974
          byId.put((int)field._thriftId, field);
19975
          byName.put(field.getFieldName(), field);
19976
        }
19977
      }
19978
 
19979
      /**
19980
       * Find the _Fields constant that matches fieldId, or null if its not found.
19981
       */
19982
      public static _Fields findByThriftId(int fieldId) {
19983
        return byId.get(fieldId);
19984
      }
19985
 
19986
      /**
19987
       * Find the _Fields constant that matches fieldId, throwing an exception
19988
       * if it is not found.
19989
       */
19990
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19991
        _Fields fields = findByThriftId(fieldId);
19992
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19993
        return fields;
19994
      }
19995
 
19996
      /**
19997
       * Find the _Fields constant that matches name, or null if its not found.
19998
       */
19999
      public static _Fields findByName(String name) {
20000
        return byName.get(name);
20001
      }
20002
 
20003
      private final short _thriftId;
20004
      private final String _fieldName;
20005
 
20006
      _Fields(short thriftId, String fieldName) {
20007
        _thriftId = thriftId;
20008
        _fieldName = fieldName;
20009
      }
20010
 
20011
      public short getThriftFieldId() {
20012
        return _thriftId;
20013
      }
20014
 
20015
      public String getFieldName() {
20016
        return _fieldName;
20017
      }
20018
    }
20019
 
20020
    // isset id assignments
20021
 
20022
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20023
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20024
          new ListMetaData(TType.LIST, 
20025
              new StructMetaData(TType.STRUCT, Order.class))));
20026
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20027
          new FieldValueMetaData(TType.STRUCT)));
20028
    }});
20029
 
20030
    static {
20031
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
20032
    }
20033
 
20034
    public batchOrders_result() {
20035
    }
20036
 
20037
    public batchOrders_result(
20038
      List<Order> success,
20039
      TransactionServiceException ex)
20040
    {
20041
      this();
20042
      this.success = success;
20043
      this.ex = ex;
20044
    }
20045
 
20046
    /**
20047
     * Performs a deep copy on <i>other</i>.
20048
     */
20049
    public batchOrders_result(batchOrders_result other) {
20050
      if (other.isSetSuccess()) {
20051
        List<Order> __this__success = new ArrayList<Order>();
20052
        for (Order other_element : other.success) {
20053
          __this__success.add(new Order(other_element));
20054
        }
20055
        this.success = __this__success;
20056
      }
20057
      if (other.isSetEx()) {
20058
        this.ex = new TransactionServiceException(other.ex);
20059
      }
20060
    }
20061
 
20062
    public batchOrders_result deepCopy() {
20063
      return new batchOrders_result(this);
20064
    }
20065
 
20066
    @Deprecated
20067
    public batchOrders_result clone() {
20068
      return new batchOrders_result(this);
20069
    }
20070
 
20071
    public int getSuccessSize() {
20072
      return (this.success == null) ? 0 : this.success.size();
20073
    }
20074
 
20075
    public java.util.Iterator<Order> getSuccessIterator() {
20076
      return (this.success == null) ? null : this.success.iterator();
20077
    }
20078
 
20079
    public void addToSuccess(Order elem) {
20080
      if (this.success == null) {
20081
        this.success = new ArrayList<Order>();
20082
      }
20083
      this.success.add(elem);
20084
    }
20085
 
20086
    public List<Order> getSuccess() {
20087
      return this.success;
20088
    }
20089
 
20090
    public batchOrders_result setSuccess(List<Order> success) {
20091
      this.success = success;
20092
      return this;
20093
    }
20094
 
20095
    public void unsetSuccess() {
20096
      this.success = null;
20097
    }
20098
 
20099
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20100
    public boolean isSetSuccess() {
20101
      return this.success != null;
20102
    }
20103
 
20104
    public void setSuccessIsSet(boolean value) {
20105
      if (!value) {
20106
        this.success = null;
20107
      }
20108
    }
20109
 
20110
    public TransactionServiceException getEx() {
20111
      return this.ex;
20112
    }
20113
 
20114
    public batchOrders_result setEx(TransactionServiceException ex) {
20115
      this.ex = ex;
20116
      return this;
20117
    }
20118
 
20119
    public void unsetEx() {
20120
      this.ex = null;
20121
    }
20122
 
20123
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20124
    public boolean isSetEx() {
20125
      return this.ex != null;
20126
    }
20127
 
20128
    public void setExIsSet(boolean value) {
20129
      if (!value) {
20130
        this.ex = null;
20131
      }
20132
    }
20133
 
20134
    public void setFieldValue(_Fields field, Object value) {
20135
      switch (field) {
20136
      case SUCCESS:
20137
        if (value == null) {
20138
          unsetSuccess();
20139
        } else {
20140
          setSuccess((List<Order>)value);
20141
        }
20142
        break;
20143
 
20144
      case EX:
20145
        if (value == null) {
20146
          unsetEx();
20147
        } else {
20148
          setEx((TransactionServiceException)value);
20149
        }
20150
        break;
20151
 
20152
      }
20153
    }
20154
 
20155
    public void setFieldValue(int fieldID, Object value) {
20156
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20157
    }
20158
 
20159
    public Object getFieldValue(_Fields field) {
20160
      switch (field) {
20161
      case SUCCESS:
20162
        return getSuccess();
20163
 
20164
      case EX:
20165
        return getEx();
20166
 
20167
      }
20168
      throw new IllegalStateException();
20169
    }
20170
 
20171
    public Object getFieldValue(int fieldId) {
20172
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20173
    }
20174
 
20175
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20176
    public boolean isSet(_Fields field) {
20177
      switch (field) {
20178
      case SUCCESS:
20179
        return isSetSuccess();
20180
      case EX:
20181
        return isSetEx();
20182
      }
20183
      throw new IllegalStateException();
20184
    }
20185
 
20186
    public boolean isSet(int fieldID) {
20187
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20188
    }
20189
 
20190
    @Override
20191
    public boolean equals(Object that) {
20192
      if (that == null)
20193
        return false;
20194
      if (that instanceof batchOrders_result)
20195
        return this.equals((batchOrders_result)that);
20196
      return false;
20197
    }
20198
 
20199
    public boolean equals(batchOrders_result that) {
20200
      if (that == null)
20201
        return false;
20202
 
20203
      boolean this_present_success = true && this.isSetSuccess();
20204
      boolean that_present_success = true && that.isSetSuccess();
20205
      if (this_present_success || that_present_success) {
20206
        if (!(this_present_success && that_present_success))
20207
          return false;
20208
        if (!this.success.equals(that.success))
20209
          return false;
20210
      }
20211
 
20212
      boolean this_present_ex = true && this.isSetEx();
20213
      boolean that_present_ex = true && that.isSetEx();
20214
      if (this_present_ex || that_present_ex) {
20215
        if (!(this_present_ex && that_present_ex))
20216
          return false;
20217
        if (!this.ex.equals(that.ex))
20218
          return false;
20219
      }
20220
 
20221
      return true;
20222
    }
20223
 
20224
    @Override
20225
    public int hashCode() {
20226
      return 0;
20227
    }
20228
 
20229
    public int compareTo(batchOrders_result other) {
20230
      if (!getClass().equals(other.getClass())) {
20231
        return getClass().getName().compareTo(other.getClass().getName());
20232
      }
20233
 
20234
      int lastComparison = 0;
20235
      batchOrders_result typedOther = (batchOrders_result)other;
20236
 
20237
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20238
      if (lastComparison != 0) {
20239
        return lastComparison;
20240
      }
20241
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20242
      if (lastComparison != 0) {
20243
        return lastComparison;
20244
      }
20245
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20246
      if (lastComparison != 0) {
20247
        return lastComparison;
20248
      }
20249
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20250
      if (lastComparison != 0) {
20251
        return lastComparison;
20252
      }
20253
      return 0;
20254
    }
20255
 
20256
    public void read(TProtocol iprot) throws TException {
20257
      TField field;
20258
      iprot.readStructBegin();
20259
      while (true)
20260
      {
20261
        field = iprot.readFieldBegin();
20262
        if (field.type == TType.STOP) { 
20263
          break;
20264
        }
20265
        _Fields fieldId = _Fields.findByThriftId(field.id);
20266
        if (fieldId == null) {
20267
          TProtocolUtil.skip(iprot, field.type);
20268
        } else {
20269
          switch (fieldId) {
20270
            case SUCCESS:
20271
              if (field.type == TType.LIST) {
20272
                {
1382 varun.gupt 20273
                  TList _list44 = iprot.readListBegin();
20274
                  this.success = new ArrayList<Order>(_list44.size);
20275
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 20276
                  {
1382 varun.gupt 20277
                    Order _elem46;
20278
                    _elem46 = new Order();
20279
                    _elem46.read(iprot);
20280
                    this.success.add(_elem46);
1221 chandransh 20281
                  }
20282
                  iprot.readListEnd();
20283
                }
20284
              } else { 
20285
                TProtocolUtil.skip(iprot, field.type);
20286
              }
20287
              break;
20288
            case EX:
20289
              if (field.type == TType.STRUCT) {
20290
                this.ex = new TransactionServiceException();
20291
                this.ex.read(iprot);
20292
              } else { 
20293
                TProtocolUtil.skip(iprot, field.type);
20294
              }
20295
              break;
20296
          }
20297
          iprot.readFieldEnd();
20298
        }
20299
      }
20300
      iprot.readStructEnd();
20301
      validate();
20302
    }
20303
 
20304
    public void write(TProtocol oprot) throws TException {
20305
      oprot.writeStructBegin(STRUCT_DESC);
20306
 
20307
      if (this.isSetSuccess()) {
20308
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20309
        {
20310
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 20311
          for (Order _iter47 : this.success)
1221 chandransh 20312
          {
1382 varun.gupt 20313
            _iter47.write(oprot);
1221 chandransh 20314
          }
20315
          oprot.writeListEnd();
20316
        }
20317
        oprot.writeFieldEnd();
20318
      } else if (this.isSetEx()) {
20319
        oprot.writeFieldBegin(EX_FIELD_DESC);
20320
        this.ex.write(oprot);
20321
        oprot.writeFieldEnd();
20322
      }
20323
      oprot.writeFieldStop();
20324
      oprot.writeStructEnd();
20325
    }
20326
 
20327
    @Override
20328
    public String toString() {
20329
      StringBuilder sb = new StringBuilder("batchOrders_result(");
20330
      boolean first = true;
20331
 
20332
      sb.append("success:");
20333
      if (this.success == null) {
20334
        sb.append("null");
20335
      } else {
20336
        sb.append(this.success);
20337
      }
20338
      first = false;
20339
      if (!first) sb.append(", ");
20340
      sb.append("ex:");
20341
      if (this.ex == null) {
20342
        sb.append("null");
20343
      } else {
20344
        sb.append(this.ex);
20345
      }
20346
      first = false;
20347
      sb.append(")");
20348
      return sb.toString();
20349
    }
20350
 
20351
    public void validate() throws TException {
20352
      // check for required fields
20353
    }
20354
 
20355
  }
20356
 
1209 chandransh 20357
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
20358
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
20359
 
20360
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
20361
 
20362
    private long orderId;
20363
 
20364
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20365
    public enum _Fields implements TFieldIdEnum {
20366
      ORDER_ID((short)1, "orderId");
20367
 
20368
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20370
 
20371
      static {
20372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20373
          byId.put((int)field._thriftId, field);
20374
          byName.put(field.getFieldName(), field);
20375
        }
20376
      }
20377
 
20378
      /**
20379
       * Find the _Fields constant that matches fieldId, or null if its not found.
20380
       */
20381
      public static _Fields findByThriftId(int fieldId) {
20382
        return byId.get(fieldId);
20383
      }
20384
 
20385
      /**
20386
       * Find the _Fields constant that matches fieldId, throwing an exception
20387
       * if it is not found.
20388
       */
20389
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20390
        _Fields fields = findByThriftId(fieldId);
20391
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20392
        return fields;
20393
      }
20394
 
20395
      /**
20396
       * Find the _Fields constant that matches name, or null if its not found.
20397
       */
20398
      public static _Fields findByName(String name) {
20399
        return byName.get(name);
20400
      }
20401
 
20402
      private final short _thriftId;
20403
      private final String _fieldName;
20404
 
20405
      _Fields(short thriftId, String fieldName) {
20406
        _thriftId = thriftId;
20407
        _fieldName = fieldName;
20408
      }
20409
 
20410
      public short getThriftFieldId() {
20411
        return _thriftId;
20412
      }
20413
 
20414
      public String getFieldName() {
20415
        return _fieldName;
20416
      }
20417
    }
20418
 
20419
    // isset id assignments
20420
    private static final int __ORDERID_ISSET_ID = 0;
20421
    private BitSet __isset_bit_vector = new BitSet(1);
20422
 
20423
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20424
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
20425
          new FieldValueMetaData(TType.I64)));
20426
    }});
20427
 
20428
    static {
20429
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
20430
    }
20431
 
20432
    public markOrderAsOutOfStock_args() {
20433
    }
20434
 
20435
    public markOrderAsOutOfStock_args(
20436
      long orderId)
20437
    {
20438
      this();
20439
      this.orderId = orderId;
20440
      setOrderIdIsSet(true);
20441
    }
20442
 
20443
    /**
20444
     * Performs a deep copy on <i>other</i>.
20445
     */
20446
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
20447
      __isset_bit_vector.clear();
20448
      __isset_bit_vector.or(other.__isset_bit_vector);
20449
      this.orderId = other.orderId;
20450
    }
20451
 
20452
    public markOrderAsOutOfStock_args deepCopy() {
20453
      return new markOrderAsOutOfStock_args(this);
20454
    }
20455
 
20456
    @Deprecated
20457
    public markOrderAsOutOfStock_args clone() {
20458
      return new markOrderAsOutOfStock_args(this);
20459
    }
20460
 
20461
    public long getOrderId() {
20462
      return this.orderId;
20463
    }
20464
 
20465
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
20466
      this.orderId = orderId;
20467
      setOrderIdIsSet(true);
20468
      return this;
20469
    }
20470
 
20471
    public void unsetOrderId() {
20472
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20473
    }
20474
 
20475
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20476
    public boolean isSetOrderId() {
20477
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20478
    }
20479
 
20480
    public void setOrderIdIsSet(boolean value) {
20481
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20482
    }
20483
 
20484
    public void setFieldValue(_Fields field, Object value) {
20485
      switch (field) {
20486
      case ORDER_ID:
20487
        if (value == null) {
20488
          unsetOrderId();
20489
        } else {
20490
          setOrderId((Long)value);
20491
        }
20492
        break;
20493
 
20494
      }
20495
    }
20496
 
20497
    public void setFieldValue(int fieldID, Object value) {
20498
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20499
    }
20500
 
20501
    public Object getFieldValue(_Fields field) {
20502
      switch (field) {
20503
      case ORDER_ID:
20504
        return new Long(getOrderId());
20505
 
20506
      }
20507
      throw new IllegalStateException();
20508
    }
20509
 
20510
    public Object getFieldValue(int fieldId) {
20511
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20512
    }
20513
 
20514
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20515
    public boolean isSet(_Fields field) {
20516
      switch (field) {
20517
      case ORDER_ID:
20518
        return isSetOrderId();
20519
      }
20520
      throw new IllegalStateException();
20521
    }
20522
 
20523
    public boolean isSet(int fieldID) {
20524
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20525
    }
20526
 
20527
    @Override
20528
    public boolean equals(Object that) {
20529
      if (that == null)
20530
        return false;
20531
      if (that instanceof markOrderAsOutOfStock_args)
20532
        return this.equals((markOrderAsOutOfStock_args)that);
20533
      return false;
20534
    }
20535
 
20536
    public boolean equals(markOrderAsOutOfStock_args that) {
20537
      if (that == null)
20538
        return false;
20539
 
20540
      boolean this_present_orderId = true;
20541
      boolean that_present_orderId = true;
20542
      if (this_present_orderId || that_present_orderId) {
20543
        if (!(this_present_orderId && that_present_orderId))
20544
          return false;
20545
        if (this.orderId != that.orderId)
20546
          return false;
20547
      }
20548
 
20549
      return true;
20550
    }
20551
 
20552
    @Override
20553
    public int hashCode() {
20554
      return 0;
20555
    }
20556
 
20557
    public int compareTo(markOrderAsOutOfStock_args other) {
20558
      if (!getClass().equals(other.getClass())) {
20559
        return getClass().getName().compareTo(other.getClass().getName());
20560
      }
20561
 
20562
      int lastComparison = 0;
20563
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
20564
 
20565
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20566
      if (lastComparison != 0) {
20567
        return lastComparison;
20568
      }
20569
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20570
      if (lastComparison != 0) {
20571
        return lastComparison;
20572
      }
20573
      return 0;
20574
    }
20575
 
20576
    public void read(TProtocol iprot) throws TException {
20577
      TField field;
20578
      iprot.readStructBegin();
20579
      while (true)
20580
      {
20581
        field = iprot.readFieldBegin();
20582
        if (field.type == TType.STOP) { 
20583
          break;
20584
        }
20585
        _Fields fieldId = _Fields.findByThriftId(field.id);
20586
        if (fieldId == null) {
20587
          TProtocolUtil.skip(iprot, field.type);
20588
        } else {
20589
          switch (fieldId) {
20590
            case ORDER_ID:
20591
              if (field.type == TType.I64) {
20592
                this.orderId = iprot.readI64();
20593
                setOrderIdIsSet(true);
20594
              } else { 
20595
                TProtocolUtil.skip(iprot, field.type);
20596
              }
20597
              break;
20598
          }
20599
          iprot.readFieldEnd();
20600
        }
20601
      }
20602
      iprot.readStructEnd();
20603
      validate();
20604
    }
20605
 
20606
    public void write(TProtocol oprot) throws TException {
20607
      validate();
20608
 
20609
      oprot.writeStructBegin(STRUCT_DESC);
20610
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20611
      oprot.writeI64(this.orderId);
20612
      oprot.writeFieldEnd();
20613
      oprot.writeFieldStop();
20614
      oprot.writeStructEnd();
20615
    }
20616
 
20617
    @Override
20618
    public String toString() {
20619
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
20620
      boolean first = true;
20621
 
20622
      sb.append("orderId:");
20623
      sb.append(this.orderId);
20624
      first = false;
20625
      sb.append(")");
20626
      return sb.toString();
20627
    }
20628
 
20629
    public void validate() throws TException {
20630
      // check for required fields
20631
    }
20632
 
20633
  }
20634
 
20635
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
20636
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
20637
 
20638
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20639
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20640
 
20641
    private boolean success;
20642
    private TransactionServiceException ex;
20643
 
20644
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20645
    public enum _Fields implements TFieldIdEnum {
20646
      SUCCESS((short)0, "success"),
20647
      EX((short)1, "ex");
20648
 
20649
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20650
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20651
 
20652
      static {
20653
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20654
          byId.put((int)field._thriftId, field);
20655
          byName.put(field.getFieldName(), field);
20656
        }
20657
      }
20658
 
20659
      /**
20660
       * Find the _Fields constant that matches fieldId, or null if its not found.
20661
       */
20662
      public static _Fields findByThriftId(int fieldId) {
20663
        return byId.get(fieldId);
20664
      }
20665
 
20666
      /**
20667
       * Find the _Fields constant that matches fieldId, throwing an exception
20668
       * if it is not found.
20669
       */
20670
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20671
        _Fields fields = findByThriftId(fieldId);
20672
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20673
        return fields;
20674
      }
20675
 
20676
      /**
20677
       * Find the _Fields constant that matches name, or null if its not found.
20678
       */
20679
      public static _Fields findByName(String name) {
20680
        return byName.get(name);
20681
      }
20682
 
20683
      private final short _thriftId;
20684
      private final String _fieldName;
20685
 
20686
      _Fields(short thriftId, String fieldName) {
20687
        _thriftId = thriftId;
20688
        _fieldName = fieldName;
20689
      }
20690
 
20691
      public short getThriftFieldId() {
20692
        return _thriftId;
20693
      }
20694
 
20695
      public String getFieldName() {
20696
        return _fieldName;
20697
      }
20698
    }
20699
 
20700
    // isset id assignments
20701
    private static final int __SUCCESS_ISSET_ID = 0;
20702
    private BitSet __isset_bit_vector = new BitSet(1);
20703
 
20704
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20705
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20706
          new FieldValueMetaData(TType.BOOL)));
20707
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20708
          new FieldValueMetaData(TType.STRUCT)));
20709
    }});
20710
 
20711
    static {
20712
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
20713
    }
20714
 
20715
    public markOrderAsOutOfStock_result() {
20716
    }
20717
 
20718
    public markOrderAsOutOfStock_result(
20719
      boolean success,
20720
      TransactionServiceException ex)
20721
    {
20722
      this();
20723
      this.success = success;
20724
      setSuccessIsSet(true);
20725
      this.ex = ex;
20726
    }
20727
 
20728
    /**
20729
     * Performs a deep copy on <i>other</i>.
20730
     */
20731
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
20732
      __isset_bit_vector.clear();
20733
      __isset_bit_vector.or(other.__isset_bit_vector);
20734
      this.success = other.success;
20735
      if (other.isSetEx()) {
20736
        this.ex = new TransactionServiceException(other.ex);
20737
      }
20738
    }
20739
 
20740
    public markOrderAsOutOfStock_result deepCopy() {
20741
      return new markOrderAsOutOfStock_result(this);
20742
    }
20743
 
20744
    @Deprecated
20745
    public markOrderAsOutOfStock_result clone() {
20746
      return new markOrderAsOutOfStock_result(this);
20747
    }
20748
 
20749
    public boolean isSuccess() {
20750
      return this.success;
20751
    }
20752
 
20753
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
20754
      this.success = success;
20755
      setSuccessIsSet(true);
20756
      return this;
20757
    }
20758
 
20759
    public void unsetSuccess() {
20760
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20761
    }
20762
 
20763
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20764
    public boolean isSetSuccess() {
20765
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20766
    }
20767
 
20768
    public void setSuccessIsSet(boolean value) {
20769
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20770
    }
20771
 
20772
    public TransactionServiceException getEx() {
20773
      return this.ex;
20774
    }
20775
 
20776
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
20777
      this.ex = ex;
20778
      return this;
20779
    }
20780
 
20781
    public void unsetEx() {
20782
      this.ex = null;
20783
    }
20784
 
20785
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20786
    public boolean isSetEx() {
20787
      return this.ex != null;
20788
    }
20789
 
20790
    public void setExIsSet(boolean value) {
20791
      if (!value) {
20792
        this.ex = null;
20793
      }
20794
    }
20795
 
20796
    public void setFieldValue(_Fields field, Object value) {
20797
      switch (field) {
20798
      case SUCCESS:
20799
        if (value == null) {
20800
          unsetSuccess();
20801
        } else {
20802
          setSuccess((Boolean)value);
20803
        }
20804
        break;
20805
 
20806
      case EX:
20807
        if (value == null) {
20808
          unsetEx();
20809
        } else {
20810
          setEx((TransactionServiceException)value);
20811
        }
20812
        break;
20813
 
20814
      }
20815
    }
20816
 
20817
    public void setFieldValue(int fieldID, Object value) {
20818
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20819
    }
20820
 
20821
    public Object getFieldValue(_Fields field) {
20822
      switch (field) {
20823
      case SUCCESS:
20824
        return new Boolean(isSuccess());
20825
 
20826
      case EX:
20827
        return getEx();
20828
 
20829
      }
20830
      throw new IllegalStateException();
20831
    }
20832
 
20833
    public Object getFieldValue(int fieldId) {
20834
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20835
    }
20836
 
20837
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20838
    public boolean isSet(_Fields field) {
20839
      switch (field) {
20840
      case SUCCESS:
20841
        return isSetSuccess();
20842
      case EX:
20843
        return isSetEx();
20844
      }
20845
      throw new IllegalStateException();
20846
    }
20847
 
20848
    public boolean isSet(int fieldID) {
20849
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20850
    }
20851
 
20852
    @Override
20853
    public boolean equals(Object that) {
20854
      if (that == null)
20855
        return false;
20856
      if (that instanceof markOrderAsOutOfStock_result)
20857
        return this.equals((markOrderAsOutOfStock_result)that);
20858
      return false;
20859
    }
20860
 
20861
    public boolean equals(markOrderAsOutOfStock_result that) {
20862
      if (that == null)
20863
        return false;
20864
 
20865
      boolean this_present_success = true;
20866
      boolean that_present_success = true;
20867
      if (this_present_success || that_present_success) {
20868
        if (!(this_present_success && that_present_success))
20869
          return false;
20870
        if (this.success != that.success)
20871
          return false;
20872
      }
20873
 
20874
      boolean this_present_ex = true && this.isSetEx();
20875
      boolean that_present_ex = true && that.isSetEx();
20876
      if (this_present_ex || that_present_ex) {
20877
        if (!(this_present_ex && that_present_ex))
20878
          return false;
20879
        if (!this.ex.equals(that.ex))
20880
          return false;
20881
      }
20882
 
20883
      return true;
20884
    }
20885
 
20886
    @Override
20887
    public int hashCode() {
20888
      return 0;
20889
    }
20890
 
20891
    public int compareTo(markOrderAsOutOfStock_result other) {
20892
      if (!getClass().equals(other.getClass())) {
20893
        return getClass().getName().compareTo(other.getClass().getName());
20894
      }
20895
 
20896
      int lastComparison = 0;
20897
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
20898
 
20899
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20900
      if (lastComparison != 0) {
20901
        return lastComparison;
20902
      }
20903
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20904
      if (lastComparison != 0) {
20905
        return lastComparison;
20906
      }
20907
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20908
      if (lastComparison != 0) {
20909
        return lastComparison;
20910
      }
20911
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20912
      if (lastComparison != 0) {
20913
        return lastComparison;
20914
      }
20915
      return 0;
20916
    }
20917
 
20918
    public void read(TProtocol iprot) throws TException {
20919
      TField field;
20920
      iprot.readStructBegin();
20921
      while (true)
20922
      {
20923
        field = iprot.readFieldBegin();
20924
        if (field.type == TType.STOP) { 
20925
          break;
20926
        }
20927
        _Fields fieldId = _Fields.findByThriftId(field.id);
20928
        if (fieldId == null) {
20929
          TProtocolUtil.skip(iprot, field.type);
20930
        } else {
20931
          switch (fieldId) {
20932
            case SUCCESS:
20933
              if (field.type == TType.BOOL) {
20934
                this.success = iprot.readBool();
20935
                setSuccessIsSet(true);
20936
              } else { 
20937
                TProtocolUtil.skip(iprot, field.type);
20938
              }
20939
              break;
20940
            case EX:
20941
              if (field.type == TType.STRUCT) {
20942
                this.ex = new TransactionServiceException();
20943
                this.ex.read(iprot);
20944
              } else { 
20945
                TProtocolUtil.skip(iprot, field.type);
20946
              }
20947
              break;
20948
          }
20949
          iprot.readFieldEnd();
20950
        }
20951
      }
20952
      iprot.readStructEnd();
20953
      validate();
20954
    }
20955
 
20956
    public void write(TProtocol oprot) throws TException {
20957
      oprot.writeStructBegin(STRUCT_DESC);
20958
 
20959
      if (this.isSetSuccess()) {
20960
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20961
        oprot.writeBool(this.success);
20962
        oprot.writeFieldEnd();
20963
      } else if (this.isSetEx()) {
20964
        oprot.writeFieldBegin(EX_FIELD_DESC);
20965
        this.ex.write(oprot);
20966
        oprot.writeFieldEnd();
20967
      }
20968
      oprot.writeFieldStop();
20969
      oprot.writeStructEnd();
20970
    }
20971
 
20972
    @Override
20973
    public String toString() {
20974
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
20975
      boolean first = true;
20976
 
20977
      sb.append("success:");
20978
      sb.append(this.success);
20979
      first = false;
20980
      if (!first) sb.append(", ");
20981
      sb.append("ex:");
20982
      if (this.ex == null) {
20983
        sb.append("null");
20984
      } else {
20985
        sb.append(this.ex);
20986
      }
20987
      first = false;
20988
      sb.append(")");
20989
      return sb.toString();
20990
    }
20991
 
20992
    public void validate() throws TException {
20993
      // check for required fields
20994
    }
20995
 
20996
  }
20997
 
758 chandransh 20998
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
20999
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
21000
 
21001
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
21002
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
21003
 
21004
    private long warehouseId;
21005
    private long providerId;
21006
 
21007
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21008
    public enum _Fields implements TFieldIdEnum {
21009
      WAREHOUSE_ID((short)1, "warehouseId"),
21010
      PROVIDER_ID((short)2, "providerId");
21011
 
21012
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21013
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21014
 
21015
      static {
21016
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21017
          byId.put((int)field._thriftId, field);
21018
          byName.put(field.getFieldName(), field);
21019
        }
21020
      }
21021
 
21022
      /**
21023
       * Find the _Fields constant that matches fieldId, or null if its not found.
21024
       */
21025
      public static _Fields findByThriftId(int fieldId) {
21026
        return byId.get(fieldId);
21027
      }
21028
 
21029
      /**
21030
       * Find the _Fields constant that matches fieldId, throwing an exception
21031
       * if it is not found.
21032
       */
21033
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21034
        _Fields fields = findByThriftId(fieldId);
21035
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21036
        return fields;
21037
      }
21038
 
21039
      /**
21040
       * Find the _Fields constant that matches name, or null if its not found.
21041
       */
21042
      public static _Fields findByName(String name) {
21043
        return byName.get(name);
21044
      }
21045
 
21046
      private final short _thriftId;
21047
      private final String _fieldName;
21048
 
21049
      _Fields(short thriftId, String fieldName) {
21050
        _thriftId = thriftId;
21051
        _fieldName = fieldName;
21052
      }
21053
 
21054
      public short getThriftFieldId() {
21055
        return _thriftId;
21056
      }
21057
 
21058
      public String getFieldName() {
21059
        return _fieldName;
21060
      }
21061
    }
21062
 
21063
    // isset id assignments
21064
    private static final int __WAREHOUSEID_ISSET_ID = 0;
21065
    private static final int __PROVIDERID_ISSET_ID = 1;
21066
    private BitSet __isset_bit_vector = new BitSet(2);
21067
 
21068
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21069
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
21070
          new FieldValueMetaData(TType.I64)));
21071
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21072
          new FieldValueMetaData(TType.I64)));
21073
    }});
21074
 
21075
    static {
21076
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
21077
    }
21078
 
21079
    public markOrdersAsManifested_args() {
21080
    }
21081
 
21082
    public markOrdersAsManifested_args(
21083
      long warehouseId,
21084
      long providerId)
21085
    {
21086
      this();
21087
      this.warehouseId = warehouseId;
21088
      setWarehouseIdIsSet(true);
21089
      this.providerId = providerId;
21090
      setProviderIdIsSet(true);
21091
    }
21092
 
21093
    /**
21094
     * Performs a deep copy on <i>other</i>.
21095
     */
21096
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
21097
      __isset_bit_vector.clear();
21098
      __isset_bit_vector.or(other.__isset_bit_vector);
21099
      this.warehouseId = other.warehouseId;
21100
      this.providerId = other.providerId;
21101
    }
21102
 
21103
    public markOrdersAsManifested_args deepCopy() {
21104
      return new markOrdersAsManifested_args(this);
21105
    }
21106
 
21107
    @Deprecated
21108
    public markOrdersAsManifested_args clone() {
21109
      return new markOrdersAsManifested_args(this);
21110
    }
21111
 
21112
    public long getWarehouseId() {
21113
      return this.warehouseId;
21114
    }
21115
 
21116
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
21117
      this.warehouseId = warehouseId;
21118
      setWarehouseIdIsSet(true);
21119
      return this;
21120
    }
21121
 
21122
    public void unsetWarehouseId() {
21123
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
21124
    }
21125
 
21126
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
21127
    public boolean isSetWarehouseId() {
21128
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
21129
    }
21130
 
21131
    public void setWarehouseIdIsSet(boolean value) {
21132
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
21133
    }
21134
 
21135
    public long getProviderId() {
21136
      return this.providerId;
21137
    }
21138
 
21139
    public markOrdersAsManifested_args setProviderId(long providerId) {
21140
      this.providerId = providerId;
21141
      setProviderIdIsSet(true);
21142
      return this;
21143
    }
21144
 
21145
    public void unsetProviderId() {
21146
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21147
    }
21148
 
21149
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21150
    public boolean isSetProviderId() {
21151
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21152
    }
21153
 
21154
    public void setProviderIdIsSet(boolean value) {
21155
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21156
    }
21157
 
21158
    public void setFieldValue(_Fields field, Object value) {
21159
      switch (field) {
21160
      case WAREHOUSE_ID:
21161
        if (value == null) {
21162
          unsetWarehouseId();
21163
        } else {
21164
          setWarehouseId((Long)value);
21165
        }
21166
        break;
21167
 
21168
      case PROVIDER_ID:
21169
        if (value == null) {
21170
          unsetProviderId();
21171
        } else {
21172
          setProviderId((Long)value);
21173
        }
21174
        break;
21175
 
21176
      }
21177
    }
21178
 
21179
    public void setFieldValue(int fieldID, Object value) {
21180
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21181
    }
21182
 
21183
    public Object getFieldValue(_Fields field) {
21184
      switch (field) {
21185
      case WAREHOUSE_ID:
21186
        return new Long(getWarehouseId());
21187
 
21188
      case PROVIDER_ID:
21189
        return new Long(getProviderId());
21190
 
21191
      }
21192
      throw new IllegalStateException();
21193
    }
21194
 
21195
    public Object getFieldValue(int fieldId) {
21196
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21197
    }
21198
 
21199
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21200
    public boolean isSet(_Fields field) {
21201
      switch (field) {
21202
      case WAREHOUSE_ID:
21203
        return isSetWarehouseId();
21204
      case PROVIDER_ID:
21205
        return isSetProviderId();
21206
      }
21207
      throw new IllegalStateException();
21208
    }
21209
 
21210
    public boolean isSet(int fieldID) {
21211
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21212
    }
21213
 
21214
    @Override
21215
    public boolean equals(Object that) {
21216
      if (that == null)
21217
        return false;
21218
      if (that instanceof markOrdersAsManifested_args)
21219
        return this.equals((markOrdersAsManifested_args)that);
21220
      return false;
21221
    }
21222
 
21223
    public boolean equals(markOrdersAsManifested_args that) {
21224
      if (that == null)
21225
        return false;
21226
 
21227
      boolean this_present_warehouseId = true;
21228
      boolean that_present_warehouseId = true;
21229
      if (this_present_warehouseId || that_present_warehouseId) {
21230
        if (!(this_present_warehouseId && that_present_warehouseId))
21231
          return false;
21232
        if (this.warehouseId != that.warehouseId)
21233
          return false;
21234
      }
21235
 
21236
      boolean this_present_providerId = true;
21237
      boolean that_present_providerId = true;
21238
      if (this_present_providerId || that_present_providerId) {
21239
        if (!(this_present_providerId && that_present_providerId))
21240
          return false;
21241
        if (this.providerId != that.providerId)
21242
          return false;
21243
      }
21244
 
21245
      return true;
21246
    }
21247
 
21248
    @Override
21249
    public int hashCode() {
21250
      return 0;
21251
    }
21252
 
21253
    public int compareTo(markOrdersAsManifested_args other) {
21254
      if (!getClass().equals(other.getClass())) {
21255
        return getClass().getName().compareTo(other.getClass().getName());
21256
      }
21257
 
21258
      int lastComparison = 0;
21259
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
21260
 
21261
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
21262
      if (lastComparison != 0) {
21263
        return lastComparison;
21264
      }
21265
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
21266
      if (lastComparison != 0) {
21267
        return lastComparison;
21268
      }
21269
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
21270
      if (lastComparison != 0) {
21271
        return lastComparison;
21272
      }
21273
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
21274
      if (lastComparison != 0) {
21275
        return lastComparison;
21276
      }
21277
      return 0;
21278
    }
21279
 
21280
    public void read(TProtocol iprot) throws TException {
21281
      TField field;
21282
      iprot.readStructBegin();
21283
      while (true)
21284
      {
21285
        field = iprot.readFieldBegin();
21286
        if (field.type == TType.STOP) { 
21287
          break;
21288
        }
21289
        _Fields fieldId = _Fields.findByThriftId(field.id);
21290
        if (fieldId == null) {
21291
          TProtocolUtil.skip(iprot, field.type);
21292
        } else {
21293
          switch (fieldId) {
21294
            case WAREHOUSE_ID:
21295
              if (field.type == TType.I64) {
21296
                this.warehouseId = iprot.readI64();
21297
                setWarehouseIdIsSet(true);
21298
              } else { 
21299
                TProtocolUtil.skip(iprot, field.type);
21300
              }
21301
              break;
21302
            case PROVIDER_ID:
21303
              if (field.type == TType.I64) {
21304
                this.providerId = iprot.readI64();
21305
                setProviderIdIsSet(true);
21306
              } else { 
21307
                TProtocolUtil.skip(iprot, field.type);
21308
              }
21309
              break;
21310
          }
21311
          iprot.readFieldEnd();
21312
        }
21313
      }
21314
      iprot.readStructEnd();
21315
      validate();
21316
    }
21317
 
21318
    public void write(TProtocol oprot) throws TException {
21319
      validate();
21320
 
21321
      oprot.writeStructBegin(STRUCT_DESC);
21322
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21323
      oprot.writeI64(this.warehouseId);
21324
      oprot.writeFieldEnd();
21325
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21326
      oprot.writeI64(this.providerId);
21327
      oprot.writeFieldEnd();
21328
      oprot.writeFieldStop();
21329
      oprot.writeStructEnd();
21330
    }
21331
 
21332
    @Override
21333
    public String toString() {
21334
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
21335
      boolean first = true;
21336
 
21337
      sb.append("warehouseId:");
21338
      sb.append(this.warehouseId);
21339
      first = false;
21340
      if (!first) sb.append(", ");
21341
      sb.append("providerId:");
21342
      sb.append(this.providerId);
21343
      first = false;
21344
      sb.append(")");
21345
      return sb.toString();
21346
    }
21347
 
21348
    public void validate() throws TException {
21349
      // check for required fields
21350
    }
21351
 
21352
  }
21353
 
21354
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
21355
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
21356
 
21357
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21358
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21359
 
21360
    private boolean success;
21361
    private TransactionServiceException ex;
21362
 
21363
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21364
    public enum _Fields implements TFieldIdEnum {
21365
      SUCCESS((short)0, "success"),
21366
      EX((short)1, "ex");
21367
 
21368
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21370
 
21371
      static {
21372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21373
          byId.put((int)field._thriftId, field);
21374
          byName.put(field.getFieldName(), field);
21375
        }
21376
      }
21377
 
21378
      /**
21379
       * Find the _Fields constant that matches fieldId, or null if its not found.
21380
       */
21381
      public static _Fields findByThriftId(int fieldId) {
21382
        return byId.get(fieldId);
21383
      }
21384
 
21385
      /**
21386
       * Find the _Fields constant that matches fieldId, throwing an exception
21387
       * if it is not found.
21388
       */
21389
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21390
        _Fields fields = findByThriftId(fieldId);
21391
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21392
        return fields;
21393
      }
21394
 
21395
      /**
21396
       * Find the _Fields constant that matches name, or null if its not found.
21397
       */
21398
      public static _Fields findByName(String name) {
21399
        return byName.get(name);
21400
      }
21401
 
21402
      private final short _thriftId;
21403
      private final String _fieldName;
21404
 
21405
      _Fields(short thriftId, String fieldName) {
21406
        _thriftId = thriftId;
21407
        _fieldName = fieldName;
21408
      }
21409
 
21410
      public short getThriftFieldId() {
21411
        return _thriftId;
21412
      }
21413
 
21414
      public String getFieldName() {
21415
        return _fieldName;
21416
      }
21417
    }
21418
 
21419
    // isset id assignments
21420
    private static final int __SUCCESS_ISSET_ID = 0;
21421
    private BitSet __isset_bit_vector = new BitSet(1);
21422
 
21423
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21424
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21425
          new FieldValueMetaData(TType.BOOL)));
21426
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21427
          new FieldValueMetaData(TType.STRUCT)));
21428
    }});
21429
 
21430
    static {
21431
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
21432
    }
21433
 
21434
    public markOrdersAsManifested_result() {
21435
    }
21436
 
21437
    public markOrdersAsManifested_result(
21438
      boolean success,
21439
      TransactionServiceException ex)
21440
    {
21441
      this();
21442
      this.success = success;
21443
      setSuccessIsSet(true);
21444
      this.ex = ex;
21445
    }
21446
 
21447
    /**
21448
     * Performs a deep copy on <i>other</i>.
21449
     */
21450
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
21451
      __isset_bit_vector.clear();
21452
      __isset_bit_vector.or(other.__isset_bit_vector);
21453
      this.success = other.success;
21454
      if (other.isSetEx()) {
21455
        this.ex = new TransactionServiceException(other.ex);
21456
      }
21457
    }
21458
 
21459
    public markOrdersAsManifested_result deepCopy() {
21460
      return new markOrdersAsManifested_result(this);
21461
    }
21462
 
21463
    @Deprecated
21464
    public markOrdersAsManifested_result clone() {
21465
      return new markOrdersAsManifested_result(this);
21466
    }
21467
 
21468
    public boolean isSuccess() {
21469
      return this.success;
21470
    }
21471
 
21472
    public markOrdersAsManifested_result setSuccess(boolean success) {
21473
      this.success = success;
21474
      setSuccessIsSet(true);
21475
      return this;
21476
    }
21477
 
21478
    public void unsetSuccess() {
21479
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21480
    }
21481
 
21482
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21483
    public boolean isSetSuccess() {
21484
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21485
    }
21486
 
21487
    public void setSuccessIsSet(boolean value) {
21488
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21489
    }
21490
 
21491
    public TransactionServiceException getEx() {
21492
      return this.ex;
21493
    }
21494
 
21495
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
21496
      this.ex = ex;
21497
      return this;
21498
    }
21499
 
21500
    public void unsetEx() {
21501
      this.ex = null;
21502
    }
21503
 
21504
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21505
    public boolean isSetEx() {
21506
      return this.ex != null;
21507
    }
21508
 
21509
    public void setExIsSet(boolean value) {
21510
      if (!value) {
21511
        this.ex = null;
21512
      }
21513
    }
21514
 
21515
    public void setFieldValue(_Fields field, Object value) {
21516
      switch (field) {
21517
      case SUCCESS:
21518
        if (value == null) {
21519
          unsetSuccess();
21520
        } else {
21521
          setSuccess((Boolean)value);
21522
        }
21523
        break;
21524
 
21525
      case EX:
21526
        if (value == null) {
21527
          unsetEx();
21528
        } else {
21529
          setEx((TransactionServiceException)value);
21530
        }
21531
        break;
21532
 
21533
      }
21534
    }
21535
 
21536
    public void setFieldValue(int fieldID, Object value) {
21537
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21538
    }
21539
 
21540
    public Object getFieldValue(_Fields field) {
21541
      switch (field) {
21542
      case SUCCESS:
21543
        return new Boolean(isSuccess());
21544
 
21545
      case EX:
21546
        return getEx();
21547
 
21548
      }
21549
      throw new IllegalStateException();
21550
    }
21551
 
21552
    public Object getFieldValue(int fieldId) {
21553
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21554
    }
21555
 
21556
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21557
    public boolean isSet(_Fields field) {
21558
      switch (field) {
21559
      case SUCCESS:
21560
        return isSetSuccess();
21561
      case EX:
21562
        return isSetEx();
21563
      }
21564
      throw new IllegalStateException();
21565
    }
21566
 
21567
    public boolean isSet(int fieldID) {
21568
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21569
    }
21570
 
21571
    @Override
21572
    public boolean equals(Object that) {
21573
      if (that == null)
21574
        return false;
21575
      if (that instanceof markOrdersAsManifested_result)
21576
        return this.equals((markOrdersAsManifested_result)that);
21577
      return false;
21578
    }
21579
 
21580
    public boolean equals(markOrdersAsManifested_result that) {
21581
      if (that == null)
21582
        return false;
21583
 
21584
      boolean this_present_success = true;
21585
      boolean that_present_success = true;
21586
      if (this_present_success || that_present_success) {
21587
        if (!(this_present_success && that_present_success))
21588
          return false;
21589
        if (this.success != that.success)
21590
          return false;
21591
      }
21592
 
21593
      boolean this_present_ex = true && this.isSetEx();
21594
      boolean that_present_ex = true && that.isSetEx();
21595
      if (this_present_ex || that_present_ex) {
21596
        if (!(this_present_ex && that_present_ex))
21597
          return false;
21598
        if (!this.ex.equals(that.ex))
21599
          return false;
21600
      }
21601
 
21602
      return true;
21603
    }
21604
 
21605
    @Override
21606
    public int hashCode() {
21607
      return 0;
21608
    }
21609
 
21610
    public int compareTo(markOrdersAsManifested_result other) {
21611
      if (!getClass().equals(other.getClass())) {
21612
        return getClass().getName().compareTo(other.getClass().getName());
21613
      }
21614
 
21615
      int lastComparison = 0;
21616
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
21617
 
21618
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21619
      if (lastComparison != 0) {
21620
        return lastComparison;
21621
      }
21622
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21623
      if (lastComparison != 0) {
21624
        return lastComparison;
21625
      }
21626
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21627
      if (lastComparison != 0) {
21628
        return lastComparison;
21629
      }
21630
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21631
      if (lastComparison != 0) {
21632
        return lastComparison;
21633
      }
21634
      return 0;
21635
    }
21636
 
21637
    public void read(TProtocol iprot) throws TException {
21638
      TField field;
21639
      iprot.readStructBegin();
21640
      while (true)
21641
      {
21642
        field = iprot.readFieldBegin();
21643
        if (field.type == TType.STOP) { 
21644
          break;
21645
        }
21646
        _Fields fieldId = _Fields.findByThriftId(field.id);
21647
        if (fieldId == null) {
21648
          TProtocolUtil.skip(iprot, field.type);
21649
        } else {
21650
          switch (fieldId) {
21651
            case SUCCESS:
21652
              if (field.type == TType.BOOL) {
21653
                this.success = iprot.readBool();
21654
                setSuccessIsSet(true);
21655
              } else { 
21656
                TProtocolUtil.skip(iprot, field.type);
21657
              }
21658
              break;
21659
            case EX:
21660
              if (field.type == TType.STRUCT) {
21661
                this.ex = new TransactionServiceException();
21662
                this.ex.read(iprot);
21663
              } else { 
21664
                TProtocolUtil.skip(iprot, field.type);
21665
              }
21666
              break;
21667
          }
21668
          iprot.readFieldEnd();
21669
        }
21670
      }
21671
      iprot.readStructEnd();
21672
      validate();
21673
    }
21674
 
21675
    public void write(TProtocol oprot) throws TException {
21676
      oprot.writeStructBegin(STRUCT_DESC);
21677
 
21678
      if (this.isSetSuccess()) {
21679
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21680
        oprot.writeBool(this.success);
21681
        oprot.writeFieldEnd();
21682
      } else if (this.isSetEx()) {
21683
        oprot.writeFieldBegin(EX_FIELD_DESC);
21684
        this.ex.write(oprot);
21685
        oprot.writeFieldEnd();
21686
      }
21687
      oprot.writeFieldStop();
21688
      oprot.writeStructEnd();
21689
    }
21690
 
21691
    @Override
21692
    public String toString() {
21693
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
21694
      boolean first = true;
21695
 
21696
      sb.append("success:");
21697
      sb.append(this.success);
21698
      first = false;
21699
      if (!first) sb.append(", ");
21700
      sb.append("ex:");
21701
      if (this.ex == null) {
21702
        sb.append("null");
21703
      } else {
21704
        sb.append(this.ex);
21705
      }
21706
      first = false;
21707
      sb.append(")");
21708
      return sb.toString();
21709
    }
21710
 
21711
    public void validate() throws TException {
21712
      // check for required fields
21713
    }
21714
 
21715
  }
21716
 
1114 chandransh 21717
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
21718
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
21719
 
21720
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21721
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
21722
 
21723
    private long providerId;
1245 chandransh 21724
    private Map<String,String> pickupDetails;
1114 chandransh 21725
 
21726
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21727
    public enum _Fields implements TFieldIdEnum {
21728
      PROVIDER_ID((short)1, "providerId"),
21729
      PICKUP_DETAILS((short)2, "pickupDetails");
21730
 
21731
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21732
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21733
 
21734
      static {
21735
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21736
          byId.put((int)field._thriftId, field);
21737
          byName.put(field.getFieldName(), field);
21738
        }
21739
      }
21740
 
21741
      /**
21742
       * Find the _Fields constant that matches fieldId, or null if its not found.
21743
       */
21744
      public static _Fields findByThriftId(int fieldId) {
21745
        return byId.get(fieldId);
21746
      }
21747
 
21748
      /**
21749
       * Find the _Fields constant that matches fieldId, throwing an exception
21750
       * if it is not found.
21751
       */
21752
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21753
        _Fields fields = findByThriftId(fieldId);
21754
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21755
        return fields;
21756
      }
21757
 
21758
      /**
21759
       * Find the _Fields constant that matches name, or null if its not found.
21760
       */
21761
      public static _Fields findByName(String name) {
21762
        return byName.get(name);
21763
      }
21764
 
21765
      private final short _thriftId;
21766
      private final String _fieldName;
21767
 
21768
      _Fields(short thriftId, String fieldName) {
21769
        _thriftId = thriftId;
21770
        _fieldName = fieldName;
21771
      }
21772
 
21773
      public short getThriftFieldId() {
21774
        return _thriftId;
21775
      }
21776
 
21777
      public String getFieldName() {
21778
        return _fieldName;
21779
      }
21780
    }
21781
 
21782
    // isset id assignments
21783
    private static final int __PROVIDERID_ISSET_ID = 0;
21784
    private BitSet __isset_bit_vector = new BitSet(1);
21785
 
21786
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21787
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21788
          new FieldValueMetaData(TType.I64)));
21789
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
21790
          new MapMetaData(TType.MAP, 
21791
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 21792
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 21793
    }});
21794
 
21795
    static {
21796
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
21797
    }
21798
 
21799
    public markOrdersAsPickedUp_args() {
21800
    }
21801
 
21802
    public markOrdersAsPickedUp_args(
21803
      long providerId,
1245 chandransh 21804
      Map<String,String> pickupDetails)
1114 chandransh 21805
    {
21806
      this();
21807
      this.providerId = providerId;
21808
      setProviderIdIsSet(true);
21809
      this.pickupDetails = pickupDetails;
21810
    }
21811
 
21812
    /**
21813
     * Performs a deep copy on <i>other</i>.
21814
     */
21815
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
21816
      __isset_bit_vector.clear();
21817
      __isset_bit_vector.or(other.__isset_bit_vector);
21818
      this.providerId = other.providerId;
21819
      if (other.isSetPickupDetails()) {
1245 chandransh 21820
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
21821
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 21822
 
21823
          String other_element_key = other_element.getKey();
1245 chandransh 21824
          String other_element_value = other_element.getValue();
1114 chandransh 21825
 
21826
          String __this__pickupDetails_copy_key = other_element_key;
21827
 
1245 chandransh 21828
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 21829
 
21830
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
21831
        }
21832
        this.pickupDetails = __this__pickupDetails;
21833
      }
21834
    }
21835
 
21836
    public markOrdersAsPickedUp_args deepCopy() {
21837
      return new markOrdersAsPickedUp_args(this);
21838
    }
21839
 
21840
    @Deprecated
21841
    public markOrdersAsPickedUp_args clone() {
21842
      return new markOrdersAsPickedUp_args(this);
21843
    }
21844
 
21845
    public long getProviderId() {
21846
      return this.providerId;
21847
    }
21848
 
21849
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
21850
      this.providerId = providerId;
21851
      setProviderIdIsSet(true);
21852
      return this;
21853
    }
21854
 
21855
    public void unsetProviderId() {
21856
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21857
    }
21858
 
21859
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21860
    public boolean isSetProviderId() {
21861
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21862
    }
21863
 
21864
    public void setProviderIdIsSet(boolean value) {
21865
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21866
    }
21867
 
21868
    public int getPickupDetailsSize() {
21869
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
21870
    }
21871
 
1245 chandransh 21872
    public void putToPickupDetails(String key, String val) {
1114 chandransh 21873
      if (this.pickupDetails == null) {
1245 chandransh 21874
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 21875
      }
21876
      this.pickupDetails.put(key, val);
21877
    }
21878
 
1245 chandransh 21879
    public Map<String,String> getPickupDetails() {
1114 chandransh 21880
      return this.pickupDetails;
21881
    }
21882
 
1245 chandransh 21883
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 21884
      this.pickupDetails = pickupDetails;
21885
      return this;
21886
    }
21887
 
21888
    public void unsetPickupDetails() {
21889
      this.pickupDetails = null;
21890
    }
21891
 
21892
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
21893
    public boolean isSetPickupDetails() {
21894
      return this.pickupDetails != null;
21895
    }
21896
 
21897
    public void setPickupDetailsIsSet(boolean value) {
21898
      if (!value) {
21899
        this.pickupDetails = null;
21900
      }
21901
    }
21902
 
21903
    public void setFieldValue(_Fields field, Object value) {
21904
      switch (field) {
21905
      case PROVIDER_ID:
21906
        if (value == null) {
21907
          unsetProviderId();
21908
        } else {
21909
          setProviderId((Long)value);
21910
        }
21911
        break;
21912
 
21913
      case PICKUP_DETAILS:
21914
        if (value == null) {
21915
          unsetPickupDetails();
21916
        } else {
1245 chandransh 21917
          setPickupDetails((Map<String,String>)value);
1114 chandransh 21918
        }
21919
        break;
21920
 
21921
      }
21922
    }
21923
 
21924
    public void setFieldValue(int fieldID, Object value) {
21925
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21926
    }
21927
 
21928
    public Object getFieldValue(_Fields field) {
21929
      switch (field) {
21930
      case PROVIDER_ID:
21931
        return new Long(getProviderId());
21932
 
21933
      case PICKUP_DETAILS:
21934
        return getPickupDetails();
21935
 
21936
      }
21937
      throw new IllegalStateException();
21938
    }
21939
 
21940
    public Object getFieldValue(int fieldId) {
21941
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21942
    }
21943
 
21944
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21945
    public boolean isSet(_Fields field) {
21946
      switch (field) {
21947
      case PROVIDER_ID:
21948
        return isSetProviderId();
21949
      case PICKUP_DETAILS:
21950
        return isSetPickupDetails();
21951
      }
21952
      throw new IllegalStateException();
21953
    }
21954
 
21955
    public boolean isSet(int fieldID) {
21956
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21957
    }
21958
 
21959
    @Override
21960
    public boolean equals(Object that) {
21961
      if (that == null)
21962
        return false;
21963
      if (that instanceof markOrdersAsPickedUp_args)
21964
        return this.equals((markOrdersAsPickedUp_args)that);
21965
      return false;
21966
    }
21967
 
21968
    public boolean equals(markOrdersAsPickedUp_args that) {
21969
      if (that == null)
21970
        return false;
21971
 
21972
      boolean this_present_providerId = true;
21973
      boolean that_present_providerId = true;
21974
      if (this_present_providerId || that_present_providerId) {
21975
        if (!(this_present_providerId && that_present_providerId))
21976
          return false;
21977
        if (this.providerId != that.providerId)
21978
          return false;
21979
      }
21980
 
21981
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
21982
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
21983
      if (this_present_pickupDetails || that_present_pickupDetails) {
21984
        if (!(this_present_pickupDetails && that_present_pickupDetails))
21985
          return false;
21986
        if (!this.pickupDetails.equals(that.pickupDetails))
21987
          return false;
21988
      }
21989
 
21990
      return true;
21991
    }
21992
 
21993
    @Override
21994
    public int hashCode() {
21995
      return 0;
21996
    }
21997
 
21998
    public void read(TProtocol iprot) throws TException {
21999
      TField field;
22000
      iprot.readStructBegin();
22001
      while (true)
22002
      {
22003
        field = iprot.readFieldBegin();
22004
        if (field.type == TType.STOP) { 
22005
          break;
22006
        }
22007
        _Fields fieldId = _Fields.findByThriftId(field.id);
22008
        if (fieldId == null) {
22009
          TProtocolUtil.skip(iprot, field.type);
22010
        } else {
22011
          switch (fieldId) {
22012
            case PROVIDER_ID:
22013
              if (field.type == TType.I64) {
22014
                this.providerId = iprot.readI64();
22015
                setProviderIdIsSet(true);
22016
              } else { 
22017
                TProtocolUtil.skip(iprot, field.type);
22018
              }
22019
              break;
22020
            case PICKUP_DETAILS:
22021
              if (field.type == TType.MAP) {
22022
                {
1382 varun.gupt 22023
                  TMap _map48 = iprot.readMapBegin();
22024
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
22025
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 22026
                  {
1382 varun.gupt 22027
                    String _key50;
22028
                    String _val51;
22029
                    _key50 = iprot.readString();
22030
                    _val51 = iprot.readString();
22031
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 22032
                  }
22033
                  iprot.readMapEnd();
22034
                }
22035
              } else { 
22036
                TProtocolUtil.skip(iprot, field.type);
22037
              }
22038
              break;
22039
          }
22040
          iprot.readFieldEnd();
22041
        }
22042
      }
22043
      iprot.readStructEnd();
22044
      validate();
22045
    }
22046
 
22047
    public void write(TProtocol oprot) throws TException {
22048
      validate();
22049
 
22050
      oprot.writeStructBegin(STRUCT_DESC);
22051
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22052
      oprot.writeI64(this.providerId);
22053
      oprot.writeFieldEnd();
22054
      if (this.pickupDetails != null) {
22055
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
22056
        {
1245 chandransh 22057
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 22058
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 22059
          {
1382 varun.gupt 22060
            oprot.writeString(_iter52.getKey());
22061
            oprot.writeString(_iter52.getValue());
1114 chandransh 22062
          }
22063
          oprot.writeMapEnd();
22064
        }
22065
        oprot.writeFieldEnd();
22066
      }
22067
      oprot.writeFieldStop();
22068
      oprot.writeStructEnd();
22069
    }
22070
 
22071
    @Override
22072
    public String toString() {
22073
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
22074
      boolean first = true;
22075
 
22076
      sb.append("providerId:");
22077
      sb.append(this.providerId);
22078
      first = false;
22079
      if (!first) sb.append(", ");
22080
      sb.append("pickupDetails:");
22081
      if (this.pickupDetails == null) {
22082
        sb.append("null");
22083
      } else {
22084
        sb.append(this.pickupDetails);
22085
      }
22086
      first = false;
22087
      sb.append(")");
22088
      return sb.toString();
22089
    }
22090
 
22091
    public void validate() throws TException {
22092
      // check for required fields
22093
    }
22094
 
22095
  }
22096
 
22097
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
22098
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
22099
 
22100
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
22101
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22102
 
22103
    private List<Order> success;
22104
    private TransactionServiceException ex;
22105
 
22106
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22107
    public enum _Fields implements TFieldIdEnum {
22108
      SUCCESS((short)0, "success"),
22109
      EX((short)1, "ex");
22110
 
22111
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22112
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22113
 
22114
      static {
22115
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22116
          byId.put((int)field._thriftId, field);
22117
          byName.put(field.getFieldName(), field);
22118
        }
22119
      }
22120
 
22121
      /**
22122
       * Find the _Fields constant that matches fieldId, or null if its not found.
22123
       */
22124
      public static _Fields findByThriftId(int fieldId) {
22125
        return byId.get(fieldId);
22126
      }
22127
 
22128
      /**
22129
       * Find the _Fields constant that matches fieldId, throwing an exception
22130
       * if it is not found.
22131
       */
22132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22133
        _Fields fields = findByThriftId(fieldId);
22134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22135
        return fields;
22136
      }
22137
 
22138
      /**
22139
       * Find the _Fields constant that matches name, or null if its not found.
22140
       */
22141
      public static _Fields findByName(String name) {
22142
        return byName.get(name);
22143
      }
22144
 
22145
      private final short _thriftId;
22146
      private final String _fieldName;
22147
 
22148
      _Fields(short thriftId, String fieldName) {
22149
        _thriftId = thriftId;
22150
        _fieldName = fieldName;
22151
      }
22152
 
22153
      public short getThriftFieldId() {
22154
        return _thriftId;
22155
      }
22156
 
22157
      public String getFieldName() {
22158
        return _fieldName;
22159
      }
22160
    }
22161
 
22162
    // isset id assignments
22163
 
22164
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22165
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
22166
          new ListMetaData(TType.LIST, 
22167
              new StructMetaData(TType.STRUCT, Order.class))));
22168
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22169
          new FieldValueMetaData(TType.STRUCT)));
22170
    }});
22171
 
22172
    static {
22173
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
22174
    }
22175
 
22176
    public markOrdersAsPickedUp_result() {
22177
    }
22178
 
22179
    public markOrdersAsPickedUp_result(
22180
      List<Order> success,
22181
      TransactionServiceException ex)
22182
    {
22183
      this();
22184
      this.success = success;
22185
      this.ex = ex;
22186
    }
22187
 
22188
    /**
22189
     * Performs a deep copy on <i>other</i>.
22190
     */
22191
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
22192
      if (other.isSetSuccess()) {
22193
        List<Order> __this__success = new ArrayList<Order>();
22194
        for (Order other_element : other.success) {
22195
          __this__success.add(new Order(other_element));
22196
        }
22197
        this.success = __this__success;
22198
      }
22199
      if (other.isSetEx()) {
22200
        this.ex = new TransactionServiceException(other.ex);
22201
      }
22202
    }
22203
 
22204
    public markOrdersAsPickedUp_result deepCopy() {
22205
      return new markOrdersAsPickedUp_result(this);
22206
    }
22207
 
22208
    @Deprecated
22209
    public markOrdersAsPickedUp_result clone() {
22210
      return new markOrdersAsPickedUp_result(this);
22211
    }
22212
 
22213
    public int getSuccessSize() {
22214
      return (this.success == null) ? 0 : this.success.size();
22215
    }
22216
 
22217
    public java.util.Iterator<Order> getSuccessIterator() {
22218
      return (this.success == null) ? null : this.success.iterator();
22219
    }
22220
 
22221
    public void addToSuccess(Order elem) {
22222
      if (this.success == null) {
22223
        this.success = new ArrayList<Order>();
22224
      }
22225
      this.success.add(elem);
22226
    }
22227
 
22228
    public List<Order> getSuccess() {
22229
      return this.success;
22230
    }
22231
 
22232
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
22233
      this.success = success;
22234
      return this;
22235
    }
22236
 
22237
    public void unsetSuccess() {
22238
      this.success = null;
22239
    }
22240
 
22241
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22242
    public boolean isSetSuccess() {
22243
      return this.success != null;
22244
    }
22245
 
22246
    public void setSuccessIsSet(boolean value) {
22247
      if (!value) {
22248
        this.success = null;
22249
      }
22250
    }
22251
 
22252
    public TransactionServiceException getEx() {
22253
      return this.ex;
22254
    }
22255
 
22256
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
22257
      this.ex = ex;
22258
      return this;
22259
    }
22260
 
22261
    public void unsetEx() {
22262
      this.ex = null;
22263
    }
22264
 
22265
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22266
    public boolean isSetEx() {
22267
      return this.ex != null;
22268
    }
22269
 
22270
    public void setExIsSet(boolean value) {
22271
      if (!value) {
22272
        this.ex = null;
22273
      }
22274
    }
22275
 
22276
    public void setFieldValue(_Fields field, Object value) {
22277
      switch (field) {
22278
      case SUCCESS:
22279
        if (value == null) {
22280
          unsetSuccess();
22281
        } else {
22282
          setSuccess((List<Order>)value);
22283
        }
22284
        break;
22285
 
22286
      case EX:
22287
        if (value == null) {
22288
          unsetEx();
22289
        } else {
22290
          setEx((TransactionServiceException)value);
22291
        }
22292
        break;
22293
 
22294
      }
22295
    }
22296
 
22297
    public void setFieldValue(int fieldID, Object value) {
22298
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22299
    }
22300
 
22301
    public Object getFieldValue(_Fields field) {
22302
      switch (field) {
22303
      case SUCCESS:
22304
        return getSuccess();
22305
 
22306
      case EX:
22307
        return getEx();
22308
 
22309
      }
22310
      throw new IllegalStateException();
22311
    }
22312
 
22313
    public Object getFieldValue(int fieldId) {
22314
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22315
    }
22316
 
22317
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22318
    public boolean isSet(_Fields field) {
22319
      switch (field) {
22320
      case SUCCESS:
22321
        return isSetSuccess();
22322
      case EX:
22323
        return isSetEx();
22324
      }
22325
      throw new IllegalStateException();
22326
    }
22327
 
22328
    public boolean isSet(int fieldID) {
22329
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22330
    }
22331
 
22332
    @Override
22333
    public boolean equals(Object that) {
22334
      if (that == null)
22335
        return false;
22336
      if (that instanceof markOrdersAsPickedUp_result)
22337
        return this.equals((markOrdersAsPickedUp_result)that);
22338
      return false;
22339
    }
22340
 
22341
    public boolean equals(markOrdersAsPickedUp_result that) {
22342
      if (that == null)
22343
        return false;
22344
 
22345
      boolean this_present_success = true && this.isSetSuccess();
22346
      boolean that_present_success = true && that.isSetSuccess();
22347
      if (this_present_success || that_present_success) {
22348
        if (!(this_present_success && that_present_success))
22349
          return false;
22350
        if (!this.success.equals(that.success))
22351
          return false;
22352
      }
22353
 
22354
      boolean this_present_ex = true && this.isSetEx();
22355
      boolean that_present_ex = true && that.isSetEx();
22356
      if (this_present_ex || that_present_ex) {
22357
        if (!(this_present_ex && that_present_ex))
22358
          return false;
22359
        if (!this.ex.equals(that.ex))
22360
          return false;
22361
      }
22362
 
22363
      return true;
22364
    }
22365
 
22366
    @Override
22367
    public int hashCode() {
22368
      return 0;
22369
    }
22370
 
22371
    public int compareTo(markOrdersAsPickedUp_result other) {
22372
      if (!getClass().equals(other.getClass())) {
22373
        return getClass().getName().compareTo(other.getClass().getName());
22374
      }
22375
 
22376
      int lastComparison = 0;
22377
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
22378
 
22379
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22380
      if (lastComparison != 0) {
22381
        return lastComparison;
22382
      }
22383
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22384
      if (lastComparison != 0) {
22385
        return lastComparison;
22386
      }
22387
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22388
      if (lastComparison != 0) {
22389
        return lastComparison;
22390
      }
22391
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22392
      if (lastComparison != 0) {
22393
        return lastComparison;
22394
      }
22395
      return 0;
22396
    }
22397
 
22398
    public void read(TProtocol iprot) throws TException {
22399
      TField field;
22400
      iprot.readStructBegin();
22401
      while (true)
22402
      {
22403
        field = iprot.readFieldBegin();
22404
        if (field.type == TType.STOP) { 
22405
          break;
22406
        }
22407
        _Fields fieldId = _Fields.findByThriftId(field.id);
22408
        if (fieldId == null) {
22409
          TProtocolUtil.skip(iprot, field.type);
22410
        } else {
22411
          switch (fieldId) {
22412
            case SUCCESS:
22413
              if (field.type == TType.LIST) {
22414
                {
1382 varun.gupt 22415
                  TList _list53 = iprot.readListBegin();
22416
                  this.success = new ArrayList<Order>(_list53.size);
22417
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 22418
                  {
1382 varun.gupt 22419
                    Order _elem55;
22420
                    _elem55 = new Order();
22421
                    _elem55.read(iprot);
22422
                    this.success.add(_elem55);
1114 chandransh 22423
                  }
22424
                  iprot.readListEnd();
22425
                }
22426
              } else { 
22427
                TProtocolUtil.skip(iprot, field.type);
22428
              }
22429
              break;
22430
            case EX:
22431
              if (field.type == TType.STRUCT) {
22432
                this.ex = new TransactionServiceException();
22433
                this.ex.read(iprot);
22434
              } else { 
22435
                TProtocolUtil.skip(iprot, field.type);
22436
              }
22437
              break;
22438
          }
22439
          iprot.readFieldEnd();
22440
        }
22441
      }
22442
      iprot.readStructEnd();
22443
      validate();
22444
    }
22445
 
22446
    public void write(TProtocol oprot) throws TException {
22447
      oprot.writeStructBegin(STRUCT_DESC);
22448
 
22449
      if (this.isSetSuccess()) {
22450
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22451
        {
22452
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 22453
          for (Order _iter56 : this.success)
1114 chandransh 22454
          {
1382 varun.gupt 22455
            _iter56.write(oprot);
1114 chandransh 22456
          }
22457
          oprot.writeListEnd();
22458
        }
22459
        oprot.writeFieldEnd();
22460
      } else if (this.isSetEx()) {
22461
        oprot.writeFieldBegin(EX_FIELD_DESC);
22462
        this.ex.write(oprot);
22463
        oprot.writeFieldEnd();
22464
      }
22465
      oprot.writeFieldStop();
22466
      oprot.writeStructEnd();
22467
    }
22468
 
22469
    @Override
22470
    public String toString() {
22471
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
22472
      boolean first = true;
22473
 
22474
      sb.append("success:");
22475
      if (this.success == null) {
22476
        sb.append("null");
22477
      } else {
22478
        sb.append(this.success);
22479
      }
22480
      first = false;
22481
      if (!first) sb.append(", ");
22482
      sb.append("ex:");
22483
      if (this.ex == null) {
22484
        sb.append("null");
22485
      } else {
22486
        sb.append(this.ex);
22487
      }
22488
      first = false;
22489
      sb.append(")");
22490
      return sb.toString();
22491
    }
22492
 
22493
    public void validate() throws TException {
22494
      // check for required fields
22495
    }
22496
 
22497
  }
22498
 
1133 chandransh 22499
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
22500
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
22501
 
22502
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22503
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
22504
 
22505
    private long providerId;
22506
    private Map<String,String> deliveredOrders;
22507
 
22508
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22509
    public enum _Fields implements TFieldIdEnum {
22510
      PROVIDER_ID((short)1, "providerId"),
22511
      DELIVERED_ORDERS((short)2, "deliveredOrders");
22512
 
22513
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22514
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22515
 
22516
      static {
22517
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22518
          byId.put((int)field._thriftId, field);
22519
          byName.put(field.getFieldName(), field);
22520
        }
22521
      }
22522
 
22523
      /**
22524
       * Find the _Fields constant that matches fieldId, or null if its not found.
22525
       */
22526
      public static _Fields findByThriftId(int fieldId) {
22527
        return byId.get(fieldId);
22528
      }
22529
 
22530
      /**
22531
       * Find the _Fields constant that matches fieldId, throwing an exception
22532
       * if it is not found.
22533
       */
22534
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22535
        _Fields fields = findByThriftId(fieldId);
22536
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22537
        return fields;
22538
      }
22539
 
22540
      /**
22541
       * Find the _Fields constant that matches name, or null if its not found.
22542
       */
22543
      public static _Fields findByName(String name) {
22544
        return byName.get(name);
22545
      }
22546
 
22547
      private final short _thriftId;
22548
      private final String _fieldName;
22549
 
22550
      _Fields(short thriftId, String fieldName) {
22551
        _thriftId = thriftId;
22552
        _fieldName = fieldName;
22553
      }
22554
 
22555
      public short getThriftFieldId() {
22556
        return _thriftId;
22557
      }
22558
 
22559
      public String getFieldName() {
22560
        return _fieldName;
22561
      }
22562
    }
22563
 
22564
    // isset id assignments
22565
    private static final int __PROVIDERID_ISSET_ID = 0;
22566
    private BitSet __isset_bit_vector = new BitSet(1);
22567
 
22568
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22569
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22570
          new FieldValueMetaData(TType.I64)));
22571
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
22572
          new MapMetaData(TType.MAP, 
22573
              new FieldValueMetaData(TType.STRING), 
22574
              new FieldValueMetaData(TType.STRING))));
22575
    }});
22576
 
22577
    static {
22578
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
22579
    }
22580
 
22581
    public markOrdersAsDelivered_args() {
22582
    }
22583
 
22584
    public markOrdersAsDelivered_args(
22585
      long providerId,
22586
      Map<String,String> deliveredOrders)
22587
    {
22588
      this();
22589
      this.providerId = providerId;
22590
      setProviderIdIsSet(true);
22591
      this.deliveredOrders = deliveredOrders;
22592
    }
22593
 
22594
    /**
22595
     * Performs a deep copy on <i>other</i>.
22596
     */
22597
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
22598
      __isset_bit_vector.clear();
22599
      __isset_bit_vector.or(other.__isset_bit_vector);
22600
      this.providerId = other.providerId;
22601
      if (other.isSetDeliveredOrders()) {
22602
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
22603
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
22604
 
22605
          String other_element_key = other_element.getKey();
22606
          String other_element_value = other_element.getValue();
22607
 
22608
          String __this__deliveredOrders_copy_key = other_element_key;
22609
 
22610
          String __this__deliveredOrders_copy_value = other_element_value;
22611
 
22612
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
22613
        }
22614
        this.deliveredOrders = __this__deliveredOrders;
22615
      }
22616
    }
22617
 
22618
    public markOrdersAsDelivered_args deepCopy() {
22619
      return new markOrdersAsDelivered_args(this);
22620
    }
22621
 
22622
    @Deprecated
22623
    public markOrdersAsDelivered_args clone() {
22624
      return new markOrdersAsDelivered_args(this);
22625
    }
22626
 
22627
    public long getProviderId() {
22628
      return this.providerId;
22629
    }
22630
 
22631
    public markOrdersAsDelivered_args setProviderId(long providerId) {
22632
      this.providerId = providerId;
22633
      setProviderIdIsSet(true);
22634
      return this;
22635
    }
22636
 
22637
    public void unsetProviderId() {
22638
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22639
    }
22640
 
22641
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22642
    public boolean isSetProviderId() {
22643
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22644
    }
22645
 
22646
    public void setProviderIdIsSet(boolean value) {
22647
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22648
    }
22649
 
22650
    public int getDeliveredOrdersSize() {
22651
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
22652
    }
22653
 
22654
    public void putToDeliveredOrders(String key, String val) {
22655
      if (this.deliveredOrders == null) {
22656
        this.deliveredOrders = new HashMap<String,String>();
22657
      }
22658
      this.deliveredOrders.put(key, val);
22659
    }
22660
 
22661
    public Map<String,String> getDeliveredOrders() {
22662
      return this.deliveredOrders;
22663
    }
22664
 
22665
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
22666
      this.deliveredOrders = deliveredOrders;
22667
      return this;
22668
    }
22669
 
22670
    public void unsetDeliveredOrders() {
22671
      this.deliveredOrders = null;
22672
    }
22673
 
22674
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
22675
    public boolean isSetDeliveredOrders() {
22676
      return this.deliveredOrders != null;
22677
    }
22678
 
22679
    public void setDeliveredOrdersIsSet(boolean value) {
22680
      if (!value) {
22681
        this.deliveredOrders = null;
22682
      }
22683
    }
22684
 
22685
    public void setFieldValue(_Fields field, Object value) {
22686
      switch (field) {
22687
      case PROVIDER_ID:
22688
        if (value == null) {
22689
          unsetProviderId();
22690
        } else {
22691
          setProviderId((Long)value);
22692
        }
22693
        break;
22694
 
22695
      case DELIVERED_ORDERS:
22696
        if (value == null) {
22697
          unsetDeliveredOrders();
22698
        } else {
22699
          setDeliveredOrders((Map<String,String>)value);
22700
        }
22701
        break;
22702
 
22703
      }
22704
    }
22705
 
22706
    public void setFieldValue(int fieldID, Object value) {
22707
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22708
    }
22709
 
22710
    public Object getFieldValue(_Fields field) {
22711
      switch (field) {
22712
      case PROVIDER_ID:
22713
        return new Long(getProviderId());
22714
 
22715
      case DELIVERED_ORDERS:
22716
        return getDeliveredOrders();
22717
 
22718
      }
22719
      throw new IllegalStateException();
22720
    }
22721
 
22722
    public Object getFieldValue(int fieldId) {
22723
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22724
    }
22725
 
22726
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22727
    public boolean isSet(_Fields field) {
22728
      switch (field) {
22729
      case PROVIDER_ID:
22730
        return isSetProviderId();
22731
      case DELIVERED_ORDERS:
22732
        return isSetDeliveredOrders();
22733
      }
22734
      throw new IllegalStateException();
22735
    }
22736
 
22737
    public boolean isSet(int fieldID) {
22738
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22739
    }
22740
 
22741
    @Override
22742
    public boolean equals(Object that) {
22743
      if (that == null)
22744
        return false;
22745
      if (that instanceof markOrdersAsDelivered_args)
22746
        return this.equals((markOrdersAsDelivered_args)that);
22747
      return false;
22748
    }
22749
 
22750
    public boolean equals(markOrdersAsDelivered_args that) {
22751
      if (that == null)
22752
        return false;
22753
 
22754
      boolean this_present_providerId = true;
22755
      boolean that_present_providerId = true;
22756
      if (this_present_providerId || that_present_providerId) {
22757
        if (!(this_present_providerId && that_present_providerId))
22758
          return false;
22759
        if (this.providerId != that.providerId)
22760
          return false;
22761
      }
22762
 
22763
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
22764
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
22765
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
22766
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
22767
          return false;
22768
        if (!this.deliveredOrders.equals(that.deliveredOrders))
22769
          return false;
22770
      }
22771
 
22772
      return true;
22773
    }
22774
 
22775
    @Override
22776
    public int hashCode() {
22777
      return 0;
22778
    }
22779
 
22780
    public void read(TProtocol iprot) throws TException {
22781
      TField field;
22782
      iprot.readStructBegin();
22783
      while (true)
22784
      {
22785
        field = iprot.readFieldBegin();
22786
        if (field.type == TType.STOP) { 
22787
          break;
22788
        }
22789
        _Fields fieldId = _Fields.findByThriftId(field.id);
22790
        if (fieldId == null) {
22791
          TProtocolUtil.skip(iprot, field.type);
22792
        } else {
22793
          switch (fieldId) {
22794
            case PROVIDER_ID:
22795
              if (field.type == TType.I64) {
22796
                this.providerId = iprot.readI64();
22797
                setProviderIdIsSet(true);
22798
              } else { 
22799
                TProtocolUtil.skip(iprot, field.type);
22800
              }
22801
              break;
22802
            case DELIVERED_ORDERS:
22803
              if (field.type == TType.MAP) {
22804
                {
1382 varun.gupt 22805
                  TMap _map57 = iprot.readMapBegin();
22806
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
22807
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 22808
                  {
1382 varun.gupt 22809
                    String _key59;
22810
                    String _val60;
22811
                    _key59 = iprot.readString();
22812
                    _val60 = iprot.readString();
22813
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 22814
                  }
22815
                  iprot.readMapEnd();
22816
                }
22817
              } else { 
22818
                TProtocolUtil.skip(iprot, field.type);
22819
              }
22820
              break;
22821
          }
22822
          iprot.readFieldEnd();
22823
        }
22824
      }
22825
      iprot.readStructEnd();
22826
      validate();
22827
    }
22828
 
22829
    public void write(TProtocol oprot) throws TException {
22830
      validate();
22831
 
22832
      oprot.writeStructBegin(STRUCT_DESC);
22833
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22834
      oprot.writeI64(this.providerId);
22835
      oprot.writeFieldEnd();
22836
      if (this.deliveredOrders != null) {
22837
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
22838
        {
22839
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 22840
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 22841
          {
1382 varun.gupt 22842
            oprot.writeString(_iter61.getKey());
22843
            oprot.writeString(_iter61.getValue());
1133 chandransh 22844
          }
22845
          oprot.writeMapEnd();
22846
        }
22847
        oprot.writeFieldEnd();
22848
      }
22849
      oprot.writeFieldStop();
22850
      oprot.writeStructEnd();
22851
    }
22852
 
22853
    @Override
22854
    public String toString() {
22855
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
22856
      boolean first = true;
22857
 
22858
      sb.append("providerId:");
22859
      sb.append(this.providerId);
22860
      first = false;
22861
      if (!first) sb.append(", ");
22862
      sb.append("deliveredOrders:");
22863
      if (this.deliveredOrders == null) {
22864
        sb.append("null");
22865
      } else {
22866
        sb.append(this.deliveredOrders);
22867
      }
22868
      first = false;
22869
      sb.append(")");
22870
      return sb.toString();
22871
    }
22872
 
22873
    public void validate() throws TException {
22874
      // check for required fields
22875
    }
22876
 
22877
  }
22878
 
22879
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
22880
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
22881
 
22882
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22883
 
22884
    private TransactionServiceException ex;
22885
 
22886
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22887
    public enum _Fields implements TFieldIdEnum {
22888
      EX((short)1, "ex");
22889
 
22890
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22891
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22892
 
22893
      static {
22894
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22895
          byId.put((int)field._thriftId, field);
22896
          byName.put(field.getFieldName(), field);
22897
        }
22898
      }
22899
 
22900
      /**
22901
       * Find the _Fields constant that matches fieldId, or null if its not found.
22902
       */
22903
      public static _Fields findByThriftId(int fieldId) {
22904
        return byId.get(fieldId);
22905
      }
22906
 
22907
      /**
22908
       * Find the _Fields constant that matches fieldId, throwing an exception
22909
       * if it is not found.
22910
       */
22911
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22912
        _Fields fields = findByThriftId(fieldId);
22913
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22914
        return fields;
22915
      }
22916
 
22917
      /**
22918
       * Find the _Fields constant that matches name, or null if its not found.
22919
       */
22920
      public static _Fields findByName(String name) {
22921
        return byName.get(name);
22922
      }
22923
 
22924
      private final short _thriftId;
22925
      private final String _fieldName;
22926
 
22927
      _Fields(short thriftId, String fieldName) {
22928
        _thriftId = thriftId;
22929
        _fieldName = fieldName;
22930
      }
22931
 
22932
      public short getThriftFieldId() {
22933
        return _thriftId;
22934
      }
22935
 
22936
      public String getFieldName() {
22937
        return _fieldName;
22938
      }
22939
    }
22940
 
22941
    // isset id assignments
22942
 
22943
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22944
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22945
          new FieldValueMetaData(TType.STRUCT)));
22946
    }});
22947
 
22948
    static {
22949
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
22950
    }
22951
 
22952
    public markOrdersAsDelivered_result() {
22953
    }
22954
 
22955
    public markOrdersAsDelivered_result(
22956
      TransactionServiceException ex)
22957
    {
22958
      this();
22959
      this.ex = ex;
22960
    }
22961
 
22962
    /**
22963
     * Performs a deep copy on <i>other</i>.
22964
     */
22965
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
22966
      if (other.isSetEx()) {
22967
        this.ex = new TransactionServiceException(other.ex);
22968
      }
22969
    }
22970
 
22971
    public markOrdersAsDelivered_result deepCopy() {
22972
      return new markOrdersAsDelivered_result(this);
22973
    }
22974
 
22975
    @Deprecated
22976
    public markOrdersAsDelivered_result clone() {
22977
      return new markOrdersAsDelivered_result(this);
22978
    }
22979
 
22980
    public TransactionServiceException getEx() {
22981
      return this.ex;
22982
    }
22983
 
22984
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
22985
      this.ex = ex;
22986
      return this;
22987
    }
22988
 
22989
    public void unsetEx() {
22990
      this.ex = null;
22991
    }
22992
 
22993
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22994
    public boolean isSetEx() {
22995
      return this.ex != null;
22996
    }
22997
 
22998
    public void setExIsSet(boolean value) {
22999
      if (!value) {
23000
        this.ex = null;
23001
      }
23002
    }
23003
 
23004
    public void setFieldValue(_Fields field, Object value) {
23005
      switch (field) {
23006
      case EX:
23007
        if (value == null) {
23008
          unsetEx();
23009
        } else {
23010
          setEx((TransactionServiceException)value);
23011
        }
23012
        break;
23013
 
23014
      }
23015
    }
23016
 
23017
    public void setFieldValue(int fieldID, Object value) {
23018
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23019
    }
23020
 
23021
    public Object getFieldValue(_Fields field) {
23022
      switch (field) {
23023
      case EX:
23024
        return getEx();
23025
 
23026
      }
23027
      throw new IllegalStateException();
23028
    }
23029
 
23030
    public Object getFieldValue(int fieldId) {
23031
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23032
    }
23033
 
23034
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23035
    public boolean isSet(_Fields field) {
23036
      switch (field) {
23037
      case EX:
23038
        return isSetEx();
23039
      }
23040
      throw new IllegalStateException();
23041
    }
23042
 
23043
    public boolean isSet(int fieldID) {
23044
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23045
    }
23046
 
23047
    @Override
23048
    public boolean equals(Object that) {
23049
      if (that == null)
23050
        return false;
23051
      if (that instanceof markOrdersAsDelivered_result)
23052
        return this.equals((markOrdersAsDelivered_result)that);
23053
      return false;
23054
    }
23055
 
23056
    public boolean equals(markOrdersAsDelivered_result that) {
23057
      if (that == null)
23058
        return false;
23059
 
23060
      boolean this_present_ex = true && this.isSetEx();
23061
      boolean that_present_ex = true && that.isSetEx();
23062
      if (this_present_ex || that_present_ex) {
23063
        if (!(this_present_ex && that_present_ex))
23064
          return false;
23065
        if (!this.ex.equals(that.ex))
23066
          return false;
23067
      }
23068
 
23069
      return true;
23070
    }
23071
 
23072
    @Override
23073
    public int hashCode() {
23074
      return 0;
23075
    }
23076
 
23077
    public int compareTo(markOrdersAsDelivered_result other) {
23078
      if (!getClass().equals(other.getClass())) {
23079
        return getClass().getName().compareTo(other.getClass().getName());
23080
      }
23081
 
23082
      int lastComparison = 0;
23083
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
23084
 
23085
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23086
      if (lastComparison != 0) {
23087
        return lastComparison;
23088
      }
23089
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23090
      if (lastComparison != 0) {
23091
        return lastComparison;
23092
      }
23093
      return 0;
23094
    }
23095
 
23096
    public void read(TProtocol iprot) throws TException {
23097
      TField field;
23098
      iprot.readStructBegin();
23099
      while (true)
23100
      {
23101
        field = iprot.readFieldBegin();
23102
        if (field.type == TType.STOP) { 
23103
          break;
23104
        }
23105
        _Fields fieldId = _Fields.findByThriftId(field.id);
23106
        if (fieldId == null) {
23107
          TProtocolUtil.skip(iprot, field.type);
23108
        } else {
23109
          switch (fieldId) {
23110
            case EX:
23111
              if (field.type == TType.STRUCT) {
23112
                this.ex = new TransactionServiceException();
23113
                this.ex.read(iprot);
23114
              } else { 
23115
                TProtocolUtil.skip(iprot, field.type);
23116
              }
23117
              break;
23118
          }
23119
          iprot.readFieldEnd();
23120
        }
23121
      }
23122
      iprot.readStructEnd();
23123
      validate();
23124
    }
23125
 
23126
    public void write(TProtocol oprot) throws TException {
23127
      oprot.writeStructBegin(STRUCT_DESC);
23128
 
23129
      if (this.isSetEx()) {
23130
        oprot.writeFieldBegin(EX_FIELD_DESC);
23131
        this.ex.write(oprot);
23132
        oprot.writeFieldEnd();
23133
      }
23134
      oprot.writeFieldStop();
23135
      oprot.writeStructEnd();
23136
    }
23137
 
23138
    @Override
23139
    public String toString() {
23140
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
23141
      boolean first = true;
23142
 
23143
      sb.append("ex:");
23144
      if (this.ex == null) {
23145
        sb.append("null");
23146
      } else {
23147
        sb.append(this.ex);
23148
      }
23149
      first = false;
23150
      sb.append(")");
23151
      return sb.toString();
23152
    }
23153
 
23154
    public void validate() throws TException {
23155
      // check for required fields
23156
    }
23157
 
23158
  }
23159
 
23160
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
23161
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
23162
 
23163
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23164
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
23165
 
23166
    private long providerId;
23167
    private Map<String,String> returnedOrders;
23168
 
23169
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23170
    public enum _Fields implements TFieldIdEnum {
23171
      PROVIDER_ID((short)1, "providerId"),
23172
      RETURNED_ORDERS((short)2, "returnedOrders");
23173
 
23174
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23175
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23176
 
23177
      static {
23178
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23179
          byId.put((int)field._thriftId, field);
23180
          byName.put(field.getFieldName(), field);
23181
        }
23182
      }
23183
 
23184
      /**
23185
       * Find the _Fields constant that matches fieldId, or null if its not found.
23186
       */
23187
      public static _Fields findByThriftId(int fieldId) {
23188
        return byId.get(fieldId);
23189
      }
23190
 
23191
      /**
23192
       * Find the _Fields constant that matches fieldId, throwing an exception
23193
       * if it is not found.
23194
       */
23195
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23196
        _Fields fields = findByThriftId(fieldId);
23197
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23198
        return fields;
23199
      }
23200
 
23201
      /**
23202
       * Find the _Fields constant that matches name, or null if its not found.
23203
       */
23204
      public static _Fields findByName(String name) {
23205
        return byName.get(name);
23206
      }
23207
 
23208
      private final short _thriftId;
23209
      private final String _fieldName;
23210
 
23211
      _Fields(short thriftId, String fieldName) {
23212
        _thriftId = thriftId;
23213
        _fieldName = fieldName;
23214
      }
23215
 
23216
      public short getThriftFieldId() {
23217
        return _thriftId;
23218
      }
23219
 
23220
      public String getFieldName() {
23221
        return _fieldName;
23222
      }
23223
    }
23224
 
23225
    // isset id assignments
23226
    private static final int __PROVIDERID_ISSET_ID = 0;
23227
    private BitSet __isset_bit_vector = new BitSet(1);
23228
 
23229
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23230
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23231
          new FieldValueMetaData(TType.I64)));
23232
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
23233
          new MapMetaData(TType.MAP, 
23234
              new FieldValueMetaData(TType.STRING), 
23235
              new FieldValueMetaData(TType.STRING))));
23236
    }});
23237
 
23238
    static {
23239
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
23240
    }
23241
 
23242
    public markOrdersAsFailed_args() {
23243
    }
23244
 
23245
    public markOrdersAsFailed_args(
23246
      long providerId,
23247
      Map<String,String> returnedOrders)
23248
    {
23249
      this();
23250
      this.providerId = providerId;
23251
      setProviderIdIsSet(true);
23252
      this.returnedOrders = returnedOrders;
23253
    }
23254
 
23255
    /**
23256
     * Performs a deep copy on <i>other</i>.
23257
     */
23258
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
23259
      __isset_bit_vector.clear();
23260
      __isset_bit_vector.or(other.__isset_bit_vector);
23261
      this.providerId = other.providerId;
23262
      if (other.isSetReturnedOrders()) {
23263
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
23264
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
23265
 
23266
          String other_element_key = other_element.getKey();
23267
          String other_element_value = other_element.getValue();
23268
 
23269
          String __this__returnedOrders_copy_key = other_element_key;
23270
 
23271
          String __this__returnedOrders_copy_value = other_element_value;
23272
 
23273
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
23274
        }
23275
        this.returnedOrders = __this__returnedOrders;
23276
      }
23277
    }
23278
 
23279
    public markOrdersAsFailed_args deepCopy() {
23280
      return new markOrdersAsFailed_args(this);
23281
    }
23282
 
23283
    @Deprecated
23284
    public markOrdersAsFailed_args clone() {
23285
      return new markOrdersAsFailed_args(this);
23286
    }
23287
 
23288
    public long getProviderId() {
23289
      return this.providerId;
23290
    }
23291
 
23292
    public markOrdersAsFailed_args setProviderId(long providerId) {
23293
      this.providerId = providerId;
23294
      setProviderIdIsSet(true);
23295
      return this;
23296
    }
23297
 
23298
    public void unsetProviderId() {
23299
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23300
    }
23301
 
23302
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23303
    public boolean isSetProviderId() {
23304
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23305
    }
23306
 
23307
    public void setProviderIdIsSet(boolean value) {
23308
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23309
    }
23310
 
23311
    public int getReturnedOrdersSize() {
23312
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
23313
    }
23314
 
23315
    public void putToReturnedOrders(String key, String val) {
23316
      if (this.returnedOrders == null) {
23317
        this.returnedOrders = new HashMap<String,String>();
23318
      }
23319
      this.returnedOrders.put(key, val);
23320
    }
23321
 
23322
    public Map<String,String> getReturnedOrders() {
23323
      return this.returnedOrders;
23324
    }
23325
 
23326
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
23327
      this.returnedOrders = returnedOrders;
23328
      return this;
23329
    }
23330
 
23331
    public void unsetReturnedOrders() {
23332
      this.returnedOrders = null;
23333
    }
23334
 
23335
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
23336
    public boolean isSetReturnedOrders() {
23337
      return this.returnedOrders != null;
23338
    }
23339
 
23340
    public void setReturnedOrdersIsSet(boolean value) {
23341
      if (!value) {
23342
        this.returnedOrders = null;
23343
      }
23344
    }
23345
 
23346
    public void setFieldValue(_Fields field, Object value) {
23347
      switch (field) {
23348
      case PROVIDER_ID:
23349
        if (value == null) {
23350
          unsetProviderId();
23351
        } else {
23352
          setProviderId((Long)value);
23353
        }
23354
        break;
23355
 
23356
      case RETURNED_ORDERS:
23357
        if (value == null) {
23358
          unsetReturnedOrders();
23359
        } else {
23360
          setReturnedOrders((Map<String,String>)value);
23361
        }
23362
        break;
23363
 
23364
      }
23365
    }
23366
 
23367
    public void setFieldValue(int fieldID, Object value) {
23368
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23369
    }
23370
 
23371
    public Object getFieldValue(_Fields field) {
23372
      switch (field) {
23373
      case PROVIDER_ID:
23374
        return new Long(getProviderId());
23375
 
23376
      case RETURNED_ORDERS:
23377
        return getReturnedOrders();
23378
 
23379
      }
23380
      throw new IllegalStateException();
23381
    }
23382
 
23383
    public Object getFieldValue(int fieldId) {
23384
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23385
    }
23386
 
23387
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23388
    public boolean isSet(_Fields field) {
23389
      switch (field) {
23390
      case PROVIDER_ID:
23391
        return isSetProviderId();
23392
      case RETURNED_ORDERS:
23393
        return isSetReturnedOrders();
23394
      }
23395
      throw new IllegalStateException();
23396
    }
23397
 
23398
    public boolean isSet(int fieldID) {
23399
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23400
    }
23401
 
23402
    @Override
23403
    public boolean equals(Object that) {
23404
      if (that == null)
23405
        return false;
23406
      if (that instanceof markOrdersAsFailed_args)
23407
        return this.equals((markOrdersAsFailed_args)that);
23408
      return false;
23409
    }
23410
 
23411
    public boolean equals(markOrdersAsFailed_args that) {
23412
      if (that == null)
23413
        return false;
23414
 
23415
      boolean this_present_providerId = true;
23416
      boolean that_present_providerId = true;
23417
      if (this_present_providerId || that_present_providerId) {
23418
        if (!(this_present_providerId && that_present_providerId))
23419
          return false;
23420
        if (this.providerId != that.providerId)
23421
          return false;
23422
      }
23423
 
23424
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
23425
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
23426
      if (this_present_returnedOrders || that_present_returnedOrders) {
23427
        if (!(this_present_returnedOrders && that_present_returnedOrders))
23428
          return false;
23429
        if (!this.returnedOrders.equals(that.returnedOrders))
23430
          return false;
23431
      }
23432
 
23433
      return true;
23434
    }
23435
 
23436
    @Override
23437
    public int hashCode() {
23438
      return 0;
23439
    }
23440
 
23441
    public void read(TProtocol iprot) throws TException {
23442
      TField field;
23443
      iprot.readStructBegin();
23444
      while (true)
23445
      {
23446
        field = iprot.readFieldBegin();
23447
        if (field.type == TType.STOP) { 
23448
          break;
23449
        }
23450
        _Fields fieldId = _Fields.findByThriftId(field.id);
23451
        if (fieldId == null) {
23452
          TProtocolUtil.skip(iprot, field.type);
23453
        } else {
23454
          switch (fieldId) {
23455
            case PROVIDER_ID:
23456
              if (field.type == TType.I64) {
23457
                this.providerId = iprot.readI64();
23458
                setProviderIdIsSet(true);
23459
              } else { 
23460
                TProtocolUtil.skip(iprot, field.type);
23461
              }
23462
              break;
23463
            case RETURNED_ORDERS:
23464
              if (field.type == TType.MAP) {
23465
                {
1382 varun.gupt 23466
                  TMap _map62 = iprot.readMapBegin();
23467
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
23468
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 23469
                  {
1382 varun.gupt 23470
                    String _key64;
23471
                    String _val65;
23472
                    _key64 = iprot.readString();
23473
                    _val65 = iprot.readString();
23474
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 23475
                  }
23476
                  iprot.readMapEnd();
23477
                }
23478
              } else { 
23479
                TProtocolUtil.skip(iprot, field.type);
23480
              }
23481
              break;
23482
          }
23483
          iprot.readFieldEnd();
23484
        }
23485
      }
23486
      iprot.readStructEnd();
23487
      validate();
23488
    }
23489
 
23490
    public void write(TProtocol oprot) throws TException {
23491
      validate();
23492
 
23493
      oprot.writeStructBegin(STRUCT_DESC);
23494
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23495
      oprot.writeI64(this.providerId);
23496
      oprot.writeFieldEnd();
23497
      if (this.returnedOrders != null) {
23498
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
23499
        {
23500
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 23501
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 23502
          {
1382 varun.gupt 23503
            oprot.writeString(_iter66.getKey());
23504
            oprot.writeString(_iter66.getValue());
1133 chandransh 23505
          }
23506
          oprot.writeMapEnd();
23507
        }
23508
        oprot.writeFieldEnd();
23509
      }
23510
      oprot.writeFieldStop();
23511
      oprot.writeStructEnd();
23512
    }
23513
 
23514
    @Override
23515
    public String toString() {
23516
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
23517
      boolean first = true;
23518
 
23519
      sb.append("providerId:");
23520
      sb.append(this.providerId);
23521
      first = false;
23522
      if (!first) sb.append(", ");
23523
      sb.append("returnedOrders:");
23524
      if (this.returnedOrders == null) {
23525
        sb.append("null");
23526
      } else {
23527
        sb.append(this.returnedOrders);
23528
      }
23529
      first = false;
23530
      sb.append(")");
23531
      return sb.toString();
23532
    }
23533
 
23534
    public void validate() throws TException {
23535
      // check for required fields
23536
    }
23537
 
23538
  }
23539
 
23540
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
23541
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
23542
 
23543
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23544
 
23545
    private TransactionServiceException ex;
23546
 
23547
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23548
    public enum _Fields implements TFieldIdEnum {
23549
      EX((short)1, "ex");
23550
 
23551
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23552
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23553
 
23554
      static {
23555
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23556
          byId.put((int)field._thriftId, field);
23557
          byName.put(field.getFieldName(), field);
23558
        }
23559
      }
23560
 
23561
      /**
23562
       * Find the _Fields constant that matches fieldId, or null if its not found.
23563
       */
23564
      public static _Fields findByThriftId(int fieldId) {
23565
        return byId.get(fieldId);
23566
      }
23567
 
23568
      /**
23569
       * Find the _Fields constant that matches fieldId, throwing an exception
23570
       * if it is not found.
23571
       */
23572
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23573
        _Fields fields = findByThriftId(fieldId);
23574
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23575
        return fields;
23576
      }
23577
 
23578
      /**
23579
       * Find the _Fields constant that matches name, or null if its not found.
23580
       */
23581
      public static _Fields findByName(String name) {
23582
        return byName.get(name);
23583
      }
23584
 
23585
      private final short _thriftId;
23586
      private final String _fieldName;
23587
 
23588
      _Fields(short thriftId, String fieldName) {
23589
        _thriftId = thriftId;
23590
        _fieldName = fieldName;
23591
      }
23592
 
23593
      public short getThriftFieldId() {
23594
        return _thriftId;
23595
      }
23596
 
23597
      public String getFieldName() {
23598
        return _fieldName;
23599
      }
23600
    }
23601
 
23602
    // isset id assignments
23603
 
23604
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23605
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23606
          new FieldValueMetaData(TType.STRUCT)));
23607
    }});
23608
 
23609
    static {
23610
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
23611
    }
23612
 
23613
    public markOrdersAsFailed_result() {
23614
    }
23615
 
23616
    public markOrdersAsFailed_result(
23617
      TransactionServiceException ex)
23618
    {
23619
      this();
23620
      this.ex = ex;
23621
    }
23622
 
23623
    /**
23624
     * Performs a deep copy on <i>other</i>.
23625
     */
23626
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
23627
      if (other.isSetEx()) {
23628
        this.ex = new TransactionServiceException(other.ex);
23629
      }
23630
    }
23631
 
23632
    public markOrdersAsFailed_result deepCopy() {
23633
      return new markOrdersAsFailed_result(this);
23634
    }
23635
 
23636
    @Deprecated
23637
    public markOrdersAsFailed_result clone() {
23638
      return new markOrdersAsFailed_result(this);
23639
    }
23640
 
23641
    public TransactionServiceException getEx() {
23642
      return this.ex;
23643
    }
23644
 
23645
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
23646
      this.ex = ex;
23647
      return this;
23648
    }
23649
 
23650
    public void unsetEx() {
23651
      this.ex = null;
23652
    }
23653
 
23654
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23655
    public boolean isSetEx() {
23656
      return this.ex != null;
23657
    }
23658
 
23659
    public void setExIsSet(boolean value) {
23660
      if (!value) {
23661
        this.ex = null;
23662
      }
23663
    }
23664
 
23665
    public void setFieldValue(_Fields field, Object value) {
23666
      switch (field) {
23667
      case EX:
23668
        if (value == null) {
23669
          unsetEx();
23670
        } else {
23671
          setEx((TransactionServiceException)value);
23672
        }
23673
        break;
23674
 
23675
      }
23676
    }
23677
 
23678
    public void setFieldValue(int fieldID, Object value) {
23679
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23680
    }
23681
 
23682
    public Object getFieldValue(_Fields field) {
23683
      switch (field) {
23684
      case EX:
23685
        return getEx();
23686
 
23687
      }
23688
      throw new IllegalStateException();
23689
    }
23690
 
23691
    public Object getFieldValue(int fieldId) {
23692
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23693
    }
23694
 
23695
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23696
    public boolean isSet(_Fields field) {
23697
      switch (field) {
23698
      case EX:
23699
        return isSetEx();
23700
      }
23701
      throw new IllegalStateException();
23702
    }
23703
 
23704
    public boolean isSet(int fieldID) {
23705
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23706
    }
23707
 
23708
    @Override
23709
    public boolean equals(Object that) {
23710
      if (that == null)
23711
        return false;
23712
      if (that instanceof markOrdersAsFailed_result)
23713
        return this.equals((markOrdersAsFailed_result)that);
23714
      return false;
23715
    }
23716
 
23717
    public boolean equals(markOrdersAsFailed_result that) {
23718
      if (that == null)
23719
        return false;
23720
 
23721
      boolean this_present_ex = true && this.isSetEx();
23722
      boolean that_present_ex = true && that.isSetEx();
23723
      if (this_present_ex || that_present_ex) {
23724
        if (!(this_present_ex && that_present_ex))
23725
          return false;
23726
        if (!this.ex.equals(that.ex))
23727
          return false;
23728
      }
23729
 
23730
      return true;
23731
    }
23732
 
23733
    @Override
23734
    public int hashCode() {
23735
      return 0;
23736
    }
23737
 
23738
    public int compareTo(markOrdersAsFailed_result other) {
23739
      if (!getClass().equals(other.getClass())) {
23740
        return getClass().getName().compareTo(other.getClass().getName());
23741
      }
23742
 
23743
      int lastComparison = 0;
23744
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
23745
 
23746
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23747
      if (lastComparison != 0) {
23748
        return lastComparison;
23749
      }
23750
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23751
      if (lastComparison != 0) {
23752
        return lastComparison;
23753
      }
23754
      return 0;
23755
    }
23756
 
23757
    public void read(TProtocol iprot) throws TException {
23758
      TField field;
23759
      iprot.readStructBegin();
23760
      while (true)
23761
      {
23762
        field = iprot.readFieldBegin();
23763
        if (field.type == TType.STOP) { 
23764
          break;
23765
        }
23766
        _Fields fieldId = _Fields.findByThriftId(field.id);
23767
        if (fieldId == null) {
23768
          TProtocolUtil.skip(iprot, field.type);
23769
        } else {
23770
          switch (fieldId) {
23771
            case EX:
23772
              if (field.type == TType.STRUCT) {
23773
                this.ex = new TransactionServiceException();
23774
                this.ex.read(iprot);
23775
              } else { 
23776
                TProtocolUtil.skip(iprot, field.type);
23777
              }
23778
              break;
23779
          }
23780
          iprot.readFieldEnd();
23781
        }
23782
      }
23783
      iprot.readStructEnd();
23784
      validate();
23785
    }
23786
 
23787
    public void write(TProtocol oprot) throws TException {
23788
      oprot.writeStructBegin(STRUCT_DESC);
23789
 
23790
      if (this.isSetEx()) {
23791
        oprot.writeFieldBegin(EX_FIELD_DESC);
23792
        this.ex.write(oprot);
23793
        oprot.writeFieldEnd();
23794
      }
23795
      oprot.writeFieldStop();
23796
      oprot.writeStructEnd();
23797
    }
23798
 
23799
    @Override
23800
    public String toString() {
23801
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
23802
      boolean first = true;
23803
 
23804
      sb.append("ex:");
23805
      if (this.ex == null) {
23806
        sb.append("null");
23807
      } else {
23808
        sb.append(this.ex);
23809
      }
23810
      first = false;
23811
      sb.append(")");
23812
      return sb.toString();
23813
    }
23814
 
23815
    public void validate() throws TException {
23816
      // check for required fields
23817
    }
23818
 
23819
  }
23820
 
1245 chandransh 23821
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
23822
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
23823
 
23824
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23825
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
23826
 
23827
    private long providerId;
23828
    private Map<String,String> undeliveredOrders;
23829
 
23830
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23831
    public enum _Fields implements TFieldIdEnum {
23832
      PROVIDER_ID((short)1, "providerId"),
23833
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
23834
 
23835
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23836
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23837
 
23838
      static {
23839
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23840
          byId.put((int)field._thriftId, field);
23841
          byName.put(field.getFieldName(), field);
23842
        }
23843
      }
23844
 
23845
      /**
23846
       * Find the _Fields constant that matches fieldId, or null if its not found.
23847
       */
23848
      public static _Fields findByThriftId(int fieldId) {
23849
        return byId.get(fieldId);
23850
      }
23851
 
23852
      /**
23853
       * Find the _Fields constant that matches fieldId, throwing an exception
23854
       * if it is not found.
23855
       */
23856
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23857
        _Fields fields = findByThriftId(fieldId);
23858
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23859
        return fields;
23860
      }
23861
 
23862
      /**
23863
       * Find the _Fields constant that matches name, or null if its not found.
23864
       */
23865
      public static _Fields findByName(String name) {
23866
        return byName.get(name);
23867
      }
23868
 
23869
      private final short _thriftId;
23870
      private final String _fieldName;
23871
 
23872
      _Fields(short thriftId, String fieldName) {
23873
        _thriftId = thriftId;
23874
        _fieldName = fieldName;
23875
      }
23876
 
23877
      public short getThriftFieldId() {
23878
        return _thriftId;
23879
      }
23880
 
23881
      public String getFieldName() {
23882
        return _fieldName;
23883
      }
23884
    }
23885
 
23886
    // isset id assignments
23887
    private static final int __PROVIDERID_ISSET_ID = 0;
23888
    private BitSet __isset_bit_vector = new BitSet(1);
23889
 
23890
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23891
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23892
          new FieldValueMetaData(TType.I64)));
23893
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
23894
          new MapMetaData(TType.MAP, 
23895
              new FieldValueMetaData(TType.STRING), 
23896
              new FieldValueMetaData(TType.STRING))));
23897
    }});
23898
 
23899
    static {
23900
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
23901
    }
23902
 
23903
    public updateNonDeliveryReason_args() {
23904
    }
23905
 
23906
    public updateNonDeliveryReason_args(
23907
      long providerId,
23908
      Map<String,String> undeliveredOrders)
23909
    {
23910
      this();
23911
      this.providerId = providerId;
23912
      setProviderIdIsSet(true);
23913
      this.undeliveredOrders = undeliveredOrders;
23914
    }
23915
 
23916
    /**
23917
     * Performs a deep copy on <i>other</i>.
23918
     */
23919
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
23920
      __isset_bit_vector.clear();
23921
      __isset_bit_vector.or(other.__isset_bit_vector);
23922
      this.providerId = other.providerId;
23923
      if (other.isSetUndeliveredOrders()) {
23924
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
23925
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
23926
 
23927
          String other_element_key = other_element.getKey();
23928
          String other_element_value = other_element.getValue();
23929
 
23930
          String __this__undeliveredOrders_copy_key = other_element_key;
23931
 
23932
          String __this__undeliveredOrders_copy_value = other_element_value;
23933
 
23934
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
23935
        }
23936
        this.undeliveredOrders = __this__undeliveredOrders;
23937
      }
23938
    }
23939
 
23940
    public updateNonDeliveryReason_args deepCopy() {
23941
      return new updateNonDeliveryReason_args(this);
23942
    }
23943
 
23944
    @Deprecated
23945
    public updateNonDeliveryReason_args clone() {
23946
      return new updateNonDeliveryReason_args(this);
23947
    }
23948
 
23949
    public long getProviderId() {
23950
      return this.providerId;
23951
    }
23952
 
23953
    public updateNonDeliveryReason_args setProviderId(long providerId) {
23954
      this.providerId = providerId;
23955
      setProviderIdIsSet(true);
23956
      return this;
23957
    }
23958
 
23959
    public void unsetProviderId() {
23960
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23961
    }
23962
 
23963
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23964
    public boolean isSetProviderId() {
23965
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23966
    }
23967
 
23968
    public void setProviderIdIsSet(boolean value) {
23969
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23970
    }
23971
 
23972
    public int getUndeliveredOrdersSize() {
23973
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
23974
    }
23975
 
23976
    public void putToUndeliveredOrders(String key, String val) {
23977
      if (this.undeliveredOrders == null) {
23978
        this.undeliveredOrders = new HashMap<String,String>();
23979
      }
23980
      this.undeliveredOrders.put(key, val);
23981
    }
23982
 
23983
    public Map<String,String> getUndeliveredOrders() {
23984
      return this.undeliveredOrders;
23985
    }
23986
 
23987
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
23988
      this.undeliveredOrders = undeliveredOrders;
23989
      return this;
23990
    }
23991
 
23992
    public void unsetUndeliveredOrders() {
23993
      this.undeliveredOrders = null;
23994
    }
23995
 
23996
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
23997
    public boolean isSetUndeliveredOrders() {
23998
      return this.undeliveredOrders != null;
23999
    }
24000
 
24001
    public void setUndeliveredOrdersIsSet(boolean value) {
24002
      if (!value) {
24003
        this.undeliveredOrders = null;
24004
      }
24005
    }
24006
 
24007
    public void setFieldValue(_Fields field, Object value) {
24008
      switch (field) {
24009
      case PROVIDER_ID:
24010
        if (value == null) {
24011
          unsetProviderId();
24012
        } else {
24013
          setProviderId((Long)value);
24014
        }
24015
        break;
24016
 
24017
      case UNDELIVERED_ORDERS:
24018
        if (value == null) {
24019
          unsetUndeliveredOrders();
24020
        } else {
24021
          setUndeliveredOrders((Map<String,String>)value);
24022
        }
24023
        break;
24024
 
24025
      }
24026
    }
24027
 
24028
    public void setFieldValue(int fieldID, Object value) {
24029
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24030
    }
24031
 
24032
    public Object getFieldValue(_Fields field) {
24033
      switch (field) {
24034
      case PROVIDER_ID:
24035
        return new Long(getProviderId());
24036
 
24037
      case UNDELIVERED_ORDERS:
24038
        return getUndeliveredOrders();
24039
 
24040
      }
24041
      throw new IllegalStateException();
24042
    }
24043
 
24044
    public Object getFieldValue(int fieldId) {
24045
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24046
    }
24047
 
24048
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24049
    public boolean isSet(_Fields field) {
24050
      switch (field) {
24051
      case PROVIDER_ID:
24052
        return isSetProviderId();
24053
      case UNDELIVERED_ORDERS:
24054
        return isSetUndeliveredOrders();
24055
      }
24056
      throw new IllegalStateException();
24057
    }
24058
 
24059
    public boolean isSet(int fieldID) {
24060
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24061
    }
24062
 
24063
    @Override
24064
    public boolean equals(Object that) {
24065
      if (that == null)
24066
        return false;
24067
      if (that instanceof updateNonDeliveryReason_args)
24068
        return this.equals((updateNonDeliveryReason_args)that);
24069
      return false;
24070
    }
24071
 
24072
    public boolean equals(updateNonDeliveryReason_args that) {
24073
      if (that == null)
24074
        return false;
24075
 
24076
      boolean this_present_providerId = true;
24077
      boolean that_present_providerId = true;
24078
      if (this_present_providerId || that_present_providerId) {
24079
        if (!(this_present_providerId && that_present_providerId))
24080
          return false;
24081
        if (this.providerId != that.providerId)
24082
          return false;
24083
      }
24084
 
24085
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
24086
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
24087
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
24088
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
24089
          return false;
24090
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
24091
          return false;
24092
      }
24093
 
24094
      return true;
24095
    }
24096
 
24097
    @Override
24098
    public int hashCode() {
24099
      return 0;
24100
    }
24101
 
24102
    public void read(TProtocol iprot) throws TException {
24103
      TField field;
24104
      iprot.readStructBegin();
24105
      while (true)
24106
      {
24107
        field = iprot.readFieldBegin();
24108
        if (field.type == TType.STOP) { 
24109
          break;
24110
        }
24111
        _Fields fieldId = _Fields.findByThriftId(field.id);
24112
        if (fieldId == null) {
24113
          TProtocolUtil.skip(iprot, field.type);
24114
        } else {
24115
          switch (fieldId) {
24116
            case PROVIDER_ID:
24117
              if (field.type == TType.I64) {
24118
                this.providerId = iprot.readI64();
24119
                setProviderIdIsSet(true);
24120
              } else { 
24121
                TProtocolUtil.skip(iprot, field.type);
24122
              }
24123
              break;
24124
            case UNDELIVERED_ORDERS:
24125
              if (field.type == TType.MAP) {
24126
                {
1382 varun.gupt 24127
                  TMap _map67 = iprot.readMapBegin();
24128
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
24129
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 24130
                  {
1382 varun.gupt 24131
                    String _key69;
24132
                    String _val70;
24133
                    _key69 = iprot.readString();
24134
                    _val70 = iprot.readString();
24135
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 24136
                  }
24137
                  iprot.readMapEnd();
24138
                }
24139
              } else { 
24140
                TProtocolUtil.skip(iprot, field.type);
24141
              }
24142
              break;
24143
          }
24144
          iprot.readFieldEnd();
24145
        }
24146
      }
24147
      iprot.readStructEnd();
24148
      validate();
24149
    }
24150
 
24151
    public void write(TProtocol oprot) throws TException {
24152
      validate();
24153
 
24154
      oprot.writeStructBegin(STRUCT_DESC);
24155
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24156
      oprot.writeI64(this.providerId);
24157
      oprot.writeFieldEnd();
24158
      if (this.undeliveredOrders != null) {
24159
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
24160
        {
24161
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 24162
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 24163
          {
1382 varun.gupt 24164
            oprot.writeString(_iter71.getKey());
24165
            oprot.writeString(_iter71.getValue());
1245 chandransh 24166
          }
24167
          oprot.writeMapEnd();
24168
        }
24169
        oprot.writeFieldEnd();
24170
      }
24171
      oprot.writeFieldStop();
24172
      oprot.writeStructEnd();
24173
    }
24174
 
24175
    @Override
24176
    public String toString() {
24177
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
24178
      boolean first = true;
24179
 
24180
      sb.append("providerId:");
24181
      sb.append(this.providerId);
24182
      first = false;
24183
      if (!first) sb.append(", ");
24184
      sb.append("undeliveredOrders:");
24185
      if (this.undeliveredOrders == null) {
24186
        sb.append("null");
24187
      } else {
24188
        sb.append(this.undeliveredOrders);
24189
      }
24190
      first = false;
24191
      sb.append(")");
24192
      return sb.toString();
24193
    }
24194
 
24195
    public void validate() throws TException {
24196
      // check for required fields
24197
    }
24198
 
24199
  }
24200
 
24201
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
24202
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
24203
 
24204
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
24205
 
24206
    private TransactionServiceException ex;
24207
 
24208
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24209
    public enum _Fields implements TFieldIdEnum {
24210
      EX((short)1, "ex");
24211
 
24212
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24213
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24214
 
24215
      static {
24216
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24217
          byId.put((int)field._thriftId, field);
24218
          byName.put(field.getFieldName(), field);
24219
        }
24220
      }
24221
 
24222
      /**
24223
       * Find the _Fields constant that matches fieldId, or null if its not found.
24224
       */
24225
      public static _Fields findByThriftId(int fieldId) {
24226
        return byId.get(fieldId);
24227
      }
24228
 
24229
      /**
24230
       * Find the _Fields constant that matches fieldId, throwing an exception
24231
       * if it is not found.
24232
       */
24233
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24234
        _Fields fields = findByThriftId(fieldId);
24235
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24236
        return fields;
24237
      }
24238
 
24239
      /**
24240
       * Find the _Fields constant that matches name, or null if its not found.
24241
       */
24242
      public static _Fields findByName(String name) {
24243
        return byName.get(name);
24244
      }
24245
 
24246
      private final short _thriftId;
24247
      private final String _fieldName;
24248
 
24249
      _Fields(short thriftId, String fieldName) {
24250
        _thriftId = thriftId;
24251
        _fieldName = fieldName;
24252
      }
24253
 
24254
      public short getThriftFieldId() {
24255
        return _thriftId;
24256
      }
24257
 
24258
      public String getFieldName() {
24259
        return _fieldName;
24260
      }
24261
    }
24262
 
24263
    // isset id assignments
24264
 
24265
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24266
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
24267
          new FieldValueMetaData(TType.STRUCT)));
24268
    }});
24269
 
24270
    static {
24271
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
24272
    }
24273
 
24274
    public updateNonDeliveryReason_result() {
24275
    }
24276
 
24277
    public updateNonDeliveryReason_result(
24278
      TransactionServiceException ex)
24279
    {
24280
      this();
24281
      this.ex = ex;
24282
    }
24283
 
24284
    /**
24285
     * Performs a deep copy on <i>other</i>.
24286
     */
24287
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
24288
      if (other.isSetEx()) {
24289
        this.ex = new TransactionServiceException(other.ex);
24290
      }
24291
    }
24292
 
24293
    public updateNonDeliveryReason_result deepCopy() {
24294
      return new updateNonDeliveryReason_result(this);
24295
    }
24296
 
24297
    @Deprecated
24298
    public updateNonDeliveryReason_result clone() {
24299
      return new updateNonDeliveryReason_result(this);
24300
    }
24301
 
24302
    public TransactionServiceException getEx() {
24303
      return this.ex;
24304
    }
24305
 
24306
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
24307
      this.ex = ex;
24308
      return this;
24309
    }
24310
 
24311
    public void unsetEx() {
24312
      this.ex = null;
24313
    }
24314
 
24315
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
24316
    public boolean isSetEx() {
24317
      return this.ex != null;
24318
    }
24319
 
24320
    public void setExIsSet(boolean value) {
24321
      if (!value) {
24322
        this.ex = null;
24323
      }
24324
    }
24325
 
24326
    public void setFieldValue(_Fields field, Object value) {
24327
      switch (field) {
24328
      case EX:
24329
        if (value == null) {
24330
          unsetEx();
24331
        } else {
24332
          setEx((TransactionServiceException)value);
24333
        }
24334
        break;
24335
 
24336
      }
24337
    }
24338
 
24339
    public void setFieldValue(int fieldID, Object value) {
24340
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24341
    }
24342
 
24343
    public Object getFieldValue(_Fields field) {
24344
      switch (field) {
24345
      case EX:
24346
        return getEx();
24347
 
24348
      }
24349
      throw new IllegalStateException();
24350
    }
24351
 
24352
    public Object getFieldValue(int fieldId) {
24353
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24354
    }
24355
 
24356
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24357
    public boolean isSet(_Fields field) {
24358
      switch (field) {
24359
      case EX:
24360
        return isSetEx();
24361
      }
24362
      throw new IllegalStateException();
24363
    }
24364
 
24365
    public boolean isSet(int fieldID) {
24366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24367
    }
24368
 
24369
    @Override
24370
    public boolean equals(Object that) {
24371
      if (that == null)
24372
        return false;
24373
      if (that instanceof updateNonDeliveryReason_result)
24374
        return this.equals((updateNonDeliveryReason_result)that);
24375
      return false;
24376
    }
24377
 
24378
    public boolean equals(updateNonDeliveryReason_result that) {
24379
      if (that == null)
24380
        return false;
24381
 
24382
      boolean this_present_ex = true && this.isSetEx();
24383
      boolean that_present_ex = true && that.isSetEx();
24384
      if (this_present_ex || that_present_ex) {
24385
        if (!(this_present_ex && that_present_ex))
24386
          return false;
24387
        if (!this.ex.equals(that.ex))
24388
          return false;
24389
      }
24390
 
24391
      return true;
24392
    }
24393
 
24394
    @Override
24395
    public int hashCode() {
24396
      return 0;
24397
    }
24398
 
24399
    public int compareTo(updateNonDeliveryReason_result other) {
24400
      if (!getClass().equals(other.getClass())) {
24401
        return getClass().getName().compareTo(other.getClass().getName());
24402
      }
24403
 
24404
      int lastComparison = 0;
24405
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
24406
 
24407
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24408
      if (lastComparison != 0) {
24409
        return lastComparison;
24410
      }
24411
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24412
      if (lastComparison != 0) {
24413
        return lastComparison;
24414
      }
24415
      return 0;
24416
    }
24417
 
24418
    public void read(TProtocol iprot) throws TException {
24419
      TField field;
24420
      iprot.readStructBegin();
24421
      while (true)
24422
      {
24423
        field = iprot.readFieldBegin();
24424
        if (field.type == TType.STOP) { 
24425
          break;
24426
        }
24427
        _Fields fieldId = _Fields.findByThriftId(field.id);
24428
        if (fieldId == null) {
24429
          TProtocolUtil.skip(iprot, field.type);
24430
        } else {
24431
          switch (fieldId) {
24432
            case EX:
24433
              if (field.type == TType.STRUCT) {
24434
                this.ex = new TransactionServiceException();
24435
                this.ex.read(iprot);
24436
              } else { 
24437
                TProtocolUtil.skip(iprot, field.type);
24438
              }
24439
              break;
24440
          }
24441
          iprot.readFieldEnd();
24442
        }
24443
      }
24444
      iprot.readStructEnd();
24445
      validate();
24446
    }
24447
 
24448
    public void write(TProtocol oprot) throws TException {
24449
      oprot.writeStructBegin(STRUCT_DESC);
24450
 
24451
      if (this.isSetEx()) {
24452
        oprot.writeFieldBegin(EX_FIELD_DESC);
24453
        this.ex.write(oprot);
24454
        oprot.writeFieldEnd();
24455
      }
24456
      oprot.writeFieldStop();
24457
      oprot.writeStructEnd();
24458
    }
24459
 
24460
    @Override
24461
    public String toString() {
24462
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
24463
      boolean first = true;
24464
 
24465
      sb.append("ex:");
24466
      if (this.ex == null) {
24467
        sb.append("null");
24468
      } else {
24469
        sb.append(this.ex);
24470
      }
24471
      first = false;
24472
      sb.append(")");
24473
      return sb.toString();
24474
    }
24475
 
24476
    public void validate() throws TException {
24477
      // check for required fields
24478
    }
24479
 
24480
  }
24481
 
1406 ankur.sing 24482
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
24483
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
24484
 
24485
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24486
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
24487
 
24488
    private long providerId;
24489
    private long warehouseId;
24490
 
24491
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24492
    public enum _Fields implements TFieldIdEnum {
24493
      PROVIDER_ID((short)1, "providerId"),
24494
      WAREHOUSE_ID((short)2, "warehouseId");
24495
 
24496
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24497
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24498
 
24499
      static {
24500
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24501
          byId.put((int)field._thriftId, field);
24502
          byName.put(field.getFieldName(), field);
24503
        }
24504
      }
24505
 
24506
      /**
24507
       * Find the _Fields constant that matches fieldId, or null if its not found.
24508
       */
24509
      public static _Fields findByThriftId(int fieldId) {
24510
        return byId.get(fieldId);
24511
      }
24512
 
24513
      /**
24514
       * Find the _Fields constant that matches fieldId, throwing an exception
24515
       * if it is not found.
24516
       */
24517
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24518
        _Fields fields = findByThriftId(fieldId);
24519
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24520
        return fields;
24521
      }
24522
 
24523
      /**
24524
       * Find the _Fields constant that matches name, or null if its not found.
24525
       */
24526
      public static _Fields findByName(String name) {
24527
        return byName.get(name);
24528
      }
24529
 
24530
      private final short _thriftId;
24531
      private final String _fieldName;
24532
 
24533
      _Fields(short thriftId, String fieldName) {
24534
        _thriftId = thriftId;
24535
        _fieldName = fieldName;
24536
      }
24537
 
24538
      public short getThriftFieldId() {
24539
        return _thriftId;
24540
      }
24541
 
24542
      public String getFieldName() {
24543
        return _fieldName;
24544
      }
24545
    }
24546
 
24547
    // isset id assignments
24548
    private static final int __PROVIDERID_ISSET_ID = 0;
24549
    private static final int __WAREHOUSEID_ISSET_ID = 1;
24550
    private BitSet __isset_bit_vector = new BitSet(2);
24551
 
24552
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24553
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24554
          new FieldValueMetaData(TType.I64)));
24555
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
24556
          new FieldValueMetaData(TType.I64)));
24557
    }});
24558
 
24559
    static {
24560
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
24561
    }
24562
 
24563
    public getUndeliveredOrders_args() {
24564
    }
24565
 
24566
    public getUndeliveredOrders_args(
24567
      long providerId,
24568
      long warehouseId)
24569
    {
24570
      this();
24571
      this.providerId = providerId;
24572
      setProviderIdIsSet(true);
24573
      this.warehouseId = warehouseId;
24574
      setWarehouseIdIsSet(true);
24575
    }
24576
 
24577
    /**
24578
     * Performs a deep copy on <i>other</i>.
24579
     */
24580
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
24581
      __isset_bit_vector.clear();
24582
      __isset_bit_vector.or(other.__isset_bit_vector);
24583
      this.providerId = other.providerId;
24584
      this.warehouseId = other.warehouseId;
24585
    }
24586
 
24587
    public getUndeliveredOrders_args deepCopy() {
24588
      return new getUndeliveredOrders_args(this);
24589
    }
24590
 
24591
    @Deprecated
24592
    public getUndeliveredOrders_args clone() {
24593
      return new getUndeliveredOrders_args(this);
24594
    }
24595
 
24596
    public long getProviderId() {
24597
      return this.providerId;
24598
    }
24599
 
24600
    public getUndeliveredOrders_args setProviderId(long providerId) {
24601
      this.providerId = providerId;
24602
      setProviderIdIsSet(true);
24603
      return this;
24604
    }
24605
 
24606
    public void unsetProviderId() {
24607
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24608
    }
24609
 
24610
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24611
    public boolean isSetProviderId() {
24612
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24613
    }
24614
 
24615
    public void setProviderIdIsSet(boolean value) {
24616
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24617
    }
24618
 
24619
    public long getWarehouseId() {
24620
      return this.warehouseId;
24621
    }
24622
 
24623
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
24624
      this.warehouseId = warehouseId;
24625
      setWarehouseIdIsSet(true);
24626
      return this;
24627
    }
24628
 
24629
    public void unsetWarehouseId() {
24630
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
24631
    }
24632
 
24633
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
24634
    public boolean isSetWarehouseId() {
24635
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
24636
    }
24637
 
24638
    public void setWarehouseIdIsSet(boolean value) {
24639
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
24640
    }
24641
 
24642
    public void setFieldValue(_Fields field, Object value) {
24643
      switch (field) {
24644
      case PROVIDER_ID:
24645
        if (value == null) {
24646
          unsetProviderId();
24647
        } else {
24648
          setProviderId((Long)value);
24649
        }
24650
        break;
24651
 
24652
      case WAREHOUSE_ID:
24653
        if (value == null) {
24654
          unsetWarehouseId();
24655
        } else {
24656
          setWarehouseId((Long)value);
24657
        }
24658
        break;
24659
 
24660
      }
24661
    }
24662
 
24663
    public void setFieldValue(int fieldID, Object value) {
24664
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24665
    }
24666
 
24667
    public Object getFieldValue(_Fields field) {
24668
      switch (field) {
24669
      case PROVIDER_ID:
24670
        return new Long(getProviderId());
24671
 
24672
      case WAREHOUSE_ID:
24673
        return new Long(getWarehouseId());
24674
 
24675
      }
24676
      throw new IllegalStateException();
24677
    }
24678
 
24679
    public Object getFieldValue(int fieldId) {
24680
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24681
    }
24682
 
24683
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24684
    public boolean isSet(_Fields field) {
24685
      switch (field) {
24686
      case PROVIDER_ID:
24687
        return isSetProviderId();
24688
      case WAREHOUSE_ID:
24689
        return isSetWarehouseId();
24690
      }
24691
      throw new IllegalStateException();
24692
    }
24693
 
24694
    public boolean isSet(int fieldID) {
24695
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24696
    }
24697
 
24698
    @Override
24699
    public boolean equals(Object that) {
24700
      if (that == null)
24701
        return false;
24702
      if (that instanceof getUndeliveredOrders_args)
24703
        return this.equals((getUndeliveredOrders_args)that);
24704
      return false;
24705
    }
24706
 
24707
    public boolean equals(getUndeliveredOrders_args that) {
24708
      if (that == null)
24709
        return false;
24710
 
24711
      boolean this_present_providerId = true;
24712
      boolean that_present_providerId = true;
24713
      if (this_present_providerId || that_present_providerId) {
24714
        if (!(this_present_providerId && that_present_providerId))
24715
          return false;
24716
        if (this.providerId != that.providerId)
24717
          return false;
24718
      }
24719
 
24720
      boolean this_present_warehouseId = true;
24721
      boolean that_present_warehouseId = true;
24722
      if (this_present_warehouseId || that_present_warehouseId) {
24723
        if (!(this_present_warehouseId && that_present_warehouseId))
24724
          return false;
24725
        if (this.warehouseId != that.warehouseId)
24726
          return false;
24727
      }
24728
 
24729
      return true;
24730
    }
24731
 
24732
    @Override
24733
    public int hashCode() {
24734
      return 0;
24735
    }
24736
 
24737
    public int compareTo(getUndeliveredOrders_args other) {
24738
      if (!getClass().equals(other.getClass())) {
24739
        return getClass().getName().compareTo(other.getClass().getName());
24740
      }
24741
 
24742
      int lastComparison = 0;
24743
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
24744
 
24745
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
24746
      if (lastComparison != 0) {
24747
        return lastComparison;
24748
      }
24749
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
24750
      if (lastComparison != 0) {
24751
        return lastComparison;
24752
      }
24753
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
24754
      if (lastComparison != 0) {
24755
        return lastComparison;
24756
      }
24757
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
24758
      if (lastComparison != 0) {
24759
        return lastComparison;
24760
      }
24761
      return 0;
24762
    }
24763
 
24764
    public void read(TProtocol iprot) throws TException {
24765
      TField field;
24766
      iprot.readStructBegin();
24767
      while (true)
24768
      {
24769
        field = iprot.readFieldBegin();
24770
        if (field.type == TType.STOP) { 
24771
          break;
24772
        }
24773
        _Fields fieldId = _Fields.findByThriftId(field.id);
24774
        if (fieldId == null) {
24775
          TProtocolUtil.skip(iprot, field.type);
24776
        } else {
24777
          switch (fieldId) {
24778
            case PROVIDER_ID:
24779
              if (field.type == TType.I64) {
24780
                this.providerId = iprot.readI64();
24781
                setProviderIdIsSet(true);
24782
              } else { 
24783
                TProtocolUtil.skip(iprot, field.type);
24784
              }
24785
              break;
24786
            case WAREHOUSE_ID:
24787
              if (field.type == TType.I64) {
24788
                this.warehouseId = iprot.readI64();
24789
                setWarehouseIdIsSet(true);
24790
              } else { 
24791
                TProtocolUtil.skip(iprot, field.type);
24792
              }
24793
              break;
24794
          }
24795
          iprot.readFieldEnd();
24796
        }
24797
      }
24798
      iprot.readStructEnd();
24799
      validate();
24800
    }
24801
 
24802
    public void write(TProtocol oprot) throws TException {
24803
      validate();
24804
 
24805
      oprot.writeStructBegin(STRUCT_DESC);
24806
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24807
      oprot.writeI64(this.providerId);
24808
      oprot.writeFieldEnd();
24809
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
24810
      oprot.writeI64(this.warehouseId);
24811
      oprot.writeFieldEnd();
24812
      oprot.writeFieldStop();
24813
      oprot.writeStructEnd();
24814
    }
24815
 
24816
    @Override
24817
    public String toString() {
24818
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
24819
      boolean first = true;
24820
 
24821
      sb.append("providerId:");
24822
      sb.append(this.providerId);
24823
      first = false;
24824
      if (!first) sb.append(", ");
24825
      sb.append("warehouseId:");
24826
      sb.append(this.warehouseId);
24827
      first = false;
24828
      sb.append(")");
24829
      return sb.toString();
24830
    }
24831
 
24832
    public void validate() throws TException {
24833
      // check for required fields
24834
    }
24835
 
24836
  }
24837
 
24838
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
24839
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
24840
 
24841
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
24842
 
24843
    private List<Order> success;
24844
 
24845
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24846
    public enum _Fields implements TFieldIdEnum {
24847
      SUCCESS((short)0, "success");
24848
 
24849
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24850
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24851
 
24852
      static {
24853
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24854
          byId.put((int)field._thriftId, field);
24855
          byName.put(field.getFieldName(), field);
24856
        }
24857
      }
24858
 
24859
      /**
24860
       * Find the _Fields constant that matches fieldId, or null if its not found.
24861
       */
24862
      public static _Fields findByThriftId(int fieldId) {
24863
        return byId.get(fieldId);
24864
      }
24865
 
24866
      /**
24867
       * Find the _Fields constant that matches fieldId, throwing an exception
24868
       * if it is not found.
24869
       */
24870
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24871
        _Fields fields = findByThriftId(fieldId);
24872
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24873
        return fields;
24874
      }
24875
 
24876
      /**
24877
       * Find the _Fields constant that matches name, or null if its not found.
24878
       */
24879
      public static _Fields findByName(String name) {
24880
        return byName.get(name);
24881
      }
24882
 
24883
      private final short _thriftId;
24884
      private final String _fieldName;
24885
 
24886
      _Fields(short thriftId, String fieldName) {
24887
        _thriftId = thriftId;
24888
        _fieldName = fieldName;
24889
      }
24890
 
24891
      public short getThriftFieldId() {
24892
        return _thriftId;
24893
      }
24894
 
24895
      public String getFieldName() {
24896
        return _fieldName;
24897
      }
24898
    }
24899
 
24900
    // isset id assignments
24901
 
24902
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24903
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24904
          new ListMetaData(TType.LIST, 
24905
              new StructMetaData(TType.STRUCT, Order.class))));
24906
    }});
24907
 
24908
    static {
24909
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
24910
    }
24911
 
24912
    public getUndeliveredOrders_result() {
24913
    }
24914
 
24915
    public getUndeliveredOrders_result(
24916
      List<Order> success)
24917
    {
24918
      this();
24919
      this.success = success;
24920
    }
24921
 
24922
    /**
24923
     * Performs a deep copy on <i>other</i>.
24924
     */
24925
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
24926
      if (other.isSetSuccess()) {
24927
        List<Order> __this__success = new ArrayList<Order>();
24928
        for (Order other_element : other.success) {
24929
          __this__success.add(new Order(other_element));
24930
        }
24931
        this.success = __this__success;
24932
      }
24933
    }
24934
 
24935
    public getUndeliveredOrders_result deepCopy() {
24936
      return new getUndeliveredOrders_result(this);
24937
    }
24938
 
24939
    @Deprecated
24940
    public getUndeliveredOrders_result clone() {
24941
      return new getUndeliveredOrders_result(this);
24942
    }
24943
 
24944
    public int getSuccessSize() {
24945
      return (this.success == null) ? 0 : this.success.size();
24946
    }
24947
 
24948
    public java.util.Iterator<Order> getSuccessIterator() {
24949
      return (this.success == null) ? null : this.success.iterator();
24950
    }
24951
 
24952
    public void addToSuccess(Order elem) {
24953
      if (this.success == null) {
24954
        this.success = new ArrayList<Order>();
24955
      }
24956
      this.success.add(elem);
24957
    }
24958
 
24959
    public List<Order> getSuccess() {
24960
      return this.success;
24961
    }
24962
 
24963
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
24964
      this.success = success;
24965
      return this;
24966
    }
24967
 
24968
    public void unsetSuccess() {
24969
      this.success = null;
24970
    }
24971
 
24972
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24973
    public boolean isSetSuccess() {
24974
      return this.success != null;
24975
    }
24976
 
24977
    public void setSuccessIsSet(boolean value) {
24978
      if (!value) {
24979
        this.success = null;
24980
      }
24981
    }
24982
 
24983
    public void setFieldValue(_Fields field, Object value) {
24984
      switch (field) {
24985
      case SUCCESS:
24986
        if (value == null) {
24987
          unsetSuccess();
24988
        } else {
24989
          setSuccess((List<Order>)value);
24990
        }
24991
        break;
24992
 
24993
      }
24994
    }
24995
 
24996
    public void setFieldValue(int fieldID, Object value) {
24997
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24998
    }
24999
 
25000
    public Object getFieldValue(_Fields field) {
25001
      switch (field) {
25002
      case SUCCESS:
25003
        return getSuccess();
25004
 
25005
      }
25006
      throw new IllegalStateException();
25007
    }
25008
 
25009
    public Object getFieldValue(int fieldId) {
25010
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25011
    }
25012
 
25013
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25014
    public boolean isSet(_Fields field) {
25015
      switch (field) {
25016
      case SUCCESS:
25017
        return isSetSuccess();
25018
      }
25019
      throw new IllegalStateException();
25020
    }
25021
 
25022
    public boolean isSet(int fieldID) {
25023
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25024
    }
25025
 
25026
    @Override
25027
    public boolean equals(Object that) {
25028
      if (that == null)
25029
        return false;
25030
      if (that instanceof getUndeliveredOrders_result)
25031
        return this.equals((getUndeliveredOrders_result)that);
25032
      return false;
25033
    }
25034
 
25035
    public boolean equals(getUndeliveredOrders_result that) {
25036
      if (that == null)
25037
        return false;
25038
 
25039
      boolean this_present_success = true && this.isSetSuccess();
25040
      boolean that_present_success = true && that.isSetSuccess();
25041
      if (this_present_success || that_present_success) {
25042
        if (!(this_present_success && that_present_success))
25043
          return false;
25044
        if (!this.success.equals(that.success))
25045
          return false;
25046
      }
25047
 
25048
      return true;
25049
    }
25050
 
25051
    @Override
25052
    public int hashCode() {
25053
      return 0;
25054
    }
25055
 
25056
    public int compareTo(getUndeliveredOrders_result other) {
25057
      if (!getClass().equals(other.getClass())) {
25058
        return getClass().getName().compareTo(other.getClass().getName());
25059
      }
25060
 
25061
      int lastComparison = 0;
25062
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
25063
 
25064
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25065
      if (lastComparison != 0) {
25066
        return lastComparison;
25067
      }
25068
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25069
      if (lastComparison != 0) {
25070
        return lastComparison;
25071
      }
25072
      return 0;
25073
    }
25074
 
25075
    public void read(TProtocol iprot) throws TException {
25076
      TField field;
25077
      iprot.readStructBegin();
25078
      while (true)
25079
      {
25080
        field = iprot.readFieldBegin();
25081
        if (field.type == TType.STOP) { 
25082
          break;
25083
        }
25084
        _Fields fieldId = _Fields.findByThriftId(field.id);
25085
        if (fieldId == null) {
25086
          TProtocolUtil.skip(iprot, field.type);
25087
        } else {
25088
          switch (fieldId) {
25089
            case SUCCESS:
25090
              if (field.type == TType.LIST) {
25091
                {
25092
                  TList _list72 = iprot.readListBegin();
25093
                  this.success = new ArrayList<Order>(_list72.size);
25094
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
25095
                  {
25096
                    Order _elem74;
25097
                    _elem74 = new Order();
25098
                    _elem74.read(iprot);
25099
                    this.success.add(_elem74);
25100
                  }
25101
                  iprot.readListEnd();
25102
                }
25103
              } else { 
25104
                TProtocolUtil.skip(iprot, field.type);
25105
              }
25106
              break;
25107
          }
25108
          iprot.readFieldEnd();
25109
        }
25110
      }
25111
      iprot.readStructEnd();
25112
      validate();
25113
    }
25114
 
25115
    public void write(TProtocol oprot) throws TException {
25116
      oprot.writeStructBegin(STRUCT_DESC);
25117
 
25118
      if (this.isSetSuccess()) {
25119
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25120
        {
25121
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
25122
          for (Order _iter75 : this.success)
25123
          {
25124
            _iter75.write(oprot);
25125
          }
25126
          oprot.writeListEnd();
25127
        }
25128
        oprot.writeFieldEnd();
25129
      }
25130
      oprot.writeFieldStop();
25131
      oprot.writeStructEnd();
25132
    }
25133
 
25134
    @Override
25135
    public String toString() {
25136
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
25137
      boolean first = true;
25138
 
25139
      sb.append("success:");
25140
      if (this.success == null) {
25141
        sb.append("null");
25142
      } else {
25143
        sb.append(this.success);
25144
      }
25145
      first = false;
25146
      sb.append(")");
25147
      return sb.toString();
25148
    }
25149
 
25150
    public void validate() throws TException {
25151
      // check for required fields
25152
    }
25153
 
25154
  }
25155
 
305 ashish 25156
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
25157
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
25158
 
483 rajveer 25159
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25160
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
25161
 
483 rajveer 25162
    private long orderId;
305 ashish 25163
    private boolean valid;
25164
 
25165
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25166
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25167
      ORDER_ID((short)1, "orderId"),
305 ashish 25168
      VALID((short)2, "valid");
25169
 
25170
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25171
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25172
 
25173
      static {
25174
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25175
          byId.put((int)field._thriftId, field);
25176
          byName.put(field.getFieldName(), field);
25177
        }
25178
      }
25179
 
25180
      /**
25181
       * Find the _Fields constant that matches fieldId, or null if its not found.
25182
       */
25183
      public static _Fields findByThriftId(int fieldId) {
25184
        return byId.get(fieldId);
25185
      }
25186
 
25187
      /**
25188
       * Find the _Fields constant that matches fieldId, throwing an exception
25189
       * if it is not found.
25190
       */
25191
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25192
        _Fields fields = findByThriftId(fieldId);
25193
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25194
        return fields;
25195
      }
25196
 
25197
      /**
25198
       * Find the _Fields constant that matches name, or null if its not found.
25199
       */
25200
      public static _Fields findByName(String name) {
25201
        return byName.get(name);
25202
      }
25203
 
25204
      private final short _thriftId;
25205
      private final String _fieldName;
25206
 
25207
      _Fields(short thriftId, String fieldName) {
25208
        _thriftId = thriftId;
25209
        _fieldName = fieldName;
25210
      }
25211
 
25212
      public short getThriftFieldId() {
25213
        return _thriftId;
25214
      }
25215
 
25216
      public String getFieldName() {
25217
        return _fieldName;
25218
      }
25219
    }
25220
 
25221
    // isset id assignments
483 rajveer 25222
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25223
    private static final int __VALID_ISSET_ID = 1;
25224
    private BitSet __isset_bit_vector = new BitSet(2);
25225
 
25226
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25227
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25228
          new FieldValueMetaData(TType.I64)));
25229
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
25230
          new FieldValueMetaData(TType.BOOL)));
25231
    }});
25232
 
25233
    static {
25234
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
25235
    }
25236
 
25237
    public getAlerts_args() {
25238
    }
25239
 
25240
    public getAlerts_args(
483 rajveer 25241
      long orderId,
305 ashish 25242
      boolean valid)
25243
    {
25244
      this();
483 rajveer 25245
      this.orderId = orderId;
25246
      setOrderIdIsSet(true);
305 ashish 25247
      this.valid = valid;
25248
      setValidIsSet(true);
25249
    }
25250
 
25251
    /**
25252
     * Performs a deep copy on <i>other</i>.
25253
     */
25254
    public getAlerts_args(getAlerts_args other) {
25255
      __isset_bit_vector.clear();
25256
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25257
      this.orderId = other.orderId;
305 ashish 25258
      this.valid = other.valid;
25259
    }
25260
 
25261
    public getAlerts_args deepCopy() {
25262
      return new getAlerts_args(this);
25263
    }
25264
 
25265
    @Deprecated
25266
    public getAlerts_args clone() {
25267
      return new getAlerts_args(this);
25268
    }
25269
 
483 rajveer 25270
    public long getOrderId() {
25271
      return this.orderId;
305 ashish 25272
    }
25273
 
483 rajveer 25274
    public getAlerts_args setOrderId(long orderId) {
25275
      this.orderId = orderId;
25276
      setOrderIdIsSet(true);
305 ashish 25277
      return this;
25278
    }
25279
 
483 rajveer 25280
    public void unsetOrderId() {
25281
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25282
    }
25283
 
483 rajveer 25284
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25285
    public boolean isSetOrderId() {
25286
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25287
    }
25288
 
483 rajveer 25289
    public void setOrderIdIsSet(boolean value) {
25290
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25291
    }
25292
 
25293
    public boolean isValid() {
25294
      return this.valid;
25295
    }
25296
 
25297
    public getAlerts_args setValid(boolean valid) {
25298
      this.valid = valid;
25299
      setValidIsSet(true);
25300
      return this;
25301
    }
25302
 
25303
    public void unsetValid() {
25304
      __isset_bit_vector.clear(__VALID_ISSET_ID);
25305
    }
25306
 
25307
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
25308
    public boolean isSetValid() {
25309
      return __isset_bit_vector.get(__VALID_ISSET_ID);
25310
    }
25311
 
25312
    public void setValidIsSet(boolean value) {
25313
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
25314
    }
25315
 
25316
    public void setFieldValue(_Fields field, Object value) {
25317
      switch (field) {
483 rajveer 25318
      case ORDER_ID:
305 ashish 25319
        if (value == null) {
483 rajveer 25320
          unsetOrderId();
305 ashish 25321
        } else {
483 rajveer 25322
          setOrderId((Long)value);
305 ashish 25323
        }
25324
        break;
25325
 
25326
      case VALID:
25327
        if (value == null) {
25328
          unsetValid();
25329
        } else {
25330
          setValid((Boolean)value);
25331
        }
25332
        break;
25333
 
25334
      }
25335
    }
25336
 
25337
    public void setFieldValue(int fieldID, Object value) {
25338
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25339
    }
25340
 
25341
    public Object getFieldValue(_Fields field) {
25342
      switch (field) {
483 rajveer 25343
      case ORDER_ID:
25344
        return new Long(getOrderId());
305 ashish 25345
 
25346
      case VALID:
25347
        return new Boolean(isValid());
25348
 
25349
      }
25350
      throw new IllegalStateException();
25351
    }
25352
 
25353
    public Object getFieldValue(int fieldId) {
25354
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25355
    }
25356
 
25357
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25358
    public boolean isSet(_Fields field) {
25359
      switch (field) {
483 rajveer 25360
      case ORDER_ID:
25361
        return isSetOrderId();
305 ashish 25362
      case VALID:
25363
        return isSetValid();
25364
      }
25365
      throw new IllegalStateException();
25366
    }
25367
 
25368
    public boolean isSet(int fieldID) {
25369
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25370
    }
25371
 
25372
    @Override
25373
    public boolean equals(Object that) {
25374
      if (that == null)
25375
        return false;
25376
      if (that instanceof getAlerts_args)
25377
        return this.equals((getAlerts_args)that);
25378
      return false;
25379
    }
25380
 
25381
    public boolean equals(getAlerts_args that) {
25382
      if (that == null)
25383
        return false;
25384
 
483 rajveer 25385
      boolean this_present_orderId = true;
25386
      boolean that_present_orderId = true;
25387
      if (this_present_orderId || that_present_orderId) {
25388
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25389
          return false;
483 rajveer 25390
        if (this.orderId != that.orderId)
305 ashish 25391
          return false;
25392
      }
25393
 
25394
      boolean this_present_valid = true;
25395
      boolean that_present_valid = true;
25396
      if (this_present_valid || that_present_valid) {
25397
        if (!(this_present_valid && that_present_valid))
25398
          return false;
25399
        if (this.valid != that.valid)
25400
          return false;
25401
      }
25402
 
25403
      return true;
25404
    }
25405
 
25406
    @Override
25407
    public int hashCode() {
25408
      return 0;
25409
    }
25410
 
25411
    public int compareTo(getAlerts_args other) {
25412
      if (!getClass().equals(other.getClass())) {
25413
        return getClass().getName().compareTo(other.getClass().getName());
25414
      }
25415
 
25416
      int lastComparison = 0;
25417
      getAlerts_args typedOther = (getAlerts_args)other;
25418
 
483 rajveer 25419
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25420
      if (lastComparison != 0) {
25421
        return lastComparison;
25422
      }
483 rajveer 25423
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25424
      if (lastComparison != 0) {
25425
        return lastComparison;
25426
      }
25427
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
25428
      if (lastComparison != 0) {
25429
        return lastComparison;
25430
      }
25431
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
25432
      if (lastComparison != 0) {
25433
        return lastComparison;
25434
      }
25435
      return 0;
25436
    }
25437
 
25438
    public void read(TProtocol iprot) throws TException {
25439
      TField field;
25440
      iprot.readStructBegin();
25441
      while (true)
25442
      {
25443
        field = iprot.readFieldBegin();
25444
        if (field.type == TType.STOP) { 
25445
          break;
25446
        }
25447
        _Fields fieldId = _Fields.findByThriftId(field.id);
25448
        if (fieldId == null) {
25449
          TProtocolUtil.skip(iprot, field.type);
25450
        } else {
25451
          switch (fieldId) {
483 rajveer 25452
            case ORDER_ID:
305 ashish 25453
              if (field.type == TType.I64) {
483 rajveer 25454
                this.orderId = iprot.readI64();
25455
                setOrderIdIsSet(true);
305 ashish 25456
              } else { 
25457
                TProtocolUtil.skip(iprot, field.type);
25458
              }
25459
              break;
25460
            case VALID:
25461
              if (field.type == TType.BOOL) {
25462
                this.valid = iprot.readBool();
25463
                setValidIsSet(true);
25464
              } else { 
25465
                TProtocolUtil.skip(iprot, field.type);
25466
              }
25467
              break;
25468
          }
25469
          iprot.readFieldEnd();
25470
        }
25471
      }
25472
      iprot.readStructEnd();
25473
      validate();
25474
    }
25475
 
25476
    public void write(TProtocol oprot) throws TException {
25477
      validate();
25478
 
25479
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25480
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25481
      oprot.writeI64(this.orderId);
305 ashish 25482
      oprot.writeFieldEnd();
25483
      oprot.writeFieldBegin(VALID_FIELD_DESC);
25484
      oprot.writeBool(this.valid);
25485
      oprot.writeFieldEnd();
25486
      oprot.writeFieldStop();
25487
      oprot.writeStructEnd();
25488
    }
25489
 
25490
    @Override
25491
    public String toString() {
25492
      StringBuilder sb = new StringBuilder("getAlerts_args(");
25493
      boolean first = true;
25494
 
483 rajveer 25495
      sb.append("orderId:");
25496
      sb.append(this.orderId);
305 ashish 25497
      first = false;
25498
      if (!first) sb.append(", ");
25499
      sb.append("valid:");
25500
      sb.append(this.valid);
25501
      first = false;
25502
      sb.append(")");
25503
      return sb.toString();
25504
    }
25505
 
25506
    public void validate() throws TException {
25507
      // check for required fields
25508
    }
25509
 
25510
  }
25511
 
25512
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
25513
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
25514
 
25515
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25516
 
25517
    private List<Alert> success;
25518
 
25519
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25520
    public enum _Fields implements TFieldIdEnum {
25521
      SUCCESS((short)0, "success");
25522
 
25523
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25524
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25525
 
25526
      static {
25527
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25528
          byId.put((int)field._thriftId, field);
25529
          byName.put(field.getFieldName(), field);
25530
        }
25531
      }
25532
 
25533
      /**
25534
       * Find the _Fields constant that matches fieldId, or null if its not found.
25535
       */
25536
      public static _Fields findByThriftId(int fieldId) {
25537
        return byId.get(fieldId);
25538
      }
25539
 
25540
      /**
25541
       * Find the _Fields constant that matches fieldId, throwing an exception
25542
       * if it is not found.
25543
       */
25544
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25545
        _Fields fields = findByThriftId(fieldId);
25546
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25547
        return fields;
25548
      }
25549
 
25550
      /**
25551
       * Find the _Fields constant that matches name, or null if its not found.
25552
       */
25553
      public static _Fields findByName(String name) {
25554
        return byName.get(name);
25555
      }
25556
 
25557
      private final short _thriftId;
25558
      private final String _fieldName;
25559
 
25560
      _Fields(short thriftId, String fieldName) {
25561
        _thriftId = thriftId;
25562
        _fieldName = fieldName;
25563
      }
25564
 
25565
      public short getThriftFieldId() {
25566
        return _thriftId;
25567
      }
25568
 
25569
      public String getFieldName() {
25570
        return _fieldName;
25571
      }
25572
    }
25573
 
25574
    // isset id assignments
25575
 
25576
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25577
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25578
          new ListMetaData(TType.LIST, 
25579
              new StructMetaData(TType.STRUCT, Alert.class))));
25580
    }});
25581
 
25582
    static {
25583
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
25584
    }
25585
 
25586
    public getAlerts_result() {
25587
    }
25588
 
25589
    public getAlerts_result(
25590
      List<Alert> success)
25591
    {
25592
      this();
25593
      this.success = success;
25594
    }
25595
 
25596
    /**
25597
     * Performs a deep copy on <i>other</i>.
25598
     */
25599
    public getAlerts_result(getAlerts_result other) {
25600
      if (other.isSetSuccess()) {
25601
        List<Alert> __this__success = new ArrayList<Alert>();
25602
        for (Alert other_element : other.success) {
25603
          __this__success.add(new Alert(other_element));
25604
        }
25605
        this.success = __this__success;
25606
      }
25607
    }
25608
 
25609
    public getAlerts_result deepCopy() {
25610
      return new getAlerts_result(this);
25611
    }
25612
 
25613
    @Deprecated
25614
    public getAlerts_result clone() {
25615
      return new getAlerts_result(this);
25616
    }
25617
 
25618
    public int getSuccessSize() {
25619
      return (this.success == null) ? 0 : this.success.size();
25620
    }
25621
 
25622
    public java.util.Iterator<Alert> getSuccessIterator() {
25623
      return (this.success == null) ? null : this.success.iterator();
25624
    }
25625
 
25626
    public void addToSuccess(Alert elem) {
25627
      if (this.success == null) {
25628
        this.success = new ArrayList<Alert>();
25629
      }
25630
      this.success.add(elem);
25631
    }
25632
 
25633
    public List<Alert> getSuccess() {
25634
      return this.success;
25635
    }
25636
 
25637
    public getAlerts_result setSuccess(List<Alert> success) {
25638
      this.success = success;
25639
      return this;
25640
    }
25641
 
25642
    public void unsetSuccess() {
25643
      this.success = null;
25644
    }
25645
 
25646
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25647
    public boolean isSetSuccess() {
25648
      return this.success != null;
25649
    }
25650
 
25651
    public void setSuccessIsSet(boolean value) {
25652
      if (!value) {
25653
        this.success = null;
25654
      }
25655
    }
25656
 
25657
    public void setFieldValue(_Fields field, Object value) {
25658
      switch (field) {
25659
      case SUCCESS:
25660
        if (value == null) {
25661
          unsetSuccess();
25662
        } else {
25663
          setSuccess((List<Alert>)value);
25664
        }
25665
        break;
25666
 
25667
      }
25668
    }
25669
 
25670
    public void setFieldValue(int fieldID, Object value) {
25671
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25672
    }
25673
 
25674
    public Object getFieldValue(_Fields field) {
25675
      switch (field) {
25676
      case SUCCESS:
25677
        return getSuccess();
25678
 
25679
      }
25680
      throw new IllegalStateException();
25681
    }
25682
 
25683
    public Object getFieldValue(int fieldId) {
25684
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25685
    }
25686
 
25687
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25688
    public boolean isSet(_Fields field) {
25689
      switch (field) {
25690
      case SUCCESS:
25691
        return isSetSuccess();
25692
      }
25693
      throw new IllegalStateException();
25694
    }
25695
 
25696
    public boolean isSet(int fieldID) {
25697
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25698
    }
25699
 
25700
    @Override
25701
    public boolean equals(Object that) {
25702
      if (that == null)
25703
        return false;
25704
      if (that instanceof getAlerts_result)
25705
        return this.equals((getAlerts_result)that);
25706
      return false;
25707
    }
25708
 
25709
    public boolean equals(getAlerts_result that) {
25710
      if (that == null)
25711
        return false;
25712
 
25713
      boolean this_present_success = true && this.isSetSuccess();
25714
      boolean that_present_success = true && that.isSetSuccess();
25715
      if (this_present_success || that_present_success) {
25716
        if (!(this_present_success && that_present_success))
25717
          return false;
25718
        if (!this.success.equals(that.success))
25719
          return false;
25720
      }
25721
 
25722
      return true;
25723
    }
25724
 
25725
    @Override
25726
    public int hashCode() {
25727
      return 0;
25728
    }
25729
 
25730
    public int compareTo(getAlerts_result other) {
25731
      if (!getClass().equals(other.getClass())) {
25732
        return getClass().getName().compareTo(other.getClass().getName());
25733
      }
25734
 
25735
      int lastComparison = 0;
25736
      getAlerts_result typedOther = (getAlerts_result)other;
25737
 
25738
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25739
      if (lastComparison != 0) {
25740
        return lastComparison;
25741
      }
25742
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25743
      if (lastComparison != 0) {
25744
        return lastComparison;
25745
      }
25746
      return 0;
25747
    }
25748
 
25749
    public void read(TProtocol iprot) throws TException {
25750
      TField field;
25751
      iprot.readStructBegin();
25752
      while (true)
25753
      {
25754
        field = iprot.readFieldBegin();
25755
        if (field.type == TType.STOP) { 
25756
          break;
25757
        }
25758
        _Fields fieldId = _Fields.findByThriftId(field.id);
25759
        if (fieldId == null) {
25760
          TProtocolUtil.skip(iprot, field.type);
25761
        } else {
25762
          switch (fieldId) {
25763
            case SUCCESS:
25764
              if (field.type == TType.LIST) {
25765
                {
1406 ankur.sing 25766
                  TList _list76 = iprot.readListBegin();
25767
                  this.success = new ArrayList<Alert>(_list76.size);
25768
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 25769
                  {
1406 ankur.sing 25770
                    Alert _elem78;
25771
                    _elem78 = new Alert();
25772
                    _elem78.read(iprot);
25773
                    this.success.add(_elem78);
305 ashish 25774
                  }
25775
                  iprot.readListEnd();
25776
                }
25777
              } else { 
25778
                TProtocolUtil.skip(iprot, field.type);
25779
              }
25780
              break;
25781
          }
25782
          iprot.readFieldEnd();
25783
        }
25784
      }
25785
      iprot.readStructEnd();
25786
      validate();
25787
    }
25788
 
25789
    public void write(TProtocol oprot) throws TException {
25790
      oprot.writeStructBegin(STRUCT_DESC);
25791
 
25792
      if (this.isSetSuccess()) {
25793
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25794
        {
25795
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 25796
          for (Alert _iter79 : this.success)
305 ashish 25797
          {
1406 ankur.sing 25798
            _iter79.write(oprot);
305 ashish 25799
          }
25800
          oprot.writeListEnd();
25801
        }
25802
        oprot.writeFieldEnd();
25803
      }
25804
      oprot.writeFieldStop();
25805
      oprot.writeStructEnd();
25806
    }
25807
 
25808
    @Override
25809
    public String toString() {
25810
      StringBuilder sb = new StringBuilder("getAlerts_result(");
25811
      boolean first = true;
25812
 
25813
      sb.append("success:");
25814
      if (this.success == null) {
25815
        sb.append("null");
25816
      } else {
25817
        sb.append(this.success);
25818
      }
25819
      first = false;
25820
      sb.append(")");
25821
      return sb.toString();
25822
    }
25823
 
25824
    public void validate() throws TException {
25825
      // check for required fields
25826
    }
25827
 
25828
  }
25829
 
25830
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
25831
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
25832
 
483 rajveer 25833
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25834
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
25835
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
25836
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
25837
 
483 rajveer 25838
    private long orderId;
305 ashish 25839
    private boolean unset;
25840
    private long type;
25841
    private String comment;
25842
 
25843
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25844
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25845
      ORDER_ID((short)1, "orderId"),
305 ashish 25846
      UNSET((short)2, "unset"),
25847
      TYPE((short)3, "type"),
25848
      COMMENT((short)4, "comment");
25849
 
25850
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25851
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25852
 
25853
      static {
25854
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25855
          byId.put((int)field._thriftId, field);
25856
          byName.put(field.getFieldName(), field);
25857
        }
25858
      }
25859
 
25860
      /**
25861
       * Find the _Fields constant that matches fieldId, or null if its not found.
25862
       */
25863
      public static _Fields findByThriftId(int fieldId) {
25864
        return byId.get(fieldId);
25865
      }
25866
 
25867
      /**
25868
       * Find the _Fields constant that matches fieldId, throwing an exception
25869
       * if it is not found.
25870
       */
25871
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25872
        _Fields fields = findByThriftId(fieldId);
25873
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25874
        return fields;
25875
      }
25876
 
25877
      /**
25878
       * Find the _Fields constant that matches name, or null if its not found.
25879
       */
25880
      public static _Fields findByName(String name) {
25881
        return byName.get(name);
25882
      }
25883
 
25884
      private final short _thriftId;
25885
      private final String _fieldName;
25886
 
25887
      _Fields(short thriftId, String fieldName) {
25888
        _thriftId = thriftId;
25889
        _fieldName = fieldName;
25890
      }
25891
 
25892
      public short getThriftFieldId() {
25893
        return _thriftId;
25894
      }
25895
 
25896
      public String getFieldName() {
25897
        return _fieldName;
25898
      }
25899
    }
25900
 
25901
    // isset id assignments
483 rajveer 25902
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25903
    private static final int __UNSET_ISSET_ID = 1;
25904
    private static final int __TYPE_ISSET_ID = 2;
25905
    private BitSet __isset_bit_vector = new BitSet(3);
25906
 
25907
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25908
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25909
          new FieldValueMetaData(TType.I64)));
25910
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
25911
          new FieldValueMetaData(TType.BOOL)));
25912
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
25913
          new FieldValueMetaData(TType.I64)));
25914
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
25915
          new FieldValueMetaData(TType.STRING)));
25916
    }});
25917
 
25918
    static {
25919
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
25920
    }
25921
 
25922
    public setAlert_args() {
25923
    }
25924
 
25925
    public setAlert_args(
483 rajveer 25926
      long orderId,
305 ashish 25927
      boolean unset,
25928
      long type,
25929
      String comment)
25930
    {
25931
      this();
483 rajveer 25932
      this.orderId = orderId;
25933
      setOrderIdIsSet(true);
305 ashish 25934
      this.unset = unset;
25935
      setUnsetIsSet(true);
25936
      this.type = type;
25937
      setTypeIsSet(true);
25938
      this.comment = comment;
25939
    }
25940
 
25941
    /**
25942
     * Performs a deep copy on <i>other</i>.
25943
     */
25944
    public setAlert_args(setAlert_args other) {
25945
      __isset_bit_vector.clear();
25946
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25947
      this.orderId = other.orderId;
305 ashish 25948
      this.unset = other.unset;
25949
      this.type = other.type;
25950
      if (other.isSetComment()) {
25951
        this.comment = other.comment;
25952
      }
25953
    }
25954
 
25955
    public setAlert_args deepCopy() {
25956
      return new setAlert_args(this);
25957
    }
25958
 
25959
    @Deprecated
25960
    public setAlert_args clone() {
25961
      return new setAlert_args(this);
25962
    }
25963
 
483 rajveer 25964
    public long getOrderId() {
25965
      return this.orderId;
305 ashish 25966
    }
25967
 
483 rajveer 25968
    public setAlert_args setOrderId(long orderId) {
25969
      this.orderId = orderId;
25970
      setOrderIdIsSet(true);
305 ashish 25971
      return this;
25972
    }
25973
 
483 rajveer 25974
    public void unsetOrderId() {
25975
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25976
    }
25977
 
483 rajveer 25978
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25979
    public boolean isSetOrderId() {
25980
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25981
    }
25982
 
483 rajveer 25983
    public void setOrderIdIsSet(boolean value) {
25984
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25985
    }
25986
 
25987
    public boolean isUnset() {
25988
      return this.unset;
25989
    }
25990
 
25991
    public setAlert_args setUnset(boolean unset) {
25992
      this.unset = unset;
25993
      setUnsetIsSet(true);
25994
      return this;
25995
    }
25996
 
25997
    public void unsetUnset() {
25998
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
25999
    }
26000
 
26001
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
26002
    public boolean isSetUnset() {
26003
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
26004
    }
26005
 
26006
    public void setUnsetIsSet(boolean value) {
26007
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
26008
    }
26009
 
26010
    public long getType() {
26011
      return this.type;
26012
    }
26013
 
26014
    public setAlert_args setType(long type) {
26015
      this.type = type;
26016
      setTypeIsSet(true);
26017
      return this;
26018
    }
26019
 
26020
    public void unsetType() {
26021
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
26022
    }
26023
 
26024
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
26025
    public boolean isSetType() {
26026
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
26027
    }
26028
 
26029
    public void setTypeIsSet(boolean value) {
26030
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
26031
    }
26032
 
26033
    public String getComment() {
26034
      return this.comment;
26035
    }
26036
 
26037
    public setAlert_args setComment(String comment) {
26038
      this.comment = comment;
26039
      return this;
26040
    }
26041
 
26042
    public void unsetComment() {
26043
      this.comment = null;
26044
    }
26045
 
26046
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
26047
    public boolean isSetComment() {
26048
      return this.comment != null;
26049
    }
26050
 
26051
    public void setCommentIsSet(boolean value) {
26052
      if (!value) {
26053
        this.comment = null;
26054
      }
26055
    }
26056
 
26057
    public void setFieldValue(_Fields field, Object value) {
26058
      switch (field) {
483 rajveer 26059
      case ORDER_ID:
305 ashish 26060
        if (value == null) {
483 rajveer 26061
          unsetOrderId();
305 ashish 26062
        } else {
483 rajveer 26063
          setOrderId((Long)value);
305 ashish 26064
        }
26065
        break;
26066
 
26067
      case UNSET:
26068
        if (value == null) {
26069
          unsetUnset();
26070
        } else {
26071
          setUnset((Boolean)value);
26072
        }
26073
        break;
26074
 
26075
      case TYPE:
26076
        if (value == null) {
26077
          unsetType();
26078
        } else {
26079
          setType((Long)value);
26080
        }
26081
        break;
26082
 
26083
      case COMMENT:
26084
        if (value == null) {
26085
          unsetComment();
26086
        } else {
26087
          setComment((String)value);
26088
        }
26089
        break;
26090
 
26091
      }
26092
    }
26093
 
26094
    public void setFieldValue(int fieldID, Object value) {
26095
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26096
    }
26097
 
26098
    public Object getFieldValue(_Fields field) {
26099
      switch (field) {
483 rajveer 26100
      case ORDER_ID:
26101
        return new Long(getOrderId());
305 ashish 26102
 
26103
      case UNSET:
26104
        return new Boolean(isUnset());
26105
 
26106
      case TYPE:
26107
        return new Long(getType());
26108
 
26109
      case COMMENT:
26110
        return getComment();
26111
 
26112
      }
26113
      throw new IllegalStateException();
26114
    }
26115
 
26116
    public Object getFieldValue(int fieldId) {
26117
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26118
    }
26119
 
26120
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26121
    public boolean isSet(_Fields field) {
26122
      switch (field) {
483 rajveer 26123
      case ORDER_ID:
26124
        return isSetOrderId();
305 ashish 26125
      case UNSET:
26126
        return isSetUnset();
26127
      case TYPE:
26128
        return isSetType();
26129
      case COMMENT:
26130
        return isSetComment();
26131
      }
26132
      throw new IllegalStateException();
26133
    }
26134
 
26135
    public boolean isSet(int fieldID) {
26136
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26137
    }
26138
 
26139
    @Override
26140
    public boolean equals(Object that) {
26141
      if (that == null)
26142
        return false;
26143
      if (that instanceof setAlert_args)
26144
        return this.equals((setAlert_args)that);
26145
      return false;
26146
    }
26147
 
26148
    public boolean equals(setAlert_args that) {
26149
      if (that == null)
26150
        return false;
26151
 
483 rajveer 26152
      boolean this_present_orderId = true;
26153
      boolean that_present_orderId = true;
26154
      if (this_present_orderId || that_present_orderId) {
26155
        if (!(this_present_orderId && that_present_orderId))
305 ashish 26156
          return false;
483 rajveer 26157
        if (this.orderId != that.orderId)
305 ashish 26158
          return false;
26159
      }
26160
 
26161
      boolean this_present_unset = true;
26162
      boolean that_present_unset = true;
26163
      if (this_present_unset || that_present_unset) {
26164
        if (!(this_present_unset && that_present_unset))
26165
          return false;
26166
        if (this.unset != that.unset)
26167
          return false;
26168
      }
26169
 
26170
      boolean this_present_type = true;
26171
      boolean that_present_type = true;
26172
      if (this_present_type || that_present_type) {
26173
        if (!(this_present_type && that_present_type))
26174
          return false;
26175
        if (this.type != that.type)
26176
          return false;
26177
      }
26178
 
26179
      boolean this_present_comment = true && this.isSetComment();
26180
      boolean that_present_comment = true && that.isSetComment();
26181
      if (this_present_comment || that_present_comment) {
26182
        if (!(this_present_comment && that_present_comment))
26183
          return false;
26184
        if (!this.comment.equals(that.comment))
26185
          return false;
26186
      }
26187
 
26188
      return true;
26189
    }
26190
 
26191
    @Override
26192
    public int hashCode() {
26193
      return 0;
26194
    }
26195
 
26196
    public int compareTo(setAlert_args other) {
26197
      if (!getClass().equals(other.getClass())) {
26198
        return getClass().getName().compareTo(other.getClass().getName());
26199
      }
26200
 
26201
      int lastComparison = 0;
26202
      setAlert_args typedOther = (setAlert_args)other;
26203
 
483 rajveer 26204
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 26205
      if (lastComparison != 0) {
26206
        return lastComparison;
26207
      }
483 rajveer 26208
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 26209
      if (lastComparison != 0) {
26210
        return lastComparison;
26211
      }
26212
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
26213
      if (lastComparison != 0) {
26214
        return lastComparison;
26215
      }
26216
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
26217
      if (lastComparison != 0) {
26218
        return lastComparison;
26219
      }
26220
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
26221
      if (lastComparison != 0) {
26222
        return lastComparison;
26223
      }
26224
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
26225
      if (lastComparison != 0) {
26226
        return lastComparison;
26227
      }
26228
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
26229
      if (lastComparison != 0) {
26230
        return lastComparison;
26231
      }
26232
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
26233
      if (lastComparison != 0) {
26234
        return lastComparison;
26235
      }
26236
      return 0;
26237
    }
26238
 
26239
    public void read(TProtocol iprot) throws TException {
26240
      TField field;
26241
      iprot.readStructBegin();
26242
      while (true)
26243
      {
26244
        field = iprot.readFieldBegin();
26245
        if (field.type == TType.STOP) { 
26246
          break;
26247
        }
26248
        _Fields fieldId = _Fields.findByThriftId(field.id);
26249
        if (fieldId == null) {
26250
          TProtocolUtil.skip(iprot, field.type);
26251
        } else {
26252
          switch (fieldId) {
483 rajveer 26253
            case ORDER_ID:
305 ashish 26254
              if (field.type == TType.I64) {
483 rajveer 26255
                this.orderId = iprot.readI64();
26256
                setOrderIdIsSet(true);
305 ashish 26257
              } else { 
26258
                TProtocolUtil.skip(iprot, field.type);
26259
              }
26260
              break;
26261
            case UNSET:
26262
              if (field.type == TType.BOOL) {
26263
                this.unset = iprot.readBool();
26264
                setUnsetIsSet(true);
26265
              } else { 
26266
                TProtocolUtil.skip(iprot, field.type);
26267
              }
26268
              break;
26269
            case TYPE:
26270
              if (field.type == TType.I64) {
26271
                this.type = iprot.readI64();
26272
                setTypeIsSet(true);
26273
              } else { 
26274
                TProtocolUtil.skip(iprot, field.type);
26275
              }
26276
              break;
26277
            case COMMENT:
26278
              if (field.type == TType.STRING) {
26279
                this.comment = iprot.readString();
26280
              } else { 
26281
                TProtocolUtil.skip(iprot, field.type);
26282
              }
26283
              break;
26284
          }
26285
          iprot.readFieldEnd();
26286
        }
26287
      }
26288
      iprot.readStructEnd();
26289
      validate();
26290
    }
26291
 
26292
    public void write(TProtocol oprot) throws TException {
26293
      validate();
26294
 
26295
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 26296
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
26297
      oprot.writeI64(this.orderId);
305 ashish 26298
      oprot.writeFieldEnd();
26299
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
26300
      oprot.writeBool(this.unset);
26301
      oprot.writeFieldEnd();
26302
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
26303
      oprot.writeI64(this.type);
26304
      oprot.writeFieldEnd();
26305
      if (this.comment != null) {
26306
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
26307
        oprot.writeString(this.comment);
26308
        oprot.writeFieldEnd();
26309
      }
26310
      oprot.writeFieldStop();
26311
      oprot.writeStructEnd();
26312
    }
26313
 
26314
    @Override
26315
    public String toString() {
26316
      StringBuilder sb = new StringBuilder("setAlert_args(");
26317
      boolean first = true;
26318
 
483 rajveer 26319
      sb.append("orderId:");
26320
      sb.append(this.orderId);
305 ashish 26321
      first = false;
26322
      if (!first) sb.append(", ");
26323
      sb.append("unset:");
26324
      sb.append(this.unset);
26325
      first = false;
26326
      if (!first) sb.append(", ");
26327
      sb.append("type:");
26328
      sb.append(this.type);
26329
      first = false;
26330
      if (!first) sb.append(", ");
26331
      sb.append("comment:");
26332
      if (this.comment == null) {
26333
        sb.append("null");
26334
      } else {
26335
        sb.append(this.comment);
26336
      }
26337
      first = false;
26338
      sb.append(")");
26339
      return sb.toString();
26340
    }
26341
 
26342
    public void validate() throws TException {
26343
      // check for required fields
26344
    }
26345
 
26346
  }
26347
 
26348
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
26349
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
26350
 
26351
 
26352
 
26353
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26354
    public enum _Fields implements TFieldIdEnum {
26355
;
26356
 
26357
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26358
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26359
 
26360
      static {
26361
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26362
          byId.put((int)field._thriftId, field);
26363
          byName.put(field.getFieldName(), field);
26364
        }
26365
      }
26366
 
26367
      /**
26368
       * Find the _Fields constant that matches fieldId, or null if its not found.
26369
       */
26370
      public static _Fields findByThriftId(int fieldId) {
26371
        return byId.get(fieldId);
26372
      }
26373
 
26374
      /**
26375
       * Find the _Fields constant that matches fieldId, throwing an exception
26376
       * if it is not found.
26377
       */
26378
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26379
        _Fields fields = findByThriftId(fieldId);
26380
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26381
        return fields;
26382
      }
26383
 
26384
      /**
26385
       * Find the _Fields constant that matches name, or null if its not found.
26386
       */
26387
      public static _Fields findByName(String name) {
26388
        return byName.get(name);
26389
      }
26390
 
26391
      private final short _thriftId;
26392
      private final String _fieldName;
26393
 
26394
      _Fields(short thriftId, String fieldName) {
26395
        _thriftId = thriftId;
26396
        _fieldName = fieldName;
26397
      }
26398
 
26399
      public short getThriftFieldId() {
26400
        return _thriftId;
26401
      }
26402
 
26403
      public String getFieldName() {
26404
        return _fieldName;
26405
      }
26406
    }
26407
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26408
    }});
26409
 
26410
    static {
26411
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
26412
    }
26413
 
26414
    public setAlert_result() {
26415
    }
26416
 
26417
    /**
26418
     * Performs a deep copy on <i>other</i>.
26419
     */
26420
    public setAlert_result(setAlert_result other) {
26421
    }
26422
 
26423
    public setAlert_result deepCopy() {
26424
      return new setAlert_result(this);
26425
    }
26426
 
26427
    @Deprecated
26428
    public setAlert_result clone() {
26429
      return new setAlert_result(this);
26430
    }
26431
 
26432
    public void setFieldValue(_Fields field, Object value) {
26433
      switch (field) {
26434
      }
26435
    }
26436
 
26437
    public void setFieldValue(int fieldID, Object value) {
26438
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26439
    }
26440
 
26441
    public Object getFieldValue(_Fields field) {
26442
      switch (field) {
26443
      }
26444
      throw new IllegalStateException();
26445
    }
26446
 
26447
    public Object getFieldValue(int fieldId) {
26448
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26449
    }
26450
 
26451
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26452
    public boolean isSet(_Fields field) {
26453
      switch (field) {
26454
      }
26455
      throw new IllegalStateException();
26456
    }
26457
 
26458
    public boolean isSet(int fieldID) {
26459
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26460
    }
26461
 
26462
    @Override
26463
    public boolean equals(Object that) {
26464
      if (that == null)
26465
        return false;
26466
      if (that instanceof setAlert_result)
26467
        return this.equals((setAlert_result)that);
26468
      return false;
26469
    }
26470
 
26471
    public boolean equals(setAlert_result that) {
26472
      if (that == null)
26473
        return false;
26474
 
26475
      return true;
26476
    }
26477
 
26478
    @Override
26479
    public int hashCode() {
26480
      return 0;
26481
    }
26482
 
26483
    public int compareTo(setAlert_result other) {
26484
      if (!getClass().equals(other.getClass())) {
26485
        return getClass().getName().compareTo(other.getClass().getName());
26486
      }
26487
 
26488
      int lastComparison = 0;
26489
      setAlert_result typedOther = (setAlert_result)other;
26490
 
26491
      return 0;
26492
    }
26493
 
26494
    public void read(TProtocol iprot) throws TException {
26495
      TField field;
26496
      iprot.readStructBegin();
26497
      while (true)
26498
      {
26499
        field = iprot.readFieldBegin();
26500
        if (field.type == TType.STOP) { 
26501
          break;
26502
        }
26503
        _Fields fieldId = _Fields.findByThriftId(field.id);
26504
        if (fieldId == null) {
26505
          TProtocolUtil.skip(iprot, field.type);
26506
        } else {
26507
          switch (fieldId) {
26508
          }
26509
          iprot.readFieldEnd();
26510
        }
26511
      }
26512
      iprot.readStructEnd();
26513
      validate();
26514
    }
26515
 
26516
    public void write(TProtocol oprot) throws TException {
26517
      oprot.writeStructBegin(STRUCT_DESC);
26518
 
26519
      oprot.writeFieldStop();
26520
      oprot.writeStructEnd();
26521
    }
26522
 
26523
    @Override
26524
    public String toString() {
26525
      StringBuilder sb = new StringBuilder("setAlert_result(");
26526
      boolean first = true;
26527
 
26528
      sb.append(")");
26529
      return sb.toString();
26530
    }
26531
 
26532
    public void validate() throws TException {
26533
      // check for required fields
26534
    }
26535
 
26536
  }
26537
 
1598 ankur.sing 26538
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
26539
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
26540
 
26541
 
26542
 
26543
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26544
    public enum _Fields implements TFieldIdEnum {
26545
;
26546
 
26547
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26548
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26549
 
26550
      static {
26551
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26552
          byId.put((int)field._thriftId, field);
26553
          byName.put(field.getFieldName(), field);
26554
        }
26555
      }
26556
 
26557
      /**
26558
       * Find the _Fields constant that matches fieldId, or null if its not found.
26559
       */
26560
      public static _Fields findByThriftId(int fieldId) {
26561
        return byId.get(fieldId);
26562
      }
26563
 
26564
      /**
26565
       * Find the _Fields constant that matches fieldId, throwing an exception
26566
       * if it is not found.
26567
       */
26568
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26569
        _Fields fields = findByThriftId(fieldId);
26570
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26571
        return fields;
26572
      }
26573
 
26574
      /**
26575
       * Find the _Fields constant that matches name, or null if its not found.
26576
       */
26577
      public static _Fields findByName(String name) {
26578
        return byName.get(name);
26579
      }
26580
 
26581
      private final short _thriftId;
26582
      private final String _fieldName;
26583
 
26584
      _Fields(short thriftId, String fieldName) {
26585
        _thriftId = thriftId;
26586
        _fieldName = fieldName;
26587
      }
26588
 
26589
      public short getThriftFieldId() {
26590
        return _thriftId;
26591
      }
26592
 
26593
      public String getFieldName() {
26594
        return _fieldName;
26595
      }
26596
    }
26597
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26598
    }});
26599
 
26600
    static {
26601
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
26602
    }
26603
 
26604
    public getValidOrderCount_args() {
26605
    }
26606
 
26607
    /**
26608
     * Performs a deep copy on <i>other</i>.
26609
     */
26610
    public getValidOrderCount_args(getValidOrderCount_args other) {
26611
    }
26612
 
26613
    public getValidOrderCount_args deepCopy() {
26614
      return new getValidOrderCount_args(this);
26615
    }
26616
 
26617
    @Deprecated
26618
    public getValidOrderCount_args clone() {
26619
      return new getValidOrderCount_args(this);
26620
    }
26621
 
26622
    public void setFieldValue(_Fields field, Object value) {
26623
      switch (field) {
26624
      }
26625
    }
26626
 
26627
    public void setFieldValue(int fieldID, Object value) {
26628
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26629
    }
26630
 
26631
    public Object getFieldValue(_Fields field) {
26632
      switch (field) {
26633
      }
26634
      throw new IllegalStateException();
26635
    }
26636
 
26637
    public Object getFieldValue(int fieldId) {
26638
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26639
    }
26640
 
26641
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26642
    public boolean isSet(_Fields field) {
26643
      switch (field) {
26644
      }
26645
      throw new IllegalStateException();
26646
    }
26647
 
26648
    public boolean isSet(int fieldID) {
26649
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26650
    }
26651
 
26652
    @Override
26653
    public boolean equals(Object that) {
26654
      if (that == null)
26655
        return false;
26656
      if (that instanceof getValidOrderCount_args)
26657
        return this.equals((getValidOrderCount_args)that);
26658
      return false;
26659
    }
26660
 
26661
    public boolean equals(getValidOrderCount_args that) {
26662
      if (that == null)
26663
        return false;
26664
 
26665
      return true;
26666
    }
26667
 
26668
    @Override
26669
    public int hashCode() {
26670
      return 0;
26671
    }
26672
 
26673
    public int compareTo(getValidOrderCount_args other) {
26674
      if (!getClass().equals(other.getClass())) {
26675
        return getClass().getName().compareTo(other.getClass().getName());
26676
      }
26677
 
26678
      int lastComparison = 0;
26679
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
26680
 
26681
      return 0;
26682
    }
26683
 
26684
    public void read(TProtocol iprot) throws TException {
26685
      TField field;
26686
      iprot.readStructBegin();
26687
      while (true)
26688
      {
26689
        field = iprot.readFieldBegin();
26690
        if (field.type == TType.STOP) { 
26691
          break;
26692
        }
26693
        _Fields fieldId = _Fields.findByThriftId(field.id);
26694
        if (fieldId == null) {
26695
          TProtocolUtil.skip(iprot, field.type);
26696
        } else {
26697
          switch (fieldId) {
26698
          }
26699
          iprot.readFieldEnd();
26700
        }
26701
      }
26702
      iprot.readStructEnd();
26703
      validate();
26704
    }
26705
 
26706
    public void write(TProtocol oprot) throws TException {
26707
      validate();
26708
 
26709
      oprot.writeStructBegin(STRUCT_DESC);
26710
      oprot.writeFieldStop();
26711
      oprot.writeStructEnd();
26712
    }
26713
 
26714
    @Override
26715
    public String toString() {
26716
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
26717
      boolean first = true;
26718
 
26719
      sb.append(")");
26720
      return sb.toString();
26721
    }
26722
 
26723
    public void validate() throws TException {
26724
      // check for required fields
26725
    }
26726
 
26727
  }
26728
 
26729
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
26730
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
26731
 
26732
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26733
 
26734
    private long success;
26735
 
26736
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26737
    public enum _Fields implements TFieldIdEnum {
26738
      SUCCESS((short)0, "success");
26739
 
26740
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26741
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26742
 
26743
      static {
26744
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26745
          byId.put((int)field._thriftId, field);
26746
          byName.put(field.getFieldName(), field);
26747
        }
26748
      }
26749
 
26750
      /**
26751
       * Find the _Fields constant that matches fieldId, or null if its not found.
26752
       */
26753
      public static _Fields findByThriftId(int fieldId) {
26754
        return byId.get(fieldId);
26755
      }
26756
 
26757
      /**
26758
       * Find the _Fields constant that matches fieldId, throwing an exception
26759
       * if it is not found.
26760
       */
26761
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26762
        _Fields fields = findByThriftId(fieldId);
26763
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26764
        return fields;
26765
      }
26766
 
26767
      /**
26768
       * Find the _Fields constant that matches name, or null if its not found.
26769
       */
26770
      public static _Fields findByName(String name) {
26771
        return byName.get(name);
26772
      }
26773
 
26774
      private final short _thriftId;
26775
      private final String _fieldName;
26776
 
26777
      _Fields(short thriftId, String fieldName) {
26778
        _thriftId = thriftId;
26779
        _fieldName = fieldName;
26780
      }
26781
 
26782
      public short getThriftFieldId() {
26783
        return _thriftId;
26784
      }
26785
 
26786
      public String getFieldName() {
26787
        return _fieldName;
26788
      }
26789
    }
26790
 
26791
    // isset id assignments
26792
    private static final int __SUCCESS_ISSET_ID = 0;
26793
    private BitSet __isset_bit_vector = new BitSet(1);
26794
 
26795
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26796
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26797
          new FieldValueMetaData(TType.I64)));
26798
    }});
26799
 
26800
    static {
26801
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
26802
    }
26803
 
26804
    public getValidOrderCount_result() {
26805
    }
26806
 
26807
    public getValidOrderCount_result(
26808
      long success)
26809
    {
26810
      this();
26811
      this.success = success;
26812
      setSuccessIsSet(true);
26813
    }
26814
 
26815
    /**
26816
     * Performs a deep copy on <i>other</i>.
26817
     */
26818
    public getValidOrderCount_result(getValidOrderCount_result other) {
26819
      __isset_bit_vector.clear();
26820
      __isset_bit_vector.or(other.__isset_bit_vector);
26821
      this.success = other.success;
26822
    }
26823
 
26824
    public getValidOrderCount_result deepCopy() {
26825
      return new getValidOrderCount_result(this);
26826
    }
26827
 
26828
    @Deprecated
26829
    public getValidOrderCount_result clone() {
26830
      return new getValidOrderCount_result(this);
26831
    }
26832
 
26833
    public long getSuccess() {
26834
      return this.success;
26835
    }
26836
 
26837
    public getValidOrderCount_result setSuccess(long success) {
26838
      this.success = success;
26839
      setSuccessIsSet(true);
26840
      return this;
26841
    }
26842
 
26843
    public void unsetSuccess() {
26844
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26845
    }
26846
 
26847
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26848
    public boolean isSetSuccess() {
26849
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26850
    }
26851
 
26852
    public void setSuccessIsSet(boolean value) {
26853
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26854
    }
26855
 
26856
    public void setFieldValue(_Fields field, Object value) {
26857
      switch (field) {
26858
      case SUCCESS:
26859
        if (value == null) {
26860
          unsetSuccess();
26861
        } else {
26862
          setSuccess((Long)value);
26863
        }
26864
        break;
26865
 
26866
      }
26867
    }
26868
 
26869
    public void setFieldValue(int fieldID, Object value) {
26870
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26871
    }
26872
 
26873
    public Object getFieldValue(_Fields field) {
26874
      switch (field) {
26875
      case SUCCESS:
26876
        return new Long(getSuccess());
26877
 
26878
      }
26879
      throw new IllegalStateException();
26880
    }
26881
 
26882
    public Object getFieldValue(int fieldId) {
26883
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26884
    }
26885
 
26886
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26887
    public boolean isSet(_Fields field) {
26888
      switch (field) {
26889
      case SUCCESS:
26890
        return isSetSuccess();
26891
      }
26892
      throw new IllegalStateException();
26893
    }
26894
 
26895
    public boolean isSet(int fieldID) {
26896
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26897
    }
26898
 
26899
    @Override
26900
    public boolean equals(Object that) {
26901
      if (that == null)
26902
        return false;
26903
      if (that instanceof getValidOrderCount_result)
26904
        return this.equals((getValidOrderCount_result)that);
26905
      return false;
26906
    }
26907
 
26908
    public boolean equals(getValidOrderCount_result that) {
26909
      if (that == null)
26910
        return false;
26911
 
26912
      boolean this_present_success = true;
26913
      boolean that_present_success = true;
26914
      if (this_present_success || that_present_success) {
26915
        if (!(this_present_success && that_present_success))
26916
          return false;
26917
        if (this.success != that.success)
26918
          return false;
26919
      }
26920
 
26921
      return true;
26922
    }
26923
 
26924
    @Override
26925
    public int hashCode() {
26926
      return 0;
26927
    }
26928
 
26929
    public int compareTo(getValidOrderCount_result other) {
26930
      if (!getClass().equals(other.getClass())) {
26931
        return getClass().getName().compareTo(other.getClass().getName());
26932
      }
26933
 
26934
      int lastComparison = 0;
26935
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
26936
 
26937
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26938
      if (lastComparison != 0) {
26939
        return lastComparison;
26940
      }
26941
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26942
      if (lastComparison != 0) {
26943
        return lastComparison;
26944
      }
26945
      return 0;
26946
    }
26947
 
26948
    public void read(TProtocol iprot) throws TException {
26949
      TField field;
26950
      iprot.readStructBegin();
26951
      while (true)
26952
      {
26953
        field = iprot.readFieldBegin();
26954
        if (field.type == TType.STOP) { 
26955
          break;
26956
        }
26957
        _Fields fieldId = _Fields.findByThriftId(field.id);
26958
        if (fieldId == null) {
26959
          TProtocolUtil.skip(iprot, field.type);
26960
        } else {
26961
          switch (fieldId) {
26962
            case SUCCESS:
26963
              if (field.type == TType.I64) {
26964
                this.success = iprot.readI64();
26965
                setSuccessIsSet(true);
26966
              } else { 
26967
                TProtocolUtil.skip(iprot, field.type);
26968
              }
26969
              break;
26970
          }
26971
          iprot.readFieldEnd();
26972
        }
26973
      }
26974
      iprot.readStructEnd();
26975
      validate();
26976
    }
26977
 
26978
    public void write(TProtocol oprot) throws TException {
26979
      oprot.writeStructBegin(STRUCT_DESC);
26980
 
26981
      if (this.isSetSuccess()) {
26982
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26983
        oprot.writeI64(this.success);
26984
        oprot.writeFieldEnd();
26985
      }
26986
      oprot.writeFieldStop();
26987
      oprot.writeStructEnd();
26988
    }
26989
 
26990
    @Override
26991
    public String toString() {
26992
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
26993
      boolean first = true;
26994
 
26995
      sb.append("success:");
26996
      sb.append(this.success);
26997
      first = false;
26998
      sb.append(")");
26999
      return sb.toString();
27000
    }
27001
 
27002
    public void validate() throws TException {
27003
      // check for required fields
27004
    }
27005
 
27006
  }
27007
 
1629 ankur.sing 27008
  public static class getNoOfCustomersWithSuccessfulTransaction_args implements TBase<getNoOfCustomersWithSuccessfulTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_args>   {
27009
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_args");
27010
 
27011
 
27012
 
27013
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27014
    public enum _Fields implements TFieldIdEnum {
27015
;
27016
 
27017
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27018
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27019
 
27020
      static {
27021
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27022
          byId.put((int)field._thriftId, field);
27023
          byName.put(field.getFieldName(), field);
27024
        }
27025
      }
27026
 
27027
      /**
27028
       * Find the _Fields constant that matches fieldId, or null if its not found.
27029
       */
27030
      public static _Fields findByThriftId(int fieldId) {
27031
        return byId.get(fieldId);
27032
      }
27033
 
27034
      /**
27035
       * Find the _Fields constant that matches fieldId, throwing an exception
27036
       * if it is not found.
27037
       */
27038
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27039
        _Fields fields = findByThriftId(fieldId);
27040
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27041
        return fields;
27042
      }
27043
 
27044
      /**
27045
       * Find the _Fields constant that matches name, or null if its not found.
27046
       */
27047
      public static _Fields findByName(String name) {
27048
        return byName.get(name);
27049
      }
27050
 
27051
      private final short _thriftId;
27052
      private final String _fieldName;
27053
 
27054
      _Fields(short thriftId, String fieldName) {
27055
        _thriftId = thriftId;
27056
        _fieldName = fieldName;
27057
      }
27058
 
27059
      public short getThriftFieldId() {
27060
        return _thriftId;
27061
      }
27062
 
27063
      public String getFieldName() {
27064
        return _fieldName;
27065
      }
27066
    }
27067
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27068
    }});
27069
 
27070
    static {
27071
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_args.class, metaDataMap);
27072
    }
27073
 
27074
    public getNoOfCustomersWithSuccessfulTransaction_args() {
27075
    }
27076
 
27077
    /**
27078
     * Performs a deep copy on <i>other</i>.
27079
     */
27080
    public getNoOfCustomersWithSuccessfulTransaction_args(getNoOfCustomersWithSuccessfulTransaction_args other) {
27081
    }
27082
 
27083
    public getNoOfCustomersWithSuccessfulTransaction_args deepCopy() {
27084
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27085
    }
27086
 
27087
    @Deprecated
27088
    public getNoOfCustomersWithSuccessfulTransaction_args clone() {
27089
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
27090
    }
27091
 
27092
    public void setFieldValue(_Fields field, Object value) {
27093
      switch (field) {
27094
      }
27095
    }
27096
 
27097
    public void setFieldValue(int fieldID, Object value) {
27098
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27099
    }
27100
 
27101
    public Object getFieldValue(_Fields field) {
27102
      switch (field) {
27103
      }
27104
      throw new IllegalStateException();
27105
    }
27106
 
27107
    public Object getFieldValue(int fieldId) {
27108
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27109
    }
27110
 
27111
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27112
    public boolean isSet(_Fields field) {
27113
      switch (field) {
27114
      }
27115
      throw new IllegalStateException();
27116
    }
27117
 
27118
    public boolean isSet(int fieldID) {
27119
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27120
    }
27121
 
27122
    @Override
27123
    public boolean equals(Object that) {
27124
      if (that == null)
27125
        return false;
27126
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_args)
27127
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_args)that);
27128
      return false;
27129
    }
27130
 
27131
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_args that) {
27132
      if (that == null)
27133
        return false;
27134
 
27135
      return true;
27136
    }
27137
 
27138
    @Override
27139
    public int hashCode() {
27140
      return 0;
27141
    }
27142
 
27143
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_args other) {
27144
      if (!getClass().equals(other.getClass())) {
27145
        return getClass().getName().compareTo(other.getClass().getName());
27146
      }
27147
 
27148
      int lastComparison = 0;
27149
      getNoOfCustomersWithSuccessfulTransaction_args typedOther = (getNoOfCustomersWithSuccessfulTransaction_args)other;
27150
 
27151
      return 0;
27152
    }
27153
 
27154
    public void read(TProtocol iprot) throws TException {
27155
      TField field;
27156
      iprot.readStructBegin();
27157
      while (true)
27158
      {
27159
        field = iprot.readFieldBegin();
27160
        if (field.type == TType.STOP) { 
27161
          break;
27162
        }
27163
        _Fields fieldId = _Fields.findByThriftId(field.id);
27164
        if (fieldId == null) {
27165
          TProtocolUtil.skip(iprot, field.type);
27166
        } else {
27167
          switch (fieldId) {
27168
          }
27169
          iprot.readFieldEnd();
27170
        }
27171
      }
27172
      iprot.readStructEnd();
27173
      validate();
27174
    }
27175
 
27176
    public void write(TProtocol oprot) throws TException {
27177
      validate();
27178
 
27179
      oprot.writeStructBegin(STRUCT_DESC);
27180
      oprot.writeFieldStop();
27181
      oprot.writeStructEnd();
27182
    }
27183
 
27184
    @Override
27185
    public String toString() {
27186
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_args(");
27187
      boolean first = true;
27188
 
27189
      sb.append(")");
27190
      return sb.toString();
27191
    }
27192
 
27193
    public void validate() throws TException {
27194
      // check for required fields
27195
    }
27196
 
27197
  }
27198
 
27199
  public static class getNoOfCustomersWithSuccessfulTransaction_result implements TBase<getNoOfCustomersWithSuccessfulTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_result>   {
27200
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_result");
27201
 
27202
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
27203
 
27204
    private long success;
27205
 
27206
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27207
    public enum _Fields implements TFieldIdEnum {
27208
      SUCCESS((short)0, "success");
27209
 
27210
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27211
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27212
 
27213
      static {
27214
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27215
          byId.put((int)field._thriftId, field);
27216
          byName.put(field.getFieldName(), field);
27217
        }
27218
      }
27219
 
27220
      /**
27221
       * Find the _Fields constant that matches fieldId, or null if its not found.
27222
       */
27223
      public static _Fields findByThriftId(int fieldId) {
27224
        return byId.get(fieldId);
27225
      }
27226
 
27227
      /**
27228
       * Find the _Fields constant that matches fieldId, throwing an exception
27229
       * if it is not found.
27230
       */
27231
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27232
        _Fields fields = findByThriftId(fieldId);
27233
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27234
        return fields;
27235
      }
27236
 
27237
      /**
27238
       * Find the _Fields constant that matches name, or null if its not found.
27239
       */
27240
      public static _Fields findByName(String name) {
27241
        return byName.get(name);
27242
      }
27243
 
27244
      private final short _thriftId;
27245
      private final String _fieldName;
27246
 
27247
      _Fields(short thriftId, String fieldName) {
27248
        _thriftId = thriftId;
27249
        _fieldName = fieldName;
27250
      }
27251
 
27252
      public short getThriftFieldId() {
27253
        return _thriftId;
27254
      }
27255
 
27256
      public String getFieldName() {
27257
        return _fieldName;
27258
      }
27259
    }
27260
 
27261
    // isset id assignments
27262
    private static final int __SUCCESS_ISSET_ID = 0;
27263
    private BitSet __isset_bit_vector = new BitSet(1);
27264
 
27265
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27266
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27267
          new FieldValueMetaData(TType.I64)));
27268
    }});
27269
 
27270
    static {
27271
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_result.class, metaDataMap);
27272
    }
27273
 
27274
    public getNoOfCustomersWithSuccessfulTransaction_result() {
27275
    }
27276
 
27277
    public getNoOfCustomersWithSuccessfulTransaction_result(
27278
      long success)
27279
    {
27280
      this();
27281
      this.success = success;
27282
      setSuccessIsSet(true);
27283
    }
27284
 
27285
    /**
27286
     * Performs a deep copy on <i>other</i>.
27287
     */
27288
    public getNoOfCustomersWithSuccessfulTransaction_result(getNoOfCustomersWithSuccessfulTransaction_result other) {
27289
      __isset_bit_vector.clear();
27290
      __isset_bit_vector.or(other.__isset_bit_vector);
27291
      this.success = other.success;
27292
    }
27293
 
27294
    public getNoOfCustomersWithSuccessfulTransaction_result deepCopy() {
27295
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27296
    }
27297
 
27298
    @Deprecated
27299
    public getNoOfCustomersWithSuccessfulTransaction_result clone() {
27300
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27301
    }
27302
 
27303
    public long getSuccess() {
27304
      return this.success;
27305
    }
27306
 
27307
    public getNoOfCustomersWithSuccessfulTransaction_result setSuccess(long success) {
27308
      this.success = success;
27309
      setSuccessIsSet(true);
27310
      return this;
27311
    }
27312
 
27313
    public void unsetSuccess() {
27314
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27315
    }
27316
 
27317
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27318
    public boolean isSetSuccess() {
27319
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27320
    }
27321
 
27322
    public void setSuccessIsSet(boolean value) {
27323
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27324
    }
27325
 
27326
    public void setFieldValue(_Fields field, Object value) {
27327
      switch (field) {
27328
      case SUCCESS:
27329
        if (value == null) {
27330
          unsetSuccess();
27331
        } else {
27332
          setSuccess((Long)value);
27333
        }
27334
        break;
27335
 
27336
      }
27337
    }
27338
 
27339
    public void setFieldValue(int fieldID, Object value) {
27340
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27341
    }
27342
 
27343
    public Object getFieldValue(_Fields field) {
27344
      switch (field) {
27345
      case SUCCESS:
27346
        return new Long(getSuccess());
27347
 
27348
      }
27349
      throw new IllegalStateException();
27350
    }
27351
 
27352
    public Object getFieldValue(int fieldId) {
27353
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27354
    }
27355
 
27356
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27357
    public boolean isSet(_Fields field) {
27358
      switch (field) {
27359
      case SUCCESS:
27360
        return isSetSuccess();
27361
      }
27362
      throw new IllegalStateException();
27363
    }
27364
 
27365
    public boolean isSet(int fieldID) {
27366
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27367
    }
27368
 
27369
    @Override
27370
    public boolean equals(Object that) {
27371
      if (that == null)
27372
        return false;
27373
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_result)
27374
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_result)that);
27375
      return false;
27376
    }
27377
 
27378
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_result that) {
27379
      if (that == null)
27380
        return false;
27381
 
27382
      boolean this_present_success = true;
27383
      boolean that_present_success = true;
27384
      if (this_present_success || that_present_success) {
27385
        if (!(this_present_success && that_present_success))
27386
          return false;
27387
        if (this.success != that.success)
27388
          return false;
27389
      }
27390
 
27391
      return true;
27392
    }
27393
 
27394
    @Override
27395
    public int hashCode() {
27396
      return 0;
27397
    }
27398
 
27399
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_result other) {
27400
      if (!getClass().equals(other.getClass())) {
27401
        return getClass().getName().compareTo(other.getClass().getName());
27402
      }
27403
 
27404
      int lastComparison = 0;
27405
      getNoOfCustomersWithSuccessfulTransaction_result typedOther = (getNoOfCustomersWithSuccessfulTransaction_result)other;
27406
 
27407
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27408
      if (lastComparison != 0) {
27409
        return lastComparison;
27410
      }
27411
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27412
      if (lastComparison != 0) {
27413
        return lastComparison;
27414
      }
27415
      return 0;
27416
    }
27417
 
27418
    public void read(TProtocol iprot) throws TException {
27419
      TField field;
27420
      iprot.readStructBegin();
27421
      while (true)
27422
      {
27423
        field = iprot.readFieldBegin();
27424
        if (field.type == TType.STOP) { 
27425
          break;
27426
        }
27427
        _Fields fieldId = _Fields.findByThriftId(field.id);
27428
        if (fieldId == null) {
27429
          TProtocolUtil.skip(iprot, field.type);
27430
        } else {
27431
          switch (fieldId) {
27432
            case SUCCESS:
27433
              if (field.type == TType.I64) {
27434
                this.success = iprot.readI64();
27435
                setSuccessIsSet(true);
27436
              } else { 
27437
                TProtocolUtil.skip(iprot, field.type);
27438
              }
27439
              break;
27440
          }
27441
          iprot.readFieldEnd();
27442
        }
27443
      }
27444
      iprot.readStructEnd();
27445
      validate();
27446
    }
27447
 
27448
    public void write(TProtocol oprot) throws TException {
27449
      oprot.writeStructBegin(STRUCT_DESC);
27450
 
27451
      if (this.isSetSuccess()) {
27452
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27453
        oprot.writeI64(this.success);
27454
        oprot.writeFieldEnd();
27455
      }
27456
      oprot.writeFieldStop();
27457
      oprot.writeStructEnd();
27458
    }
27459
 
27460
    @Override
27461
    public String toString() {
27462
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_result(");
27463
      boolean first = true;
27464
 
27465
      sb.append("success:");
27466
      sb.append(this.success);
27467
      first = false;
27468
      sb.append(")");
27469
      return sb.toString();
27470
    }
27471
 
27472
    public void validate() throws TException {
27473
      // check for required fields
27474
    }
27475
 
27476
  }
27477
 
1731 ankur.sing 27478
  public static class getValidOrdersAmountRange_args implements TBase<getValidOrdersAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_args>   {
27479
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_args");
1629 ankur.sing 27480
 
27481
 
27482
 
27483
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27484
    public enum _Fields implements TFieldIdEnum {
27485
;
27486
 
27487
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27488
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27489
 
27490
      static {
27491
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27492
          byId.put((int)field._thriftId, field);
27493
          byName.put(field.getFieldName(), field);
27494
        }
27495
      }
27496
 
27497
      /**
27498
       * Find the _Fields constant that matches fieldId, or null if its not found.
27499
       */
27500
      public static _Fields findByThriftId(int fieldId) {
27501
        return byId.get(fieldId);
27502
      }
27503
 
27504
      /**
27505
       * Find the _Fields constant that matches fieldId, throwing an exception
27506
       * if it is not found.
27507
       */
27508
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27509
        _Fields fields = findByThriftId(fieldId);
27510
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27511
        return fields;
27512
      }
27513
 
27514
      /**
27515
       * Find the _Fields constant that matches name, or null if its not found.
27516
       */
27517
      public static _Fields findByName(String name) {
27518
        return byName.get(name);
27519
      }
27520
 
27521
      private final short _thriftId;
27522
      private final String _fieldName;
27523
 
27524
      _Fields(short thriftId, String fieldName) {
27525
        _thriftId = thriftId;
27526
        _fieldName = fieldName;
27527
      }
27528
 
27529
      public short getThriftFieldId() {
27530
        return _thriftId;
27531
      }
27532
 
27533
      public String getFieldName() {
27534
        return _fieldName;
27535
      }
27536
    }
27537
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27538
    }});
27539
 
27540
    static {
1731 ankur.sing 27541
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_args.class, metaDataMap);
1629 ankur.sing 27542
    }
27543
 
1731 ankur.sing 27544
    public getValidOrdersAmountRange_args() {
1629 ankur.sing 27545
    }
27546
 
27547
    /**
27548
     * Performs a deep copy on <i>other</i>.
27549
     */
1731 ankur.sing 27550
    public getValidOrdersAmountRange_args(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27551
    }
27552
 
1731 ankur.sing 27553
    public getValidOrdersAmountRange_args deepCopy() {
27554
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27555
    }
27556
 
27557
    @Deprecated
1731 ankur.sing 27558
    public getValidOrdersAmountRange_args clone() {
27559
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27560
    }
27561
 
27562
    public void setFieldValue(_Fields field, Object value) {
27563
      switch (field) {
27564
      }
27565
    }
27566
 
27567
    public void setFieldValue(int fieldID, Object value) {
27568
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27569
    }
27570
 
27571
    public Object getFieldValue(_Fields field) {
27572
      switch (field) {
27573
      }
27574
      throw new IllegalStateException();
27575
    }
27576
 
27577
    public Object getFieldValue(int fieldId) {
27578
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27579
    }
27580
 
27581
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27582
    public boolean isSet(_Fields field) {
27583
      switch (field) {
27584
      }
27585
      throw new IllegalStateException();
27586
    }
27587
 
27588
    public boolean isSet(int fieldID) {
27589
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27590
    }
27591
 
27592
    @Override
27593
    public boolean equals(Object that) {
27594
      if (that == null)
27595
        return false;
1731 ankur.sing 27596
      if (that instanceof getValidOrdersAmountRange_args)
27597
        return this.equals((getValidOrdersAmountRange_args)that);
1629 ankur.sing 27598
      return false;
27599
    }
27600
 
1731 ankur.sing 27601
    public boolean equals(getValidOrdersAmountRange_args that) {
1629 ankur.sing 27602
      if (that == null)
27603
        return false;
27604
 
27605
      return true;
27606
    }
27607
 
27608
    @Override
27609
    public int hashCode() {
27610
      return 0;
27611
    }
27612
 
1731 ankur.sing 27613
    public int compareTo(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27614
      if (!getClass().equals(other.getClass())) {
27615
        return getClass().getName().compareTo(other.getClass().getName());
27616
      }
27617
 
27618
      int lastComparison = 0;
1731 ankur.sing 27619
      getValidOrdersAmountRange_args typedOther = (getValidOrdersAmountRange_args)other;
1629 ankur.sing 27620
 
27621
      return 0;
27622
    }
27623
 
27624
    public void read(TProtocol iprot) throws TException {
27625
      TField field;
27626
      iprot.readStructBegin();
27627
      while (true)
27628
      {
27629
        field = iprot.readFieldBegin();
27630
        if (field.type == TType.STOP) { 
27631
          break;
27632
        }
27633
        _Fields fieldId = _Fields.findByThriftId(field.id);
27634
        if (fieldId == null) {
27635
          TProtocolUtil.skip(iprot, field.type);
27636
        } else {
27637
          switch (fieldId) {
27638
          }
27639
          iprot.readFieldEnd();
27640
        }
27641
      }
27642
      iprot.readStructEnd();
27643
      validate();
27644
    }
27645
 
27646
    public void write(TProtocol oprot) throws TException {
27647
      validate();
27648
 
27649
      oprot.writeStructBegin(STRUCT_DESC);
27650
      oprot.writeFieldStop();
27651
      oprot.writeStructEnd();
27652
    }
27653
 
27654
    @Override
27655
    public String toString() {
1731 ankur.sing 27656
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_args(");
1629 ankur.sing 27657
      boolean first = true;
27658
 
27659
      sb.append(")");
27660
      return sb.toString();
27661
    }
27662
 
27663
    public void validate() throws TException {
27664
      // check for required fields
27665
    }
27666
 
27667
  }
27668
 
1731 ankur.sing 27669
  public static class getValidOrdersAmountRange_result implements TBase<getValidOrdersAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_result>   {
27670
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_result");
1629 ankur.sing 27671
 
1731 ankur.sing 27672
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 27673
 
1731 ankur.sing 27674
    private List<Double> success;
1629 ankur.sing 27675
 
27676
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27677
    public enum _Fields implements TFieldIdEnum {
27678
      SUCCESS((short)0, "success");
27679
 
27680
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27681
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27682
 
27683
      static {
27684
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27685
          byId.put((int)field._thriftId, field);
27686
          byName.put(field.getFieldName(), field);
27687
        }
27688
      }
27689
 
27690
      /**
27691
       * Find the _Fields constant that matches fieldId, or null if its not found.
27692
       */
27693
      public static _Fields findByThriftId(int fieldId) {
27694
        return byId.get(fieldId);
27695
      }
27696
 
27697
      /**
27698
       * Find the _Fields constant that matches fieldId, throwing an exception
27699
       * if it is not found.
27700
       */
27701
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27702
        _Fields fields = findByThriftId(fieldId);
27703
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27704
        return fields;
27705
      }
27706
 
27707
      /**
27708
       * Find the _Fields constant that matches name, or null if its not found.
27709
       */
27710
      public static _Fields findByName(String name) {
27711
        return byName.get(name);
27712
      }
27713
 
27714
      private final short _thriftId;
27715
      private final String _fieldName;
27716
 
27717
      _Fields(short thriftId, String fieldName) {
27718
        _thriftId = thriftId;
27719
        _fieldName = fieldName;
27720
      }
27721
 
27722
      public short getThriftFieldId() {
27723
        return _thriftId;
27724
      }
27725
 
27726
      public String getFieldName() {
27727
        return _fieldName;
27728
      }
27729
    }
27730
 
27731
    // isset id assignments
27732
 
27733
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27734
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 27735
          new ListMetaData(TType.LIST, 
27736
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 27737
    }});
27738
 
27739
    static {
1731 ankur.sing 27740
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_result.class, metaDataMap);
1629 ankur.sing 27741
    }
27742
 
1731 ankur.sing 27743
    public getValidOrdersAmountRange_result() {
1629 ankur.sing 27744
    }
27745
 
1731 ankur.sing 27746
    public getValidOrdersAmountRange_result(
27747
      List<Double> success)
1629 ankur.sing 27748
    {
27749
      this();
27750
      this.success = success;
27751
    }
27752
 
27753
    /**
27754
     * Performs a deep copy on <i>other</i>.
27755
     */
1731 ankur.sing 27756
    public getValidOrdersAmountRange_result(getValidOrdersAmountRange_result other) {
27757
      if (other.isSetSuccess()) {
27758
        List<Double> __this__success = new ArrayList<Double>();
27759
        for (Double other_element : other.success) {
27760
          __this__success.add(other_element);
1629 ankur.sing 27761
        }
1731 ankur.sing 27762
        this.success = __this__success;
1629 ankur.sing 27763
      }
27764
    }
27765
 
1731 ankur.sing 27766
    public getValidOrdersAmountRange_result deepCopy() {
27767
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27768
    }
27769
 
27770
    @Deprecated
1731 ankur.sing 27771
    public getValidOrdersAmountRange_result clone() {
27772
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27773
    }
27774
 
1731 ankur.sing 27775
    public int getSuccessSize() {
27776
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 27777
    }
27778
 
1731 ankur.sing 27779
    public java.util.Iterator<Double> getSuccessIterator() {
27780
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 27781
    }
27782
 
1731 ankur.sing 27783
    public void addToSuccess(double elem) {
27784
      if (this.success == null) {
27785
        this.success = new ArrayList<Double>();
1629 ankur.sing 27786
      }
1731 ankur.sing 27787
      this.success.add(elem);
1629 ankur.sing 27788
    }
27789
 
1731 ankur.sing 27790
    public List<Double> getSuccess() {
1629 ankur.sing 27791
      return this.success;
27792
    }
27793
 
1731 ankur.sing 27794
    public getValidOrdersAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 27795
      this.success = success;
27796
      return this;
27797
    }
27798
 
27799
    public void unsetSuccess() {
1731 ankur.sing 27800
      this.success = null;
1629 ankur.sing 27801
    }
27802
 
27803
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27804
    public boolean isSetSuccess() {
1731 ankur.sing 27805
      return this.success != null;
1629 ankur.sing 27806
    }
27807
 
27808
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 27809
      if (!value) {
27810
        this.success = null;
27811
      }
1629 ankur.sing 27812
    }
27813
 
27814
    public void setFieldValue(_Fields field, Object value) {
27815
      switch (field) {
27816
      case SUCCESS:
27817
        if (value == null) {
27818
          unsetSuccess();
27819
        } else {
1731 ankur.sing 27820
          setSuccess((List<Double>)value);
1629 ankur.sing 27821
        }
27822
        break;
27823
 
27824
      }
27825
    }
27826
 
27827
    public void setFieldValue(int fieldID, Object value) {
27828
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27829
    }
27830
 
27831
    public Object getFieldValue(_Fields field) {
27832
      switch (field) {
27833
      case SUCCESS:
1731 ankur.sing 27834
        return getSuccess();
1629 ankur.sing 27835
 
27836
      }
27837
      throw new IllegalStateException();
27838
    }
27839
 
27840
    public Object getFieldValue(int fieldId) {
27841
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27842
    }
27843
 
27844
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27845
    public boolean isSet(_Fields field) {
27846
      switch (field) {
27847
      case SUCCESS:
27848
        return isSetSuccess();
27849
      }
27850
      throw new IllegalStateException();
27851
    }
27852
 
27853
    public boolean isSet(int fieldID) {
27854
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27855
    }
27856
 
27857
    @Override
27858
    public boolean equals(Object that) {
27859
      if (that == null)
27860
        return false;
1731 ankur.sing 27861
      if (that instanceof getValidOrdersAmountRange_result)
27862
        return this.equals((getValidOrdersAmountRange_result)that);
1629 ankur.sing 27863
      return false;
27864
    }
27865
 
1731 ankur.sing 27866
    public boolean equals(getValidOrdersAmountRange_result that) {
1629 ankur.sing 27867
      if (that == null)
27868
        return false;
27869
 
1731 ankur.sing 27870
      boolean this_present_success = true && this.isSetSuccess();
27871
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 27872
      if (this_present_success || that_present_success) {
27873
        if (!(this_present_success && that_present_success))
27874
          return false;
1731 ankur.sing 27875
        if (!this.success.equals(that.success))
1629 ankur.sing 27876
          return false;
27877
      }
27878
 
27879
      return true;
27880
    }
27881
 
27882
    @Override
27883
    public int hashCode() {
27884
      return 0;
27885
    }
27886
 
1731 ankur.sing 27887
    public int compareTo(getValidOrdersAmountRange_result other) {
1629 ankur.sing 27888
      if (!getClass().equals(other.getClass())) {
27889
        return getClass().getName().compareTo(other.getClass().getName());
27890
      }
27891
 
27892
      int lastComparison = 0;
1731 ankur.sing 27893
      getValidOrdersAmountRange_result typedOther = (getValidOrdersAmountRange_result)other;
1629 ankur.sing 27894
 
27895
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27896
      if (lastComparison != 0) {
27897
        return lastComparison;
27898
      }
27899
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27900
      if (lastComparison != 0) {
27901
        return lastComparison;
27902
      }
27903
      return 0;
27904
    }
27905
 
27906
    public void read(TProtocol iprot) throws TException {
27907
      TField field;
27908
      iprot.readStructBegin();
27909
      while (true)
27910
      {
27911
        field = iprot.readFieldBegin();
27912
        if (field.type == TType.STOP) { 
27913
          break;
27914
        }
27915
        _Fields fieldId = _Fields.findByThriftId(field.id);
27916
        if (fieldId == null) {
27917
          TProtocolUtil.skip(iprot, field.type);
27918
        } else {
27919
          switch (fieldId) {
27920
            case SUCCESS:
1731 ankur.sing 27921
              if (field.type == TType.LIST) {
27922
                {
27923
                  TList _list80 = iprot.readListBegin();
27924
                  this.success = new ArrayList<Double>(_list80.size);
27925
                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
27926
                  {
27927
                    double _elem82;
27928
                    _elem82 = iprot.readDouble();
27929
                    this.success.add(_elem82);
27930
                  }
27931
                  iprot.readListEnd();
27932
                }
1629 ankur.sing 27933
              } else { 
27934
                TProtocolUtil.skip(iprot, field.type);
27935
              }
27936
              break;
27937
          }
27938
          iprot.readFieldEnd();
27939
        }
27940
      }
27941
      iprot.readStructEnd();
27942
      validate();
27943
    }
27944
 
27945
    public void write(TProtocol oprot) throws TException {
27946
      oprot.writeStructBegin(STRUCT_DESC);
27947
 
27948
      if (this.isSetSuccess()) {
27949
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 27950
        {
27951
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
27952
          for (double _iter83 : this.success)
27953
          {
27954
            oprot.writeDouble(_iter83);
27955
          }
27956
          oprot.writeListEnd();
27957
        }
1629 ankur.sing 27958
        oprot.writeFieldEnd();
27959
      }
27960
      oprot.writeFieldStop();
27961
      oprot.writeStructEnd();
27962
    }
27963
 
27964
    @Override
27965
    public String toString() {
1731 ankur.sing 27966
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_result(");
1629 ankur.sing 27967
      boolean first = true;
27968
 
27969
      sb.append("success:");
1731 ankur.sing 27970
      if (this.success == null) {
27971
        sb.append("null");
27972
      } else {
27973
        sb.append(this.success);
27974
      }
1629 ankur.sing 27975
      first = false;
27976
      sb.append(")");
27977
      return sb.toString();
27978
    }
27979
 
27980
    public void validate() throws TException {
27981
      // check for required fields
27982
    }
27983
 
27984
  }
27985
 
1886 ankur.sing 27986
  public static class getValidOrders_args implements TBase<getValidOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_args>   {
27987
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_args");
27988
 
27989
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)1);
27990
 
27991
    private long limit;
27992
 
27993
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27994
    public enum _Fields implements TFieldIdEnum {
27995
      LIMIT((short)1, "limit");
27996
 
27997
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27998
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27999
 
28000
      static {
28001
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28002
          byId.put((int)field._thriftId, field);
28003
          byName.put(field.getFieldName(), field);
28004
        }
28005
      }
28006
 
28007
      /**
28008
       * Find the _Fields constant that matches fieldId, or null if its not found.
28009
       */
28010
      public static _Fields findByThriftId(int fieldId) {
28011
        return byId.get(fieldId);
28012
      }
28013
 
28014
      /**
28015
       * Find the _Fields constant that matches fieldId, throwing an exception
28016
       * if it is not found.
28017
       */
28018
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28019
        _Fields fields = findByThriftId(fieldId);
28020
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28021
        return fields;
28022
      }
28023
 
28024
      /**
28025
       * Find the _Fields constant that matches name, or null if its not found.
28026
       */
28027
      public static _Fields findByName(String name) {
28028
        return byName.get(name);
28029
      }
28030
 
28031
      private final short _thriftId;
28032
      private final String _fieldName;
28033
 
28034
      _Fields(short thriftId, String fieldName) {
28035
        _thriftId = thriftId;
28036
        _fieldName = fieldName;
28037
      }
28038
 
28039
      public short getThriftFieldId() {
28040
        return _thriftId;
28041
      }
28042
 
28043
      public String getFieldName() {
28044
        return _fieldName;
28045
      }
28046
    }
28047
 
28048
    // isset id assignments
28049
    private static final int __LIMIT_ISSET_ID = 0;
28050
    private BitSet __isset_bit_vector = new BitSet(1);
28051
 
28052
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28053
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
28054
          new FieldValueMetaData(TType.I64)));
28055
    }});
28056
 
28057
    static {
28058
      FieldMetaData.addStructMetaDataMap(getValidOrders_args.class, metaDataMap);
28059
    }
28060
 
28061
    public getValidOrders_args() {
28062
    }
28063
 
28064
    public getValidOrders_args(
28065
      long limit)
28066
    {
28067
      this();
28068
      this.limit = limit;
28069
      setLimitIsSet(true);
28070
    }
28071
 
28072
    /**
28073
     * Performs a deep copy on <i>other</i>.
28074
     */
28075
    public getValidOrders_args(getValidOrders_args other) {
28076
      __isset_bit_vector.clear();
28077
      __isset_bit_vector.or(other.__isset_bit_vector);
28078
      this.limit = other.limit;
28079
    }
28080
 
28081
    public getValidOrders_args deepCopy() {
28082
      return new getValidOrders_args(this);
28083
    }
28084
 
28085
    @Deprecated
28086
    public getValidOrders_args clone() {
28087
      return new getValidOrders_args(this);
28088
    }
28089
 
28090
    public long getLimit() {
28091
      return this.limit;
28092
    }
28093
 
28094
    public getValidOrders_args setLimit(long limit) {
28095
      this.limit = limit;
28096
      setLimitIsSet(true);
28097
      return this;
28098
    }
28099
 
28100
    public void unsetLimit() {
28101
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
28102
    }
28103
 
28104
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
28105
    public boolean isSetLimit() {
28106
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
28107
    }
28108
 
28109
    public void setLimitIsSet(boolean value) {
28110
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
28111
    }
28112
 
28113
    public void setFieldValue(_Fields field, Object value) {
28114
      switch (field) {
28115
      case LIMIT:
28116
        if (value == null) {
28117
          unsetLimit();
28118
        } else {
28119
          setLimit((Long)value);
28120
        }
28121
        break;
28122
 
28123
      }
28124
    }
28125
 
28126
    public void setFieldValue(int fieldID, Object value) {
28127
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28128
    }
28129
 
28130
    public Object getFieldValue(_Fields field) {
28131
      switch (field) {
28132
      case LIMIT:
28133
        return new Long(getLimit());
28134
 
28135
      }
28136
      throw new IllegalStateException();
28137
    }
28138
 
28139
    public Object getFieldValue(int fieldId) {
28140
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28141
    }
28142
 
28143
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28144
    public boolean isSet(_Fields field) {
28145
      switch (field) {
28146
      case LIMIT:
28147
        return isSetLimit();
28148
      }
28149
      throw new IllegalStateException();
28150
    }
28151
 
28152
    public boolean isSet(int fieldID) {
28153
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28154
    }
28155
 
28156
    @Override
28157
    public boolean equals(Object that) {
28158
      if (that == null)
28159
        return false;
28160
      if (that instanceof getValidOrders_args)
28161
        return this.equals((getValidOrders_args)that);
28162
      return false;
28163
    }
28164
 
28165
    public boolean equals(getValidOrders_args that) {
28166
      if (that == null)
28167
        return false;
28168
 
28169
      boolean this_present_limit = true;
28170
      boolean that_present_limit = true;
28171
      if (this_present_limit || that_present_limit) {
28172
        if (!(this_present_limit && that_present_limit))
28173
          return false;
28174
        if (this.limit != that.limit)
28175
          return false;
28176
      }
28177
 
28178
      return true;
28179
    }
28180
 
28181
    @Override
28182
    public int hashCode() {
28183
      return 0;
28184
    }
28185
 
28186
    public int compareTo(getValidOrders_args other) {
28187
      if (!getClass().equals(other.getClass())) {
28188
        return getClass().getName().compareTo(other.getClass().getName());
28189
      }
28190
 
28191
      int lastComparison = 0;
28192
      getValidOrders_args typedOther = (getValidOrders_args)other;
28193
 
28194
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
28195
      if (lastComparison != 0) {
28196
        return lastComparison;
28197
      }
28198
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
28199
      if (lastComparison != 0) {
28200
        return lastComparison;
28201
      }
28202
      return 0;
28203
    }
28204
 
28205
    public void read(TProtocol iprot) throws TException {
28206
      TField field;
28207
      iprot.readStructBegin();
28208
      while (true)
28209
      {
28210
        field = iprot.readFieldBegin();
28211
        if (field.type == TType.STOP) { 
28212
          break;
28213
        }
28214
        _Fields fieldId = _Fields.findByThriftId(field.id);
28215
        if (fieldId == null) {
28216
          TProtocolUtil.skip(iprot, field.type);
28217
        } else {
28218
          switch (fieldId) {
28219
            case LIMIT:
28220
              if (field.type == TType.I64) {
28221
                this.limit = iprot.readI64();
28222
                setLimitIsSet(true);
28223
              } else { 
28224
                TProtocolUtil.skip(iprot, field.type);
28225
              }
28226
              break;
28227
          }
28228
          iprot.readFieldEnd();
28229
        }
28230
      }
28231
      iprot.readStructEnd();
28232
      validate();
28233
    }
28234
 
28235
    public void write(TProtocol oprot) throws TException {
28236
      validate();
28237
 
28238
      oprot.writeStructBegin(STRUCT_DESC);
28239
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
28240
      oprot.writeI64(this.limit);
28241
      oprot.writeFieldEnd();
28242
      oprot.writeFieldStop();
28243
      oprot.writeStructEnd();
28244
    }
28245
 
28246
    @Override
28247
    public String toString() {
28248
      StringBuilder sb = new StringBuilder("getValidOrders_args(");
28249
      boolean first = true;
28250
 
28251
      sb.append("limit:");
28252
      sb.append(this.limit);
28253
      first = false;
28254
      sb.append(")");
28255
      return sb.toString();
28256
    }
28257
 
28258
    public void validate() throws TException {
28259
      // check for required fields
28260
    }
28261
 
28262
  }
28263
 
28264
  public static class getValidOrders_result implements TBase<getValidOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_result>   {
28265
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_result");
28266
 
28267
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
28268
 
28269
    private List<Order> success;
28270
 
28271
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28272
    public enum _Fields implements TFieldIdEnum {
28273
      SUCCESS((short)0, "success");
28274
 
28275
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28277
 
28278
      static {
28279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28280
          byId.put((int)field._thriftId, field);
28281
          byName.put(field.getFieldName(), field);
28282
        }
28283
      }
28284
 
28285
      /**
28286
       * Find the _Fields constant that matches fieldId, or null if its not found.
28287
       */
28288
      public static _Fields findByThriftId(int fieldId) {
28289
        return byId.get(fieldId);
28290
      }
28291
 
28292
      /**
28293
       * Find the _Fields constant that matches fieldId, throwing an exception
28294
       * if it is not found.
28295
       */
28296
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28297
        _Fields fields = findByThriftId(fieldId);
28298
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28299
        return fields;
28300
      }
28301
 
28302
      /**
28303
       * Find the _Fields constant that matches name, or null if its not found.
28304
       */
28305
      public static _Fields findByName(String name) {
28306
        return byName.get(name);
28307
      }
28308
 
28309
      private final short _thriftId;
28310
      private final String _fieldName;
28311
 
28312
      _Fields(short thriftId, String fieldName) {
28313
        _thriftId = thriftId;
28314
        _fieldName = fieldName;
28315
      }
28316
 
28317
      public short getThriftFieldId() {
28318
        return _thriftId;
28319
      }
28320
 
28321
      public String getFieldName() {
28322
        return _fieldName;
28323
      }
28324
    }
28325
 
28326
    // isset id assignments
28327
 
28328
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28329
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28330
          new ListMetaData(TType.LIST, 
28331
              new StructMetaData(TType.STRUCT, Order.class))));
28332
    }});
28333
 
28334
    static {
28335
      FieldMetaData.addStructMetaDataMap(getValidOrders_result.class, metaDataMap);
28336
    }
28337
 
28338
    public getValidOrders_result() {
28339
    }
28340
 
28341
    public getValidOrders_result(
28342
      List<Order> success)
28343
    {
28344
      this();
28345
      this.success = success;
28346
    }
28347
 
28348
    /**
28349
     * Performs a deep copy on <i>other</i>.
28350
     */
28351
    public getValidOrders_result(getValidOrders_result other) {
28352
      if (other.isSetSuccess()) {
28353
        List<Order> __this__success = new ArrayList<Order>();
28354
        for (Order other_element : other.success) {
28355
          __this__success.add(new Order(other_element));
28356
        }
28357
        this.success = __this__success;
28358
      }
28359
    }
28360
 
28361
    public getValidOrders_result deepCopy() {
28362
      return new getValidOrders_result(this);
28363
    }
28364
 
28365
    @Deprecated
28366
    public getValidOrders_result clone() {
28367
      return new getValidOrders_result(this);
28368
    }
28369
 
28370
    public int getSuccessSize() {
28371
      return (this.success == null) ? 0 : this.success.size();
28372
    }
28373
 
28374
    public java.util.Iterator<Order> getSuccessIterator() {
28375
      return (this.success == null) ? null : this.success.iterator();
28376
    }
28377
 
28378
    public void addToSuccess(Order elem) {
28379
      if (this.success == null) {
28380
        this.success = new ArrayList<Order>();
28381
      }
28382
      this.success.add(elem);
28383
    }
28384
 
28385
    public List<Order> getSuccess() {
28386
      return this.success;
28387
    }
28388
 
28389
    public getValidOrders_result setSuccess(List<Order> success) {
28390
      this.success = success;
28391
      return this;
28392
    }
28393
 
28394
    public void unsetSuccess() {
28395
      this.success = null;
28396
    }
28397
 
28398
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28399
    public boolean isSetSuccess() {
28400
      return this.success != null;
28401
    }
28402
 
28403
    public void setSuccessIsSet(boolean value) {
28404
      if (!value) {
28405
        this.success = null;
28406
      }
28407
    }
28408
 
28409
    public void setFieldValue(_Fields field, Object value) {
28410
      switch (field) {
28411
      case SUCCESS:
28412
        if (value == null) {
28413
          unsetSuccess();
28414
        } else {
28415
          setSuccess((List<Order>)value);
28416
        }
28417
        break;
28418
 
28419
      }
28420
    }
28421
 
28422
    public void setFieldValue(int fieldID, Object value) {
28423
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28424
    }
28425
 
28426
    public Object getFieldValue(_Fields field) {
28427
      switch (field) {
28428
      case SUCCESS:
28429
        return getSuccess();
28430
 
28431
      }
28432
      throw new IllegalStateException();
28433
    }
28434
 
28435
    public Object getFieldValue(int fieldId) {
28436
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28437
    }
28438
 
28439
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28440
    public boolean isSet(_Fields field) {
28441
      switch (field) {
28442
      case SUCCESS:
28443
        return isSetSuccess();
28444
      }
28445
      throw new IllegalStateException();
28446
    }
28447
 
28448
    public boolean isSet(int fieldID) {
28449
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28450
    }
28451
 
28452
    @Override
28453
    public boolean equals(Object that) {
28454
      if (that == null)
28455
        return false;
28456
      if (that instanceof getValidOrders_result)
28457
        return this.equals((getValidOrders_result)that);
28458
      return false;
28459
    }
28460
 
28461
    public boolean equals(getValidOrders_result that) {
28462
      if (that == null)
28463
        return false;
28464
 
28465
      boolean this_present_success = true && this.isSetSuccess();
28466
      boolean that_present_success = true && that.isSetSuccess();
28467
      if (this_present_success || that_present_success) {
28468
        if (!(this_present_success && that_present_success))
28469
          return false;
28470
        if (!this.success.equals(that.success))
28471
          return false;
28472
      }
28473
 
28474
      return true;
28475
    }
28476
 
28477
    @Override
28478
    public int hashCode() {
28479
      return 0;
28480
    }
28481
 
28482
    public int compareTo(getValidOrders_result other) {
28483
      if (!getClass().equals(other.getClass())) {
28484
        return getClass().getName().compareTo(other.getClass().getName());
28485
      }
28486
 
28487
      int lastComparison = 0;
28488
      getValidOrders_result typedOther = (getValidOrders_result)other;
28489
 
28490
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28491
      if (lastComparison != 0) {
28492
        return lastComparison;
28493
      }
28494
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28495
      if (lastComparison != 0) {
28496
        return lastComparison;
28497
      }
28498
      return 0;
28499
    }
28500
 
28501
    public void read(TProtocol iprot) throws TException {
28502
      TField field;
28503
      iprot.readStructBegin();
28504
      while (true)
28505
      {
28506
        field = iprot.readFieldBegin();
28507
        if (field.type == TType.STOP) { 
28508
          break;
28509
        }
28510
        _Fields fieldId = _Fields.findByThriftId(field.id);
28511
        if (fieldId == null) {
28512
          TProtocolUtil.skip(iprot, field.type);
28513
        } else {
28514
          switch (fieldId) {
28515
            case SUCCESS:
28516
              if (field.type == TType.LIST) {
28517
                {
28518
                  TList _list84 = iprot.readListBegin();
28519
                  this.success = new ArrayList<Order>(_list84.size);
28520
                  for (int _i85 = 0; _i85 < _list84.size; ++_i85)
28521
                  {
28522
                    Order _elem86;
28523
                    _elem86 = new Order();
28524
                    _elem86.read(iprot);
28525
                    this.success.add(_elem86);
28526
                  }
28527
                  iprot.readListEnd();
28528
                }
28529
              } else { 
28530
                TProtocolUtil.skip(iprot, field.type);
28531
              }
28532
              break;
28533
          }
28534
          iprot.readFieldEnd();
28535
        }
28536
      }
28537
      iprot.readStructEnd();
28538
      validate();
28539
    }
28540
 
28541
    public void write(TProtocol oprot) throws TException {
28542
      oprot.writeStructBegin(STRUCT_DESC);
28543
 
28544
      if (this.isSetSuccess()) {
28545
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28546
        {
28547
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
28548
          for (Order _iter87 : this.success)
28549
          {
28550
            _iter87.write(oprot);
28551
          }
28552
          oprot.writeListEnd();
28553
        }
28554
        oprot.writeFieldEnd();
28555
      }
28556
      oprot.writeFieldStop();
28557
      oprot.writeStructEnd();
28558
    }
28559
 
28560
    @Override
28561
    public String toString() {
28562
      StringBuilder sb = new StringBuilder("getValidOrders_result(");
28563
      boolean first = true;
28564
 
28565
      sb.append("success:");
28566
      if (this.success == null) {
28567
        sb.append("null");
28568
      } else {
28569
        sb.append(this.success);
28570
      }
28571
      first = false;
28572
      sb.append(")");
28573
      return sb.toString();
28574
    }
28575
 
28576
    public void validate() throws TException {
28577
      // check for required fields
28578
    }
28579
 
28580
  }
28581
 
2538 chandransh 28582
  public static class toggleDOAFlag_args implements TBase<toggleDOAFlag_args._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_args>   {
28583
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_args");
28584
 
28585
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
28586
 
28587
    private long orderId;
28588
 
28589
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28590
    public enum _Fields implements TFieldIdEnum {
28591
      ORDER_ID((short)1, "orderId");
28592
 
28593
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28594
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28595
 
28596
      static {
28597
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28598
          byId.put((int)field._thriftId, field);
28599
          byName.put(field.getFieldName(), field);
28600
        }
28601
      }
28602
 
28603
      /**
28604
       * Find the _Fields constant that matches fieldId, or null if its not found.
28605
       */
28606
      public static _Fields findByThriftId(int fieldId) {
28607
        return byId.get(fieldId);
28608
      }
28609
 
28610
      /**
28611
       * Find the _Fields constant that matches fieldId, throwing an exception
28612
       * if it is not found.
28613
       */
28614
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28615
        _Fields fields = findByThriftId(fieldId);
28616
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28617
        return fields;
28618
      }
28619
 
28620
      /**
28621
       * Find the _Fields constant that matches name, or null if its not found.
28622
       */
28623
      public static _Fields findByName(String name) {
28624
        return byName.get(name);
28625
      }
28626
 
28627
      private final short _thriftId;
28628
      private final String _fieldName;
28629
 
28630
      _Fields(short thriftId, String fieldName) {
28631
        _thriftId = thriftId;
28632
        _fieldName = fieldName;
28633
      }
28634
 
28635
      public short getThriftFieldId() {
28636
        return _thriftId;
28637
      }
28638
 
28639
      public String getFieldName() {
28640
        return _fieldName;
28641
      }
28642
    }
28643
 
28644
    // isset id assignments
28645
    private static final int __ORDERID_ISSET_ID = 0;
28646
    private BitSet __isset_bit_vector = new BitSet(1);
28647
 
28648
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28649
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
28650
          new FieldValueMetaData(TType.I64)));
28651
    }});
28652
 
28653
    static {
28654
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_args.class, metaDataMap);
28655
    }
28656
 
28657
    public toggleDOAFlag_args() {
28658
    }
28659
 
28660
    public toggleDOAFlag_args(
28661
      long orderId)
28662
    {
28663
      this();
28664
      this.orderId = orderId;
28665
      setOrderIdIsSet(true);
28666
    }
28667
 
28668
    /**
28669
     * Performs a deep copy on <i>other</i>.
28670
     */
28671
    public toggleDOAFlag_args(toggleDOAFlag_args other) {
28672
      __isset_bit_vector.clear();
28673
      __isset_bit_vector.or(other.__isset_bit_vector);
28674
      this.orderId = other.orderId;
28675
    }
28676
 
28677
    public toggleDOAFlag_args deepCopy() {
28678
      return new toggleDOAFlag_args(this);
28679
    }
28680
 
28681
    @Deprecated
28682
    public toggleDOAFlag_args clone() {
28683
      return new toggleDOAFlag_args(this);
28684
    }
28685
 
28686
    public long getOrderId() {
28687
      return this.orderId;
28688
    }
28689
 
28690
    public toggleDOAFlag_args setOrderId(long orderId) {
28691
      this.orderId = orderId;
28692
      setOrderIdIsSet(true);
28693
      return this;
28694
    }
28695
 
28696
    public void unsetOrderId() {
28697
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
28698
    }
28699
 
28700
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
28701
    public boolean isSetOrderId() {
28702
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
28703
    }
28704
 
28705
    public void setOrderIdIsSet(boolean value) {
28706
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
28707
    }
28708
 
28709
    public void setFieldValue(_Fields field, Object value) {
28710
      switch (field) {
28711
      case ORDER_ID:
28712
        if (value == null) {
28713
          unsetOrderId();
28714
        } else {
28715
          setOrderId((Long)value);
28716
        }
28717
        break;
28718
 
28719
      }
28720
    }
28721
 
28722
    public void setFieldValue(int fieldID, Object value) {
28723
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28724
    }
28725
 
28726
    public Object getFieldValue(_Fields field) {
28727
      switch (field) {
28728
      case ORDER_ID:
28729
        return new Long(getOrderId());
28730
 
28731
      }
28732
      throw new IllegalStateException();
28733
    }
28734
 
28735
    public Object getFieldValue(int fieldId) {
28736
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28737
    }
28738
 
28739
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28740
    public boolean isSet(_Fields field) {
28741
      switch (field) {
28742
      case ORDER_ID:
28743
        return isSetOrderId();
28744
      }
28745
      throw new IllegalStateException();
28746
    }
28747
 
28748
    public boolean isSet(int fieldID) {
28749
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28750
    }
28751
 
28752
    @Override
28753
    public boolean equals(Object that) {
28754
      if (that == null)
28755
        return false;
28756
      if (that instanceof toggleDOAFlag_args)
28757
        return this.equals((toggleDOAFlag_args)that);
28758
      return false;
28759
    }
28760
 
28761
    public boolean equals(toggleDOAFlag_args that) {
28762
      if (that == null)
28763
        return false;
28764
 
28765
      boolean this_present_orderId = true;
28766
      boolean that_present_orderId = true;
28767
      if (this_present_orderId || that_present_orderId) {
28768
        if (!(this_present_orderId && that_present_orderId))
28769
          return false;
28770
        if (this.orderId != that.orderId)
28771
          return false;
28772
      }
28773
 
28774
      return true;
28775
    }
28776
 
28777
    @Override
28778
    public int hashCode() {
28779
      return 0;
28780
    }
28781
 
28782
    public int compareTo(toggleDOAFlag_args other) {
28783
      if (!getClass().equals(other.getClass())) {
28784
        return getClass().getName().compareTo(other.getClass().getName());
28785
      }
28786
 
28787
      int lastComparison = 0;
28788
      toggleDOAFlag_args typedOther = (toggleDOAFlag_args)other;
28789
 
28790
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
28791
      if (lastComparison != 0) {
28792
        return lastComparison;
28793
      }
28794
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
28795
      if (lastComparison != 0) {
28796
        return lastComparison;
28797
      }
28798
      return 0;
28799
    }
28800
 
28801
    public void read(TProtocol iprot) throws TException {
28802
      TField field;
28803
      iprot.readStructBegin();
28804
      while (true)
28805
      {
28806
        field = iprot.readFieldBegin();
28807
        if (field.type == TType.STOP) { 
28808
          break;
28809
        }
28810
        _Fields fieldId = _Fields.findByThriftId(field.id);
28811
        if (fieldId == null) {
28812
          TProtocolUtil.skip(iprot, field.type);
28813
        } else {
28814
          switch (fieldId) {
28815
            case ORDER_ID:
28816
              if (field.type == TType.I64) {
28817
                this.orderId = iprot.readI64();
28818
                setOrderIdIsSet(true);
28819
              } else { 
28820
                TProtocolUtil.skip(iprot, field.type);
28821
              }
28822
              break;
28823
          }
28824
          iprot.readFieldEnd();
28825
        }
28826
      }
28827
      iprot.readStructEnd();
28828
      validate();
28829
    }
28830
 
28831
    public void write(TProtocol oprot) throws TException {
28832
      validate();
28833
 
28834
      oprot.writeStructBegin(STRUCT_DESC);
28835
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
28836
      oprot.writeI64(this.orderId);
28837
      oprot.writeFieldEnd();
28838
      oprot.writeFieldStop();
28839
      oprot.writeStructEnd();
28840
    }
28841
 
28842
    @Override
28843
    public String toString() {
28844
      StringBuilder sb = new StringBuilder("toggleDOAFlag_args(");
28845
      boolean first = true;
28846
 
28847
      sb.append("orderId:");
28848
      sb.append(this.orderId);
28849
      first = false;
28850
      sb.append(")");
28851
      return sb.toString();
28852
    }
28853
 
28854
    public void validate() throws TException {
28855
      // check for required fields
28856
    }
28857
 
28858
  }
28859
 
28860
  public static class toggleDOAFlag_result implements TBase<toggleDOAFlag_result._Fields>, java.io.Serializable, Cloneable, Comparable<toggleDOAFlag_result>   {
28861
    private static final TStruct STRUCT_DESC = new TStruct("toggleDOAFlag_result");
28862
 
28863
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
28864
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
28865
 
28866
    private boolean success;
28867
    private TransactionServiceException ex;
28868
 
28869
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28870
    public enum _Fields implements TFieldIdEnum {
28871
      SUCCESS((short)0, "success"),
28872
      EX((short)1, "ex");
28873
 
28874
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28875
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28876
 
28877
      static {
28878
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28879
          byId.put((int)field._thriftId, field);
28880
          byName.put(field.getFieldName(), field);
28881
        }
28882
      }
28883
 
28884
      /**
28885
       * Find the _Fields constant that matches fieldId, or null if its not found.
28886
       */
28887
      public static _Fields findByThriftId(int fieldId) {
28888
        return byId.get(fieldId);
28889
      }
28890
 
28891
      /**
28892
       * Find the _Fields constant that matches fieldId, throwing an exception
28893
       * if it is not found.
28894
       */
28895
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28896
        _Fields fields = findByThriftId(fieldId);
28897
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28898
        return fields;
28899
      }
28900
 
28901
      /**
28902
       * Find the _Fields constant that matches name, or null if its not found.
28903
       */
28904
      public static _Fields findByName(String name) {
28905
        return byName.get(name);
28906
      }
28907
 
28908
      private final short _thriftId;
28909
      private final String _fieldName;
28910
 
28911
      _Fields(short thriftId, String fieldName) {
28912
        _thriftId = thriftId;
28913
        _fieldName = fieldName;
28914
      }
28915
 
28916
      public short getThriftFieldId() {
28917
        return _thriftId;
28918
      }
28919
 
28920
      public String getFieldName() {
28921
        return _fieldName;
28922
      }
28923
    }
28924
 
28925
    // isset id assignments
28926
    private static final int __SUCCESS_ISSET_ID = 0;
28927
    private BitSet __isset_bit_vector = new BitSet(1);
28928
 
28929
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28930
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28931
          new FieldValueMetaData(TType.BOOL)));
28932
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
28933
          new FieldValueMetaData(TType.STRUCT)));
28934
    }});
28935
 
28936
    static {
28937
      FieldMetaData.addStructMetaDataMap(toggleDOAFlag_result.class, metaDataMap);
28938
    }
28939
 
28940
    public toggleDOAFlag_result() {
28941
    }
28942
 
28943
    public toggleDOAFlag_result(
28944
      boolean success,
28945
      TransactionServiceException ex)
28946
    {
28947
      this();
28948
      this.success = success;
28949
      setSuccessIsSet(true);
28950
      this.ex = ex;
28951
    }
28952
 
28953
    /**
28954
     * Performs a deep copy on <i>other</i>.
28955
     */
28956
    public toggleDOAFlag_result(toggleDOAFlag_result other) {
28957
      __isset_bit_vector.clear();
28958
      __isset_bit_vector.or(other.__isset_bit_vector);
28959
      this.success = other.success;
28960
      if (other.isSetEx()) {
28961
        this.ex = new TransactionServiceException(other.ex);
28962
      }
28963
    }
28964
 
28965
    public toggleDOAFlag_result deepCopy() {
28966
      return new toggleDOAFlag_result(this);
28967
    }
28968
 
28969
    @Deprecated
28970
    public toggleDOAFlag_result clone() {
28971
      return new toggleDOAFlag_result(this);
28972
    }
28973
 
28974
    public boolean isSuccess() {
28975
      return this.success;
28976
    }
28977
 
28978
    public toggleDOAFlag_result setSuccess(boolean success) {
28979
      this.success = success;
28980
      setSuccessIsSet(true);
28981
      return this;
28982
    }
28983
 
28984
    public void unsetSuccess() {
28985
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
28986
    }
28987
 
28988
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28989
    public boolean isSetSuccess() {
28990
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
28991
    }
28992
 
28993
    public void setSuccessIsSet(boolean value) {
28994
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
28995
    }
28996
 
28997
    public TransactionServiceException getEx() {
28998
      return this.ex;
28999
    }
29000
 
29001
    public toggleDOAFlag_result setEx(TransactionServiceException ex) {
29002
      this.ex = ex;
29003
      return this;
29004
    }
29005
 
29006
    public void unsetEx() {
29007
      this.ex = null;
29008
    }
29009
 
29010
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
29011
    public boolean isSetEx() {
29012
      return this.ex != null;
29013
    }
29014
 
29015
    public void setExIsSet(boolean value) {
29016
      if (!value) {
29017
        this.ex = null;
29018
      }
29019
    }
29020
 
29021
    public void setFieldValue(_Fields field, Object value) {
29022
      switch (field) {
29023
      case SUCCESS:
29024
        if (value == null) {
29025
          unsetSuccess();
29026
        } else {
29027
          setSuccess((Boolean)value);
29028
        }
29029
        break;
29030
 
29031
      case EX:
29032
        if (value == null) {
29033
          unsetEx();
29034
        } else {
29035
          setEx((TransactionServiceException)value);
29036
        }
29037
        break;
29038
 
29039
      }
29040
    }
29041
 
29042
    public void setFieldValue(int fieldID, Object value) {
29043
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29044
    }
29045
 
29046
    public Object getFieldValue(_Fields field) {
29047
      switch (field) {
29048
      case SUCCESS:
29049
        return new Boolean(isSuccess());
29050
 
29051
      case EX:
29052
        return getEx();
29053
 
29054
      }
29055
      throw new IllegalStateException();
29056
    }
29057
 
29058
    public Object getFieldValue(int fieldId) {
29059
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29060
    }
29061
 
29062
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29063
    public boolean isSet(_Fields field) {
29064
      switch (field) {
29065
      case SUCCESS:
29066
        return isSetSuccess();
29067
      case EX:
29068
        return isSetEx();
29069
      }
29070
      throw new IllegalStateException();
29071
    }
29072
 
29073
    public boolean isSet(int fieldID) {
29074
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29075
    }
29076
 
29077
    @Override
29078
    public boolean equals(Object that) {
29079
      if (that == null)
29080
        return false;
29081
      if (that instanceof toggleDOAFlag_result)
29082
        return this.equals((toggleDOAFlag_result)that);
29083
      return false;
29084
    }
29085
 
29086
    public boolean equals(toggleDOAFlag_result that) {
29087
      if (that == null)
29088
        return false;
29089
 
29090
      boolean this_present_success = true;
29091
      boolean that_present_success = true;
29092
      if (this_present_success || that_present_success) {
29093
        if (!(this_present_success && that_present_success))
29094
          return false;
29095
        if (this.success != that.success)
29096
          return false;
29097
      }
29098
 
29099
      boolean this_present_ex = true && this.isSetEx();
29100
      boolean that_present_ex = true && that.isSetEx();
29101
      if (this_present_ex || that_present_ex) {
29102
        if (!(this_present_ex && that_present_ex))
29103
          return false;
29104
        if (!this.ex.equals(that.ex))
29105
          return false;
29106
      }
29107
 
29108
      return true;
29109
    }
29110
 
29111
    @Override
29112
    public int hashCode() {
29113
      return 0;
29114
    }
29115
 
29116
    public int compareTo(toggleDOAFlag_result other) {
29117
      if (!getClass().equals(other.getClass())) {
29118
        return getClass().getName().compareTo(other.getClass().getName());
29119
      }
29120
 
29121
      int lastComparison = 0;
29122
      toggleDOAFlag_result typedOther = (toggleDOAFlag_result)other;
29123
 
29124
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29125
      if (lastComparison != 0) {
29126
        return lastComparison;
29127
      }
29128
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29129
      if (lastComparison != 0) {
29130
        return lastComparison;
29131
      }
29132
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
29133
      if (lastComparison != 0) {
29134
        return lastComparison;
29135
      }
29136
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
29137
      if (lastComparison != 0) {
29138
        return lastComparison;
29139
      }
29140
      return 0;
29141
    }
29142
 
29143
    public void read(TProtocol iprot) throws TException {
29144
      TField field;
29145
      iprot.readStructBegin();
29146
      while (true)
29147
      {
29148
        field = iprot.readFieldBegin();
29149
        if (field.type == TType.STOP) { 
29150
          break;
29151
        }
29152
        _Fields fieldId = _Fields.findByThriftId(field.id);
29153
        if (fieldId == null) {
29154
          TProtocolUtil.skip(iprot, field.type);
29155
        } else {
29156
          switch (fieldId) {
29157
            case SUCCESS:
29158
              if (field.type == TType.BOOL) {
29159
                this.success = iprot.readBool();
29160
                setSuccessIsSet(true);
29161
              } else { 
29162
                TProtocolUtil.skip(iprot, field.type);
29163
              }
29164
              break;
29165
            case EX:
29166
              if (field.type == TType.STRUCT) {
29167
                this.ex = new TransactionServiceException();
29168
                this.ex.read(iprot);
29169
              } else { 
29170
                TProtocolUtil.skip(iprot, field.type);
29171
              }
29172
              break;
29173
          }
29174
          iprot.readFieldEnd();
29175
        }
29176
      }
29177
      iprot.readStructEnd();
29178
      validate();
29179
    }
29180
 
29181
    public void write(TProtocol oprot) throws TException {
29182
      oprot.writeStructBegin(STRUCT_DESC);
29183
 
29184
      if (this.isSetSuccess()) {
29185
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29186
        oprot.writeBool(this.success);
29187
        oprot.writeFieldEnd();
29188
      } else if (this.isSetEx()) {
29189
        oprot.writeFieldBegin(EX_FIELD_DESC);
29190
        this.ex.write(oprot);
29191
        oprot.writeFieldEnd();
29192
      }
29193
      oprot.writeFieldStop();
29194
      oprot.writeStructEnd();
29195
    }
29196
 
29197
    @Override
29198
    public String toString() {
29199
      StringBuilder sb = new StringBuilder("toggleDOAFlag_result(");
29200
      boolean first = true;
29201
 
29202
      sb.append("success:");
29203
      sb.append(this.success);
29204
      first = false;
29205
      if (!first) sb.append(", ");
29206
      sb.append("ex:");
29207
      if (this.ex == null) {
29208
        sb.append("null");
29209
      } else {
29210
        sb.append(this.ex);
29211
      }
29212
      first = false;
29213
      sb.append(")");
29214
      return sb.toString();
29215
    }
29216
 
29217
    public void validate() throws TException {
29218
      // check for required fields
29219
    }
29220
 
29221
  }
29222
 
29223
  public static class requestPickupNumber_args implements TBase<requestPickupNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_args>   {
29224
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_args");
29225
 
29226
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
29227
 
29228
    private long orderId;
29229
 
29230
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29231
    public enum _Fields implements TFieldIdEnum {
29232
      ORDER_ID((short)1, "orderId");
29233
 
29234
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29235
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29236
 
29237
      static {
29238
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29239
          byId.put((int)field._thriftId, field);
29240
          byName.put(field.getFieldName(), field);
29241
        }
29242
      }
29243
 
29244
      /**
29245
       * Find the _Fields constant that matches fieldId, or null if its not found.
29246
       */
29247
      public static _Fields findByThriftId(int fieldId) {
29248
        return byId.get(fieldId);
29249
      }
29250
 
29251
      /**
29252
       * Find the _Fields constant that matches fieldId, throwing an exception
29253
       * if it is not found.
29254
       */
29255
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29256
        _Fields fields = findByThriftId(fieldId);
29257
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29258
        return fields;
29259
      }
29260
 
29261
      /**
29262
       * Find the _Fields constant that matches name, or null if its not found.
29263
       */
29264
      public static _Fields findByName(String name) {
29265
        return byName.get(name);
29266
      }
29267
 
29268
      private final short _thriftId;
29269
      private final String _fieldName;
29270
 
29271
      _Fields(short thriftId, String fieldName) {
29272
        _thriftId = thriftId;
29273
        _fieldName = fieldName;
29274
      }
29275
 
29276
      public short getThriftFieldId() {
29277
        return _thriftId;
29278
      }
29279
 
29280
      public String getFieldName() {
29281
        return _fieldName;
29282
      }
29283
    }
29284
 
29285
    // isset id assignments
29286
    private static final int __ORDERID_ISSET_ID = 0;
29287
    private BitSet __isset_bit_vector = new BitSet(1);
29288
 
29289
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29290
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
29291
          new FieldValueMetaData(TType.I64)));
29292
    }});
29293
 
29294
    static {
29295
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_args.class, metaDataMap);
29296
    }
29297
 
29298
    public requestPickupNumber_args() {
29299
    }
29300
 
29301
    public requestPickupNumber_args(
29302
      long orderId)
29303
    {
29304
      this();
29305
      this.orderId = orderId;
29306
      setOrderIdIsSet(true);
29307
    }
29308
 
29309
    /**
29310
     * Performs a deep copy on <i>other</i>.
29311
     */
29312
    public requestPickupNumber_args(requestPickupNumber_args other) {
29313
      __isset_bit_vector.clear();
29314
      __isset_bit_vector.or(other.__isset_bit_vector);
29315
      this.orderId = other.orderId;
29316
    }
29317
 
29318
    public requestPickupNumber_args deepCopy() {
29319
      return new requestPickupNumber_args(this);
29320
    }
29321
 
29322
    @Deprecated
29323
    public requestPickupNumber_args clone() {
29324
      return new requestPickupNumber_args(this);
29325
    }
29326
 
29327
    public long getOrderId() {
29328
      return this.orderId;
29329
    }
29330
 
29331
    public requestPickupNumber_args setOrderId(long orderId) {
29332
      this.orderId = orderId;
29333
      setOrderIdIsSet(true);
29334
      return this;
29335
    }
29336
 
29337
    public void unsetOrderId() {
29338
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
29339
    }
29340
 
29341
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
29342
    public boolean isSetOrderId() {
29343
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
29344
    }
29345
 
29346
    public void setOrderIdIsSet(boolean value) {
29347
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
29348
    }
29349
 
29350
    public void setFieldValue(_Fields field, Object value) {
29351
      switch (field) {
29352
      case ORDER_ID:
29353
        if (value == null) {
29354
          unsetOrderId();
29355
        } else {
29356
          setOrderId((Long)value);
29357
        }
29358
        break;
29359
 
29360
      }
29361
    }
29362
 
29363
    public void setFieldValue(int fieldID, Object value) {
29364
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29365
    }
29366
 
29367
    public Object getFieldValue(_Fields field) {
29368
      switch (field) {
29369
      case ORDER_ID:
29370
        return new Long(getOrderId());
29371
 
29372
      }
29373
      throw new IllegalStateException();
29374
    }
29375
 
29376
    public Object getFieldValue(int fieldId) {
29377
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29378
    }
29379
 
29380
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29381
    public boolean isSet(_Fields field) {
29382
      switch (field) {
29383
      case ORDER_ID:
29384
        return isSetOrderId();
29385
      }
29386
      throw new IllegalStateException();
29387
    }
29388
 
29389
    public boolean isSet(int fieldID) {
29390
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29391
    }
29392
 
29393
    @Override
29394
    public boolean equals(Object that) {
29395
      if (that == null)
29396
        return false;
29397
      if (that instanceof requestPickupNumber_args)
29398
        return this.equals((requestPickupNumber_args)that);
29399
      return false;
29400
    }
29401
 
29402
    public boolean equals(requestPickupNumber_args that) {
29403
      if (that == null)
29404
        return false;
29405
 
29406
      boolean this_present_orderId = true;
29407
      boolean that_present_orderId = true;
29408
      if (this_present_orderId || that_present_orderId) {
29409
        if (!(this_present_orderId && that_present_orderId))
29410
          return false;
29411
        if (this.orderId != that.orderId)
29412
          return false;
29413
      }
29414
 
29415
      return true;
29416
    }
29417
 
29418
    @Override
29419
    public int hashCode() {
29420
      return 0;
29421
    }
29422
 
29423
    public int compareTo(requestPickupNumber_args other) {
29424
      if (!getClass().equals(other.getClass())) {
29425
        return getClass().getName().compareTo(other.getClass().getName());
29426
      }
29427
 
29428
      int lastComparison = 0;
29429
      requestPickupNumber_args typedOther = (requestPickupNumber_args)other;
29430
 
29431
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
29432
      if (lastComparison != 0) {
29433
        return lastComparison;
29434
      }
29435
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
29436
      if (lastComparison != 0) {
29437
        return lastComparison;
29438
      }
29439
      return 0;
29440
    }
29441
 
29442
    public void read(TProtocol iprot) throws TException {
29443
      TField field;
29444
      iprot.readStructBegin();
29445
      while (true)
29446
      {
29447
        field = iprot.readFieldBegin();
29448
        if (field.type == TType.STOP) { 
29449
          break;
29450
        }
29451
        _Fields fieldId = _Fields.findByThriftId(field.id);
29452
        if (fieldId == null) {
29453
          TProtocolUtil.skip(iprot, field.type);
29454
        } else {
29455
          switch (fieldId) {
29456
            case ORDER_ID:
29457
              if (field.type == TType.I64) {
29458
                this.orderId = iprot.readI64();
29459
                setOrderIdIsSet(true);
29460
              } else { 
29461
                TProtocolUtil.skip(iprot, field.type);
29462
              }
29463
              break;
29464
          }
29465
          iprot.readFieldEnd();
29466
        }
29467
      }
29468
      iprot.readStructEnd();
29469
      validate();
29470
    }
29471
 
29472
    public void write(TProtocol oprot) throws TException {
29473
      validate();
29474
 
29475
      oprot.writeStructBegin(STRUCT_DESC);
29476
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
29477
      oprot.writeI64(this.orderId);
29478
      oprot.writeFieldEnd();
29479
      oprot.writeFieldStop();
29480
      oprot.writeStructEnd();
29481
    }
29482
 
29483
    @Override
29484
    public String toString() {
29485
      StringBuilder sb = new StringBuilder("requestPickupNumber_args(");
29486
      boolean first = true;
29487
 
29488
      sb.append("orderId:");
29489
      sb.append(this.orderId);
29490
      first = false;
29491
      sb.append(")");
29492
      return sb.toString();
29493
    }
29494
 
29495
    public void validate() throws TException {
29496
      // check for required fields
29497
    }
29498
 
29499
  }
29500
 
29501
  public static class requestPickupNumber_result implements TBase<requestPickupNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<requestPickupNumber_result>   {
29502
    private static final TStruct STRUCT_DESC = new TStruct("requestPickupNumber_result");
29503
 
29504
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
29505
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
29506
 
29507
    private boolean success;
29508
    private TransactionServiceException ex;
29509
 
29510
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29511
    public enum _Fields implements TFieldIdEnum {
29512
      SUCCESS((short)0, "success"),
29513
      EX((short)1, "ex");
29514
 
29515
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29516
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29517
 
29518
      static {
29519
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29520
          byId.put((int)field._thriftId, field);
29521
          byName.put(field.getFieldName(), field);
29522
        }
29523
      }
29524
 
29525
      /**
29526
       * Find the _Fields constant that matches fieldId, or null if its not found.
29527
       */
29528
      public static _Fields findByThriftId(int fieldId) {
29529
        return byId.get(fieldId);
29530
      }
29531
 
29532
      /**
29533
       * Find the _Fields constant that matches fieldId, throwing an exception
29534
       * if it is not found.
29535
       */
29536
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29537
        _Fields fields = findByThriftId(fieldId);
29538
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29539
        return fields;
29540
      }
29541
 
29542
      /**
29543
       * Find the _Fields constant that matches name, or null if its not found.
29544
       */
29545
      public static _Fields findByName(String name) {
29546
        return byName.get(name);
29547
      }
29548
 
29549
      private final short _thriftId;
29550
      private final String _fieldName;
29551
 
29552
      _Fields(short thriftId, String fieldName) {
29553
        _thriftId = thriftId;
29554
        _fieldName = fieldName;
29555
      }
29556
 
29557
      public short getThriftFieldId() {
29558
        return _thriftId;
29559
      }
29560
 
29561
      public String getFieldName() {
29562
        return _fieldName;
29563
      }
29564
    }
29565
 
29566
    // isset id assignments
29567
    private static final int __SUCCESS_ISSET_ID = 0;
29568
    private BitSet __isset_bit_vector = new BitSet(1);
29569
 
29570
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29571
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
29572
          new FieldValueMetaData(TType.BOOL)));
29573
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
29574
          new FieldValueMetaData(TType.STRUCT)));
29575
    }});
29576
 
29577
    static {
29578
      FieldMetaData.addStructMetaDataMap(requestPickupNumber_result.class, metaDataMap);
29579
    }
29580
 
29581
    public requestPickupNumber_result() {
29582
    }
29583
 
29584
    public requestPickupNumber_result(
29585
      boolean success,
29586
      TransactionServiceException ex)
29587
    {
29588
      this();
29589
      this.success = success;
29590
      setSuccessIsSet(true);
29591
      this.ex = ex;
29592
    }
29593
 
29594
    /**
29595
     * Performs a deep copy on <i>other</i>.
29596
     */
29597
    public requestPickupNumber_result(requestPickupNumber_result other) {
29598
      __isset_bit_vector.clear();
29599
      __isset_bit_vector.or(other.__isset_bit_vector);
29600
      this.success = other.success;
29601
      if (other.isSetEx()) {
29602
        this.ex = new TransactionServiceException(other.ex);
29603
      }
29604
    }
29605
 
29606
    public requestPickupNumber_result deepCopy() {
29607
      return new requestPickupNumber_result(this);
29608
    }
29609
 
29610
    @Deprecated
29611
    public requestPickupNumber_result clone() {
29612
      return new requestPickupNumber_result(this);
29613
    }
29614
 
29615
    public boolean isSuccess() {
29616
      return this.success;
29617
    }
29618
 
29619
    public requestPickupNumber_result setSuccess(boolean success) {
29620
      this.success = success;
29621
      setSuccessIsSet(true);
29622
      return this;
29623
    }
29624
 
29625
    public void unsetSuccess() {
29626
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
29627
    }
29628
 
29629
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
29630
    public boolean isSetSuccess() {
29631
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
29632
    }
29633
 
29634
    public void setSuccessIsSet(boolean value) {
29635
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
29636
    }
29637
 
29638
    public TransactionServiceException getEx() {
29639
      return this.ex;
29640
    }
29641
 
29642
    public requestPickupNumber_result setEx(TransactionServiceException ex) {
29643
      this.ex = ex;
29644
      return this;
29645
    }
29646
 
29647
    public void unsetEx() {
29648
      this.ex = null;
29649
    }
29650
 
29651
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
29652
    public boolean isSetEx() {
29653
      return this.ex != null;
29654
    }
29655
 
29656
    public void setExIsSet(boolean value) {
29657
      if (!value) {
29658
        this.ex = null;
29659
      }
29660
    }
29661
 
29662
    public void setFieldValue(_Fields field, Object value) {
29663
      switch (field) {
29664
      case SUCCESS:
29665
        if (value == null) {
29666
          unsetSuccess();
29667
        } else {
29668
          setSuccess((Boolean)value);
29669
        }
29670
        break;
29671
 
29672
      case EX:
29673
        if (value == null) {
29674
          unsetEx();
29675
        } else {
29676
          setEx((TransactionServiceException)value);
29677
        }
29678
        break;
29679
 
29680
      }
29681
    }
29682
 
29683
    public void setFieldValue(int fieldID, Object value) {
29684
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
29685
    }
29686
 
29687
    public Object getFieldValue(_Fields field) {
29688
      switch (field) {
29689
      case SUCCESS:
29690
        return new Boolean(isSuccess());
29691
 
29692
      case EX:
29693
        return getEx();
29694
 
29695
      }
29696
      throw new IllegalStateException();
29697
    }
29698
 
29699
    public Object getFieldValue(int fieldId) {
29700
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
29701
    }
29702
 
29703
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
29704
    public boolean isSet(_Fields field) {
29705
      switch (field) {
29706
      case SUCCESS:
29707
        return isSetSuccess();
29708
      case EX:
29709
        return isSetEx();
29710
      }
29711
      throw new IllegalStateException();
29712
    }
29713
 
29714
    public boolean isSet(int fieldID) {
29715
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
29716
    }
29717
 
29718
    @Override
29719
    public boolean equals(Object that) {
29720
      if (that == null)
29721
        return false;
29722
      if (that instanceof requestPickupNumber_result)
29723
        return this.equals((requestPickupNumber_result)that);
29724
      return false;
29725
    }
29726
 
29727
    public boolean equals(requestPickupNumber_result that) {
29728
      if (that == null)
29729
        return false;
29730
 
29731
      boolean this_present_success = true;
29732
      boolean that_present_success = true;
29733
      if (this_present_success || that_present_success) {
29734
        if (!(this_present_success && that_present_success))
29735
          return false;
29736
        if (this.success != that.success)
29737
          return false;
29738
      }
29739
 
29740
      boolean this_present_ex = true && this.isSetEx();
29741
      boolean that_present_ex = true && that.isSetEx();
29742
      if (this_present_ex || that_present_ex) {
29743
        if (!(this_present_ex && that_present_ex))
29744
          return false;
29745
        if (!this.ex.equals(that.ex))
29746
          return false;
29747
      }
29748
 
29749
      return true;
29750
    }
29751
 
29752
    @Override
29753
    public int hashCode() {
29754
      return 0;
29755
    }
29756
 
29757
    public int compareTo(requestPickupNumber_result other) {
29758
      if (!getClass().equals(other.getClass())) {
29759
        return getClass().getName().compareTo(other.getClass().getName());
29760
      }
29761
 
29762
      int lastComparison = 0;
29763
      requestPickupNumber_result typedOther = (requestPickupNumber_result)other;
29764
 
29765
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
29766
      if (lastComparison != 0) {
29767
        return lastComparison;
29768
      }
29769
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
29770
      if (lastComparison != 0) {
29771
        return lastComparison;
29772
      }
29773
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
29774
      if (lastComparison != 0) {
29775
        return lastComparison;
29776
      }
29777
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
29778
      if (lastComparison != 0) {
29779
        return lastComparison;
29780
      }
29781
      return 0;
29782
    }
29783
 
29784
    public void read(TProtocol iprot) throws TException {
29785
      TField field;
29786
      iprot.readStructBegin();
29787
      while (true)
29788
      {
29789
        field = iprot.readFieldBegin();
29790
        if (field.type == TType.STOP) { 
29791
          break;
29792
        }
29793
        _Fields fieldId = _Fields.findByThriftId(field.id);
29794
        if (fieldId == null) {
29795
          TProtocolUtil.skip(iprot, field.type);
29796
        } else {
29797
          switch (fieldId) {
29798
            case SUCCESS:
29799
              if (field.type == TType.BOOL) {
29800
                this.success = iprot.readBool();
29801
                setSuccessIsSet(true);
29802
              } else { 
29803
                TProtocolUtil.skip(iprot, field.type);
29804
              }
29805
              break;
29806
            case EX:
29807
              if (field.type == TType.STRUCT) {
29808
                this.ex = new TransactionServiceException();
29809
                this.ex.read(iprot);
29810
              } else { 
29811
                TProtocolUtil.skip(iprot, field.type);
29812
              }
29813
              break;
29814
          }
29815
          iprot.readFieldEnd();
29816
        }
29817
      }
29818
      iprot.readStructEnd();
29819
      validate();
29820
    }
29821
 
29822
    public void write(TProtocol oprot) throws TException {
29823
      oprot.writeStructBegin(STRUCT_DESC);
29824
 
29825
      if (this.isSetSuccess()) {
29826
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
29827
        oprot.writeBool(this.success);
29828
        oprot.writeFieldEnd();
29829
      } else if (this.isSetEx()) {
29830
        oprot.writeFieldBegin(EX_FIELD_DESC);
29831
        this.ex.write(oprot);
29832
        oprot.writeFieldEnd();
29833
      }
29834
      oprot.writeFieldStop();
29835
      oprot.writeStructEnd();
29836
    }
29837
 
29838
    @Override
29839
    public String toString() {
29840
      StringBuilder sb = new StringBuilder("requestPickupNumber_result(");
29841
      boolean first = true;
29842
 
29843
      sb.append("success:");
29844
      sb.append(this.success);
29845
      first = false;
29846
      if (!first) sb.append(", ");
29847
      sb.append("ex:");
29848
      if (this.ex == null) {
29849
        sb.append("null");
29850
      } else {
29851
        sb.append(this.ex);
29852
      }
29853
      first = false;
29854
      sb.append(")");
29855
      return sb.toString();
29856
    }
29857
 
29858
    public void validate() throws TException {
29859
      // check for required fields
29860
    }
29861
 
29862
  }
29863
 
29864
  public static class authorizePickup_args implements TBase<authorizePickup_args._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_args>   {
29865
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_args");
29866
 
29867
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
29868
    private static final TField PICKUP_NUMBER_FIELD_DESC = new TField("pickupNumber", TType.STRING, (short)2);
29869
 
29870
    private long orderId;
29871
    private String pickupNumber;
29872
 
29873
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
29874
    public enum _Fields implements TFieldIdEnum {
29875
      ORDER_ID((short)1, "orderId"),
29876
      PICKUP_NUMBER((short)2, "pickupNumber");
29877
 
29878
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
29879
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
29880
 
29881
      static {
29882
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
29883
          byId.put((int)field._thriftId, field);
29884
          byName.put(field.getFieldName(), field);
29885
        }
29886
      }
29887
 
29888
      /**
29889
       * Find the _Fields constant that matches fieldId, or null if its not found.
29890
       */
29891
      public static _Fields findByThriftId(int fieldId) {
29892
        return byId.get(fieldId);
29893
      }
29894
 
29895
      /**
29896
       * Find the _Fields constant that matches fieldId, throwing an exception
29897
       * if it is not found.
29898
       */
29899
      public static _Fields findByThriftIdOrThrow(int fieldId) {
29900
        _Fields fields = findByThriftId(fieldId);
29901
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
29902
        return fields;
29903
      }
29904
 
29905
      /**
29906
       * Find the _Fields constant that matches name, or null if its not found.
29907
       */
29908
      public static _Fields findByName(String name) {
29909
        return byName.get(name);
29910
      }
29911
 
29912
      private final short _thriftId;
29913
      private final String _fieldName;
29914
 
29915
      _Fields(short thriftId, String fieldName) {
29916
        _thriftId = thriftId;
29917
        _fieldName = fieldName;
29918
      }
29919
 
29920
      public short getThriftFieldId() {
29921
        return _thriftId;
29922
      }
29923
 
29924
      public String getFieldName() {
29925
        return _fieldName;
29926
      }
29927
    }
29928
 
29929
    // isset id assignments
29930
    private static final int __ORDERID_ISSET_ID = 0;
29931
    private BitSet __isset_bit_vector = new BitSet(1);
29932
 
29933
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
29934
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
29935
          new FieldValueMetaData(TType.I64)));
29936
      put(_Fields.PICKUP_NUMBER, new FieldMetaData("pickupNumber", TFieldRequirementType.DEFAULT, 
29937
          new FieldValueMetaData(TType.STRING)));
29938
    }});
29939
 
29940
    static {
29941
      FieldMetaData.addStructMetaDataMap(authorizePickup_args.class, metaDataMap);
29942
    }
29943
 
29944
    public authorizePickup_args() {
29945
    }
29946
 
29947
    public authorizePickup_args(
29948
      long orderId,
29949
      String pickupNumber)
29950
    {
29951
      this();
29952
      this.orderId = orderId;
29953
      setOrderIdIsSet(true);
29954
      this.pickupNumber = pickupNumber;
29955
    }
29956
 
29957
    /**
29958
     * Performs a deep copy on <i>other</i>.
29959
     */
29960
    public authorizePickup_args(authorizePickup_args other) {
29961
      __isset_bit_vector.clear();
29962
      __isset_bit_vector.or(other.__isset_bit_vector);
29963
      this.orderId = other.orderId;
29964
      if (other.isSetPickupNumber()) {
29965
        this.pickupNumber = other.pickupNumber;
29966
      }
29967
    }
29968
 
29969
    public authorizePickup_args deepCopy() {
29970
      return new authorizePickup_args(this);
29971
    }
29972
 
29973
    @Deprecated
29974
    public authorizePickup_args clone() {
29975
      return new authorizePickup_args(this);
29976
    }
29977
 
29978
    public long getOrderId() {
29979
      return this.orderId;
29980
    }
29981
 
29982
    public authorizePickup_args setOrderId(long orderId) {
29983
      this.orderId = orderId;
29984
      setOrderIdIsSet(true);
29985
      return this;
29986
    }
29987
 
29988
    public void unsetOrderId() {
29989
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
29990
    }
29991
 
29992
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
29993
    public boolean isSetOrderId() {
29994
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
29995
    }
29996
 
29997
    public void setOrderIdIsSet(boolean value) {
29998
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
29999
    }
30000
 
30001
    public String getPickupNumber() {
30002
      return this.pickupNumber;
30003
    }
30004
 
30005
    public authorizePickup_args setPickupNumber(String pickupNumber) {
30006
      this.pickupNumber = pickupNumber;
30007
      return this;
30008
    }
30009
 
30010
    public void unsetPickupNumber() {
30011
      this.pickupNumber = null;
30012
    }
30013
 
30014
    /** Returns true if field pickupNumber is set (has been asigned a value) and false otherwise */
30015
    public boolean isSetPickupNumber() {
30016
      return this.pickupNumber != null;
30017
    }
30018
 
30019
    public void setPickupNumberIsSet(boolean value) {
30020
      if (!value) {
30021
        this.pickupNumber = null;
30022
      }
30023
    }
30024
 
30025
    public void setFieldValue(_Fields field, Object value) {
30026
      switch (field) {
30027
      case ORDER_ID:
30028
        if (value == null) {
30029
          unsetOrderId();
30030
        } else {
30031
          setOrderId((Long)value);
30032
        }
30033
        break;
30034
 
30035
      case PICKUP_NUMBER:
30036
        if (value == null) {
30037
          unsetPickupNumber();
30038
        } else {
30039
          setPickupNumber((String)value);
30040
        }
30041
        break;
30042
 
30043
      }
30044
    }
30045
 
30046
    public void setFieldValue(int fieldID, Object value) {
30047
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30048
    }
30049
 
30050
    public Object getFieldValue(_Fields field) {
30051
      switch (field) {
30052
      case ORDER_ID:
30053
        return new Long(getOrderId());
30054
 
30055
      case PICKUP_NUMBER:
30056
        return getPickupNumber();
30057
 
30058
      }
30059
      throw new IllegalStateException();
30060
    }
30061
 
30062
    public Object getFieldValue(int fieldId) {
30063
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30064
    }
30065
 
30066
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30067
    public boolean isSet(_Fields field) {
30068
      switch (field) {
30069
      case ORDER_ID:
30070
        return isSetOrderId();
30071
      case PICKUP_NUMBER:
30072
        return isSetPickupNumber();
30073
      }
30074
      throw new IllegalStateException();
30075
    }
30076
 
30077
    public boolean isSet(int fieldID) {
30078
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30079
    }
30080
 
30081
    @Override
30082
    public boolean equals(Object that) {
30083
      if (that == null)
30084
        return false;
30085
      if (that instanceof authorizePickup_args)
30086
        return this.equals((authorizePickup_args)that);
30087
      return false;
30088
    }
30089
 
30090
    public boolean equals(authorizePickup_args that) {
30091
      if (that == null)
30092
        return false;
30093
 
30094
      boolean this_present_orderId = true;
30095
      boolean that_present_orderId = true;
30096
      if (this_present_orderId || that_present_orderId) {
30097
        if (!(this_present_orderId && that_present_orderId))
30098
          return false;
30099
        if (this.orderId != that.orderId)
30100
          return false;
30101
      }
30102
 
30103
      boolean this_present_pickupNumber = true && this.isSetPickupNumber();
30104
      boolean that_present_pickupNumber = true && that.isSetPickupNumber();
30105
      if (this_present_pickupNumber || that_present_pickupNumber) {
30106
        if (!(this_present_pickupNumber && that_present_pickupNumber))
30107
          return false;
30108
        if (!this.pickupNumber.equals(that.pickupNumber))
30109
          return false;
30110
      }
30111
 
30112
      return true;
30113
    }
30114
 
30115
    @Override
30116
    public int hashCode() {
30117
      return 0;
30118
    }
30119
 
30120
    public int compareTo(authorizePickup_args other) {
30121
      if (!getClass().equals(other.getClass())) {
30122
        return getClass().getName().compareTo(other.getClass().getName());
30123
      }
30124
 
30125
      int lastComparison = 0;
30126
      authorizePickup_args typedOther = (authorizePickup_args)other;
30127
 
30128
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
30129
      if (lastComparison != 0) {
30130
        return lastComparison;
30131
      }
30132
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
30133
      if (lastComparison != 0) {
30134
        return lastComparison;
30135
      }
30136
      lastComparison = Boolean.valueOf(isSetPickupNumber()).compareTo(isSetPickupNumber());
30137
      if (lastComparison != 0) {
30138
        return lastComparison;
30139
      }
30140
      lastComparison = TBaseHelper.compareTo(pickupNumber, typedOther.pickupNumber);
30141
      if (lastComparison != 0) {
30142
        return lastComparison;
30143
      }
30144
      return 0;
30145
    }
30146
 
30147
    public void read(TProtocol iprot) throws TException {
30148
      TField field;
30149
      iprot.readStructBegin();
30150
      while (true)
30151
      {
30152
        field = iprot.readFieldBegin();
30153
        if (field.type == TType.STOP) { 
30154
          break;
30155
        }
30156
        _Fields fieldId = _Fields.findByThriftId(field.id);
30157
        if (fieldId == null) {
30158
          TProtocolUtil.skip(iprot, field.type);
30159
        } else {
30160
          switch (fieldId) {
30161
            case ORDER_ID:
30162
              if (field.type == TType.I64) {
30163
                this.orderId = iprot.readI64();
30164
                setOrderIdIsSet(true);
30165
              } else { 
30166
                TProtocolUtil.skip(iprot, field.type);
30167
              }
30168
              break;
30169
            case PICKUP_NUMBER:
30170
              if (field.type == TType.STRING) {
30171
                this.pickupNumber = iprot.readString();
30172
              } else { 
30173
                TProtocolUtil.skip(iprot, field.type);
30174
              }
30175
              break;
30176
          }
30177
          iprot.readFieldEnd();
30178
        }
30179
      }
30180
      iprot.readStructEnd();
30181
      validate();
30182
    }
30183
 
30184
    public void write(TProtocol oprot) throws TException {
30185
      validate();
30186
 
30187
      oprot.writeStructBegin(STRUCT_DESC);
30188
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
30189
      oprot.writeI64(this.orderId);
30190
      oprot.writeFieldEnd();
30191
      if (this.pickupNumber != null) {
30192
        oprot.writeFieldBegin(PICKUP_NUMBER_FIELD_DESC);
30193
        oprot.writeString(this.pickupNumber);
30194
        oprot.writeFieldEnd();
30195
      }
30196
      oprot.writeFieldStop();
30197
      oprot.writeStructEnd();
30198
    }
30199
 
30200
    @Override
30201
    public String toString() {
30202
      StringBuilder sb = new StringBuilder("authorizePickup_args(");
30203
      boolean first = true;
30204
 
30205
      sb.append("orderId:");
30206
      sb.append(this.orderId);
30207
      first = false;
30208
      if (!first) sb.append(", ");
30209
      sb.append("pickupNumber:");
30210
      if (this.pickupNumber == null) {
30211
        sb.append("null");
30212
      } else {
30213
        sb.append(this.pickupNumber);
30214
      }
30215
      first = false;
30216
      sb.append(")");
30217
      return sb.toString();
30218
    }
30219
 
30220
    public void validate() throws TException {
30221
      // check for required fields
30222
    }
30223
 
30224
  }
30225
 
30226
  public static class authorizePickup_result implements TBase<authorizePickup_result._Fields>, java.io.Serializable, Cloneable, Comparable<authorizePickup_result>   {
30227
    private static final TStruct STRUCT_DESC = new TStruct("authorizePickup_result");
30228
 
30229
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
30230
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
30231
 
30232
    private boolean success;
30233
    private TransactionServiceException ex;
30234
 
30235
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
30236
    public enum _Fields implements TFieldIdEnum {
30237
      SUCCESS((short)0, "success"),
30238
      EX((short)1, "ex");
30239
 
30240
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
30241
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
30242
 
30243
      static {
30244
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
30245
          byId.put((int)field._thriftId, field);
30246
          byName.put(field.getFieldName(), field);
30247
        }
30248
      }
30249
 
30250
      /**
30251
       * Find the _Fields constant that matches fieldId, or null if its not found.
30252
       */
30253
      public static _Fields findByThriftId(int fieldId) {
30254
        return byId.get(fieldId);
30255
      }
30256
 
30257
      /**
30258
       * Find the _Fields constant that matches fieldId, throwing an exception
30259
       * if it is not found.
30260
       */
30261
      public static _Fields findByThriftIdOrThrow(int fieldId) {
30262
        _Fields fields = findByThriftId(fieldId);
30263
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
30264
        return fields;
30265
      }
30266
 
30267
      /**
30268
       * Find the _Fields constant that matches name, or null if its not found.
30269
       */
30270
      public static _Fields findByName(String name) {
30271
        return byName.get(name);
30272
      }
30273
 
30274
      private final short _thriftId;
30275
      private final String _fieldName;
30276
 
30277
      _Fields(short thriftId, String fieldName) {
30278
        _thriftId = thriftId;
30279
        _fieldName = fieldName;
30280
      }
30281
 
30282
      public short getThriftFieldId() {
30283
        return _thriftId;
30284
      }
30285
 
30286
      public String getFieldName() {
30287
        return _fieldName;
30288
      }
30289
    }
30290
 
30291
    // isset id assignments
30292
    private static final int __SUCCESS_ISSET_ID = 0;
30293
    private BitSet __isset_bit_vector = new BitSet(1);
30294
 
30295
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
30296
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
30297
          new FieldValueMetaData(TType.BOOL)));
30298
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
30299
          new FieldValueMetaData(TType.STRUCT)));
30300
    }});
30301
 
30302
    static {
30303
      FieldMetaData.addStructMetaDataMap(authorizePickup_result.class, metaDataMap);
30304
    }
30305
 
30306
    public authorizePickup_result() {
30307
    }
30308
 
30309
    public authorizePickup_result(
30310
      boolean success,
30311
      TransactionServiceException ex)
30312
    {
30313
      this();
30314
      this.success = success;
30315
      setSuccessIsSet(true);
30316
      this.ex = ex;
30317
    }
30318
 
30319
    /**
30320
     * Performs a deep copy on <i>other</i>.
30321
     */
30322
    public authorizePickup_result(authorizePickup_result other) {
30323
      __isset_bit_vector.clear();
30324
      __isset_bit_vector.or(other.__isset_bit_vector);
30325
      this.success = other.success;
30326
      if (other.isSetEx()) {
30327
        this.ex = new TransactionServiceException(other.ex);
30328
      }
30329
    }
30330
 
30331
    public authorizePickup_result deepCopy() {
30332
      return new authorizePickup_result(this);
30333
    }
30334
 
30335
    @Deprecated
30336
    public authorizePickup_result clone() {
30337
      return new authorizePickup_result(this);
30338
    }
30339
 
30340
    public boolean isSuccess() {
30341
      return this.success;
30342
    }
30343
 
30344
    public authorizePickup_result setSuccess(boolean success) {
30345
      this.success = success;
30346
      setSuccessIsSet(true);
30347
      return this;
30348
    }
30349
 
30350
    public void unsetSuccess() {
30351
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
30352
    }
30353
 
30354
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
30355
    public boolean isSetSuccess() {
30356
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
30357
    }
30358
 
30359
    public void setSuccessIsSet(boolean value) {
30360
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
30361
    }
30362
 
30363
    public TransactionServiceException getEx() {
30364
      return this.ex;
30365
    }
30366
 
30367
    public authorizePickup_result setEx(TransactionServiceException ex) {
30368
      this.ex = ex;
30369
      return this;
30370
    }
30371
 
30372
    public void unsetEx() {
30373
      this.ex = null;
30374
    }
30375
 
30376
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
30377
    public boolean isSetEx() {
30378
      return this.ex != null;
30379
    }
30380
 
30381
    public void setExIsSet(boolean value) {
30382
      if (!value) {
30383
        this.ex = null;
30384
      }
30385
    }
30386
 
30387
    public void setFieldValue(_Fields field, Object value) {
30388
      switch (field) {
30389
      case SUCCESS:
30390
        if (value == null) {
30391
          unsetSuccess();
30392
        } else {
30393
          setSuccess((Boolean)value);
30394
        }
30395
        break;
30396
 
30397
      case EX:
30398
        if (value == null) {
30399
          unsetEx();
30400
        } else {
30401
          setEx((TransactionServiceException)value);
30402
        }
30403
        break;
30404
 
30405
      }
30406
    }
30407
 
30408
    public void setFieldValue(int fieldID, Object value) {
30409
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
30410
    }
30411
 
30412
    public Object getFieldValue(_Fields field) {
30413
      switch (field) {
30414
      case SUCCESS:
30415
        return new Boolean(isSuccess());
30416
 
30417
      case EX:
30418
        return getEx();
30419
 
30420
      }
30421
      throw new IllegalStateException();
30422
    }
30423
 
30424
    public Object getFieldValue(int fieldId) {
30425
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
30426
    }
30427
 
30428
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
30429
    public boolean isSet(_Fields field) {
30430
      switch (field) {
30431
      case SUCCESS:
30432
        return isSetSuccess();
30433
      case EX:
30434
        return isSetEx();
30435
      }
30436
      throw new IllegalStateException();
30437
    }
30438
 
30439
    public boolean isSet(int fieldID) {
30440
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
30441
    }
30442
 
30443
    @Override
30444
    public boolean equals(Object that) {
30445
      if (that == null)
30446
        return false;
30447
      if (that instanceof authorizePickup_result)
30448
        return this.equals((authorizePickup_result)that);
30449
      return false;
30450
    }
30451
 
30452
    public boolean equals(authorizePickup_result that) {
30453
      if (that == null)
30454
        return false;
30455
 
30456
      boolean this_present_success = true;
30457
      boolean that_present_success = true;
30458
      if (this_present_success || that_present_success) {
30459
        if (!(this_present_success && that_present_success))
30460
          return false;
30461
        if (this.success != that.success)
30462
          return false;
30463
      }
30464
 
30465
      boolean this_present_ex = true && this.isSetEx();
30466
      boolean that_present_ex = true && that.isSetEx();
30467
      if (this_present_ex || that_present_ex) {
30468
        if (!(this_present_ex && that_present_ex))
30469
          return false;
30470
        if (!this.ex.equals(that.ex))
30471
          return false;
30472
      }
30473
 
30474
      return true;
30475
    }
30476
 
30477
    @Override
30478
    public int hashCode() {
30479
      return 0;
30480
    }
30481
 
30482
    public int compareTo(authorizePickup_result other) {
30483
      if (!getClass().equals(other.getClass())) {
30484
        return getClass().getName().compareTo(other.getClass().getName());
30485
      }
30486
 
30487
      int lastComparison = 0;
30488
      authorizePickup_result typedOther = (authorizePickup_result)other;
30489
 
30490
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
30491
      if (lastComparison != 0) {
30492
        return lastComparison;
30493
      }
30494
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
30495
      if (lastComparison != 0) {
30496
        return lastComparison;
30497
      }
30498
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
30499
      if (lastComparison != 0) {
30500
        return lastComparison;
30501
      }
30502
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
30503
      if (lastComparison != 0) {
30504
        return lastComparison;
30505
      }
30506
      return 0;
30507
    }
30508
 
30509
    public void read(TProtocol iprot) throws TException {
30510
      TField field;
30511
      iprot.readStructBegin();
30512
      while (true)
30513
      {
30514
        field = iprot.readFieldBegin();
30515
        if (field.type == TType.STOP) { 
30516
          break;
30517
        }
30518
        _Fields fieldId = _Fields.findByThriftId(field.id);
30519
        if (fieldId == null) {
30520
          TProtocolUtil.skip(iprot, field.type);
30521
        } else {
30522
          switch (fieldId) {
30523
            case SUCCESS:
30524
              if (field.type == TType.BOOL) {
30525
                this.success = iprot.readBool();
30526
                setSuccessIsSet(true);
30527
              } else { 
30528
                TProtocolUtil.skip(iprot, field.type);
30529
              }
30530
              break;
30531
            case EX:
30532
              if (field.type == TType.STRUCT) {
30533
                this.ex = new TransactionServiceException();
30534
                this.ex.read(iprot);
30535
              } else { 
30536
                TProtocolUtil.skip(iprot, field.type);
30537
              }
30538
              break;
30539
          }
30540
          iprot.readFieldEnd();
30541
        }
30542
      }
30543
      iprot.readStructEnd();
30544
      validate();
30545
    }
30546
 
30547
    public void write(TProtocol oprot) throws TException {
30548
      oprot.writeStructBegin(STRUCT_DESC);
30549
 
30550
      if (this.isSetSuccess()) {
30551
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
30552
        oprot.writeBool(this.success);
30553
        oprot.writeFieldEnd();
30554
      } else if (this.isSetEx()) {
30555
        oprot.writeFieldBegin(EX_FIELD_DESC);
30556
        this.ex.write(oprot);
30557
        oprot.writeFieldEnd();
30558
      }
30559
      oprot.writeFieldStop();
30560
      oprot.writeStructEnd();
30561
    }
30562
 
30563
    @Override
30564
    public String toString() {
30565
      StringBuilder sb = new StringBuilder("authorizePickup_result(");
30566
      boolean first = true;
30567
 
30568
      sb.append("success:");
30569
      sb.append(this.success);
30570
      first = false;
30571
      if (!first) sb.append(", ");
30572
      sb.append("ex:");
30573
      if (this.ex == null) {
30574
        sb.append("null");
30575
      } else {
30576
        sb.append(this.ex);
30577
      }
30578
      first = false;
30579
      sb.append(")");
30580
      return sb.toString();
30581
    }
30582
 
30583
    public void validate() throws TException {
30584
      // check for required fields
30585
    }
30586
 
30587
  }
30588
 
68 ashish 30589
}