Subversion Repositories SmartDukaan

Rev

Rev 2364 | Rev 2538 | 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
 
68 ashish 228
  }
229
 
230
  public static class Client implements Iface {
231
    public Client(TProtocol prot)
232
    {
233
      this(prot, prot);
234
    }
235
 
236
    public Client(TProtocol iprot, TProtocol oprot)
237
    {
238
      iprot_ = iprot;
239
      oprot_ = oprot;
240
    }
241
 
242
    protected TProtocol iprot_;
243
    protected TProtocol oprot_;
244
 
245
    protected int seqid_;
246
 
247
    public TProtocol getInputProtocol()
248
    {
249
      return this.iprot_;
250
    }
251
 
252
    public TProtocol getOutputProtocol()
253
    {
254
      return this.oprot_;
255
    }
256
 
764 rajveer 257
    public void closeSession() throws TException
258
    {
259
      send_closeSession();
260
      recv_closeSession();
261
    }
262
 
263
    public void send_closeSession() throws TException
264
    {
265
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
266
      closeSession_args args = new closeSession_args();
267
      args.write(oprot_);
268
      oprot_.writeMessageEnd();
269
      oprot_.getTransport().flush();
270
    }
271
 
272
    public void recv_closeSession() throws TException
273
    {
274
      TMessage msg = iprot_.readMessageBegin();
275
      if (msg.type == TMessageType.EXCEPTION) {
276
        TApplicationException x = TApplicationException.read(iprot_);
277
        iprot_.readMessageEnd();
278
        throw x;
279
      }
280
      closeSession_result result = new closeSession_result();
281
      result.read(iprot_);
282
      iprot_.readMessageEnd();
283
      return;
284
    }
285
 
132 ashish 286
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 287
    {
288
      send_createTransaction(transaction);
132 ashish 289
      return recv_createTransaction();
68 ashish 290
    }
291
 
292
    public void send_createTransaction(Transaction transaction) throws TException
293
    {
294
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
295
      createTransaction_args args = new createTransaction_args();
296
      args.transaction = transaction;
297
      args.write(oprot_);
298
      oprot_.writeMessageEnd();
299
      oprot_.getTransport().flush();
300
    }
301
 
132 ashish 302
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 303
    {
304
      TMessage msg = iprot_.readMessageBegin();
305
      if (msg.type == TMessageType.EXCEPTION) {
306
        TApplicationException x = TApplicationException.read(iprot_);
307
        iprot_.readMessageEnd();
308
        throw x;
309
      }
310
      createTransaction_result result = new createTransaction_result();
311
      result.read(iprot_);
312
      iprot_.readMessageEnd();
132 ashish 313
      if (result.isSetSuccess()) {
314
        return result.success;
315
      }
68 ashish 316
      if (result.ex != null) {
317
        throw result.ex;
318
      }
132 ashish 319
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 320
    }
321
 
322
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
323
    {
324
      send_getTransaction(id);
325
      return recv_getTransaction();
326
    }
327
 
328
    public void send_getTransaction(long id) throws TException
329
    {
330
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
331
      getTransaction_args args = new getTransaction_args();
332
      args.id = id;
333
      args.write(oprot_);
334
      oprot_.writeMessageEnd();
335
      oprot_.getTransport().flush();
336
    }
337
 
338
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
339
    {
340
      TMessage msg = iprot_.readMessageBegin();
341
      if (msg.type == TMessageType.EXCEPTION) {
342
        TApplicationException x = TApplicationException.read(iprot_);
343
        iprot_.readMessageEnd();
344
        throw x;
345
      }
346
      getTransaction_result result = new getTransaction_result();
347
      result.read(iprot_);
348
      iprot_.readMessageEnd();
349
      if (result.isSetSuccess()) {
350
        return result.success;
351
      }
352
      if (result.ex != null) {
353
        throw result.ex;
354
      }
355
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
356
    }
357
 
132 ashish 358
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 359
    {
132 ashish 360
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 361
      return recv_getTransactionsForCustomer();
362
    }
363
 
132 ashish 364
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 365
    {
366
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
367
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
368
      args.customerId = customerId;
132 ashish 369
      args.from_date = from_date;
370
      args.to_date = to_date;
68 ashish 371
      args.status = status;
372
      args.write(oprot_);
373
      oprot_.writeMessageEnd();
374
      oprot_.getTransport().flush();
375
    }
376
 
377
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
378
    {
379
      TMessage msg = iprot_.readMessageBegin();
380
      if (msg.type == TMessageType.EXCEPTION) {
381
        TApplicationException x = TApplicationException.read(iprot_);
382
        iprot_.readMessageEnd();
383
        throw x;
384
      }
385
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
386
      result.read(iprot_);
387
      iprot_.readMessageEnd();
388
      if (result.isSetSuccess()) {
389
        return result.success;
390
      }
391
      if (result.ex != null) {
392
        throw result.ex;
393
      }
394
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
395
    }
396
 
132 ashish 397
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
398
    {
399
      send_getTransactionsForShoppingCartId(shoppingCartId);
400
      return recv_getTransactionsForShoppingCartId();
401
    }
402
 
403
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
404
    {
405
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
406
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
407
      args.shoppingCartId = shoppingCartId;
408
      args.write(oprot_);
409
      oprot_.writeMessageEnd();
410
      oprot_.getTransport().flush();
411
    }
412
 
413
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
414
    {
415
      TMessage msg = iprot_.readMessageBegin();
416
      if (msg.type == TMessageType.EXCEPTION) {
417
        TApplicationException x = TApplicationException.read(iprot_);
418
        iprot_.readMessageEnd();
419
        throw x;
420
      }
421
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
422
      result.read(iprot_);
423
      iprot_.readMessageEnd();
424
      if (result.isSetSuccess()) {
425
        return result.success;
426
      }
427
      if (result.ex != null) {
428
        throw result.ex;
429
      }
430
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
431
    }
432
 
68 ashish 433
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
434
    {
435
      send_getTransactionStatus(transactionId);
436
      return recv_getTransactionStatus();
437
    }
438
 
439
    public void send_getTransactionStatus(long transactionId) throws TException
440
    {
441
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
442
      getTransactionStatus_args args = new getTransactionStatus_args();
443
      args.transactionId = transactionId;
444
      args.write(oprot_);
445
      oprot_.writeMessageEnd();
446
      oprot_.getTransport().flush();
447
    }
448
 
449
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
450
    {
451
      TMessage msg = iprot_.readMessageBegin();
452
      if (msg.type == TMessageType.EXCEPTION) {
453
        TApplicationException x = TApplicationException.read(iprot_);
454
        iprot_.readMessageEnd();
455
        throw x;
456
      }
457
      getTransactionStatus_result result = new getTransactionStatus_result();
458
      result.read(iprot_);
459
      iprot_.readMessageEnd();
460
      if (result.isSetSuccess()) {
461
        return result.success;
462
      }
463
      if (result.ex != null) {
464
        throw result.ex;
465
      }
466
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
467
    }
468
 
469
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
470
    {
471
      send_changeTransactionStatus(transactionId, status, description);
472
      return recv_changeTransactionStatus();
473
    }
474
 
475
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
476
    {
477
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
478
      changeTransactionStatus_args args = new changeTransactionStatus_args();
479
      args.transactionId = transactionId;
480
      args.status = status;
481
      args.description = description;
482
      args.write(oprot_);
483
      oprot_.writeMessageEnd();
484
      oprot_.getTransport().flush();
485
    }
486
 
487
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
488
    {
489
      TMessage msg = iprot_.readMessageBegin();
490
      if (msg.type == TMessageType.EXCEPTION) {
491
        TApplicationException x = TApplicationException.read(iprot_);
492
        iprot_.readMessageEnd();
493
        throw x;
494
      }
495
      changeTransactionStatus_result result = new changeTransactionStatus_result();
496
      result.read(iprot_);
497
      iprot_.readMessageEnd();
498
      if (result.isSetSuccess()) {
499
        return result.success;
500
      }
501
      if (result.ex != null) {
502
        throw result.ex;
503
      }
504
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
505
    }
506
 
1398 varun.gupt 507
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 508
    {
1398 varun.gupt 509
      send_enqueueTransactionInfoEmail(transactionId);
510
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 511
    }
512
 
1398 varun.gupt 513
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 514
    {
1398 varun.gupt 515
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
516
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 517
      args.transactionId = transactionId;
518
      args.write(oprot_);
519
      oprot_.writeMessageEnd();
520
      oprot_.getTransport().flush();
521
    }
522
 
1398 varun.gupt 523
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 524
    {
525
      TMessage msg = iprot_.readMessageBegin();
526
      if (msg.type == TMessageType.EXCEPTION) {
527
        TApplicationException x = TApplicationException.read(iprot_);
528
        iprot_.readMessageEnd();
529
        throw x;
530
      }
1398 varun.gupt 531
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 532
      result.read(iprot_);
533
      iprot_.readMessageEnd();
534
      if (result.isSetSuccess()) {
535
        return result.success;
536
      }
537
      if (result.ex != null) {
538
        throw result.ex;
539
      }
1398 varun.gupt 540
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 541
    }
542
 
483 rajveer 543
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 544
    {
483 rajveer 545
      send_getAllOrders(status, from_date, to_date, warehouse_id);
546
      return recv_getAllOrders();
68 ashish 547
    }
548
 
483 rajveer 549
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 550
    {
483 rajveer 551
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
552
      getAllOrders_args args = new getAllOrders_args();
553
      args.status = status;
554
      args.from_date = from_date;
555
      args.to_date = to_date;
556
      args.warehouse_id = warehouse_id;
68 ashish 557
      args.write(oprot_);
558
      oprot_.writeMessageEnd();
559
      oprot_.getTransport().flush();
560
    }
561
 
483 rajveer 562
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 563
    {
564
      TMessage msg = iprot_.readMessageBegin();
565
      if (msg.type == TMessageType.EXCEPTION) {
566
        TApplicationException x = TApplicationException.read(iprot_);
567
        iprot_.readMessageEnd();
568
        throw x;
569
      }
483 rajveer 570
      getAllOrders_result result = new getAllOrders_result();
68 ashish 571
      result.read(iprot_);
572
      iprot_.readMessageEnd();
573
      if (result.isSetSuccess()) {
574
        return result.success;
575
      }
576
      if (result.ex != null) {
577
        throw result.ex;
578
      }
483 rajveer 579
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 580
    }
581
 
1022 varun.gupt 582
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
583
    {
584
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
585
      return recv_getOrdersByBillingDate();
586
    }
587
 
588
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
589
    {
590
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
591
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
592
      args.status = status;
593
      args.start_billing_date = start_billing_date;
594
      args.end_billing_date = end_billing_date;
595
      args.warehouse_id = warehouse_id;
596
      args.write(oprot_);
597
      oprot_.writeMessageEnd();
598
      oprot_.getTransport().flush();
599
    }
600
 
601
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
602
    {
603
      TMessage msg = iprot_.readMessageBegin();
604
      if (msg.type == TMessageType.EXCEPTION) {
605
        TApplicationException x = TApplicationException.read(iprot_);
606
        iprot_.readMessageEnd();
607
        throw x;
608
      }
609
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
610
      result.read(iprot_);
611
      iprot_.readMessageEnd();
612
      if (result.isSetSuccess()) {
613
        return result.success;
614
      }
615
      if (result.ex != null) {
616
        throw result.ex;
617
      }
618
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
619
    }
620
 
1382 varun.gupt 621
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
622
    {
623
      send_getReturnableOrdersForCustomer(customer_id, limit);
624
      return recv_getReturnableOrdersForCustomer();
625
    }
626
 
627
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
628
    {
629
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
630
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
631
      args.customer_id = customer_id;
632
      args.limit = limit;
633
      args.write(oprot_);
634
      oprot_.writeMessageEnd();
635
      oprot_.getTransport().flush();
636
    }
637
 
638
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
639
    {
640
      TMessage msg = iprot_.readMessageBegin();
641
      if (msg.type == TMessageType.EXCEPTION) {
642
        TApplicationException x = TApplicationException.read(iprot_);
643
        iprot_.readMessageEnd();
644
        throw x;
645
      }
646
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
647
      result.read(iprot_);
648
      iprot_.readMessageEnd();
649
      if (result.isSetSuccess()) {
650
        return result.success;
651
      }
652
      if (result.ex != null) {
653
        throw result.ex;
654
      }
655
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
656
    }
657
 
658
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
659
    {
660
      send_getCancellableOrdersForCustomer(customer_id, limit);
661
      return recv_getCancellableOrdersForCustomer();
662
    }
663
 
664
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
665
    {
666
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
667
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
668
      args.customer_id = customer_id;
669
      args.limit = limit;
670
      args.write(oprot_);
671
      oprot_.writeMessageEnd();
672
      oprot_.getTransport().flush();
673
    }
674
 
675
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
676
    {
677
      TMessage msg = iprot_.readMessageBegin();
678
      if (msg.type == TMessageType.EXCEPTION) {
679
        TApplicationException x = TApplicationException.read(iprot_);
680
        iprot_.readMessageEnd();
681
        throw x;
682
      }
683
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
684
      result.read(iprot_);
685
      iprot_.readMessageEnd();
686
      if (result.isSetSuccess()) {
687
        return result.success;
688
      }
689
      if (result.ex != null) {
690
        throw result.ex;
691
      }
692
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
693
    }
694
 
483 rajveer 695
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 696
    {
483 rajveer 697
      send_changeOrderStatus(orderId, status, description);
698
      return recv_changeOrderStatus();
68 ashish 699
    }
700
 
483 rajveer 701
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 702
    {
483 rajveer 703
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
704
      changeOrderStatus_args args = new changeOrderStatus_args();
705
      args.orderId = orderId;
706
      args.status = status;
707
      args.description = description;
68 ashish 708
      args.write(oprot_);
709
      oprot_.writeMessageEnd();
710
      oprot_.getTransport().flush();
711
    }
712
 
483 rajveer 713
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 714
    {
715
      TMessage msg = iprot_.readMessageBegin();
716
      if (msg.type == TMessageType.EXCEPTION) {
717
        TApplicationException x = TApplicationException.read(iprot_);
718
        iprot_.readMessageEnd();
719
        throw x;
720
      }
483 rajveer 721
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 722
      result.read(iprot_);
723
      iprot_.readMessageEnd();
724
      if (result.isSetSuccess()) {
725
        return result.success;
726
      }
727
      if (result.ex != null) {
728
        throw result.ex;
729
      }
483 rajveer 730
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 731
    }
732
 
1148 chandransh 733
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 734
    {
1148 chandransh 735
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 736
      return recv_addBillingDetails();
737
    }
738
 
1148 chandransh 739
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 740
    {
741
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
742
      addBillingDetails_args args = new addBillingDetails_args();
743
      args.orderId = orderId;
744
      args.invoice_number = invoice_number;
745
      args.billed_by = billed_by;
746
      args.write(oprot_);
747
      oprot_.writeMessageEnd();
748
      oprot_.getTransport().flush();
749
    }
750
 
751
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
752
    {
753
      TMessage msg = iprot_.readMessageBegin();
754
      if (msg.type == TMessageType.EXCEPTION) {
755
        TApplicationException x = TApplicationException.read(iprot_);
756
        iprot_.readMessageEnd();
757
        throw x;
758
      }
759
      addBillingDetails_result result = new addBillingDetails_result();
760
      result.read(iprot_);
761
      iprot_.readMessageEnd();
762
      if (result.isSetSuccess()) {
763
        return result.success;
764
      }
765
      if (result.ex != null) {
766
        throw result.ex;
767
      }
768
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
769
    }
770
 
2383 rajveer 771
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
1148 chandransh 772
    {
2383 rajveer 773
      send_addJacketNumber(orderId, jacketNumber);
1148 chandransh 774
      return recv_addJacketNumber();
775
    }
776
 
2383 rajveer 777
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
1148 chandransh 778
    {
779
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
780
      addJacketNumber_args args = new addJacketNumber_args();
781
      args.orderId = orderId;
782
      args.jacketNumber = jacketNumber;
783
      args.write(oprot_);
784
      oprot_.writeMessageEnd();
785
      oprot_.getTransport().flush();
786
    }
787
 
788
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
789
    {
790
      TMessage msg = iprot_.readMessageBegin();
791
      if (msg.type == TMessageType.EXCEPTION) {
792
        TApplicationException x = TApplicationException.read(iprot_);
793
        iprot_.readMessageEnd();
794
        throw x;
795
      }
796
      addJacketNumber_result result = new addJacketNumber_result();
797
      result.read(iprot_);
798
      iprot_.readMessageEnd();
799
      if (result.isSetSuccess()) {
800
        return result.success;
801
      }
802
      if (result.ex != null) {
803
        throw result.ex;
804
      }
805
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
806
    }
807
 
923 rajveer 808
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
809
    {
810
      send_acceptOrder(orderId);
811
      return recv_acceptOrder();
812
    }
813
 
814
    public void send_acceptOrder(long orderId) throws TException
815
    {
816
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
817
      acceptOrder_args args = new acceptOrder_args();
818
      args.orderId = orderId;
819
      args.write(oprot_);
820
      oprot_.writeMessageEnd();
821
      oprot_.getTransport().flush();
822
    }
823
 
824
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
825
    {
826
      TMessage msg = iprot_.readMessageBegin();
827
      if (msg.type == TMessageType.EXCEPTION) {
828
        TApplicationException x = TApplicationException.read(iprot_);
829
        iprot_.readMessageEnd();
830
        throw x;
831
      }
832
      acceptOrder_result result = new acceptOrder_result();
833
      result.read(iprot_);
834
      iprot_.readMessageEnd();
835
      if (result.isSetSuccess()) {
836
        return result.success;
837
      }
838
      if (result.ex != null) {
839
        throw result.ex;
840
      }
841
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
842
    }
843
 
844
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
845
    {
846
      send_billOrder(orderId);
847
      return recv_billOrder();
848
    }
849
 
850
    public void send_billOrder(long orderId) throws TException
851
    {
852
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
853
      billOrder_args args = new billOrder_args();
854
      args.orderId = orderId;
855
      args.write(oprot_);
856
      oprot_.writeMessageEnd();
857
      oprot_.getTransport().flush();
858
    }
859
 
860
    public boolean recv_billOrder() throws TransactionServiceException, TException
861
    {
862
      TMessage msg = iprot_.readMessageBegin();
863
      if (msg.type == TMessageType.EXCEPTION) {
864
        TApplicationException x = TApplicationException.read(iprot_);
865
        iprot_.readMessageEnd();
866
        throw x;
867
      }
868
      billOrder_result result = new billOrder_result();
869
      result.read(iprot_);
870
      iprot_.readMessageEnd();
871
      if (result.isSetSuccess()) {
872
        return result.success;
873
      }
874
      if (result.ex != null) {
875
        throw result.ex;
876
      }
877
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
878
    }
879
 
1529 ankur.sing 880
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 881
    {
1529 ankur.sing 882
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 883
      return recv_getOrdersForTransaction();
68 ashish 884
    }
885
 
1529 ankur.sing 886
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 887
    {
483 rajveer 888
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
889
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 890
      args.transactionId = transactionId;
1529 ankur.sing 891
      args.customerId = customerId;
68 ashish 892
      args.write(oprot_);
893
      oprot_.writeMessageEnd();
894
      oprot_.getTransport().flush();
895
    }
896
 
483 rajveer 897
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 898
    {
899
      TMessage msg = iprot_.readMessageBegin();
900
      if (msg.type == TMessageType.EXCEPTION) {
901
        TApplicationException x = TApplicationException.read(iprot_);
902
        iprot_.readMessageEnd();
903
        throw x;
904
      }
483 rajveer 905
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 906
      result.read(iprot_);
907
      iprot_.readMessageEnd();
908
      if (result.isSetSuccess()) {
909
        return result.success;
910
      }
911
      if (result.ex != null) {
912
        throw result.ex;
913
      }
483 rajveer 914
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 915
    }
916
 
483 rajveer 917
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 918
    {
483 rajveer 919
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
920
      return recv_getOrdersForCustomer();
68 ashish 921
    }
922
 
483 rajveer 923
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 924
    {
483 rajveer 925
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
926
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
927
      args.customerId = customerId;
928
      args.from_date = from_date;
929
      args.to_date = to_date;
930
      args.status = status;
68 ashish 931
      args.write(oprot_);
932
      oprot_.writeMessageEnd();
933
      oprot_.getTransport().flush();
934
    }
935
 
483 rajveer 936
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 937
    {
938
      TMessage msg = iprot_.readMessageBegin();
939
      if (msg.type == TMessageType.EXCEPTION) {
940
        TApplicationException x = TApplicationException.read(iprot_);
941
        iprot_.readMessageEnd();
942
        throw x;
943
      }
483 rajveer 944
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 945
      result.read(iprot_);
946
      iprot_.readMessageEnd();
947
      if (result.isSetSuccess()) {
948
        return result.success;
949
      }
950
      if (result.ex != null) {
951
        throw result.ex;
952
      }
483 rajveer 953
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 954
    }
955
 
483 rajveer 956
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 957
    {
483 rajveer 958
      send_createOrder(order);
959
      return recv_createOrder();
68 ashish 960
    }
961
 
483 rajveer 962
    public void send_createOrder(Order order) throws TException
68 ashish 963
    {
483 rajveer 964
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
965
      createOrder_args args = new createOrder_args();
966
      args.order = order;
68 ashish 967
      args.write(oprot_);
968
      oprot_.writeMessageEnd();
969
      oprot_.getTransport().flush();
970
    }
971
 
483 rajveer 972
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 973
    {
974
      TMessage msg = iprot_.readMessageBegin();
975
      if (msg.type == TMessageType.EXCEPTION) {
976
        TApplicationException x = TApplicationException.read(iprot_);
977
        iprot_.readMessageEnd();
978
        throw x;
979
      }
483 rajveer 980
      createOrder_result result = new createOrder_result();
68 ashish 981
      result.read(iprot_);
982
      iprot_.readMessageEnd();
983
      if (result.isSetSuccess()) {
984
        return result.success;
985
      }
986
      if (result.ex != null) {
987
        throw result.ex;
988
      }
483 rajveer 989
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 990
    }
991
 
483 rajveer 992
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 993
    {
483 rajveer 994
      send_getOrder(id);
995
      return recv_getOrder();
68 ashish 996
    }
997
 
483 rajveer 998
    public void send_getOrder(long id) throws TException
68 ashish 999
    {
483 rajveer 1000
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
1001
      getOrder_args args = new getOrder_args();
1002
      args.id = id;
68 ashish 1003
      args.write(oprot_);
1004
      oprot_.writeMessageEnd();
1005
      oprot_.getTransport().flush();
1006
    }
1007
 
483 rajveer 1008
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 1009
    {
1010
      TMessage msg = iprot_.readMessageBegin();
1011
      if (msg.type == TMessageType.EXCEPTION) {
1012
        TApplicationException x = TApplicationException.read(iprot_);
1013
        iprot_.readMessageEnd();
1014
        throw x;
1015
      }
483 rajveer 1016
      getOrder_result result = new getOrder_result();
68 ashish 1017
      result.read(iprot_);
1018
      iprot_.readMessageEnd();
1019
      if (result.isSetSuccess()) {
1020
        return result.success;
1021
      }
1022
      if (result.ex != null) {
1023
        throw result.ex;
1024
      }
483 rajveer 1025
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1026
    }
1027
 
483 rajveer 1028
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1029
    {
483 rajveer 1030
      send_getLineItemsForOrder(orderId);
1031
      return recv_getLineItemsForOrder();
68 ashish 1032
    }
1033
 
483 rajveer 1034
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1035
    {
483 rajveer 1036
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1037
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1038
      args.orderId = orderId;
68 ashish 1039
      args.write(oprot_);
1040
      oprot_.writeMessageEnd();
1041
      oprot_.getTransport().flush();
1042
    }
1043
 
483 rajveer 1044
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1045
    {
1046
      TMessage msg = iprot_.readMessageBegin();
1047
      if (msg.type == TMessageType.EXCEPTION) {
1048
        TApplicationException x = TApplicationException.read(iprot_);
1049
        iprot_.readMessageEnd();
1050
        throw x;
1051
      }
483 rajveer 1052
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1053
      result.read(iprot_);
1054
      iprot_.readMessageEnd();
1055
      if (result.isSetSuccess()) {
1056
        return result.success;
1057
      }
1058
      if (result.ex != null) {
1059
        throw result.ex;
1060
      }
483 rajveer 1061
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1062
    }
1063
 
1529 ankur.sing 1064
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1065
    {
1066
      send_getOrderForCustomer(orderId, customerId);
1067
      return recv_getOrderForCustomer();
1068
    }
1069
 
1070
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1071
    {
1072
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1073
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1074
      args.orderId = orderId;
1075
      args.customerId = customerId;
1076
      args.write(oprot_);
1077
      oprot_.writeMessageEnd();
1078
      oprot_.getTransport().flush();
1079
    }
1080
 
1081
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1082
    {
1083
      TMessage msg = iprot_.readMessageBegin();
1084
      if (msg.type == TMessageType.EXCEPTION) {
1085
        TApplicationException x = TApplicationException.read(iprot_);
1086
        iprot_.readMessageEnd();
1087
        throw x;
1088
      }
1089
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1090
      result.read(iprot_);
1091
      iprot_.readMessageEnd();
1092
      if (result.isSetSuccess()) {
1093
        return result.success;
1094
      }
1095
      if (result.ex != null) {
1096
        throw result.ex;
1097
      }
1098
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1099
    }
1100
 
1221 chandransh 1101
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1102
    {
1103
      send_batchOrders(warehouseId);
1104
      return recv_batchOrders();
1105
    }
1106
 
1107
    public void send_batchOrders(long warehouseId) throws TException
1108
    {
1109
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1110
      batchOrders_args args = new batchOrders_args();
1111
      args.warehouseId = warehouseId;
1112
      args.write(oprot_);
1113
      oprot_.writeMessageEnd();
1114
      oprot_.getTransport().flush();
1115
    }
1116
 
1117
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1118
    {
1119
      TMessage msg = iprot_.readMessageBegin();
1120
      if (msg.type == TMessageType.EXCEPTION) {
1121
        TApplicationException x = TApplicationException.read(iprot_);
1122
        iprot_.readMessageEnd();
1123
        throw x;
1124
      }
1125
      batchOrders_result result = new batchOrders_result();
1126
      result.read(iprot_);
1127
      iprot_.readMessageEnd();
1128
      if (result.isSetSuccess()) {
1129
        return result.success;
1130
      }
1131
      if (result.ex != null) {
1132
        throw result.ex;
1133
      }
1134
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1135
    }
1136
 
1209 chandransh 1137
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1138
    {
1139
      send_markOrderAsOutOfStock(orderId);
1140
      return recv_markOrderAsOutOfStock();
1141
    }
1142
 
1143
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1144
    {
1145
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1146
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1147
      args.orderId = orderId;
1148
      args.write(oprot_);
1149
      oprot_.writeMessageEnd();
1150
      oprot_.getTransport().flush();
1151
    }
1152
 
1153
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1154
    {
1155
      TMessage msg = iprot_.readMessageBegin();
1156
      if (msg.type == TMessageType.EXCEPTION) {
1157
        TApplicationException x = TApplicationException.read(iprot_);
1158
        iprot_.readMessageEnd();
1159
        throw x;
1160
      }
1161
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1162
      result.read(iprot_);
1163
      iprot_.readMessageEnd();
1164
      if (result.isSetSuccess()) {
1165
        return result.success;
1166
      }
1167
      if (result.ex != null) {
1168
        throw result.ex;
1169
      }
1170
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1171
    }
1172
 
758 chandransh 1173
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1174
    {
1175
      send_markOrdersAsManifested(warehouseId, providerId);
1176
      return recv_markOrdersAsManifested();
1177
    }
1178
 
1179
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1180
    {
1181
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1182
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1183
      args.warehouseId = warehouseId;
1184
      args.providerId = providerId;
1185
      args.write(oprot_);
1186
      oprot_.writeMessageEnd();
1187
      oprot_.getTransport().flush();
1188
    }
1189
 
1190
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1191
    {
1192
      TMessage msg = iprot_.readMessageBegin();
1193
      if (msg.type == TMessageType.EXCEPTION) {
1194
        TApplicationException x = TApplicationException.read(iprot_);
1195
        iprot_.readMessageEnd();
1196
        throw x;
1197
      }
1198
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1199
      result.read(iprot_);
1200
      iprot_.readMessageEnd();
1201
      if (result.isSetSuccess()) {
1202
        return result.success;
1203
      }
1204
      if (result.ex != null) {
1205
        throw result.ex;
1206
      }
1207
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1208
    }
1209
 
1245 chandransh 1210
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1211
    {
1212
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1213
      return recv_markOrdersAsPickedUp();
1214
    }
1215
 
1245 chandransh 1216
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1217
    {
1218
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1219
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1220
      args.providerId = providerId;
1221
      args.pickupDetails = pickupDetails;
1222
      args.write(oprot_);
1223
      oprot_.writeMessageEnd();
1224
      oprot_.getTransport().flush();
1225
    }
1226
 
1227
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1228
    {
1229
      TMessage msg = iprot_.readMessageBegin();
1230
      if (msg.type == TMessageType.EXCEPTION) {
1231
        TApplicationException x = TApplicationException.read(iprot_);
1232
        iprot_.readMessageEnd();
1233
        throw x;
1234
      }
1235
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1236
      result.read(iprot_);
1237
      iprot_.readMessageEnd();
1238
      if (result.isSetSuccess()) {
1239
        return result.success;
1240
      }
1241
      if (result.ex != null) {
1242
        throw result.ex;
1243
      }
1244
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1245
    }
1246
 
1133 chandransh 1247
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1248
    {
1249
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1250
      recv_markOrdersAsDelivered();
1251
    }
1252
 
1253
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1254
    {
1255
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1256
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1257
      args.providerId = providerId;
1258
      args.deliveredOrders = deliveredOrders;
1259
      args.write(oprot_);
1260
      oprot_.writeMessageEnd();
1261
      oprot_.getTransport().flush();
1262
    }
1263
 
1264
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1265
    {
1266
      TMessage msg = iprot_.readMessageBegin();
1267
      if (msg.type == TMessageType.EXCEPTION) {
1268
        TApplicationException x = TApplicationException.read(iprot_);
1269
        iprot_.readMessageEnd();
1270
        throw x;
1271
      }
1272
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1273
      result.read(iprot_);
1274
      iprot_.readMessageEnd();
1275
      if (result.ex != null) {
1276
        throw result.ex;
1277
      }
1278
      return;
1279
    }
1280
 
1281
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1282
    {
1283
      send_markOrdersAsFailed(providerId, returnedOrders);
1284
      recv_markOrdersAsFailed();
1285
    }
1286
 
1287
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1288
    {
1289
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1290
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1291
      args.providerId = providerId;
1292
      args.returnedOrders = returnedOrders;
1293
      args.write(oprot_);
1294
      oprot_.writeMessageEnd();
1295
      oprot_.getTransport().flush();
1296
    }
1297
 
1298
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1299
    {
1300
      TMessage msg = iprot_.readMessageBegin();
1301
      if (msg.type == TMessageType.EXCEPTION) {
1302
        TApplicationException x = TApplicationException.read(iprot_);
1303
        iprot_.readMessageEnd();
1304
        throw x;
1305
      }
1306
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1307
      result.read(iprot_);
1308
      iprot_.readMessageEnd();
1309
      if (result.ex != null) {
1310
        throw result.ex;
1311
      }
1312
      return;
1313
    }
1314
 
1245 chandransh 1315
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1316
    {
1317
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1318
      recv_updateNonDeliveryReason();
1319
    }
1320
 
1321
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1322
    {
1323
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1324
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1325
      args.providerId = providerId;
1326
      args.undeliveredOrders = undeliveredOrders;
1327
      args.write(oprot_);
1328
      oprot_.writeMessageEnd();
1329
      oprot_.getTransport().flush();
1330
    }
1331
 
1332
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1333
    {
1334
      TMessage msg = iprot_.readMessageBegin();
1335
      if (msg.type == TMessageType.EXCEPTION) {
1336
        TApplicationException x = TApplicationException.read(iprot_);
1337
        iprot_.readMessageEnd();
1338
        throw x;
1339
      }
1340
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1341
      result.read(iprot_);
1342
      iprot_.readMessageEnd();
1343
      if (result.ex != null) {
1344
        throw result.ex;
1345
      }
1346
      return;
1347
    }
1348
 
1406 ankur.sing 1349
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1350
    {
1351
      send_getUndeliveredOrders(providerId, warehouseId);
1352
      return recv_getUndeliveredOrders();
1353
    }
1354
 
1355
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1356
    {
1357
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1358
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1359
      args.providerId = providerId;
1360
      args.warehouseId = warehouseId;
1361
      args.write(oprot_);
1362
      oprot_.writeMessageEnd();
1363
      oprot_.getTransport().flush();
1364
    }
1365
 
1366
    public List<Order> recv_getUndeliveredOrders() throws TException
1367
    {
1368
      TMessage msg = iprot_.readMessageBegin();
1369
      if (msg.type == TMessageType.EXCEPTION) {
1370
        TApplicationException x = TApplicationException.read(iprot_);
1371
        iprot_.readMessageEnd();
1372
        throw x;
1373
      }
1374
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1375
      result.read(iprot_);
1376
      iprot_.readMessageEnd();
1377
      if (result.isSetSuccess()) {
1378
        return result.success;
1379
      }
1380
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1381
    }
1382
 
483 rajveer 1383
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1384
    {
483 rajveer 1385
      send_getAlerts(orderId, valid);
305 ashish 1386
      return recv_getAlerts();
1387
    }
1388
 
483 rajveer 1389
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1390
    {
1391
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1392
      getAlerts_args args = new getAlerts_args();
483 rajveer 1393
      args.orderId = orderId;
305 ashish 1394
      args.valid = valid;
1395
      args.write(oprot_);
1396
      oprot_.writeMessageEnd();
1397
      oprot_.getTransport().flush();
1398
    }
1399
 
1400
    public List<Alert> recv_getAlerts() throws TException
1401
    {
1402
      TMessage msg = iprot_.readMessageBegin();
1403
      if (msg.type == TMessageType.EXCEPTION) {
1404
        TApplicationException x = TApplicationException.read(iprot_);
1405
        iprot_.readMessageEnd();
1406
        throw x;
1407
      }
1408
      getAlerts_result result = new getAlerts_result();
1409
      result.read(iprot_);
1410
      iprot_.readMessageEnd();
1411
      if (result.isSetSuccess()) {
1412
        return result.success;
1413
      }
1414
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1415
    }
1416
 
483 rajveer 1417
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1418
    {
483 rajveer 1419
      send_setAlert(orderId, unset, type, comment);
305 ashish 1420
      recv_setAlert();
1421
    }
1422
 
483 rajveer 1423
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1424
    {
1425
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1426
      setAlert_args args = new setAlert_args();
483 rajveer 1427
      args.orderId = orderId;
305 ashish 1428
      args.unset = unset;
1429
      args.type = type;
1430
      args.comment = comment;
1431
      args.write(oprot_);
1432
      oprot_.writeMessageEnd();
1433
      oprot_.getTransport().flush();
1434
    }
1435
 
1436
    public void recv_setAlert() throws TException
1437
    {
1438
      TMessage msg = iprot_.readMessageBegin();
1439
      if (msg.type == TMessageType.EXCEPTION) {
1440
        TApplicationException x = TApplicationException.read(iprot_);
1441
        iprot_.readMessageEnd();
1442
        throw x;
1443
      }
1444
      setAlert_result result = new setAlert_result();
1445
      result.read(iprot_);
1446
      iprot_.readMessageEnd();
1447
      return;
1448
    }
1449
 
1598 ankur.sing 1450
    public long getValidOrderCount() throws TException
1451
    {
1452
      send_getValidOrderCount();
1453
      return recv_getValidOrderCount();
1454
    }
1455
 
1456
    public void send_getValidOrderCount() throws TException
1457
    {
1458
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1459
      getValidOrderCount_args args = new getValidOrderCount_args();
1460
      args.write(oprot_);
1461
      oprot_.writeMessageEnd();
1462
      oprot_.getTransport().flush();
1463
    }
1464
 
1465
    public long recv_getValidOrderCount() throws TException
1466
    {
1467
      TMessage msg = iprot_.readMessageBegin();
1468
      if (msg.type == TMessageType.EXCEPTION) {
1469
        TApplicationException x = TApplicationException.read(iprot_);
1470
        iprot_.readMessageEnd();
1471
        throw x;
1472
      }
1473
      getValidOrderCount_result result = new getValidOrderCount_result();
1474
      result.read(iprot_);
1475
      iprot_.readMessageEnd();
1476
      if (result.isSetSuccess()) {
1477
        return result.success;
1478
      }
1479
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1480
    }
1481
 
1629 ankur.sing 1482
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException
1483
    {
1484
      send_getNoOfCustomersWithSuccessfulTransaction();
1485
      return recv_getNoOfCustomersWithSuccessfulTransaction();
1486
    }
1487
 
1488
    public void send_getNoOfCustomersWithSuccessfulTransaction() throws TException
1489
    {
1490
      oprot_.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.CALL, seqid_));
1491
      getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
1492
      args.write(oprot_);
1493
      oprot_.writeMessageEnd();
1494
      oprot_.getTransport().flush();
1495
    }
1496
 
1497
    public long recv_getNoOfCustomersWithSuccessfulTransaction() throws TException
1498
    {
1499
      TMessage msg = iprot_.readMessageBegin();
1500
      if (msg.type == TMessageType.EXCEPTION) {
1501
        TApplicationException x = TApplicationException.read(iprot_);
1502
        iprot_.readMessageEnd();
1503
        throw x;
1504
      }
1505
      getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
1506
      result.read(iprot_);
1507
      iprot_.readMessageEnd();
1508
      if (result.isSetSuccess()) {
1509
        return result.success;
1510
      }
1511
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1512
    }
1513
 
1731 ankur.sing 1514
    public List<Double> getValidOrdersAmountRange() throws TException
1629 ankur.sing 1515
    {
1731 ankur.sing 1516
      send_getValidOrdersAmountRange();
1517
      return recv_getValidOrdersAmountRange();
1629 ankur.sing 1518
    }
1519
 
1731 ankur.sing 1520
    public void send_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1521
    {
1731 ankur.sing 1522
      oprot_.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.CALL, seqid_));
1523
      getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 1524
      args.write(oprot_);
1525
      oprot_.writeMessageEnd();
1526
      oprot_.getTransport().flush();
1527
    }
1528
 
1731 ankur.sing 1529
    public List<Double> recv_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1530
    {
1531
      TMessage msg = iprot_.readMessageBegin();
1532
      if (msg.type == TMessageType.EXCEPTION) {
1533
        TApplicationException x = TApplicationException.read(iprot_);
1534
        iprot_.readMessageEnd();
1535
        throw x;
1536
      }
1731 ankur.sing 1537
      getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
1629 ankur.sing 1538
      result.read(iprot_);
1539
      iprot_.readMessageEnd();
1540
      if (result.isSetSuccess()) {
1541
        return result.success;
1542
      }
1731 ankur.sing 1543
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1629 ankur.sing 1544
    }
1545
 
1886 ankur.sing 1546
    public List<Order> getValidOrders(long limit) throws TException
1547
    {
1548
      send_getValidOrders(limit);
1549
      return recv_getValidOrders();
1550
    }
1551
 
1552
    public void send_getValidOrders(long limit) throws TException
1553
    {
1554
      oprot_.writeMessageBegin(new TMessage("getValidOrders", TMessageType.CALL, seqid_));
1555
      getValidOrders_args args = new getValidOrders_args();
1556
      args.limit = limit;
1557
      args.write(oprot_);
1558
      oprot_.writeMessageEnd();
1559
      oprot_.getTransport().flush();
1560
    }
1561
 
1562
    public List<Order> recv_getValidOrders() throws TException
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
      }
1570
      getValidOrders_result result = new getValidOrders_result();
1571
      result.read(iprot_);
1572
      iprot_.readMessageEnd();
1573
      if (result.isSetSuccess()) {
1574
        return result.success;
1575
      }
1576
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1577
    }
1578
 
68 ashish 1579
  }
1580
  public static class Processor implements TProcessor {
1581
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1582
    public Processor(Iface iface)
1583
    {
1584
      iface_ = iface;
764 rajveer 1585
      processMap_.put("closeSession", new closeSession());
68 ashish 1586
      processMap_.put("createTransaction", new createTransaction());
1587
      processMap_.put("getTransaction", new getTransaction());
1588
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1589
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1590
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1591
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1592
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1593
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1594
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1595
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1596
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1597
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1598
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1599
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1600
      processMap_.put("acceptOrder", new acceptOrder());
1601
      processMap_.put("billOrder", new billOrder());
483 rajveer 1602
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1603
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1604
      processMap_.put("createOrder", new createOrder());
1605
      processMap_.put("getOrder", new getOrder());
1606
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 1607
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 1608
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1609
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1610
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1611
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1612
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1613
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1614
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1615
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1616
      processMap_.put("getAlerts", new getAlerts());
1617
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 1618
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1629 ankur.sing 1619
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1731 ankur.sing 1620
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1886 ankur.sing 1621
      processMap_.put("getValidOrders", new getValidOrders());
68 ashish 1622
    }
1623
 
1624
    protected static interface ProcessFunction {
1625
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1626
    }
1627
 
1628
    private Iface iface_;
1629
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1630
 
1631
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1632
    {
1633
      TMessage msg = iprot.readMessageBegin();
1634
      ProcessFunction fn = processMap_.get(msg.name);
1635
      if (fn == null) {
1636
        TProtocolUtil.skip(iprot, TType.STRUCT);
1637
        iprot.readMessageEnd();
1638
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1639
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1640
        x.write(oprot);
1641
        oprot.writeMessageEnd();
1642
        oprot.getTransport().flush();
1643
        return true;
1644
      }
1645
      fn.process(msg.seqid, iprot, oprot);
1646
      return true;
1647
    }
1648
 
764 rajveer 1649
    private class closeSession implements ProcessFunction {
1650
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1651
      {
1652
        closeSession_args args = new closeSession_args();
1653
        args.read(iprot);
1654
        iprot.readMessageEnd();
1655
        closeSession_result result = new closeSession_result();
1656
        iface_.closeSession();
1657
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1658
        result.write(oprot);
1659
        oprot.writeMessageEnd();
1660
        oprot.getTransport().flush();
1661
      }
1662
 
1663
    }
1664
 
68 ashish 1665
    private class createTransaction implements ProcessFunction {
1666
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1667
      {
1668
        createTransaction_args args = new createTransaction_args();
1669
        args.read(iprot);
1670
        iprot.readMessageEnd();
1671
        createTransaction_result result = new createTransaction_result();
1672
        try {
132 ashish 1673
          result.success = iface_.createTransaction(args.transaction);
1674
          result.setSuccessIsSet(true);
68 ashish 1675
        } catch (TransactionServiceException ex) {
1676
          result.ex = ex;
1677
        } catch (Throwable th) {
1678
          LOGGER.error("Internal error processing createTransaction", th);
1679
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1680
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1681
          x.write(oprot);
1682
          oprot.writeMessageEnd();
1683
          oprot.getTransport().flush();
1684
          return;
1685
        }
1686
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1687
        result.write(oprot);
1688
        oprot.writeMessageEnd();
1689
        oprot.getTransport().flush();
1690
      }
1691
 
1692
    }
1693
 
1694
    private class getTransaction implements ProcessFunction {
1695
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1696
      {
1697
        getTransaction_args args = new getTransaction_args();
1698
        args.read(iprot);
1699
        iprot.readMessageEnd();
1700
        getTransaction_result result = new getTransaction_result();
1701
        try {
1702
          result.success = iface_.getTransaction(args.id);
1703
        } catch (TransactionServiceException ex) {
1704
          result.ex = ex;
1705
        } catch (Throwable th) {
1706
          LOGGER.error("Internal error processing getTransaction", th);
1707
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1708
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1709
          x.write(oprot);
1710
          oprot.writeMessageEnd();
1711
          oprot.getTransport().flush();
1712
          return;
1713
        }
1714
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1715
        result.write(oprot);
1716
        oprot.writeMessageEnd();
1717
        oprot.getTransport().flush();
1718
      }
1719
 
1720
    }
1721
 
1722
    private class getTransactionsForCustomer implements ProcessFunction {
1723
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1724
      {
1725
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1726
        args.read(iprot);
1727
        iprot.readMessageEnd();
1728
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1729
        try {
132 ashish 1730
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1731
        } catch (TransactionServiceException ex) {
1732
          result.ex = ex;
1733
        } catch (Throwable th) {
1734
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1735
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1736
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1737
          x.write(oprot);
1738
          oprot.writeMessageEnd();
1739
          oprot.getTransport().flush();
1740
          return;
1741
        }
1742
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1743
        result.write(oprot);
1744
        oprot.writeMessageEnd();
1745
        oprot.getTransport().flush();
1746
      }
1747
 
1748
    }
1749
 
132 ashish 1750
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1751
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1752
      {
1753
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1754
        args.read(iprot);
1755
        iprot.readMessageEnd();
1756
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1757
        try {
1758
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1759
        } catch (TransactionServiceException ex) {
1760
          result.ex = ex;
1761
        } catch (Throwable th) {
1762
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1763
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1764
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1765
          x.write(oprot);
1766
          oprot.writeMessageEnd();
1767
          oprot.getTransport().flush();
1768
          return;
1769
        }
1770
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1771
        result.write(oprot);
1772
        oprot.writeMessageEnd();
1773
        oprot.getTransport().flush();
1774
      }
1775
 
1776
    }
1777
 
68 ashish 1778
    private class getTransactionStatus implements ProcessFunction {
1779
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1780
      {
1781
        getTransactionStatus_args args = new getTransactionStatus_args();
1782
        args.read(iprot);
1783
        iprot.readMessageEnd();
1784
        getTransactionStatus_result result = new getTransactionStatus_result();
1785
        try {
1786
          result.success = iface_.getTransactionStatus(args.transactionId);
1787
        } catch (TransactionServiceException ex) {
1788
          result.ex = ex;
1789
        } catch (Throwable th) {
1790
          LOGGER.error("Internal error processing getTransactionStatus", th);
1791
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1792
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1793
          x.write(oprot);
1794
          oprot.writeMessageEnd();
1795
          oprot.getTransport().flush();
1796
          return;
1797
        }
1798
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1799
        result.write(oprot);
1800
        oprot.writeMessageEnd();
1801
        oprot.getTransport().flush();
1802
      }
1803
 
1804
    }
1805
 
1806
    private class changeTransactionStatus implements ProcessFunction {
1807
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1808
      {
1809
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1810
        args.read(iprot);
1811
        iprot.readMessageEnd();
1812
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1813
        try {
1814
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1815
          result.setSuccessIsSet(true);
1816
        } catch (TransactionServiceException ex) {
1817
          result.ex = ex;
1818
        } catch (Throwable th) {
1819
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1820
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1821
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1822
          x.write(oprot);
1823
          oprot.writeMessageEnd();
1824
          oprot.getTransport().flush();
1825
          return;
1826
        }
1827
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1828
        result.write(oprot);
1829
        oprot.writeMessageEnd();
1830
        oprot.getTransport().flush();
1831
      }
1832
 
1833
    }
1834
 
1398 varun.gupt 1835
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 1836
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1837
      {
1398 varun.gupt 1838
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 1839
        args.read(iprot);
1840
        iprot.readMessageEnd();
1398 varun.gupt 1841
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 1842
        try {
1398 varun.gupt 1843
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 1844
          result.setSuccessIsSet(true);
1845
        } catch (TransactionServiceException ex) {
1846
          result.ex = ex;
1847
        } catch (Throwable th) {
1398 varun.gupt 1848
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
1849
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
1850
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 1851
          x.write(oprot);
1852
          oprot.writeMessageEnd();
1853
          oprot.getTransport().flush();
1854
          return;
1855
        }
1398 varun.gupt 1856
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 1857
        result.write(oprot);
1858
        oprot.writeMessageEnd();
1859
        oprot.getTransport().flush();
1860
      }
1861
 
1862
    }
1863
 
483 rajveer 1864
    private class getAllOrders implements ProcessFunction {
68 ashish 1865
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1866
      {
483 rajveer 1867
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1868
        args.read(iprot);
1869
        iprot.readMessageEnd();
483 rajveer 1870
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1871
        try {
483 rajveer 1872
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1873
        } catch (TransactionServiceException ex) {
1874
          result.ex = ex;
1875
        } catch (Throwable th) {
483 rajveer 1876
          LOGGER.error("Internal error processing getAllOrders", th);
1877
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1878
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1879
          x.write(oprot);
1880
          oprot.writeMessageEnd();
1881
          oprot.getTransport().flush();
1882
          return;
1883
        }
483 rajveer 1884
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1885
        result.write(oprot);
1886
        oprot.writeMessageEnd();
1887
        oprot.getTransport().flush();
1888
      }
1889
 
1890
    }
1891
 
1022 varun.gupt 1892
    private class getOrdersByBillingDate implements ProcessFunction {
1893
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1894
      {
1895
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1896
        args.read(iprot);
1897
        iprot.readMessageEnd();
1898
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1899
        try {
1900
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1901
        } catch (TransactionServiceException ex) {
1902
          result.ex = ex;
1903
        } catch (Throwable th) {
1904
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1905
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1906
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1907
          x.write(oprot);
1908
          oprot.writeMessageEnd();
1909
          oprot.getTransport().flush();
1910
          return;
1911
        }
1912
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1913
        result.write(oprot);
1914
        oprot.writeMessageEnd();
1915
        oprot.getTransport().flush();
1916
      }
1917
 
1918
    }
1919
 
1382 varun.gupt 1920
    private class getReturnableOrdersForCustomer implements ProcessFunction {
1921
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1922
      {
1923
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
1924
        args.read(iprot);
1925
        iprot.readMessageEnd();
1926
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
1927
        try {
1928
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
1929
        } catch (TransactionServiceException ex) {
1930
          result.ex = ex;
1931
        } catch (Throwable th) {
1932
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
1933
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
1934
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1935
          x.write(oprot);
1936
          oprot.writeMessageEnd();
1937
          oprot.getTransport().flush();
1938
          return;
1939
        }
1940
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
1941
        result.write(oprot);
1942
        oprot.writeMessageEnd();
1943
        oprot.getTransport().flush();
1944
      }
1945
 
1946
    }
1947
 
1948
    private class getCancellableOrdersForCustomer implements ProcessFunction {
1949
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1950
      {
1951
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
1952
        args.read(iprot);
1953
        iprot.readMessageEnd();
1954
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
1955
        try {
1956
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
1957
        } catch (TransactionServiceException ex) {
1958
          result.ex = ex;
1959
        } catch (Throwable th) {
1960
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
1961
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
1962
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1963
          x.write(oprot);
1964
          oprot.writeMessageEnd();
1965
          oprot.getTransport().flush();
1966
          return;
1967
        }
1968
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
1969
        result.write(oprot);
1970
        oprot.writeMessageEnd();
1971
        oprot.getTransport().flush();
1972
      }
1973
 
1974
    }
1975
 
483 rajveer 1976
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1977
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1978
      {
483 rajveer 1979
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1980
        args.read(iprot);
1981
        iprot.readMessageEnd();
483 rajveer 1982
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1983
        try {
483 rajveer 1984
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1985
          result.setSuccessIsSet(true);
1986
        } catch (TransactionServiceException ex) {
1987
          result.ex = ex;
1988
        } catch (Throwable th) {
483 rajveer 1989
          LOGGER.error("Internal error processing changeOrderStatus", th);
1990
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1991
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1992
          x.write(oprot);
1993
          oprot.writeMessageEnd();
1994
          oprot.getTransport().flush();
1995
          return;
1996
        }
483 rajveer 1997
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1998
        result.write(oprot);
1999
        oprot.writeMessageEnd();
2000
        oprot.getTransport().flush();
2001
      }
2002
 
2003
    }
2004
 
495 rajveer 2005
    private class addBillingDetails implements ProcessFunction {
2006
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2007
      {
2008
        addBillingDetails_args args = new addBillingDetails_args();
2009
        args.read(iprot);
2010
        iprot.readMessageEnd();
2011
        addBillingDetails_result result = new addBillingDetails_result();
2012
        try {
1148 chandransh 2013
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 2014
          result.setSuccessIsSet(true);
2015
        } catch (TransactionServiceException ex) {
2016
          result.ex = ex;
2017
        } catch (Throwable th) {
2018
          LOGGER.error("Internal error processing addBillingDetails", th);
2019
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
2020
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
2021
          x.write(oprot);
2022
          oprot.writeMessageEnd();
2023
          oprot.getTransport().flush();
2024
          return;
2025
        }
2026
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
2027
        result.write(oprot);
2028
        oprot.writeMessageEnd();
2029
        oprot.getTransport().flush();
2030
      }
2031
 
2032
    }
2033
 
1148 chandransh 2034
    private class addJacketNumber implements ProcessFunction {
2035
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2036
      {
2037
        addJacketNumber_args args = new addJacketNumber_args();
2038
        args.read(iprot);
2039
        iprot.readMessageEnd();
2040
        addJacketNumber_result result = new addJacketNumber_result();
2041
        try {
2383 rajveer 2042
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1148 chandransh 2043
          result.setSuccessIsSet(true);
2044
        } catch (TransactionServiceException ex) {
2045
          result.ex = ex;
2046
        } catch (Throwable th) {
2047
          LOGGER.error("Internal error processing addJacketNumber", th);
2048
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
2049
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
2050
          x.write(oprot);
2051
          oprot.writeMessageEnd();
2052
          oprot.getTransport().flush();
2053
          return;
2054
        }
2055
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
2056
        result.write(oprot);
2057
        oprot.writeMessageEnd();
2058
        oprot.getTransport().flush();
2059
      }
2060
 
2061
    }
2062
 
923 rajveer 2063
    private class acceptOrder implements ProcessFunction {
2064
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2065
      {
2066
        acceptOrder_args args = new acceptOrder_args();
2067
        args.read(iprot);
2068
        iprot.readMessageEnd();
2069
        acceptOrder_result result = new acceptOrder_result();
2070
        try {
2071
          result.success = iface_.acceptOrder(args.orderId);
2072
          result.setSuccessIsSet(true);
2073
        } catch (TransactionServiceException ex) {
2074
          result.ex = ex;
2075
        } catch (Throwable th) {
2076
          LOGGER.error("Internal error processing acceptOrder", th);
2077
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
2078
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
2079
          x.write(oprot);
2080
          oprot.writeMessageEnd();
2081
          oprot.getTransport().flush();
2082
          return;
2083
        }
2084
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
2085
        result.write(oprot);
2086
        oprot.writeMessageEnd();
2087
        oprot.getTransport().flush();
2088
      }
2089
 
2090
    }
2091
 
2092
    private class billOrder implements ProcessFunction {
2093
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2094
      {
2095
        billOrder_args args = new billOrder_args();
2096
        args.read(iprot);
2097
        iprot.readMessageEnd();
2098
        billOrder_result result = new billOrder_result();
2099
        try {
2100
          result.success = iface_.billOrder(args.orderId);
2101
          result.setSuccessIsSet(true);
2102
        } catch (TransactionServiceException ex) {
2103
          result.ex = ex;
2104
        } catch (Throwable th) {
2105
          LOGGER.error("Internal error processing billOrder", th);
2106
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
2107
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
2108
          x.write(oprot);
2109
          oprot.writeMessageEnd();
2110
          oprot.getTransport().flush();
2111
          return;
2112
        }
2113
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
2114
        result.write(oprot);
2115
        oprot.writeMessageEnd();
2116
        oprot.getTransport().flush();
2117
      }
2118
 
2119
    }
2120
 
483 rajveer 2121
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2122
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2123
      {
483 rajveer 2124
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2125
        args.read(iprot);
2126
        iprot.readMessageEnd();
483 rajveer 2127
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2128
        try {
1529 ankur.sing 2129
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2130
        } catch (TransactionServiceException ex) {
2131
          result.ex = ex;
2132
        } catch (Throwable th) {
483 rajveer 2133
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2134
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2135
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2136
          x.write(oprot);
2137
          oprot.writeMessageEnd();
2138
          oprot.getTransport().flush();
2139
          return;
2140
        }
483 rajveer 2141
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2142
        result.write(oprot);
2143
        oprot.writeMessageEnd();
2144
        oprot.getTransport().flush();
2145
      }
2146
 
2147
    }
2148
 
483 rajveer 2149
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2150
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2151
      {
483 rajveer 2152
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2153
        args.read(iprot);
2154
        iprot.readMessageEnd();
483 rajveer 2155
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2156
        try {
483 rajveer 2157
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2158
        } catch (TransactionServiceException ex) {
2159
          result.ex = ex;
2160
        } catch (Throwable th) {
483 rajveer 2161
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2162
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2163
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2164
          x.write(oprot);
2165
          oprot.writeMessageEnd();
2166
          oprot.getTransport().flush();
2167
          return;
2168
        }
483 rajveer 2169
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2170
        result.write(oprot);
2171
        oprot.writeMessageEnd();
2172
        oprot.getTransport().flush();
2173
      }
2174
 
2175
    }
2176
 
483 rajveer 2177
    private class createOrder implements ProcessFunction {
68 ashish 2178
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2179
      {
483 rajveer 2180
        createOrder_args args = new createOrder_args();
68 ashish 2181
        args.read(iprot);
2182
        iprot.readMessageEnd();
483 rajveer 2183
        createOrder_result result = new createOrder_result();
68 ashish 2184
        try {
483 rajveer 2185
          result.success = iface_.createOrder(args.order);
68 ashish 2186
          result.setSuccessIsSet(true);
2187
        } catch (TransactionServiceException ex) {
2188
          result.ex = ex;
2189
        } catch (Throwable th) {
483 rajveer 2190
          LOGGER.error("Internal error processing createOrder", th);
2191
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2192
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2193
          x.write(oprot);
2194
          oprot.writeMessageEnd();
2195
          oprot.getTransport().flush();
2196
          return;
2197
        }
483 rajveer 2198
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2199
        result.write(oprot);
2200
        oprot.writeMessageEnd();
2201
        oprot.getTransport().flush();
2202
      }
2203
 
2204
    }
2205
 
483 rajveer 2206
    private class getOrder implements ProcessFunction {
68 ashish 2207
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2208
      {
483 rajveer 2209
        getOrder_args args = new getOrder_args();
68 ashish 2210
        args.read(iprot);
2211
        iprot.readMessageEnd();
483 rajveer 2212
        getOrder_result result = new getOrder_result();
68 ashish 2213
        try {
483 rajveer 2214
          result.success = iface_.getOrder(args.id);
68 ashish 2215
        } catch (TransactionServiceException ex) {
2216
          result.ex = ex;
2217
        } catch (Throwable th) {
483 rajveer 2218
          LOGGER.error("Internal error processing getOrder", th);
2219
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2220
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2221
          x.write(oprot);
2222
          oprot.writeMessageEnd();
2223
          oprot.getTransport().flush();
2224
          return;
2225
        }
483 rajveer 2226
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2227
        result.write(oprot);
2228
        oprot.writeMessageEnd();
2229
        oprot.getTransport().flush();
2230
      }
2231
 
2232
    }
2233
 
483 rajveer 2234
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2235
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2236
      {
483 rajveer 2237
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2238
        args.read(iprot);
2239
        iprot.readMessageEnd();
483 rajveer 2240
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2241
        try {
483 rajveer 2242
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2243
        } catch (TransactionServiceException ex) {
2244
          result.ex = ex;
2245
        } catch (Throwable th) {
483 rajveer 2246
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2247
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2248
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2249
          x.write(oprot);
2250
          oprot.writeMessageEnd();
2251
          oprot.getTransport().flush();
2252
          return;
2253
        }
483 rajveer 2254
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2255
        result.write(oprot);
2256
        oprot.writeMessageEnd();
2257
        oprot.getTransport().flush();
2258
      }
2259
 
2260
    }
2261
 
1529 ankur.sing 2262
    private class getOrderForCustomer implements ProcessFunction {
2263
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2264
      {
2265
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2266
        args.read(iprot);
2267
        iprot.readMessageEnd();
2268
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2269
        try {
2270
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2271
        } catch (TransactionServiceException ex) {
2272
          result.ex = ex;
2273
        } catch (Throwable th) {
2274
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2275
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2276
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2277
          x.write(oprot);
2278
          oprot.writeMessageEnd();
2279
          oprot.getTransport().flush();
2280
          return;
2281
        }
2282
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2283
        result.write(oprot);
2284
        oprot.writeMessageEnd();
2285
        oprot.getTransport().flush();
2286
      }
2287
 
2288
    }
2289
 
1221 chandransh 2290
    private class batchOrders implements ProcessFunction {
2291
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2292
      {
2293
        batchOrders_args args = new batchOrders_args();
2294
        args.read(iprot);
2295
        iprot.readMessageEnd();
2296
        batchOrders_result result = new batchOrders_result();
2297
        try {
2298
          result.success = iface_.batchOrders(args.warehouseId);
2299
        } catch (TransactionServiceException ex) {
2300
          result.ex = ex;
2301
        } catch (Throwable th) {
2302
          LOGGER.error("Internal error processing batchOrders", th);
2303
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2304
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2305
          x.write(oprot);
2306
          oprot.writeMessageEnd();
2307
          oprot.getTransport().flush();
2308
          return;
2309
        }
2310
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2311
        result.write(oprot);
2312
        oprot.writeMessageEnd();
2313
        oprot.getTransport().flush();
2314
      }
2315
 
2316
    }
2317
 
1209 chandransh 2318
    private class markOrderAsOutOfStock implements ProcessFunction {
2319
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2320
      {
2321
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2322
        args.read(iprot);
2323
        iprot.readMessageEnd();
2324
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2325
        try {
2326
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2327
          result.setSuccessIsSet(true);
2328
        } catch (TransactionServiceException ex) {
2329
          result.ex = ex;
2330
        } catch (Throwable th) {
2331
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2332
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2333
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2334
          x.write(oprot);
2335
          oprot.writeMessageEnd();
2336
          oprot.getTransport().flush();
2337
          return;
2338
        }
2339
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2340
        result.write(oprot);
2341
        oprot.writeMessageEnd();
2342
        oprot.getTransport().flush();
2343
      }
2344
 
2345
    }
2346
 
758 chandransh 2347
    private class markOrdersAsManifested implements ProcessFunction {
2348
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2349
      {
2350
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2351
        args.read(iprot);
2352
        iprot.readMessageEnd();
2353
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2354
        try {
2355
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2356
          result.setSuccessIsSet(true);
2357
        } catch (TransactionServiceException ex) {
2358
          result.ex = ex;
2359
        } catch (Throwable th) {
2360
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2361
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2362
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2363
          x.write(oprot);
2364
          oprot.writeMessageEnd();
2365
          oprot.getTransport().flush();
2366
          return;
2367
        }
2368
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2369
        result.write(oprot);
2370
        oprot.writeMessageEnd();
2371
        oprot.getTransport().flush();
2372
      }
2373
 
2374
    }
2375
 
1114 chandransh 2376
    private class markOrdersAsPickedUp implements ProcessFunction {
2377
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2378
      {
2379
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2380
        args.read(iprot);
2381
        iprot.readMessageEnd();
2382
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2383
        try {
2384
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2385
        } catch (TransactionServiceException ex) {
2386
          result.ex = ex;
2387
        } catch (Throwable th) {
2388
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2389
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2390
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2391
          x.write(oprot);
2392
          oprot.writeMessageEnd();
2393
          oprot.getTransport().flush();
2394
          return;
2395
        }
2396
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2397
        result.write(oprot);
2398
        oprot.writeMessageEnd();
2399
        oprot.getTransport().flush();
2400
      }
2401
 
2402
    }
2403
 
1133 chandransh 2404
    private class markOrdersAsDelivered implements ProcessFunction {
2405
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2406
      {
2407
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2408
        args.read(iprot);
2409
        iprot.readMessageEnd();
2410
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2411
        try {
2412
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2413
        } catch (TransactionServiceException ex) {
2414
          result.ex = ex;
2415
        } catch (Throwable th) {
2416
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2417
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2418
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2419
          x.write(oprot);
2420
          oprot.writeMessageEnd();
2421
          oprot.getTransport().flush();
2422
          return;
2423
        }
2424
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2425
        result.write(oprot);
2426
        oprot.writeMessageEnd();
2427
        oprot.getTransport().flush();
2428
      }
2429
 
2430
    }
2431
 
2432
    private class markOrdersAsFailed implements ProcessFunction {
2433
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2434
      {
2435
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2436
        args.read(iprot);
2437
        iprot.readMessageEnd();
2438
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2439
        try {
2440
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2441
        } catch (TransactionServiceException ex) {
2442
          result.ex = ex;
2443
        } catch (Throwable th) {
2444
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2445
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2446
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2447
          x.write(oprot);
2448
          oprot.writeMessageEnd();
2449
          oprot.getTransport().flush();
2450
          return;
2451
        }
2452
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2453
        result.write(oprot);
2454
        oprot.writeMessageEnd();
2455
        oprot.getTransport().flush();
2456
      }
2457
 
2458
    }
2459
 
1245 chandransh 2460
    private class updateNonDeliveryReason implements ProcessFunction {
2461
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2462
      {
2463
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2464
        args.read(iprot);
2465
        iprot.readMessageEnd();
2466
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2467
        try {
2468
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2469
        } catch (TransactionServiceException ex) {
2470
          result.ex = ex;
2471
        } catch (Throwable th) {
2472
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2473
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2474
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2475
          x.write(oprot);
2476
          oprot.writeMessageEnd();
2477
          oprot.getTransport().flush();
2478
          return;
2479
        }
2480
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2481
        result.write(oprot);
2482
        oprot.writeMessageEnd();
2483
        oprot.getTransport().flush();
2484
      }
2485
 
2486
    }
2487
 
1406 ankur.sing 2488
    private class getUndeliveredOrders implements ProcessFunction {
2489
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2490
      {
2491
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2492
        args.read(iprot);
2493
        iprot.readMessageEnd();
2494
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2495
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2496
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2497
        result.write(oprot);
2498
        oprot.writeMessageEnd();
2499
        oprot.getTransport().flush();
2500
      }
2501
 
2502
    }
2503
 
305 ashish 2504
    private class getAlerts implements ProcessFunction {
2505
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2506
      {
2507
        getAlerts_args args = new getAlerts_args();
2508
        args.read(iprot);
2509
        iprot.readMessageEnd();
2510
        getAlerts_result result = new getAlerts_result();
483 rajveer 2511
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2512
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2513
        result.write(oprot);
2514
        oprot.writeMessageEnd();
2515
        oprot.getTransport().flush();
2516
      }
2517
 
2518
    }
2519
 
2520
    private class setAlert implements ProcessFunction {
2521
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2522
      {
2523
        setAlert_args args = new setAlert_args();
2524
        args.read(iprot);
2525
        iprot.readMessageEnd();
2526
        setAlert_result result = new setAlert_result();
483 rajveer 2527
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2528
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2529
        result.write(oprot);
2530
        oprot.writeMessageEnd();
2531
        oprot.getTransport().flush();
2532
      }
2533
 
2534
    }
2535
 
1598 ankur.sing 2536
    private class getValidOrderCount implements ProcessFunction {
2537
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2538
      {
2539
        getValidOrderCount_args args = new getValidOrderCount_args();
2540
        args.read(iprot);
2541
        iprot.readMessageEnd();
2542
        getValidOrderCount_result result = new getValidOrderCount_result();
2543
        result.success = iface_.getValidOrderCount();
2544
        result.setSuccessIsSet(true);
2545
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
2546
        result.write(oprot);
2547
        oprot.writeMessageEnd();
2548
        oprot.getTransport().flush();
2549
      }
2550
 
2551
    }
2552
 
1629 ankur.sing 2553
    private class getNoOfCustomersWithSuccessfulTransaction implements ProcessFunction {
2554
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2555
      {
2556
        getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
2557
        args.read(iprot);
2558
        iprot.readMessageEnd();
2559
        getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
2560
        result.success = iface_.getNoOfCustomersWithSuccessfulTransaction();
2561
        result.setSuccessIsSet(true);
2562
        oprot.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid));
2563
        result.write(oprot);
2564
        oprot.writeMessageEnd();
2565
        oprot.getTransport().flush();
2566
      }
2567
 
2568
    }
2569
 
1731 ankur.sing 2570
    private class getValidOrdersAmountRange implements ProcessFunction {
1629 ankur.sing 2571
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2572
      {
1731 ankur.sing 2573
        getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 2574
        args.read(iprot);
2575
        iprot.readMessageEnd();
1731 ankur.sing 2576
        getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
2577
        result.success = iface_.getValidOrdersAmountRange();
2578
        oprot.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 2579
        result.write(oprot);
2580
        oprot.writeMessageEnd();
2581
        oprot.getTransport().flush();
2582
      }
2583
 
2584
    }
2585
 
1886 ankur.sing 2586
    private class getValidOrders implements ProcessFunction {
2587
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2588
      {
2589
        getValidOrders_args args = new getValidOrders_args();
2590
        args.read(iprot);
2591
        iprot.readMessageEnd();
2592
        getValidOrders_result result = new getValidOrders_result();
2593
        result.success = iface_.getValidOrders(args.limit);
2594
        oprot.writeMessageBegin(new TMessage("getValidOrders", TMessageType.REPLY, seqid));
2595
        result.write(oprot);
2596
        oprot.writeMessageEnd();
2597
        oprot.getTransport().flush();
2598
      }
2599
 
2600
    }
2601
 
68 ashish 2602
  }
2603
 
764 rajveer 2604
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2605
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2606
 
2607
 
2608
 
2609
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2610
    public enum _Fields implements TFieldIdEnum {
2611
;
2612
 
2613
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2614
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2615
 
2616
      static {
2617
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2618
          byId.put((int)field._thriftId, field);
2619
          byName.put(field.getFieldName(), field);
2620
        }
2621
      }
2622
 
2623
      /**
2624
       * Find the _Fields constant that matches fieldId, or null if its not found.
2625
       */
2626
      public static _Fields findByThriftId(int fieldId) {
2627
        return byId.get(fieldId);
2628
      }
2629
 
2630
      /**
2631
       * Find the _Fields constant that matches fieldId, throwing an exception
2632
       * if it is not found.
2633
       */
2634
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2635
        _Fields fields = findByThriftId(fieldId);
2636
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2637
        return fields;
2638
      }
2639
 
2640
      /**
2641
       * Find the _Fields constant that matches name, or null if its not found.
2642
       */
2643
      public static _Fields findByName(String name) {
2644
        return byName.get(name);
2645
      }
2646
 
2647
      private final short _thriftId;
2648
      private final String _fieldName;
2649
 
2650
      _Fields(short thriftId, String fieldName) {
2651
        _thriftId = thriftId;
2652
        _fieldName = fieldName;
2653
      }
2654
 
2655
      public short getThriftFieldId() {
2656
        return _thriftId;
2657
      }
2658
 
2659
      public String getFieldName() {
2660
        return _fieldName;
2661
      }
2662
    }
2663
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2664
    }});
2665
 
2666
    static {
2667
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2668
    }
2669
 
2670
    public closeSession_args() {
2671
    }
2672
 
2673
    /**
2674
     * Performs a deep copy on <i>other</i>.
2675
     */
2676
    public closeSession_args(closeSession_args other) {
2677
    }
2678
 
2679
    public closeSession_args deepCopy() {
2680
      return new closeSession_args(this);
2681
    }
2682
 
2683
    @Deprecated
2684
    public closeSession_args clone() {
2685
      return new closeSession_args(this);
2686
    }
2687
 
2688
    public void setFieldValue(_Fields field, Object value) {
2689
      switch (field) {
2690
      }
2691
    }
2692
 
2693
    public void setFieldValue(int fieldID, Object value) {
2694
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2695
    }
2696
 
2697
    public Object getFieldValue(_Fields field) {
2698
      switch (field) {
2699
      }
2700
      throw new IllegalStateException();
2701
    }
2702
 
2703
    public Object getFieldValue(int fieldId) {
2704
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2705
    }
2706
 
2707
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2708
    public boolean isSet(_Fields field) {
2709
      switch (field) {
2710
      }
2711
      throw new IllegalStateException();
2712
    }
2713
 
2714
    public boolean isSet(int fieldID) {
2715
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2716
    }
2717
 
2718
    @Override
2719
    public boolean equals(Object that) {
2720
      if (that == null)
2721
        return false;
2722
      if (that instanceof closeSession_args)
2723
        return this.equals((closeSession_args)that);
2724
      return false;
2725
    }
2726
 
2727
    public boolean equals(closeSession_args that) {
2728
      if (that == null)
2729
        return false;
2730
 
2731
      return true;
2732
    }
2733
 
2734
    @Override
2735
    public int hashCode() {
2736
      return 0;
2737
    }
2738
 
2739
    public int compareTo(closeSession_args other) {
2740
      if (!getClass().equals(other.getClass())) {
2741
        return getClass().getName().compareTo(other.getClass().getName());
2742
      }
2743
 
2744
      int lastComparison = 0;
2745
      closeSession_args typedOther = (closeSession_args)other;
2746
 
2747
      return 0;
2748
    }
2749
 
2750
    public void read(TProtocol iprot) throws TException {
2751
      TField field;
2752
      iprot.readStructBegin();
2753
      while (true)
2754
      {
2755
        field = iprot.readFieldBegin();
2756
        if (field.type == TType.STOP) { 
2757
          break;
2758
        }
2759
        _Fields fieldId = _Fields.findByThriftId(field.id);
2760
        if (fieldId == null) {
2761
          TProtocolUtil.skip(iprot, field.type);
2762
        } else {
2763
          switch (fieldId) {
2764
          }
2765
          iprot.readFieldEnd();
2766
        }
2767
      }
2768
      iprot.readStructEnd();
2769
      validate();
2770
    }
2771
 
2772
    public void write(TProtocol oprot) throws TException {
2773
      validate();
2774
 
2775
      oprot.writeStructBegin(STRUCT_DESC);
2776
      oprot.writeFieldStop();
2777
      oprot.writeStructEnd();
2778
    }
2779
 
2780
    @Override
2781
    public String toString() {
2782
      StringBuilder sb = new StringBuilder("closeSession_args(");
2783
      boolean first = true;
2784
 
2785
      sb.append(")");
2786
      return sb.toString();
2787
    }
2788
 
2789
    public void validate() throws TException {
2790
      // check for required fields
2791
    }
2792
 
2793
  }
2794
 
2795
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2796
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2797
 
2798
 
2799
 
2800
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2801
    public enum _Fields implements TFieldIdEnum {
2802
;
2803
 
2804
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2805
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2806
 
2807
      static {
2808
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2809
          byId.put((int)field._thriftId, field);
2810
          byName.put(field.getFieldName(), field);
2811
        }
2812
      }
2813
 
2814
      /**
2815
       * Find the _Fields constant that matches fieldId, or null if its not found.
2816
       */
2817
      public static _Fields findByThriftId(int fieldId) {
2818
        return byId.get(fieldId);
2819
      }
2820
 
2821
      /**
2822
       * Find the _Fields constant that matches fieldId, throwing an exception
2823
       * if it is not found.
2824
       */
2825
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2826
        _Fields fields = findByThriftId(fieldId);
2827
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2828
        return fields;
2829
      }
2830
 
2831
      /**
2832
       * Find the _Fields constant that matches name, or null if its not found.
2833
       */
2834
      public static _Fields findByName(String name) {
2835
        return byName.get(name);
2836
      }
2837
 
2838
      private final short _thriftId;
2839
      private final String _fieldName;
2840
 
2841
      _Fields(short thriftId, String fieldName) {
2842
        _thriftId = thriftId;
2843
        _fieldName = fieldName;
2844
      }
2845
 
2846
      public short getThriftFieldId() {
2847
        return _thriftId;
2848
      }
2849
 
2850
      public String getFieldName() {
2851
        return _fieldName;
2852
      }
2853
    }
2854
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2855
    }});
2856
 
2857
    static {
2858
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2859
    }
2860
 
2861
    public closeSession_result() {
2862
    }
2863
 
2864
    /**
2865
     * Performs a deep copy on <i>other</i>.
2866
     */
2867
    public closeSession_result(closeSession_result other) {
2868
    }
2869
 
2870
    public closeSession_result deepCopy() {
2871
      return new closeSession_result(this);
2872
    }
2873
 
2874
    @Deprecated
2875
    public closeSession_result clone() {
2876
      return new closeSession_result(this);
2877
    }
2878
 
2879
    public void setFieldValue(_Fields field, Object value) {
2880
      switch (field) {
2881
      }
2882
    }
2883
 
2884
    public void setFieldValue(int fieldID, Object value) {
2885
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2886
    }
2887
 
2888
    public Object getFieldValue(_Fields field) {
2889
      switch (field) {
2890
      }
2891
      throw new IllegalStateException();
2892
    }
2893
 
2894
    public Object getFieldValue(int fieldId) {
2895
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2896
    }
2897
 
2898
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2899
    public boolean isSet(_Fields field) {
2900
      switch (field) {
2901
      }
2902
      throw new IllegalStateException();
2903
    }
2904
 
2905
    public boolean isSet(int fieldID) {
2906
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2907
    }
2908
 
2909
    @Override
2910
    public boolean equals(Object that) {
2911
      if (that == null)
2912
        return false;
2913
      if (that instanceof closeSession_result)
2914
        return this.equals((closeSession_result)that);
2915
      return false;
2916
    }
2917
 
2918
    public boolean equals(closeSession_result that) {
2919
      if (that == null)
2920
        return false;
2921
 
2922
      return true;
2923
    }
2924
 
2925
    @Override
2926
    public int hashCode() {
2927
      return 0;
2928
    }
2929
 
2930
    public int compareTo(closeSession_result other) {
2931
      if (!getClass().equals(other.getClass())) {
2932
        return getClass().getName().compareTo(other.getClass().getName());
2933
      }
2934
 
2935
      int lastComparison = 0;
2936
      closeSession_result typedOther = (closeSession_result)other;
2937
 
2938
      return 0;
2939
    }
2940
 
2941
    public void read(TProtocol iprot) throws TException {
2942
      TField field;
2943
      iprot.readStructBegin();
2944
      while (true)
2945
      {
2946
        field = iprot.readFieldBegin();
2947
        if (field.type == TType.STOP) { 
2948
          break;
2949
        }
2950
        _Fields fieldId = _Fields.findByThriftId(field.id);
2951
        if (fieldId == null) {
2952
          TProtocolUtil.skip(iprot, field.type);
2953
        } else {
2954
          switch (fieldId) {
2955
          }
2956
          iprot.readFieldEnd();
2957
        }
2958
      }
2959
      iprot.readStructEnd();
2960
      validate();
2961
    }
2962
 
2963
    public void write(TProtocol oprot) throws TException {
2964
      oprot.writeStructBegin(STRUCT_DESC);
2965
 
2966
      oprot.writeFieldStop();
2967
      oprot.writeStructEnd();
2968
    }
2969
 
2970
    @Override
2971
    public String toString() {
2972
      StringBuilder sb = new StringBuilder("closeSession_result(");
2973
      boolean first = true;
2974
 
2975
      sb.append(")");
2976
      return sb.toString();
2977
    }
2978
 
2979
    public void validate() throws TException {
2980
      // check for required fields
2981
    }
2982
 
2983
  }
2984
 
684 chandransh 2985
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2986
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2987
 
2988
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2989
 
2990
    private Transaction transaction;
2991
 
2992
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2993
    public enum _Fields implements TFieldIdEnum {
2994
      TRANSACTION((short)1, "transaction");
2995
 
2996
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2997
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2998
 
2999
      static {
3000
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3001
          byId.put((int)field._thriftId, field);
3002
          byName.put(field.getFieldName(), field);
3003
        }
3004
      }
3005
 
3006
      /**
3007
       * Find the _Fields constant that matches fieldId, or null if its not found.
3008
       */
3009
      public static _Fields findByThriftId(int fieldId) {
3010
        return byId.get(fieldId);
3011
      }
3012
 
3013
      /**
3014
       * Find the _Fields constant that matches fieldId, throwing an exception
3015
       * if it is not found.
3016
       */
3017
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3018
        _Fields fields = findByThriftId(fieldId);
3019
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3020
        return fields;
3021
      }
3022
 
3023
      /**
3024
       * Find the _Fields constant that matches name, or null if its not found.
3025
       */
3026
      public static _Fields findByName(String name) {
3027
        return byName.get(name);
3028
      }
3029
 
3030
      private final short _thriftId;
3031
      private final String _fieldName;
3032
 
3033
      _Fields(short thriftId, String fieldName) {
3034
        _thriftId = thriftId;
3035
        _fieldName = fieldName;
3036
      }
3037
 
3038
      public short getThriftFieldId() {
3039
        return _thriftId;
3040
      }
3041
 
3042
      public String getFieldName() {
3043
        return _fieldName;
3044
      }
3045
    }
3046
 
3047
    // isset id assignments
3048
 
3049
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3050
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
3051
          new StructMetaData(TType.STRUCT, Transaction.class)));
3052
    }});
3053
 
3054
    static {
3055
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
3056
    }
3057
 
3058
    public createTransaction_args() {
3059
    }
3060
 
3061
    public createTransaction_args(
3062
      Transaction transaction)
3063
    {
3064
      this();
3065
      this.transaction = transaction;
3066
    }
3067
 
3068
    /**
3069
     * Performs a deep copy on <i>other</i>.
3070
     */
3071
    public createTransaction_args(createTransaction_args other) {
3072
      if (other.isSetTransaction()) {
3073
        this.transaction = new Transaction(other.transaction);
3074
      }
3075
    }
3076
 
3077
    public createTransaction_args deepCopy() {
3078
      return new createTransaction_args(this);
3079
    }
3080
 
3081
    @Deprecated
3082
    public createTransaction_args clone() {
3083
      return new createTransaction_args(this);
3084
    }
3085
 
3086
    public Transaction getTransaction() {
3087
      return this.transaction;
3088
    }
3089
 
3090
    public createTransaction_args setTransaction(Transaction transaction) {
3091
      this.transaction = transaction;
3092
      return this;
3093
    }
3094
 
3095
    public void unsetTransaction() {
3096
      this.transaction = null;
3097
    }
3098
 
3099
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
3100
    public boolean isSetTransaction() {
3101
      return this.transaction != null;
3102
    }
3103
 
3104
    public void setTransactionIsSet(boolean value) {
3105
      if (!value) {
3106
        this.transaction = null;
3107
      }
3108
    }
3109
 
3110
    public void setFieldValue(_Fields field, Object value) {
3111
      switch (field) {
3112
      case TRANSACTION:
3113
        if (value == null) {
3114
          unsetTransaction();
3115
        } else {
3116
          setTransaction((Transaction)value);
3117
        }
3118
        break;
3119
 
3120
      }
3121
    }
3122
 
3123
    public void setFieldValue(int fieldID, Object value) {
3124
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3125
    }
3126
 
3127
    public Object getFieldValue(_Fields field) {
3128
      switch (field) {
3129
      case TRANSACTION:
3130
        return getTransaction();
3131
 
3132
      }
3133
      throw new IllegalStateException();
3134
    }
3135
 
3136
    public Object getFieldValue(int fieldId) {
3137
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3138
    }
3139
 
3140
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3141
    public boolean isSet(_Fields field) {
3142
      switch (field) {
3143
      case TRANSACTION:
3144
        return isSetTransaction();
3145
      }
3146
      throw new IllegalStateException();
3147
    }
3148
 
3149
    public boolean isSet(int fieldID) {
3150
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3151
    }
3152
 
3153
    @Override
3154
    public boolean equals(Object that) {
3155
      if (that == null)
3156
        return false;
3157
      if (that instanceof createTransaction_args)
3158
        return this.equals((createTransaction_args)that);
3159
      return false;
3160
    }
3161
 
3162
    public boolean equals(createTransaction_args that) {
3163
      if (that == null)
3164
        return false;
3165
 
3166
      boolean this_present_transaction = true && this.isSetTransaction();
3167
      boolean that_present_transaction = true && that.isSetTransaction();
3168
      if (this_present_transaction || that_present_transaction) {
3169
        if (!(this_present_transaction && that_present_transaction))
3170
          return false;
3171
        if (!this.transaction.equals(that.transaction))
3172
          return false;
3173
      }
3174
 
3175
      return true;
3176
    }
3177
 
3178
    @Override
3179
    public int hashCode() {
3180
      return 0;
3181
    }
3182
 
684 chandransh 3183
    public int compareTo(createTransaction_args other) {
3184
      if (!getClass().equals(other.getClass())) {
3185
        return getClass().getName().compareTo(other.getClass().getName());
3186
      }
3187
 
3188
      int lastComparison = 0;
3189
      createTransaction_args typedOther = (createTransaction_args)other;
3190
 
3191
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
3192
      if (lastComparison != 0) {
3193
        return lastComparison;
3194
      }
3195
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
3196
      if (lastComparison != 0) {
3197
        return lastComparison;
3198
      }
3199
      return 0;
3200
    }
3201
 
68 ashish 3202
    public void read(TProtocol iprot) throws TException {
3203
      TField field;
3204
      iprot.readStructBegin();
3205
      while (true)
3206
      {
3207
        field = iprot.readFieldBegin();
3208
        if (field.type == TType.STOP) { 
3209
          break;
3210
        }
3211
        _Fields fieldId = _Fields.findByThriftId(field.id);
3212
        if (fieldId == null) {
3213
          TProtocolUtil.skip(iprot, field.type);
3214
        } else {
3215
          switch (fieldId) {
3216
            case TRANSACTION:
3217
              if (field.type == TType.STRUCT) {
3218
                this.transaction = new Transaction();
3219
                this.transaction.read(iprot);
3220
              } else { 
3221
                TProtocolUtil.skip(iprot, field.type);
3222
              }
3223
              break;
3224
          }
3225
          iprot.readFieldEnd();
3226
        }
3227
      }
3228
      iprot.readStructEnd();
3229
      validate();
3230
    }
3231
 
3232
    public void write(TProtocol oprot) throws TException {
3233
      validate();
3234
 
3235
      oprot.writeStructBegin(STRUCT_DESC);
3236
      if (this.transaction != null) {
3237
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
3238
        this.transaction.write(oprot);
3239
        oprot.writeFieldEnd();
3240
      }
3241
      oprot.writeFieldStop();
3242
      oprot.writeStructEnd();
3243
    }
3244
 
3245
    @Override
3246
    public String toString() {
3247
      StringBuilder sb = new StringBuilder("createTransaction_args(");
3248
      boolean first = true;
3249
 
3250
      sb.append("transaction:");
3251
      if (this.transaction == null) {
3252
        sb.append("null");
3253
      } else {
3254
        sb.append(this.transaction);
3255
      }
3256
      first = false;
3257
      sb.append(")");
3258
      return sb.toString();
3259
    }
3260
 
3261
    public void validate() throws TException {
3262
      // check for required fields
3263
    }
3264
 
3265
  }
3266
 
3267
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
3268
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
3269
 
132 ashish 3270
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 3271
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3272
 
132 ashish 3273
    private long success;
68 ashish 3274
    private TransactionServiceException ex;
3275
 
3276
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3277
    public enum _Fields implements TFieldIdEnum {
132 ashish 3278
      SUCCESS((short)0, "success"),
68 ashish 3279
      EX((short)1, "ex");
3280
 
3281
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3282
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3283
 
3284
      static {
3285
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3286
          byId.put((int)field._thriftId, field);
3287
          byName.put(field.getFieldName(), field);
3288
        }
3289
      }
3290
 
3291
      /**
3292
       * Find the _Fields constant that matches fieldId, or null if its not found.
3293
       */
3294
      public static _Fields findByThriftId(int fieldId) {
3295
        return byId.get(fieldId);
3296
      }
3297
 
3298
      /**
3299
       * Find the _Fields constant that matches fieldId, throwing an exception
3300
       * if it is not found.
3301
       */
3302
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3303
        _Fields fields = findByThriftId(fieldId);
3304
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3305
        return fields;
3306
      }
3307
 
3308
      /**
3309
       * Find the _Fields constant that matches name, or null if its not found.
3310
       */
3311
      public static _Fields findByName(String name) {
3312
        return byName.get(name);
3313
      }
3314
 
3315
      private final short _thriftId;
3316
      private final String _fieldName;
3317
 
3318
      _Fields(short thriftId, String fieldName) {
3319
        _thriftId = thriftId;
3320
        _fieldName = fieldName;
3321
      }
3322
 
3323
      public short getThriftFieldId() {
3324
        return _thriftId;
3325
      }
3326
 
3327
      public String getFieldName() {
3328
        return _fieldName;
3329
      }
3330
    }
3331
 
3332
    // isset id assignments
132 ashish 3333
    private static final int __SUCCESS_ISSET_ID = 0;
3334
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3335
 
3336
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3337
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3338
          new FieldValueMetaData(TType.I64)));
68 ashish 3339
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3340
          new FieldValueMetaData(TType.STRUCT)));
3341
    }});
3342
 
3343
    static {
3344
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3345
    }
3346
 
3347
    public createTransaction_result() {
3348
    }
3349
 
3350
    public createTransaction_result(
132 ashish 3351
      long success,
68 ashish 3352
      TransactionServiceException ex)
3353
    {
3354
      this();
132 ashish 3355
      this.success = success;
3356
      setSuccessIsSet(true);
68 ashish 3357
      this.ex = ex;
3358
    }
3359
 
3360
    /**
3361
     * Performs a deep copy on <i>other</i>.
3362
     */
3363
    public createTransaction_result(createTransaction_result other) {
132 ashish 3364
      __isset_bit_vector.clear();
3365
      __isset_bit_vector.or(other.__isset_bit_vector);
3366
      this.success = other.success;
68 ashish 3367
      if (other.isSetEx()) {
3368
        this.ex = new TransactionServiceException(other.ex);
3369
      }
3370
    }
3371
 
3372
    public createTransaction_result deepCopy() {
3373
      return new createTransaction_result(this);
3374
    }
3375
 
3376
    @Deprecated
3377
    public createTransaction_result clone() {
3378
      return new createTransaction_result(this);
3379
    }
3380
 
132 ashish 3381
    public long getSuccess() {
3382
      return this.success;
3383
    }
3384
 
3385
    public createTransaction_result setSuccess(long success) {
3386
      this.success = success;
3387
      setSuccessIsSet(true);
3388
      return this;
3389
    }
3390
 
3391
    public void unsetSuccess() {
3392
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3393
    }
3394
 
3395
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3396
    public boolean isSetSuccess() {
3397
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3398
    }
3399
 
3400
    public void setSuccessIsSet(boolean value) {
3401
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3402
    }
3403
 
68 ashish 3404
    public TransactionServiceException getEx() {
3405
      return this.ex;
3406
    }
3407
 
3408
    public createTransaction_result setEx(TransactionServiceException ex) {
3409
      this.ex = ex;
3410
      return this;
3411
    }
3412
 
3413
    public void unsetEx() {
3414
      this.ex = null;
3415
    }
3416
 
3417
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3418
    public boolean isSetEx() {
3419
      return this.ex != null;
3420
    }
3421
 
3422
    public void setExIsSet(boolean value) {
3423
      if (!value) {
3424
        this.ex = null;
3425
      }
3426
    }
3427
 
3428
    public void setFieldValue(_Fields field, Object value) {
3429
      switch (field) {
132 ashish 3430
      case SUCCESS:
3431
        if (value == null) {
3432
          unsetSuccess();
3433
        } else {
3434
          setSuccess((Long)value);
3435
        }
3436
        break;
3437
 
68 ashish 3438
      case EX:
3439
        if (value == null) {
3440
          unsetEx();
3441
        } else {
3442
          setEx((TransactionServiceException)value);
3443
        }
3444
        break;
3445
 
3446
      }
3447
    }
3448
 
3449
    public void setFieldValue(int fieldID, Object value) {
3450
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3451
    }
3452
 
3453
    public Object getFieldValue(_Fields field) {
3454
      switch (field) {
132 ashish 3455
      case SUCCESS:
3456
        return new Long(getSuccess());
3457
 
68 ashish 3458
      case EX:
3459
        return getEx();
3460
 
3461
      }
3462
      throw new IllegalStateException();
3463
    }
3464
 
3465
    public Object getFieldValue(int fieldId) {
3466
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3467
    }
3468
 
3469
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3470
    public boolean isSet(_Fields field) {
3471
      switch (field) {
132 ashish 3472
      case SUCCESS:
3473
        return isSetSuccess();
68 ashish 3474
      case EX:
3475
        return isSetEx();
3476
      }
3477
      throw new IllegalStateException();
3478
    }
3479
 
3480
    public boolean isSet(int fieldID) {
3481
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3482
    }
3483
 
3484
    @Override
3485
    public boolean equals(Object that) {
3486
      if (that == null)
3487
        return false;
3488
      if (that instanceof createTransaction_result)
3489
        return this.equals((createTransaction_result)that);
3490
      return false;
3491
    }
3492
 
3493
    public boolean equals(createTransaction_result that) {
3494
      if (that == null)
3495
        return false;
3496
 
132 ashish 3497
      boolean this_present_success = true;
3498
      boolean that_present_success = true;
3499
      if (this_present_success || that_present_success) {
3500
        if (!(this_present_success && that_present_success))
3501
          return false;
3502
        if (this.success != that.success)
3503
          return false;
3504
      }
3505
 
68 ashish 3506
      boolean this_present_ex = true && this.isSetEx();
3507
      boolean that_present_ex = true && that.isSetEx();
3508
      if (this_present_ex || that_present_ex) {
3509
        if (!(this_present_ex && that_present_ex))
3510
          return false;
3511
        if (!this.ex.equals(that.ex))
3512
          return false;
3513
      }
3514
 
3515
      return true;
3516
    }
3517
 
3518
    @Override
3519
    public int hashCode() {
3520
      return 0;
3521
    }
3522
 
3523
    public int compareTo(createTransaction_result other) {
3524
      if (!getClass().equals(other.getClass())) {
3525
        return getClass().getName().compareTo(other.getClass().getName());
3526
      }
3527
 
3528
      int lastComparison = 0;
3529
      createTransaction_result typedOther = (createTransaction_result)other;
3530
 
132 ashish 3531
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3532
      if (lastComparison != 0) {
3533
        return lastComparison;
3534
      }
3535
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3536
      if (lastComparison != 0) {
3537
        return lastComparison;
3538
      }
68 ashish 3539
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3540
      if (lastComparison != 0) {
3541
        return lastComparison;
3542
      }
3543
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3544
      if (lastComparison != 0) {
3545
        return lastComparison;
3546
      }
3547
      return 0;
3548
    }
3549
 
3550
    public void read(TProtocol iprot) throws TException {
3551
      TField field;
3552
      iprot.readStructBegin();
3553
      while (true)
3554
      {
3555
        field = iprot.readFieldBegin();
3556
        if (field.type == TType.STOP) { 
3557
          break;
3558
        }
3559
        _Fields fieldId = _Fields.findByThriftId(field.id);
3560
        if (fieldId == null) {
3561
          TProtocolUtil.skip(iprot, field.type);
3562
        } else {
3563
          switch (fieldId) {
132 ashish 3564
            case SUCCESS:
3565
              if (field.type == TType.I64) {
3566
                this.success = iprot.readI64();
3567
                setSuccessIsSet(true);
3568
              } else { 
3569
                TProtocolUtil.skip(iprot, field.type);
3570
              }
3571
              break;
68 ashish 3572
            case EX:
3573
              if (field.type == TType.STRUCT) {
3574
                this.ex = new TransactionServiceException();
3575
                this.ex.read(iprot);
3576
              } else { 
3577
                TProtocolUtil.skip(iprot, field.type);
3578
              }
3579
              break;
3580
          }
3581
          iprot.readFieldEnd();
3582
        }
3583
      }
3584
      iprot.readStructEnd();
3585
      validate();
3586
    }
3587
 
3588
    public void write(TProtocol oprot) throws TException {
3589
      oprot.writeStructBegin(STRUCT_DESC);
3590
 
132 ashish 3591
      if (this.isSetSuccess()) {
3592
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3593
        oprot.writeI64(this.success);
3594
        oprot.writeFieldEnd();
3595
      } else if (this.isSetEx()) {
68 ashish 3596
        oprot.writeFieldBegin(EX_FIELD_DESC);
3597
        this.ex.write(oprot);
3598
        oprot.writeFieldEnd();
3599
      }
3600
      oprot.writeFieldStop();
3601
      oprot.writeStructEnd();
3602
    }
3603
 
3604
    @Override
3605
    public String toString() {
3606
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3607
      boolean first = true;
3608
 
132 ashish 3609
      sb.append("success:");
3610
      sb.append(this.success);
3611
      first = false;
3612
      if (!first) sb.append(", ");
68 ashish 3613
      sb.append("ex:");
3614
      if (this.ex == null) {
3615
        sb.append("null");
3616
      } else {
3617
        sb.append(this.ex);
3618
      }
3619
      first = false;
3620
      sb.append(")");
3621
      return sb.toString();
3622
    }
3623
 
3624
    public void validate() throws TException {
3625
      // check for required fields
3626
    }
3627
 
3628
  }
3629
 
3630
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3631
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3632
 
3633
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3634
 
3635
    private long id;
3636
 
3637
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3638
    public enum _Fields implements TFieldIdEnum {
3639
      ID((short)1, "id");
3640
 
3641
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3642
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3643
 
3644
      static {
3645
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3646
          byId.put((int)field._thriftId, field);
3647
          byName.put(field.getFieldName(), field);
3648
        }
3649
      }
3650
 
3651
      /**
3652
       * Find the _Fields constant that matches fieldId, or null if its not found.
3653
       */
3654
      public static _Fields findByThriftId(int fieldId) {
3655
        return byId.get(fieldId);
3656
      }
3657
 
3658
      /**
3659
       * Find the _Fields constant that matches fieldId, throwing an exception
3660
       * if it is not found.
3661
       */
3662
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3663
        _Fields fields = findByThriftId(fieldId);
3664
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3665
        return fields;
3666
      }
3667
 
3668
      /**
3669
       * Find the _Fields constant that matches name, or null if its not found.
3670
       */
3671
      public static _Fields findByName(String name) {
3672
        return byName.get(name);
3673
      }
3674
 
3675
      private final short _thriftId;
3676
      private final String _fieldName;
3677
 
3678
      _Fields(short thriftId, String fieldName) {
3679
        _thriftId = thriftId;
3680
        _fieldName = fieldName;
3681
      }
3682
 
3683
      public short getThriftFieldId() {
3684
        return _thriftId;
3685
      }
3686
 
3687
      public String getFieldName() {
3688
        return _fieldName;
3689
      }
3690
    }
3691
 
3692
    // isset id assignments
3693
    private static final int __ID_ISSET_ID = 0;
3694
    private BitSet __isset_bit_vector = new BitSet(1);
3695
 
3696
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3697
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3698
          new FieldValueMetaData(TType.I64)));
3699
    }});
3700
 
3701
    static {
3702
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3703
    }
3704
 
3705
    public getTransaction_args() {
3706
    }
3707
 
3708
    public getTransaction_args(
3709
      long id)
3710
    {
3711
      this();
3712
      this.id = id;
3713
      setIdIsSet(true);
3714
    }
3715
 
3716
    /**
3717
     * Performs a deep copy on <i>other</i>.
3718
     */
3719
    public getTransaction_args(getTransaction_args other) {
3720
      __isset_bit_vector.clear();
3721
      __isset_bit_vector.or(other.__isset_bit_vector);
3722
      this.id = other.id;
3723
    }
3724
 
3725
    public getTransaction_args deepCopy() {
3726
      return new getTransaction_args(this);
3727
    }
3728
 
3729
    @Deprecated
3730
    public getTransaction_args clone() {
3731
      return new getTransaction_args(this);
3732
    }
3733
 
3734
    public long getId() {
3735
      return this.id;
3736
    }
3737
 
3738
    public getTransaction_args setId(long id) {
3739
      this.id = id;
3740
      setIdIsSet(true);
3741
      return this;
3742
    }
3743
 
3744
    public void unsetId() {
3745
      __isset_bit_vector.clear(__ID_ISSET_ID);
3746
    }
3747
 
3748
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3749
    public boolean isSetId() {
3750
      return __isset_bit_vector.get(__ID_ISSET_ID);
3751
    }
3752
 
3753
    public void setIdIsSet(boolean value) {
3754
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3755
    }
3756
 
3757
    public void setFieldValue(_Fields field, Object value) {
3758
      switch (field) {
3759
      case ID:
3760
        if (value == null) {
3761
          unsetId();
3762
        } else {
3763
          setId((Long)value);
3764
        }
3765
        break;
3766
 
3767
      }
3768
    }
3769
 
3770
    public void setFieldValue(int fieldID, Object value) {
3771
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3772
    }
3773
 
3774
    public Object getFieldValue(_Fields field) {
3775
      switch (field) {
3776
      case ID:
3777
        return new Long(getId());
3778
 
3779
      }
3780
      throw new IllegalStateException();
3781
    }
3782
 
3783
    public Object getFieldValue(int fieldId) {
3784
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3785
    }
3786
 
3787
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3788
    public boolean isSet(_Fields field) {
3789
      switch (field) {
3790
      case ID:
3791
        return isSetId();
3792
      }
3793
      throw new IllegalStateException();
3794
    }
3795
 
3796
    public boolean isSet(int fieldID) {
3797
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3798
    }
3799
 
3800
    @Override
3801
    public boolean equals(Object that) {
3802
      if (that == null)
3803
        return false;
3804
      if (that instanceof getTransaction_args)
3805
        return this.equals((getTransaction_args)that);
3806
      return false;
3807
    }
3808
 
3809
    public boolean equals(getTransaction_args that) {
3810
      if (that == null)
3811
        return false;
3812
 
3813
      boolean this_present_id = true;
3814
      boolean that_present_id = true;
3815
      if (this_present_id || that_present_id) {
3816
        if (!(this_present_id && that_present_id))
3817
          return false;
3818
        if (this.id != that.id)
3819
          return false;
3820
      }
3821
 
3822
      return true;
3823
    }
3824
 
3825
    @Override
3826
    public int hashCode() {
3827
      return 0;
3828
    }
3829
 
3830
    public int compareTo(getTransaction_args other) {
3831
      if (!getClass().equals(other.getClass())) {
3832
        return getClass().getName().compareTo(other.getClass().getName());
3833
      }
3834
 
3835
      int lastComparison = 0;
3836
      getTransaction_args typedOther = (getTransaction_args)other;
3837
 
3838
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3839
      if (lastComparison != 0) {
3840
        return lastComparison;
3841
      }
3842
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3843
      if (lastComparison != 0) {
3844
        return lastComparison;
3845
      }
3846
      return 0;
3847
    }
3848
 
3849
    public void read(TProtocol iprot) throws TException {
3850
      TField field;
3851
      iprot.readStructBegin();
3852
      while (true)
3853
      {
3854
        field = iprot.readFieldBegin();
3855
        if (field.type == TType.STOP) { 
3856
          break;
3857
        }
3858
        _Fields fieldId = _Fields.findByThriftId(field.id);
3859
        if (fieldId == null) {
3860
          TProtocolUtil.skip(iprot, field.type);
3861
        } else {
3862
          switch (fieldId) {
3863
            case ID:
3864
              if (field.type == TType.I64) {
3865
                this.id = iprot.readI64();
3866
                setIdIsSet(true);
3867
              } else { 
3868
                TProtocolUtil.skip(iprot, field.type);
3869
              }
3870
              break;
3871
          }
3872
          iprot.readFieldEnd();
3873
        }
3874
      }
3875
      iprot.readStructEnd();
3876
      validate();
3877
    }
3878
 
3879
    public void write(TProtocol oprot) throws TException {
3880
      validate();
3881
 
3882
      oprot.writeStructBegin(STRUCT_DESC);
3883
      oprot.writeFieldBegin(ID_FIELD_DESC);
3884
      oprot.writeI64(this.id);
3885
      oprot.writeFieldEnd();
3886
      oprot.writeFieldStop();
3887
      oprot.writeStructEnd();
3888
    }
3889
 
3890
    @Override
3891
    public String toString() {
3892
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3893
      boolean first = true;
3894
 
3895
      sb.append("id:");
3896
      sb.append(this.id);
3897
      first = false;
3898
      sb.append(")");
3899
      return sb.toString();
3900
    }
3901
 
3902
    public void validate() throws TException {
3903
      // check for required fields
3904
    }
3905
 
3906
  }
3907
 
684 chandransh 3908
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3909
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3910
 
3911
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3912
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3913
 
3914
    private Transaction success;
3915
    private TransactionServiceException ex;
3916
 
3917
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3918
    public enum _Fields implements TFieldIdEnum {
3919
      SUCCESS((short)0, "success"),
3920
      EX((short)1, "ex");
3921
 
3922
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3923
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3924
 
3925
      static {
3926
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3927
          byId.put((int)field._thriftId, field);
3928
          byName.put(field.getFieldName(), field);
3929
        }
3930
      }
3931
 
3932
      /**
3933
       * Find the _Fields constant that matches fieldId, or null if its not found.
3934
       */
3935
      public static _Fields findByThriftId(int fieldId) {
3936
        return byId.get(fieldId);
3937
      }
3938
 
3939
      /**
3940
       * Find the _Fields constant that matches fieldId, throwing an exception
3941
       * if it is not found.
3942
       */
3943
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3944
        _Fields fields = findByThriftId(fieldId);
3945
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3946
        return fields;
3947
      }
3948
 
3949
      /**
3950
       * Find the _Fields constant that matches name, or null if its not found.
3951
       */
3952
      public static _Fields findByName(String name) {
3953
        return byName.get(name);
3954
      }
3955
 
3956
      private final short _thriftId;
3957
      private final String _fieldName;
3958
 
3959
      _Fields(short thriftId, String fieldName) {
3960
        _thriftId = thriftId;
3961
        _fieldName = fieldName;
3962
      }
3963
 
3964
      public short getThriftFieldId() {
3965
        return _thriftId;
3966
      }
3967
 
3968
      public String getFieldName() {
3969
        return _fieldName;
3970
      }
3971
    }
3972
 
3973
    // isset id assignments
3974
 
3975
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3976
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3977
          new StructMetaData(TType.STRUCT, Transaction.class)));
3978
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3979
          new FieldValueMetaData(TType.STRUCT)));
3980
    }});
3981
 
3982
    static {
3983
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3984
    }
3985
 
3986
    public getTransaction_result() {
3987
    }
3988
 
3989
    public getTransaction_result(
3990
      Transaction success,
3991
      TransactionServiceException ex)
3992
    {
3993
      this();
3994
      this.success = success;
3995
      this.ex = ex;
3996
    }
3997
 
3998
    /**
3999
     * Performs a deep copy on <i>other</i>.
4000
     */
4001
    public getTransaction_result(getTransaction_result other) {
4002
      if (other.isSetSuccess()) {
4003
        this.success = new Transaction(other.success);
4004
      }
4005
      if (other.isSetEx()) {
4006
        this.ex = new TransactionServiceException(other.ex);
4007
      }
4008
    }
4009
 
4010
    public getTransaction_result deepCopy() {
4011
      return new getTransaction_result(this);
4012
    }
4013
 
4014
    @Deprecated
4015
    public getTransaction_result clone() {
4016
      return new getTransaction_result(this);
4017
    }
4018
 
4019
    public Transaction getSuccess() {
4020
      return this.success;
4021
    }
4022
 
4023
    public getTransaction_result setSuccess(Transaction success) {
4024
      this.success = success;
4025
      return this;
4026
    }
4027
 
4028
    public void unsetSuccess() {
4029
      this.success = null;
4030
    }
4031
 
4032
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4033
    public boolean isSetSuccess() {
4034
      return this.success != null;
4035
    }
4036
 
4037
    public void setSuccessIsSet(boolean value) {
4038
      if (!value) {
4039
        this.success = null;
4040
      }
4041
    }
4042
 
4043
    public TransactionServiceException getEx() {
4044
      return this.ex;
4045
    }
4046
 
4047
    public getTransaction_result setEx(TransactionServiceException ex) {
4048
      this.ex = ex;
4049
      return this;
4050
    }
4051
 
4052
    public void unsetEx() {
4053
      this.ex = null;
4054
    }
4055
 
4056
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4057
    public boolean isSetEx() {
4058
      return this.ex != null;
4059
    }
4060
 
4061
    public void setExIsSet(boolean value) {
4062
      if (!value) {
4063
        this.ex = null;
4064
      }
4065
    }
4066
 
4067
    public void setFieldValue(_Fields field, Object value) {
4068
      switch (field) {
4069
      case SUCCESS:
4070
        if (value == null) {
4071
          unsetSuccess();
4072
        } else {
4073
          setSuccess((Transaction)value);
4074
        }
4075
        break;
4076
 
4077
      case EX:
4078
        if (value == null) {
4079
          unsetEx();
4080
        } else {
4081
          setEx((TransactionServiceException)value);
4082
        }
4083
        break;
4084
 
4085
      }
4086
    }
4087
 
4088
    public void setFieldValue(int fieldID, Object value) {
4089
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4090
    }
4091
 
4092
    public Object getFieldValue(_Fields field) {
4093
      switch (field) {
4094
      case SUCCESS:
4095
        return getSuccess();
4096
 
4097
      case EX:
4098
        return getEx();
4099
 
4100
      }
4101
      throw new IllegalStateException();
4102
    }
4103
 
4104
    public Object getFieldValue(int fieldId) {
4105
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4106
    }
4107
 
4108
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4109
    public boolean isSet(_Fields field) {
4110
      switch (field) {
4111
      case SUCCESS:
4112
        return isSetSuccess();
4113
      case EX:
4114
        return isSetEx();
4115
      }
4116
      throw new IllegalStateException();
4117
    }
4118
 
4119
    public boolean isSet(int fieldID) {
4120
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4121
    }
4122
 
4123
    @Override
4124
    public boolean equals(Object that) {
4125
      if (that == null)
4126
        return false;
4127
      if (that instanceof getTransaction_result)
4128
        return this.equals((getTransaction_result)that);
4129
      return false;
4130
    }
4131
 
4132
    public boolean equals(getTransaction_result that) {
4133
      if (that == null)
4134
        return false;
4135
 
4136
      boolean this_present_success = true && this.isSetSuccess();
4137
      boolean that_present_success = true && that.isSetSuccess();
4138
      if (this_present_success || that_present_success) {
4139
        if (!(this_present_success && that_present_success))
4140
          return false;
4141
        if (!this.success.equals(that.success))
4142
          return false;
4143
      }
4144
 
4145
      boolean this_present_ex = true && this.isSetEx();
4146
      boolean that_present_ex = true && that.isSetEx();
4147
      if (this_present_ex || that_present_ex) {
4148
        if (!(this_present_ex && that_present_ex))
4149
          return false;
4150
        if (!this.ex.equals(that.ex))
4151
          return false;
4152
      }
4153
 
4154
      return true;
4155
    }
4156
 
4157
    @Override
4158
    public int hashCode() {
4159
      return 0;
4160
    }
4161
 
684 chandransh 4162
    public int compareTo(getTransaction_result other) {
4163
      if (!getClass().equals(other.getClass())) {
4164
        return getClass().getName().compareTo(other.getClass().getName());
4165
      }
4166
 
4167
      int lastComparison = 0;
4168
      getTransaction_result typedOther = (getTransaction_result)other;
4169
 
4170
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4171
      if (lastComparison != 0) {
4172
        return lastComparison;
4173
      }
4174
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4175
      if (lastComparison != 0) {
4176
        return lastComparison;
4177
      }
4178
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4179
      if (lastComparison != 0) {
4180
        return lastComparison;
4181
      }
4182
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4183
      if (lastComparison != 0) {
4184
        return lastComparison;
4185
      }
4186
      return 0;
4187
    }
4188
 
68 ashish 4189
    public void read(TProtocol iprot) throws TException {
4190
      TField field;
4191
      iprot.readStructBegin();
4192
      while (true)
4193
      {
4194
        field = iprot.readFieldBegin();
4195
        if (field.type == TType.STOP) { 
4196
          break;
4197
        }
4198
        _Fields fieldId = _Fields.findByThriftId(field.id);
4199
        if (fieldId == null) {
4200
          TProtocolUtil.skip(iprot, field.type);
4201
        } else {
4202
          switch (fieldId) {
4203
            case SUCCESS:
4204
              if (field.type == TType.STRUCT) {
4205
                this.success = new Transaction();
4206
                this.success.read(iprot);
4207
              } else { 
4208
                TProtocolUtil.skip(iprot, field.type);
4209
              }
4210
              break;
4211
            case EX:
4212
              if (field.type == TType.STRUCT) {
4213
                this.ex = new TransactionServiceException();
4214
                this.ex.read(iprot);
4215
              } else { 
4216
                TProtocolUtil.skip(iprot, field.type);
4217
              }
4218
              break;
4219
          }
4220
          iprot.readFieldEnd();
4221
        }
4222
      }
4223
      iprot.readStructEnd();
4224
      validate();
4225
    }
4226
 
4227
    public void write(TProtocol oprot) throws TException {
4228
      oprot.writeStructBegin(STRUCT_DESC);
4229
 
4230
      if (this.isSetSuccess()) {
4231
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4232
        this.success.write(oprot);
4233
        oprot.writeFieldEnd();
4234
      } else if (this.isSetEx()) {
4235
        oprot.writeFieldBegin(EX_FIELD_DESC);
4236
        this.ex.write(oprot);
4237
        oprot.writeFieldEnd();
4238
      }
4239
      oprot.writeFieldStop();
4240
      oprot.writeStructEnd();
4241
    }
4242
 
4243
    @Override
4244
    public String toString() {
4245
      StringBuilder sb = new StringBuilder("getTransaction_result(");
4246
      boolean first = true;
4247
 
4248
      sb.append("success:");
4249
      if (this.success == null) {
4250
        sb.append("null");
4251
      } else {
4252
        sb.append(this.success);
4253
      }
4254
      first = false;
4255
      if (!first) sb.append(", ");
4256
      sb.append("ex:");
4257
      if (this.ex == null) {
4258
        sb.append("null");
4259
      } else {
4260
        sb.append(this.ex);
4261
      }
4262
      first = false;
4263
      sb.append(")");
4264
      return sb.toString();
4265
    }
4266
 
4267
    public void validate() throws TException {
4268
      // check for required fields
4269
    }
4270
 
4271
  }
4272
 
4273
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4274
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4275
 
4276
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4277
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4278
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4279
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4280
 
4281
    private long customerId;
132 ashish 4282
    private long from_date;
4283
    private long to_date;
68 ashish 4284
    private TransactionStatus status;
4285
 
4286
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4287
    public enum _Fields implements TFieldIdEnum {
4288
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4289
      FROM_DATE((short)2, "from_date"),
4290
      TO_DATE((short)3, "to_date"),
68 ashish 4291
      /**
4292
       * 
4293
       * @see TransactionStatus
4294
       */
4295
      STATUS((short)4, "status");
4296
 
4297
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4298
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4299
 
4300
      static {
4301
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4302
          byId.put((int)field._thriftId, field);
4303
          byName.put(field.getFieldName(), field);
4304
        }
4305
      }
4306
 
4307
      /**
4308
       * Find the _Fields constant that matches fieldId, or null if its not found.
4309
       */
4310
      public static _Fields findByThriftId(int fieldId) {
4311
        return byId.get(fieldId);
4312
      }
4313
 
4314
      /**
4315
       * Find the _Fields constant that matches fieldId, throwing an exception
4316
       * if it is not found.
4317
       */
4318
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4319
        _Fields fields = findByThriftId(fieldId);
4320
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4321
        return fields;
4322
      }
4323
 
4324
      /**
4325
       * Find the _Fields constant that matches name, or null if its not found.
4326
       */
4327
      public static _Fields findByName(String name) {
4328
        return byName.get(name);
4329
      }
4330
 
4331
      private final short _thriftId;
4332
      private final String _fieldName;
4333
 
4334
      _Fields(short thriftId, String fieldName) {
4335
        _thriftId = thriftId;
4336
        _fieldName = fieldName;
4337
      }
4338
 
4339
      public short getThriftFieldId() {
4340
        return _thriftId;
4341
      }
4342
 
4343
      public String getFieldName() {
4344
        return _fieldName;
4345
      }
4346
    }
4347
 
4348
    // isset id assignments
4349
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4350
    private static final int __FROM_DATE_ISSET_ID = 1;
4351
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4352
    private BitSet __isset_bit_vector = new BitSet(3);
4353
 
4354
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4355
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4356
          new FieldValueMetaData(TType.I64)));
132 ashish 4357
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4358
          new FieldValueMetaData(TType.I64)));
132 ashish 4359
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4360
          new FieldValueMetaData(TType.I64)));
4361
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4362
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4363
    }});
4364
 
4365
    static {
4366
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4367
    }
4368
 
4369
    public getTransactionsForCustomer_args() {
4370
    }
4371
 
4372
    public getTransactionsForCustomer_args(
4373
      long customerId,
132 ashish 4374
      long from_date,
4375
      long to_date,
68 ashish 4376
      TransactionStatus status)
4377
    {
4378
      this();
4379
      this.customerId = customerId;
4380
      setCustomerIdIsSet(true);
132 ashish 4381
      this.from_date = from_date;
4382
      setFrom_dateIsSet(true);
4383
      this.to_date = to_date;
4384
      setTo_dateIsSet(true);
68 ashish 4385
      this.status = status;
4386
    }
4387
 
4388
    /**
4389
     * Performs a deep copy on <i>other</i>.
4390
     */
4391
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4392
      __isset_bit_vector.clear();
4393
      __isset_bit_vector.or(other.__isset_bit_vector);
4394
      this.customerId = other.customerId;
132 ashish 4395
      this.from_date = other.from_date;
4396
      this.to_date = other.to_date;
68 ashish 4397
      if (other.isSetStatus()) {
4398
        this.status = other.status;
4399
      }
4400
    }
4401
 
4402
    public getTransactionsForCustomer_args deepCopy() {
4403
      return new getTransactionsForCustomer_args(this);
4404
    }
4405
 
4406
    @Deprecated
4407
    public getTransactionsForCustomer_args clone() {
4408
      return new getTransactionsForCustomer_args(this);
4409
    }
4410
 
4411
    public long getCustomerId() {
4412
      return this.customerId;
4413
    }
4414
 
4415
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4416
      this.customerId = customerId;
4417
      setCustomerIdIsSet(true);
4418
      return this;
4419
    }
4420
 
4421
    public void unsetCustomerId() {
4422
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4423
    }
4424
 
4425
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4426
    public boolean isSetCustomerId() {
4427
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4428
    }
4429
 
4430
    public void setCustomerIdIsSet(boolean value) {
4431
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4432
    }
4433
 
132 ashish 4434
    public long getFrom_date() {
4435
      return this.from_date;
68 ashish 4436
    }
4437
 
132 ashish 4438
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4439
      this.from_date = from_date;
4440
      setFrom_dateIsSet(true);
68 ashish 4441
      return this;
4442
    }
4443
 
132 ashish 4444
    public void unsetFrom_date() {
4445
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4446
    }
4447
 
132 ashish 4448
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4449
    public boolean isSetFrom_date() {
4450
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4451
    }
4452
 
132 ashish 4453
    public void setFrom_dateIsSet(boolean value) {
4454
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4455
    }
4456
 
132 ashish 4457
    public long getTo_date() {
4458
      return this.to_date;
68 ashish 4459
    }
4460
 
132 ashish 4461
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4462
      this.to_date = to_date;
4463
      setTo_dateIsSet(true);
68 ashish 4464
      return this;
4465
    }
4466
 
132 ashish 4467
    public void unsetTo_date() {
4468
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4469
    }
4470
 
132 ashish 4471
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4472
    public boolean isSetTo_date() {
4473
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4474
    }
4475
 
132 ashish 4476
    public void setTo_dateIsSet(boolean value) {
4477
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4478
    }
4479
 
4480
    /**
4481
     * 
4482
     * @see TransactionStatus
4483
     */
4484
    public TransactionStatus getStatus() {
4485
      return this.status;
4486
    }
4487
 
4488
    /**
4489
     * 
4490
     * @see TransactionStatus
4491
     */
4492
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4493
      this.status = status;
4494
      return this;
4495
    }
4496
 
4497
    public void unsetStatus() {
4498
      this.status = null;
4499
    }
4500
 
4501
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4502
    public boolean isSetStatus() {
4503
      return this.status != null;
4504
    }
4505
 
4506
    public void setStatusIsSet(boolean value) {
4507
      if (!value) {
4508
        this.status = null;
4509
      }
4510
    }
4511
 
4512
    public void setFieldValue(_Fields field, Object value) {
4513
      switch (field) {
4514
      case CUSTOMER_ID:
4515
        if (value == null) {
4516
          unsetCustomerId();
4517
        } else {
4518
          setCustomerId((Long)value);
4519
        }
4520
        break;
4521
 
132 ashish 4522
      case FROM_DATE:
68 ashish 4523
        if (value == null) {
132 ashish 4524
          unsetFrom_date();
68 ashish 4525
        } else {
132 ashish 4526
          setFrom_date((Long)value);
68 ashish 4527
        }
4528
        break;
4529
 
132 ashish 4530
      case TO_DATE:
68 ashish 4531
        if (value == null) {
132 ashish 4532
          unsetTo_date();
68 ashish 4533
        } else {
132 ashish 4534
          setTo_date((Long)value);
68 ashish 4535
        }
4536
        break;
4537
 
4538
      case STATUS:
4539
        if (value == null) {
4540
          unsetStatus();
4541
        } else {
4542
          setStatus((TransactionStatus)value);
4543
        }
4544
        break;
4545
 
4546
      }
4547
    }
4548
 
4549
    public void setFieldValue(int fieldID, Object value) {
4550
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4551
    }
4552
 
4553
    public Object getFieldValue(_Fields field) {
4554
      switch (field) {
4555
      case CUSTOMER_ID:
4556
        return new Long(getCustomerId());
4557
 
132 ashish 4558
      case FROM_DATE:
4559
        return new Long(getFrom_date());
68 ashish 4560
 
132 ashish 4561
      case TO_DATE:
4562
        return new Long(getTo_date());
68 ashish 4563
 
4564
      case STATUS:
4565
        return getStatus();
4566
 
4567
      }
4568
      throw new IllegalStateException();
4569
    }
4570
 
4571
    public Object getFieldValue(int fieldId) {
4572
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4573
    }
4574
 
4575
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4576
    public boolean isSet(_Fields field) {
4577
      switch (field) {
4578
      case CUSTOMER_ID:
4579
        return isSetCustomerId();
132 ashish 4580
      case FROM_DATE:
4581
        return isSetFrom_date();
4582
      case TO_DATE:
4583
        return isSetTo_date();
68 ashish 4584
      case STATUS:
4585
        return isSetStatus();
4586
      }
4587
      throw new IllegalStateException();
4588
    }
4589
 
4590
    public boolean isSet(int fieldID) {
4591
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4592
    }
4593
 
4594
    @Override
4595
    public boolean equals(Object that) {
4596
      if (that == null)
4597
        return false;
4598
      if (that instanceof getTransactionsForCustomer_args)
4599
        return this.equals((getTransactionsForCustomer_args)that);
4600
      return false;
4601
    }
4602
 
4603
    public boolean equals(getTransactionsForCustomer_args that) {
4604
      if (that == null)
4605
        return false;
4606
 
4607
      boolean this_present_customerId = true;
4608
      boolean that_present_customerId = true;
4609
      if (this_present_customerId || that_present_customerId) {
4610
        if (!(this_present_customerId && that_present_customerId))
4611
          return false;
4612
        if (this.customerId != that.customerId)
4613
          return false;
4614
      }
4615
 
132 ashish 4616
      boolean this_present_from_date = true;
4617
      boolean that_present_from_date = true;
4618
      if (this_present_from_date || that_present_from_date) {
4619
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4620
          return false;
132 ashish 4621
        if (this.from_date != that.from_date)
68 ashish 4622
          return false;
4623
      }
4624
 
132 ashish 4625
      boolean this_present_to_date = true;
4626
      boolean that_present_to_date = true;
4627
      if (this_present_to_date || that_present_to_date) {
4628
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4629
          return false;
132 ashish 4630
        if (this.to_date != that.to_date)
68 ashish 4631
          return false;
4632
      }
4633
 
4634
      boolean this_present_status = true && this.isSetStatus();
4635
      boolean that_present_status = true && that.isSetStatus();
4636
      if (this_present_status || that_present_status) {
4637
        if (!(this_present_status && that_present_status))
4638
          return false;
4639
        if (!this.status.equals(that.status))
4640
          return false;
4641
      }
4642
 
4643
      return true;
4644
    }
4645
 
4646
    @Override
4647
    public int hashCode() {
4648
      return 0;
4649
    }
4650
 
4651
    public int compareTo(getTransactionsForCustomer_args other) {
4652
      if (!getClass().equals(other.getClass())) {
4653
        return getClass().getName().compareTo(other.getClass().getName());
4654
      }
4655
 
4656
      int lastComparison = 0;
4657
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4658
 
4659
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4660
      if (lastComparison != 0) {
4661
        return lastComparison;
4662
      }
4663
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4664
      if (lastComparison != 0) {
4665
        return lastComparison;
4666
      }
132 ashish 4667
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4668
      if (lastComparison != 0) {
4669
        return lastComparison;
4670
      }
132 ashish 4671
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4672
      if (lastComparison != 0) {
4673
        return lastComparison;
4674
      }
132 ashish 4675
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4676
      if (lastComparison != 0) {
4677
        return lastComparison;
4678
      }
132 ashish 4679
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4680
      if (lastComparison != 0) {
4681
        return lastComparison;
4682
      }
4683
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4684
      if (lastComparison != 0) {
4685
        return lastComparison;
4686
      }
4687
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4688
      if (lastComparison != 0) {
4689
        return lastComparison;
4690
      }
4691
      return 0;
4692
    }
4693
 
4694
    public void read(TProtocol iprot) throws TException {
4695
      TField field;
4696
      iprot.readStructBegin();
4697
      while (true)
4698
      {
4699
        field = iprot.readFieldBegin();
4700
        if (field.type == TType.STOP) { 
4701
          break;
4702
        }
4703
        _Fields fieldId = _Fields.findByThriftId(field.id);
4704
        if (fieldId == null) {
4705
          TProtocolUtil.skip(iprot, field.type);
4706
        } else {
4707
          switch (fieldId) {
4708
            case CUSTOMER_ID:
4709
              if (field.type == TType.I64) {
4710
                this.customerId = iprot.readI64();
4711
                setCustomerIdIsSet(true);
4712
              } else { 
4713
                TProtocolUtil.skip(iprot, field.type);
4714
              }
4715
              break;
132 ashish 4716
            case FROM_DATE:
68 ashish 4717
              if (field.type == TType.I64) {
132 ashish 4718
                this.from_date = iprot.readI64();
4719
                setFrom_dateIsSet(true);
68 ashish 4720
              } else { 
4721
                TProtocolUtil.skip(iprot, field.type);
4722
              }
4723
              break;
132 ashish 4724
            case TO_DATE:
68 ashish 4725
              if (field.type == TType.I64) {
132 ashish 4726
                this.to_date = iprot.readI64();
4727
                setTo_dateIsSet(true);
68 ashish 4728
              } else { 
4729
                TProtocolUtil.skip(iprot, field.type);
4730
              }
4731
              break;
4732
            case STATUS:
4733
              if (field.type == TType.I32) {
4734
                this.status = TransactionStatus.findByValue(iprot.readI32());
4735
              } else { 
4736
                TProtocolUtil.skip(iprot, field.type);
4737
              }
4738
              break;
4739
          }
4740
          iprot.readFieldEnd();
4741
        }
4742
      }
4743
      iprot.readStructEnd();
4744
      validate();
4745
    }
4746
 
4747
    public void write(TProtocol oprot) throws TException {
4748
      validate();
4749
 
4750
      oprot.writeStructBegin(STRUCT_DESC);
4751
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4752
      oprot.writeI64(this.customerId);
4753
      oprot.writeFieldEnd();
132 ashish 4754
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4755
      oprot.writeI64(this.from_date);
68 ashish 4756
      oprot.writeFieldEnd();
132 ashish 4757
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4758
      oprot.writeI64(this.to_date);
68 ashish 4759
      oprot.writeFieldEnd();
4760
      if (this.status != null) {
4761
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4762
        oprot.writeI32(this.status.getValue());
4763
        oprot.writeFieldEnd();
4764
      }
4765
      oprot.writeFieldStop();
4766
      oprot.writeStructEnd();
4767
    }
4768
 
4769
    @Override
4770
    public String toString() {
4771
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4772
      boolean first = true;
4773
 
4774
      sb.append("customerId:");
4775
      sb.append(this.customerId);
4776
      first = false;
4777
      if (!first) sb.append(", ");
132 ashish 4778
      sb.append("from_date:");
4779
      sb.append(this.from_date);
68 ashish 4780
      first = false;
4781
      if (!first) sb.append(", ");
132 ashish 4782
      sb.append("to_date:");
4783
      sb.append(this.to_date);
68 ashish 4784
      first = false;
4785
      if (!first) sb.append(", ");
4786
      sb.append("status:");
4787
      if (this.status == null) {
4788
        sb.append("null");
4789
      } else {
4790
        String status_name = status.name();
4791
        if (status_name != null) {
4792
          sb.append(status_name);
4793
          sb.append(" (");
4794
        }
4795
        sb.append(this.status);
4796
        if (status_name != null) {
4797
          sb.append(")");
4798
        }
4799
      }
4800
      first = false;
4801
      sb.append(")");
4802
      return sb.toString();
4803
    }
4804
 
4805
    public void validate() throws TException {
4806
      // check for required fields
4807
    }
4808
 
4809
  }
4810
 
684 chandransh 4811
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4812
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4813
 
4814
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4815
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4816
 
4817
    private List<Transaction> success;
4818
    private TransactionServiceException ex;
4819
 
4820
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4821
    public enum _Fields implements TFieldIdEnum {
4822
      SUCCESS((short)0, "success"),
4823
      EX((short)1, "ex");
4824
 
4825
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4826
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4827
 
4828
      static {
4829
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4830
          byId.put((int)field._thriftId, field);
4831
          byName.put(field.getFieldName(), field);
4832
        }
4833
      }
4834
 
4835
      /**
4836
       * Find the _Fields constant that matches fieldId, or null if its not found.
4837
       */
4838
      public static _Fields findByThriftId(int fieldId) {
4839
        return byId.get(fieldId);
4840
      }
4841
 
4842
      /**
4843
       * Find the _Fields constant that matches fieldId, throwing an exception
4844
       * if it is not found.
4845
       */
4846
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4847
        _Fields fields = findByThriftId(fieldId);
4848
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4849
        return fields;
4850
      }
4851
 
4852
      /**
4853
       * Find the _Fields constant that matches name, or null if its not found.
4854
       */
4855
      public static _Fields findByName(String name) {
4856
        return byName.get(name);
4857
      }
4858
 
4859
      private final short _thriftId;
4860
      private final String _fieldName;
4861
 
4862
      _Fields(short thriftId, String fieldName) {
4863
        _thriftId = thriftId;
4864
        _fieldName = fieldName;
4865
      }
4866
 
4867
      public short getThriftFieldId() {
4868
        return _thriftId;
4869
      }
4870
 
4871
      public String getFieldName() {
4872
        return _fieldName;
4873
      }
4874
    }
4875
 
4876
    // isset id assignments
4877
 
4878
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4879
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4880
          new ListMetaData(TType.LIST, 
4881
              new StructMetaData(TType.STRUCT, Transaction.class))));
4882
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4883
          new FieldValueMetaData(TType.STRUCT)));
4884
    }});
4885
 
4886
    static {
4887
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4888
    }
4889
 
4890
    public getTransactionsForCustomer_result() {
4891
    }
4892
 
4893
    public getTransactionsForCustomer_result(
4894
      List<Transaction> success,
4895
      TransactionServiceException ex)
4896
    {
4897
      this();
4898
      this.success = success;
4899
      this.ex = ex;
4900
    }
4901
 
4902
    /**
4903
     * Performs a deep copy on <i>other</i>.
4904
     */
4905
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4906
      if (other.isSetSuccess()) {
4907
        List<Transaction> __this__success = new ArrayList<Transaction>();
4908
        for (Transaction other_element : other.success) {
4909
          __this__success.add(new Transaction(other_element));
4910
        }
4911
        this.success = __this__success;
4912
      }
4913
      if (other.isSetEx()) {
4914
        this.ex = new TransactionServiceException(other.ex);
4915
      }
4916
    }
4917
 
4918
    public getTransactionsForCustomer_result deepCopy() {
4919
      return new getTransactionsForCustomer_result(this);
4920
    }
4921
 
4922
    @Deprecated
4923
    public getTransactionsForCustomer_result clone() {
4924
      return new getTransactionsForCustomer_result(this);
4925
    }
4926
 
4927
    public int getSuccessSize() {
4928
      return (this.success == null) ? 0 : this.success.size();
4929
    }
4930
 
4931
    public java.util.Iterator<Transaction> getSuccessIterator() {
4932
      return (this.success == null) ? null : this.success.iterator();
4933
    }
4934
 
4935
    public void addToSuccess(Transaction elem) {
4936
      if (this.success == null) {
4937
        this.success = new ArrayList<Transaction>();
4938
      }
4939
      this.success.add(elem);
4940
    }
4941
 
4942
    public List<Transaction> getSuccess() {
4943
      return this.success;
4944
    }
4945
 
4946
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4947
      this.success = success;
4948
      return this;
4949
    }
4950
 
4951
    public void unsetSuccess() {
4952
      this.success = null;
4953
    }
4954
 
4955
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4956
    public boolean isSetSuccess() {
4957
      return this.success != null;
4958
    }
4959
 
4960
    public void setSuccessIsSet(boolean value) {
4961
      if (!value) {
4962
        this.success = null;
4963
      }
4964
    }
4965
 
4966
    public TransactionServiceException getEx() {
4967
      return this.ex;
4968
    }
4969
 
4970
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4971
      this.ex = ex;
4972
      return this;
4973
    }
4974
 
4975
    public void unsetEx() {
4976
      this.ex = null;
4977
    }
4978
 
4979
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4980
    public boolean isSetEx() {
4981
      return this.ex != null;
4982
    }
4983
 
4984
    public void setExIsSet(boolean value) {
4985
      if (!value) {
4986
        this.ex = null;
4987
      }
4988
    }
4989
 
4990
    public void setFieldValue(_Fields field, Object value) {
4991
      switch (field) {
4992
      case SUCCESS:
4993
        if (value == null) {
4994
          unsetSuccess();
4995
        } else {
4996
          setSuccess((List<Transaction>)value);
4997
        }
4998
        break;
4999
 
5000
      case EX:
5001
        if (value == null) {
5002
          unsetEx();
5003
        } else {
5004
          setEx((TransactionServiceException)value);
5005
        }
5006
        break;
5007
 
5008
      }
5009
    }
5010
 
5011
    public void setFieldValue(int fieldID, Object value) {
5012
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5013
    }
5014
 
5015
    public Object getFieldValue(_Fields field) {
5016
      switch (field) {
5017
      case SUCCESS:
5018
        return getSuccess();
5019
 
5020
      case EX:
5021
        return getEx();
5022
 
5023
      }
5024
      throw new IllegalStateException();
5025
    }
5026
 
5027
    public Object getFieldValue(int fieldId) {
5028
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5029
    }
5030
 
5031
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5032
    public boolean isSet(_Fields field) {
5033
      switch (field) {
5034
      case SUCCESS:
5035
        return isSetSuccess();
5036
      case EX:
5037
        return isSetEx();
5038
      }
5039
      throw new IllegalStateException();
5040
    }
5041
 
5042
    public boolean isSet(int fieldID) {
5043
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5044
    }
5045
 
5046
    @Override
5047
    public boolean equals(Object that) {
5048
      if (that == null)
5049
        return false;
5050
      if (that instanceof getTransactionsForCustomer_result)
5051
        return this.equals((getTransactionsForCustomer_result)that);
5052
      return false;
5053
    }
5054
 
5055
    public boolean equals(getTransactionsForCustomer_result that) {
5056
      if (that == null)
5057
        return false;
5058
 
5059
      boolean this_present_success = true && this.isSetSuccess();
5060
      boolean that_present_success = true && that.isSetSuccess();
5061
      if (this_present_success || that_present_success) {
5062
        if (!(this_present_success && that_present_success))
5063
          return false;
5064
        if (!this.success.equals(that.success))
5065
          return false;
5066
      }
5067
 
5068
      boolean this_present_ex = true && this.isSetEx();
5069
      boolean that_present_ex = true && that.isSetEx();
5070
      if (this_present_ex || that_present_ex) {
5071
        if (!(this_present_ex && that_present_ex))
5072
          return false;
5073
        if (!this.ex.equals(that.ex))
5074
          return false;
5075
      }
5076
 
5077
      return true;
5078
    }
5079
 
5080
    @Override
5081
    public int hashCode() {
5082
      return 0;
5083
    }
5084
 
684 chandransh 5085
    public int compareTo(getTransactionsForCustomer_result other) {
5086
      if (!getClass().equals(other.getClass())) {
5087
        return getClass().getName().compareTo(other.getClass().getName());
5088
      }
5089
 
5090
      int lastComparison = 0;
5091
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
5092
 
5093
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5094
      if (lastComparison != 0) {
5095
        return lastComparison;
5096
      }
5097
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5098
      if (lastComparison != 0) {
5099
        return lastComparison;
5100
      }
5101
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5102
      if (lastComparison != 0) {
5103
        return lastComparison;
5104
      }
5105
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5106
      if (lastComparison != 0) {
5107
        return lastComparison;
5108
      }
5109
      return 0;
5110
    }
5111
 
68 ashish 5112
    public void read(TProtocol iprot) throws TException {
5113
      TField field;
5114
      iprot.readStructBegin();
5115
      while (true)
5116
      {
5117
        field = iprot.readFieldBegin();
5118
        if (field.type == TType.STOP) { 
5119
          break;
5120
        }
5121
        _Fields fieldId = _Fields.findByThriftId(field.id);
5122
        if (fieldId == null) {
5123
          TProtocolUtil.skip(iprot, field.type);
5124
        } else {
5125
          switch (fieldId) {
5126
            case SUCCESS:
5127
              if (field.type == TType.LIST) {
5128
                {
684 chandransh 5129
                  TList _list8 = iprot.readListBegin();
5130
                  this.success = new ArrayList<Transaction>(_list8.size);
5131
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 5132
                  {
684 chandransh 5133
                    Transaction _elem10;
5134
                    _elem10 = new Transaction();
5135
                    _elem10.read(iprot);
5136
                    this.success.add(_elem10);
68 ashish 5137
                  }
5138
                  iprot.readListEnd();
5139
                }
5140
              } else { 
5141
                TProtocolUtil.skip(iprot, field.type);
5142
              }
5143
              break;
5144
            case EX:
5145
              if (field.type == TType.STRUCT) {
5146
                this.ex = new TransactionServiceException();
5147
                this.ex.read(iprot);
5148
              } else { 
5149
                TProtocolUtil.skip(iprot, field.type);
5150
              }
5151
              break;
5152
          }
5153
          iprot.readFieldEnd();
5154
        }
5155
      }
5156
      iprot.readStructEnd();
5157
      validate();
5158
    }
5159
 
5160
    public void write(TProtocol oprot) throws TException {
5161
      oprot.writeStructBegin(STRUCT_DESC);
5162
 
5163
      if (this.isSetSuccess()) {
5164
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5165
        {
5166
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5167
          for (Transaction _iter11 : this.success)
68 ashish 5168
          {
684 chandransh 5169
            _iter11.write(oprot);
68 ashish 5170
          }
5171
          oprot.writeListEnd();
5172
        }
5173
        oprot.writeFieldEnd();
5174
      } else if (this.isSetEx()) {
5175
        oprot.writeFieldBegin(EX_FIELD_DESC);
5176
        this.ex.write(oprot);
5177
        oprot.writeFieldEnd();
5178
      }
5179
      oprot.writeFieldStop();
5180
      oprot.writeStructEnd();
5181
    }
5182
 
5183
    @Override
5184
    public String toString() {
5185
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5186
      boolean first = true;
5187
 
5188
      sb.append("success:");
5189
      if (this.success == null) {
5190
        sb.append("null");
5191
      } else {
5192
        sb.append(this.success);
5193
      }
5194
      first = false;
5195
      if (!first) sb.append(", ");
5196
      sb.append("ex:");
5197
      if (this.ex == null) {
5198
        sb.append("null");
5199
      } else {
5200
        sb.append(this.ex);
5201
      }
5202
      first = false;
5203
      sb.append(")");
5204
      return sb.toString();
5205
    }
5206
 
5207
    public void validate() throws TException {
5208
      // check for required fields
5209
    }
5210
 
5211
  }
5212
 
132 ashish 5213
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
5214
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
5215
 
5216
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
5217
 
5218
    private long shoppingCartId;
5219
 
5220
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5221
    public enum _Fields implements TFieldIdEnum {
5222
      SHOPPING_CART_ID((short)1, "shoppingCartId");
5223
 
5224
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5225
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5226
 
5227
      static {
5228
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5229
          byId.put((int)field._thriftId, field);
5230
          byName.put(field.getFieldName(), field);
5231
        }
5232
      }
5233
 
5234
      /**
5235
       * Find the _Fields constant that matches fieldId, or null if its not found.
5236
       */
5237
      public static _Fields findByThriftId(int fieldId) {
5238
        return byId.get(fieldId);
5239
      }
5240
 
5241
      /**
5242
       * Find the _Fields constant that matches fieldId, throwing an exception
5243
       * if it is not found.
5244
       */
5245
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5246
        _Fields fields = findByThriftId(fieldId);
5247
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5248
        return fields;
5249
      }
5250
 
5251
      /**
5252
       * Find the _Fields constant that matches name, or null if its not found.
5253
       */
5254
      public static _Fields findByName(String name) {
5255
        return byName.get(name);
5256
      }
5257
 
5258
      private final short _thriftId;
5259
      private final String _fieldName;
5260
 
5261
      _Fields(short thriftId, String fieldName) {
5262
        _thriftId = thriftId;
5263
        _fieldName = fieldName;
5264
      }
5265
 
5266
      public short getThriftFieldId() {
5267
        return _thriftId;
5268
      }
5269
 
5270
      public String getFieldName() {
5271
        return _fieldName;
5272
      }
5273
    }
5274
 
5275
    // isset id assignments
5276
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
5277
    private BitSet __isset_bit_vector = new BitSet(1);
5278
 
5279
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5280
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
5281
          new FieldValueMetaData(TType.I64)));
5282
    }});
5283
 
5284
    static {
5285
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
5286
    }
5287
 
5288
    public getTransactionsForShoppingCartId_args() {
5289
    }
5290
 
5291
    public getTransactionsForShoppingCartId_args(
5292
      long shoppingCartId)
5293
    {
5294
      this();
5295
      this.shoppingCartId = shoppingCartId;
5296
      setShoppingCartIdIsSet(true);
5297
    }
5298
 
5299
    /**
5300
     * Performs a deep copy on <i>other</i>.
5301
     */
5302
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
5303
      __isset_bit_vector.clear();
5304
      __isset_bit_vector.or(other.__isset_bit_vector);
5305
      this.shoppingCartId = other.shoppingCartId;
5306
    }
5307
 
5308
    public getTransactionsForShoppingCartId_args deepCopy() {
5309
      return new getTransactionsForShoppingCartId_args(this);
5310
    }
5311
 
5312
    @Deprecated
5313
    public getTransactionsForShoppingCartId_args clone() {
5314
      return new getTransactionsForShoppingCartId_args(this);
5315
    }
5316
 
5317
    public long getShoppingCartId() {
5318
      return this.shoppingCartId;
5319
    }
5320
 
5321
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5322
      this.shoppingCartId = shoppingCartId;
5323
      setShoppingCartIdIsSet(true);
5324
      return this;
5325
    }
5326
 
5327
    public void unsetShoppingCartId() {
5328
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5329
    }
5330
 
5331
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5332
    public boolean isSetShoppingCartId() {
5333
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5334
    }
5335
 
5336
    public void setShoppingCartIdIsSet(boolean value) {
5337
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5338
    }
5339
 
5340
    public void setFieldValue(_Fields field, Object value) {
5341
      switch (field) {
5342
      case SHOPPING_CART_ID:
5343
        if (value == null) {
5344
          unsetShoppingCartId();
5345
        } else {
5346
          setShoppingCartId((Long)value);
5347
        }
5348
        break;
5349
 
5350
      }
5351
    }
5352
 
5353
    public void setFieldValue(int fieldID, Object value) {
5354
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5355
    }
5356
 
5357
    public Object getFieldValue(_Fields field) {
5358
      switch (field) {
5359
      case SHOPPING_CART_ID:
5360
        return new Long(getShoppingCartId());
5361
 
5362
      }
5363
      throw new IllegalStateException();
5364
    }
5365
 
5366
    public Object getFieldValue(int fieldId) {
5367
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5368
    }
5369
 
5370
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5371
    public boolean isSet(_Fields field) {
5372
      switch (field) {
5373
      case SHOPPING_CART_ID:
5374
        return isSetShoppingCartId();
5375
      }
5376
      throw new IllegalStateException();
5377
    }
5378
 
5379
    public boolean isSet(int fieldID) {
5380
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5381
    }
5382
 
5383
    @Override
5384
    public boolean equals(Object that) {
5385
      if (that == null)
5386
        return false;
5387
      if (that instanceof getTransactionsForShoppingCartId_args)
5388
        return this.equals((getTransactionsForShoppingCartId_args)that);
5389
      return false;
5390
    }
5391
 
5392
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5393
      if (that == null)
5394
        return false;
5395
 
5396
      boolean this_present_shoppingCartId = true;
5397
      boolean that_present_shoppingCartId = true;
5398
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5399
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5400
          return false;
5401
        if (this.shoppingCartId != that.shoppingCartId)
5402
          return false;
5403
      }
5404
 
5405
      return true;
5406
    }
5407
 
5408
    @Override
5409
    public int hashCode() {
5410
      return 0;
5411
    }
5412
 
5413
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5414
      if (!getClass().equals(other.getClass())) {
5415
        return getClass().getName().compareTo(other.getClass().getName());
5416
      }
5417
 
5418
      int lastComparison = 0;
5419
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5420
 
5421
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5422
      if (lastComparison != 0) {
5423
        return lastComparison;
5424
      }
5425
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5426
      if (lastComparison != 0) {
5427
        return lastComparison;
5428
      }
5429
      return 0;
5430
    }
5431
 
5432
    public void read(TProtocol iprot) throws TException {
5433
      TField field;
5434
      iprot.readStructBegin();
5435
      while (true)
5436
      {
5437
        field = iprot.readFieldBegin();
5438
        if (field.type == TType.STOP) { 
5439
          break;
5440
        }
5441
        _Fields fieldId = _Fields.findByThriftId(field.id);
5442
        if (fieldId == null) {
5443
          TProtocolUtil.skip(iprot, field.type);
5444
        } else {
5445
          switch (fieldId) {
5446
            case SHOPPING_CART_ID:
5447
              if (field.type == TType.I64) {
5448
                this.shoppingCartId = iprot.readI64();
5449
                setShoppingCartIdIsSet(true);
5450
              } else { 
5451
                TProtocolUtil.skip(iprot, field.type);
5452
              }
5453
              break;
5454
          }
5455
          iprot.readFieldEnd();
5456
        }
5457
      }
5458
      iprot.readStructEnd();
5459
      validate();
5460
    }
5461
 
5462
    public void write(TProtocol oprot) throws TException {
5463
      validate();
5464
 
5465
      oprot.writeStructBegin(STRUCT_DESC);
5466
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5467
      oprot.writeI64(this.shoppingCartId);
5468
      oprot.writeFieldEnd();
5469
      oprot.writeFieldStop();
5470
      oprot.writeStructEnd();
5471
    }
5472
 
5473
    @Override
5474
    public String toString() {
5475
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5476
      boolean first = true;
5477
 
5478
      sb.append("shoppingCartId:");
5479
      sb.append(this.shoppingCartId);
5480
      first = false;
5481
      sb.append(")");
5482
      return sb.toString();
5483
    }
5484
 
5485
    public void validate() throws TException {
5486
      // check for required fields
5487
    }
5488
 
5489
  }
5490
 
684 chandransh 5491
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5492
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5493
 
5494
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5495
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5496
 
5497
    private List<Transaction> success;
5498
    private TransactionServiceException ex;
5499
 
5500
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5501
    public enum _Fields implements TFieldIdEnum {
5502
      SUCCESS((short)0, "success"),
5503
      EX((short)1, "ex");
5504
 
5505
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5506
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5507
 
5508
      static {
5509
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5510
          byId.put((int)field._thriftId, field);
5511
          byName.put(field.getFieldName(), field);
5512
        }
5513
      }
5514
 
5515
      /**
5516
       * Find the _Fields constant that matches fieldId, or null if its not found.
5517
       */
5518
      public static _Fields findByThriftId(int fieldId) {
5519
        return byId.get(fieldId);
5520
      }
5521
 
5522
      /**
5523
       * Find the _Fields constant that matches fieldId, throwing an exception
5524
       * if it is not found.
5525
       */
5526
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5527
        _Fields fields = findByThriftId(fieldId);
5528
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5529
        return fields;
5530
      }
5531
 
5532
      /**
5533
       * Find the _Fields constant that matches name, or null if its not found.
5534
       */
5535
      public static _Fields findByName(String name) {
5536
        return byName.get(name);
5537
      }
5538
 
5539
      private final short _thriftId;
5540
      private final String _fieldName;
5541
 
5542
      _Fields(short thriftId, String fieldName) {
5543
        _thriftId = thriftId;
5544
        _fieldName = fieldName;
5545
      }
5546
 
5547
      public short getThriftFieldId() {
5548
        return _thriftId;
5549
      }
5550
 
5551
      public String getFieldName() {
5552
        return _fieldName;
5553
      }
5554
    }
5555
 
5556
    // isset id assignments
5557
 
5558
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5559
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5560
          new ListMetaData(TType.LIST, 
5561
              new StructMetaData(TType.STRUCT, Transaction.class))));
5562
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5563
          new FieldValueMetaData(TType.STRUCT)));
5564
    }});
5565
 
5566
    static {
5567
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5568
    }
5569
 
5570
    public getTransactionsForShoppingCartId_result() {
5571
    }
5572
 
5573
    public getTransactionsForShoppingCartId_result(
5574
      List<Transaction> success,
5575
      TransactionServiceException ex)
5576
    {
5577
      this();
5578
      this.success = success;
5579
      this.ex = ex;
5580
    }
5581
 
5582
    /**
5583
     * Performs a deep copy on <i>other</i>.
5584
     */
5585
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5586
      if (other.isSetSuccess()) {
5587
        List<Transaction> __this__success = new ArrayList<Transaction>();
5588
        for (Transaction other_element : other.success) {
5589
          __this__success.add(new Transaction(other_element));
5590
        }
5591
        this.success = __this__success;
5592
      }
5593
      if (other.isSetEx()) {
5594
        this.ex = new TransactionServiceException(other.ex);
5595
      }
5596
    }
5597
 
5598
    public getTransactionsForShoppingCartId_result deepCopy() {
5599
      return new getTransactionsForShoppingCartId_result(this);
5600
    }
5601
 
5602
    @Deprecated
5603
    public getTransactionsForShoppingCartId_result clone() {
5604
      return new getTransactionsForShoppingCartId_result(this);
5605
    }
5606
 
5607
    public int getSuccessSize() {
5608
      return (this.success == null) ? 0 : this.success.size();
5609
    }
5610
 
5611
    public java.util.Iterator<Transaction> getSuccessIterator() {
5612
      return (this.success == null) ? null : this.success.iterator();
5613
    }
5614
 
5615
    public void addToSuccess(Transaction elem) {
5616
      if (this.success == null) {
5617
        this.success = new ArrayList<Transaction>();
5618
      }
5619
      this.success.add(elem);
5620
    }
5621
 
5622
    public List<Transaction> getSuccess() {
5623
      return this.success;
5624
    }
5625
 
5626
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5627
      this.success = success;
5628
      return this;
5629
    }
5630
 
5631
    public void unsetSuccess() {
5632
      this.success = null;
5633
    }
5634
 
5635
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5636
    public boolean isSetSuccess() {
5637
      return this.success != null;
5638
    }
5639
 
5640
    public void setSuccessIsSet(boolean value) {
5641
      if (!value) {
5642
        this.success = null;
5643
      }
5644
    }
5645
 
5646
    public TransactionServiceException getEx() {
5647
      return this.ex;
5648
    }
5649
 
5650
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5651
      this.ex = ex;
5652
      return this;
5653
    }
5654
 
5655
    public void unsetEx() {
5656
      this.ex = null;
5657
    }
5658
 
5659
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5660
    public boolean isSetEx() {
5661
      return this.ex != null;
5662
    }
5663
 
5664
    public void setExIsSet(boolean value) {
5665
      if (!value) {
5666
        this.ex = null;
5667
      }
5668
    }
5669
 
5670
    public void setFieldValue(_Fields field, Object value) {
5671
      switch (field) {
5672
      case SUCCESS:
5673
        if (value == null) {
5674
          unsetSuccess();
5675
        } else {
5676
          setSuccess((List<Transaction>)value);
5677
        }
5678
        break;
5679
 
5680
      case EX:
5681
        if (value == null) {
5682
          unsetEx();
5683
        } else {
5684
          setEx((TransactionServiceException)value);
5685
        }
5686
        break;
5687
 
5688
      }
5689
    }
5690
 
5691
    public void setFieldValue(int fieldID, Object value) {
5692
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5693
    }
5694
 
5695
    public Object getFieldValue(_Fields field) {
5696
      switch (field) {
5697
      case SUCCESS:
5698
        return getSuccess();
5699
 
5700
      case EX:
5701
        return getEx();
5702
 
5703
      }
5704
      throw new IllegalStateException();
5705
    }
5706
 
5707
    public Object getFieldValue(int fieldId) {
5708
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5709
    }
5710
 
5711
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5712
    public boolean isSet(_Fields field) {
5713
      switch (field) {
5714
      case SUCCESS:
5715
        return isSetSuccess();
5716
      case EX:
5717
        return isSetEx();
5718
      }
5719
      throw new IllegalStateException();
5720
    }
5721
 
5722
    public boolean isSet(int fieldID) {
5723
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5724
    }
5725
 
5726
    @Override
5727
    public boolean equals(Object that) {
5728
      if (that == null)
5729
        return false;
5730
      if (that instanceof getTransactionsForShoppingCartId_result)
5731
        return this.equals((getTransactionsForShoppingCartId_result)that);
5732
      return false;
5733
    }
5734
 
5735
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5736
      if (that == null)
5737
        return false;
5738
 
5739
      boolean this_present_success = true && this.isSetSuccess();
5740
      boolean that_present_success = true && that.isSetSuccess();
5741
      if (this_present_success || that_present_success) {
5742
        if (!(this_present_success && that_present_success))
5743
          return false;
5744
        if (!this.success.equals(that.success))
5745
          return false;
5746
      }
5747
 
5748
      boolean this_present_ex = true && this.isSetEx();
5749
      boolean that_present_ex = true && that.isSetEx();
5750
      if (this_present_ex || that_present_ex) {
5751
        if (!(this_present_ex && that_present_ex))
5752
          return false;
5753
        if (!this.ex.equals(that.ex))
5754
          return false;
5755
      }
5756
 
5757
      return true;
5758
    }
5759
 
5760
    @Override
5761
    public int hashCode() {
5762
      return 0;
5763
    }
5764
 
684 chandransh 5765
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5766
      if (!getClass().equals(other.getClass())) {
5767
        return getClass().getName().compareTo(other.getClass().getName());
5768
      }
5769
 
5770
      int lastComparison = 0;
5771
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5772
 
5773
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5774
      if (lastComparison != 0) {
5775
        return lastComparison;
5776
      }
5777
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5778
      if (lastComparison != 0) {
5779
        return lastComparison;
5780
      }
5781
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5782
      if (lastComparison != 0) {
5783
        return lastComparison;
5784
      }
5785
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5786
      if (lastComparison != 0) {
5787
        return lastComparison;
5788
      }
5789
      return 0;
5790
    }
5791
 
132 ashish 5792
    public void read(TProtocol iprot) throws TException {
5793
      TField field;
5794
      iprot.readStructBegin();
5795
      while (true)
5796
      {
5797
        field = iprot.readFieldBegin();
5798
        if (field.type == TType.STOP) { 
5799
          break;
5800
        }
5801
        _Fields fieldId = _Fields.findByThriftId(field.id);
5802
        if (fieldId == null) {
5803
          TProtocolUtil.skip(iprot, field.type);
5804
        } else {
5805
          switch (fieldId) {
5806
            case SUCCESS:
5807
              if (field.type == TType.LIST) {
5808
                {
684 chandransh 5809
                  TList _list12 = iprot.readListBegin();
5810
                  this.success = new ArrayList<Transaction>(_list12.size);
5811
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5812
                  {
684 chandransh 5813
                    Transaction _elem14;
5814
                    _elem14 = new Transaction();
5815
                    _elem14.read(iprot);
5816
                    this.success.add(_elem14);
132 ashish 5817
                  }
5818
                  iprot.readListEnd();
5819
                }
5820
              } else { 
5821
                TProtocolUtil.skip(iprot, field.type);
5822
              }
5823
              break;
5824
            case EX:
5825
              if (field.type == TType.STRUCT) {
5826
                this.ex = new TransactionServiceException();
5827
                this.ex.read(iprot);
5828
              } else { 
5829
                TProtocolUtil.skip(iprot, field.type);
5830
              }
5831
              break;
5832
          }
5833
          iprot.readFieldEnd();
5834
        }
5835
      }
5836
      iprot.readStructEnd();
5837
      validate();
5838
    }
5839
 
5840
    public void write(TProtocol oprot) throws TException {
5841
      oprot.writeStructBegin(STRUCT_DESC);
5842
 
5843
      if (this.isSetSuccess()) {
5844
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5845
        {
5846
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5847
          for (Transaction _iter15 : this.success)
132 ashish 5848
          {
684 chandransh 5849
            _iter15.write(oprot);
132 ashish 5850
          }
5851
          oprot.writeListEnd();
5852
        }
5853
        oprot.writeFieldEnd();
5854
      } else if (this.isSetEx()) {
5855
        oprot.writeFieldBegin(EX_FIELD_DESC);
5856
        this.ex.write(oprot);
5857
        oprot.writeFieldEnd();
5858
      }
5859
      oprot.writeFieldStop();
5860
      oprot.writeStructEnd();
5861
    }
5862
 
5863
    @Override
5864
    public String toString() {
5865
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5866
      boolean first = true;
5867
 
5868
      sb.append("success:");
5869
      if (this.success == null) {
5870
        sb.append("null");
5871
      } else {
5872
        sb.append(this.success);
5873
      }
5874
      first = false;
5875
      if (!first) sb.append(", ");
5876
      sb.append("ex:");
5877
      if (this.ex == null) {
5878
        sb.append("null");
5879
      } else {
5880
        sb.append(this.ex);
5881
      }
5882
      first = false;
5883
      sb.append(")");
5884
      return sb.toString();
5885
    }
5886
 
5887
    public void validate() throws TException {
5888
      // check for required fields
5889
    }
5890
 
5891
  }
5892
 
68 ashish 5893
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5894
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5895
 
5896
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5897
 
5898
    private long transactionId;
5899
 
5900
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5901
    public enum _Fields implements TFieldIdEnum {
5902
      TRANSACTION_ID((short)1, "transactionId");
5903
 
5904
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5905
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5906
 
5907
      static {
5908
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5909
          byId.put((int)field._thriftId, field);
5910
          byName.put(field.getFieldName(), field);
5911
        }
5912
      }
5913
 
5914
      /**
5915
       * Find the _Fields constant that matches fieldId, or null if its not found.
5916
       */
5917
      public static _Fields findByThriftId(int fieldId) {
5918
        return byId.get(fieldId);
5919
      }
5920
 
5921
      /**
5922
       * Find the _Fields constant that matches fieldId, throwing an exception
5923
       * if it is not found.
5924
       */
5925
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5926
        _Fields fields = findByThriftId(fieldId);
5927
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5928
        return fields;
5929
      }
5930
 
5931
      /**
5932
       * Find the _Fields constant that matches name, or null if its not found.
5933
       */
5934
      public static _Fields findByName(String name) {
5935
        return byName.get(name);
5936
      }
5937
 
5938
      private final short _thriftId;
5939
      private final String _fieldName;
5940
 
5941
      _Fields(short thriftId, String fieldName) {
5942
        _thriftId = thriftId;
5943
        _fieldName = fieldName;
5944
      }
5945
 
5946
      public short getThriftFieldId() {
5947
        return _thriftId;
5948
      }
5949
 
5950
      public String getFieldName() {
5951
        return _fieldName;
5952
      }
5953
    }
5954
 
5955
    // isset id assignments
5956
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5957
    private BitSet __isset_bit_vector = new BitSet(1);
5958
 
5959
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5960
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5961
          new FieldValueMetaData(TType.I64)));
5962
    }});
5963
 
5964
    static {
5965
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5966
    }
5967
 
5968
    public getTransactionStatus_args() {
5969
    }
5970
 
5971
    public getTransactionStatus_args(
5972
      long transactionId)
5973
    {
5974
      this();
5975
      this.transactionId = transactionId;
5976
      setTransactionIdIsSet(true);
5977
    }
5978
 
5979
    /**
5980
     * Performs a deep copy on <i>other</i>.
5981
     */
5982
    public getTransactionStatus_args(getTransactionStatus_args other) {
5983
      __isset_bit_vector.clear();
5984
      __isset_bit_vector.or(other.__isset_bit_vector);
5985
      this.transactionId = other.transactionId;
5986
    }
5987
 
5988
    public getTransactionStatus_args deepCopy() {
5989
      return new getTransactionStatus_args(this);
5990
    }
5991
 
5992
    @Deprecated
5993
    public getTransactionStatus_args clone() {
5994
      return new getTransactionStatus_args(this);
5995
    }
5996
 
5997
    public long getTransactionId() {
5998
      return this.transactionId;
5999
    }
6000
 
6001
    public getTransactionStatus_args setTransactionId(long transactionId) {
6002
      this.transactionId = transactionId;
6003
      setTransactionIdIsSet(true);
6004
      return this;
6005
    }
6006
 
6007
    public void unsetTransactionId() {
6008
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6009
    }
6010
 
6011
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6012
    public boolean isSetTransactionId() {
6013
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6014
    }
6015
 
6016
    public void setTransactionIdIsSet(boolean value) {
6017
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6018
    }
6019
 
6020
    public void setFieldValue(_Fields field, Object value) {
6021
      switch (field) {
6022
      case TRANSACTION_ID:
6023
        if (value == null) {
6024
          unsetTransactionId();
6025
        } else {
6026
          setTransactionId((Long)value);
6027
        }
6028
        break;
6029
 
6030
      }
6031
    }
6032
 
6033
    public void setFieldValue(int fieldID, Object value) {
6034
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6035
    }
6036
 
6037
    public Object getFieldValue(_Fields field) {
6038
      switch (field) {
6039
      case TRANSACTION_ID:
6040
        return new Long(getTransactionId());
6041
 
6042
      }
6043
      throw new IllegalStateException();
6044
    }
6045
 
6046
    public Object getFieldValue(int fieldId) {
6047
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6048
    }
6049
 
6050
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6051
    public boolean isSet(_Fields field) {
6052
      switch (field) {
6053
      case TRANSACTION_ID:
6054
        return isSetTransactionId();
6055
      }
6056
      throw new IllegalStateException();
6057
    }
6058
 
6059
    public boolean isSet(int fieldID) {
6060
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6061
    }
6062
 
6063
    @Override
6064
    public boolean equals(Object that) {
6065
      if (that == null)
6066
        return false;
6067
      if (that instanceof getTransactionStatus_args)
6068
        return this.equals((getTransactionStatus_args)that);
6069
      return false;
6070
    }
6071
 
6072
    public boolean equals(getTransactionStatus_args that) {
6073
      if (that == null)
6074
        return false;
6075
 
6076
      boolean this_present_transactionId = true;
6077
      boolean that_present_transactionId = true;
6078
      if (this_present_transactionId || that_present_transactionId) {
6079
        if (!(this_present_transactionId && that_present_transactionId))
6080
          return false;
6081
        if (this.transactionId != that.transactionId)
6082
          return false;
6083
      }
6084
 
6085
      return true;
6086
    }
6087
 
6088
    @Override
6089
    public int hashCode() {
6090
      return 0;
6091
    }
6092
 
6093
    public int compareTo(getTransactionStatus_args other) {
6094
      if (!getClass().equals(other.getClass())) {
6095
        return getClass().getName().compareTo(other.getClass().getName());
6096
      }
6097
 
6098
      int lastComparison = 0;
6099
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
6100
 
6101
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6102
      if (lastComparison != 0) {
6103
        return lastComparison;
6104
      }
6105
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6106
      if (lastComparison != 0) {
6107
        return lastComparison;
6108
      }
6109
      return 0;
6110
    }
6111
 
6112
    public void read(TProtocol iprot) throws TException {
6113
      TField field;
6114
      iprot.readStructBegin();
6115
      while (true)
6116
      {
6117
        field = iprot.readFieldBegin();
6118
        if (field.type == TType.STOP) { 
6119
          break;
6120
        }
6121
        _Fields fieldId = _Fields.findByThriftId(field.id);
6122
        if (fieldId == null) {
6123
          TProtocolUtil.skip(iprot, field.type);
6124
        } else {
6125
          switch (fieldId) {
6126
            case TRANSACTION_ID:
6127
              if (field.type == TType.I64) {
6128
                this.transactionId = iprot.readI64();
6129
                setTransactionIdIsSet(true);
6130
              } else { 
6131
                TProtocolUtil.skip(iprot, field.type);
6132
              }
6133
              break;
6134
          }
6135
          iprot.readFieldEnd();
6136
        }
6137
      }
6138
      iprot.readStructEnd();
6139
      validate();
6140
    }
6141
 
6142
    public void write(TProtocol oprot) throws TException {
6143
      validate();
6144
 
6145
      oprot.writeStructBegin(STRUCT_DESC);
6146
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6147
      oprot.writeI64(this.transactionId);
6148
      oprot.writeFieldEnd();
6149
      oprot.writeFieldStop();
6150
      oprot.writeStructEnd();
6151
    }
6152
 
6153
    @Override
6154
    public String toString() {
6155
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
6156
      boolean first = true;
6157
 
6158
      sb.append("transactionId:");
6159
      sb.append(this.transactionId);
6160
      first = false;
6161
      sb.append(")");
6162
      return sb.toString();
6163
    }
6164
 
6165
    public void validate() throws TException {
6166
      // check for required fields
6167
    }
6168
 
6169
  }
6170
 
6171
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
6172
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
6173
 
6174
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
6175
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6176
 
6177
    private TransactionStatus success;
6178
    private TransactionServiceException ex;
6179
 
6180
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6181
    public enum _Fields implements TFieldIdEnum {
6182
      /**
6183
       * 
6184
       * @see TransactionStatus
6185
       */
6186
      SUCCESS((short)0, "success"),
6187
      EX((short)1, "ex");
6188
 
6189
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6190
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6191
 
6192
      static {
6193
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6194
          byId.put((int)field._thriftId, field);
6195
          byName.put(field.getFieldName(), field);
6196
        }
6197
      }
6198
 
6199
      /**
6200
       * Find the _Fields constant that matches fieldId, or null if its not found.
6201
       */
6202
      public static _Fields findByThriftId(int fieldId) {
6203
        return byId.get(fieldId);
6204
      }
6205
 
6206
      /**
6207
       * Find the _Fields constant that matches fieldId, throwing an exception
6208
       * if it is not found.
6209
       */
6210
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6211
        _Fields fields = findByThriftId(fieldId);
6212
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6213
        return fields;
6214
      }
6215
 
6216
      /**
6217
       * Find the _Fields constant that matches name, or null if its not found.
6218
       */
6219
      public static _Fields findByName(String name) {
6220
        return byName.get(name);
6221
      }
6222
 
6223
      private final short _thriftId;
6224
      private final String _fieldName;
6225
 
6226
      _Fields(short thriftId, String fieldName) {
6227
        _thriftId = thriftId;
6228
        _fieldName = fieldName;
6229
      }
6230
 
6231
      public short getThriftFieldId() {
6232
        return _thriftId;
6233
      }
6234
 
6235
      public String getFieldName() {
6236
        return _fieldName;
6237
      }
6238
    }
6239
 
6240
    // isset id assignments
6241
 
6242
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6243
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6244
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6245
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6246
          new FieldValueMetaData(TType.STRUCT)));
6247
    }});
6248
 
6249
    static {
6250
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
6251
    }
6252
 
6253
    public getTransactionStatus_result() {
6254
    }
6255
 
6256
    public getTransactionStatus_result(
6257
      TransactionStatus success,
6258
      TransactionServiceException ex)
6259
    {
6260
      this();
6261
      this.success = success;
6262
      this.ex = ex;
6263
    }
6264
 
6265
    /**
6266
     * Performs a deep copy on <i>other</i>.
6267
     */
6268
    public getTransactionStatus_result(getTransactionStatus_result other) {
6269
      if (other.isSetSuccess()) {
6270
        this.success = other.success;
6271
      }
6272
      if (other.isSetEx()) {
6273
        this.ex = new TransactionServiceException(other.ex);
6274
      }
6275
    }
6276
 
6277
    public getTransactionStatus_result deepCopy() {
6278
      return new getTransactionStatus_result(this);
6279
    }
6280
 
6281
    @Deprecated
6282
    public getTransactionStatus_result clone() {
6283
      return new getTransactionStatus_result(this);
6284
    }
6285
 
6286
    /**
6287
     * 
6288
     * @see TransactionStatus
6289
     */
6290
    public TransactionStatus getSuccess() {
6291
      return this.success;
6292
    }
6293
 
6294
    /**
6295
     * 
6296
     * @see TransactionStatus
6297
     */
6298
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
6299
      this.success = success;
6300
      return this;
6301
    }
6302
 
6303
    public void unsetSuccess() {
6304
      this.success = null;
6305
    }
6306
 
6307
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6308
    public boolean isSetSuccess() {
6309
      return this.success != null;
6310
    }
6311
 
6312
    public void setSuccessIsSet(boolean value) {
6313
      if (!value) {
6314
        this.success = null;
6315
      }
6316
    }
6317
 
6318
    public TransactionServiceException getEx() {
6319
      return this.ex;
6320
    }
6321
 
6322
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6323
      this.ex = ex;
6324
      return this;
6325
    }
6326
 
6327
    public void unsetEx() {
6328
      this.ex = null;
6329
    }
6330
 
6331
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6332
    public boolean isSetEx() {
6333
      return this.ex != null;
6334
    }
6335
 
6336
    public void setExIsSet(boolean value) {
6337
      if (!value) {
6338
        this.ex = null;
6339
      }
6340
    }
6341
 
6342
    public void setFieldValue(_Fields field, Object value) {
6343
      switch (field) {
6344
      case SUCCESS:
6345
        if (value == null) {
6346
          unsetSuccess();
6347
        } else {
6348
          setSuccess((TransactionStatus)value);
6349
        }
6350
        break;
6351
 
6352
      case EX:
6353
        if (value == null) {
6354
          unsetEx();
6355
        } else {
6356
          setEx((TransactionServiceException)value);
6357
        }
6358
        break;
6359
 
6360
      }
6361
    }
6362
 
6363
    public void setFieldValue(int fieldID, Object value) {
6364
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6365
    }
6366
 
6367
    public Object getFieldValue(_Fields field) {
6368
      switch (field) {
6369
      case SUCCESS:
6370
        return getSuccess();
6371
 
6372
      case EX:
6373
        return getEx();
6374
 
6375
      }
6376
      throw new IllegalStateException();
6377
    }
6378
 
6379
    public Object getFieldValue(int fieldId) {
6380
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6381
    }
6382
 
6383
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6384
    public boolean isSet(_Fields field) {
6385
      switch (field) {
6386
      case SUCCESS:
6387
        return isSetSuccess();
6388
      case EX:
6389
        return isSetEx();
6390
      }
6391
      throw new IllegalStateException();
6392
    }
6393
 
6394
    public boolean isSet(int fieldID) {
6395
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6396
    }
6397
 
6398
    @Override
6399
    public boolean equals(Object that) {
6400
      if (that == null)
6401
        return false;
6402
      if (that instanceof getTransactionStatus_result)
6403
        return this.equals((getTransactionStatus_result)that);
6404
      return false;
6405
    }
6406
 
6407
    public boolean equals(getTransactionStatus_result that) {
6408
      if (that == null)
6409
        return false;
6410
 
6411
      boolean this_present_success = true && this.isSetSuccess();
6412
      boolean that_present_success = true && that.isSetSuccess();
6413
      if (this_present_success || that_present_success) {
6414
        if (!(this_present_success && that_present_success))
6415
          return false;
6416
        if (!this.success.equals(that.success))
6417
          return false;
6418
      }
6419
 
6420
      boolean this_present_ex = true && this.isSetEx();
6421
      boolean that_present_ex = true && that.isSetEx();
6422
      if (this_present_ex || that_present_ex) {
6423
        if (!(this_present_ex && that_present_ex))
6424
          return false;
6425
        if (!this.ex.equals(that.ex))
6426
          return false;
6427
      }
6428
 
6429
      return true;
6430
    }
6431
 
6432
    @Override
6433
    public int hashCode() {
6434
      return 0;
6435
    }
6436
 
6437
    public int compareTo(getTransactionStatus_result other) {
6438
      if (!getClass().equals(other.getClass())) {
6439
        return getClass().getName().compareTo(other.getClass().getName());
6440
      }
6441
 
6442
      int lastComparison = 0;
6443
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6444
 
6445
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6446
      if (lastComparison != 0) {
6447
        return lastComparison;
6448
      }
6449
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6450
      if (lastComparison != 0) {
6451
        return lastComparison;
6452
      }
6453
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6454
      if (lastComparison != 0) {
6455
        return lastComparison;
6456
      }
6457
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6458
      if (lastComparison != 0) {
6459
        return lastComparison;
6460
      }
6461
      return 0;
6462
    }
6463
 
6464
    public void read(TProtocol iprot) throws TException {
6465
      TField field;
6466
      iprot.readStructBegin();
6467
      while (true)
6468
      {
6469
        field = iprot.readFieldBegin();
6470
        if (field.type == TType.STOP) { 
6471
          break;
6472
        }
6473
        _Fields fieldId = _Fields.findByThriftId(field.id);
6474
        if (fieldId == null) {
6475
          TProtocolUtil.skip(iprot, field.type);
6476
        } else {
6477
          switch (fieldId) {
6478
            case SUCCESS:
6479
              if (field.type == TType.I32) {
6480
                this.success = TransactionStatus.findByValue(iprot.readI32());
6481
              } else { 
6482
                TProtocolUtil.skip(iprot, field.type);
6483
              }
6484
              break;
6485
            case EX:
6486
              if (field.type == TType.STRUCT) {
6487
                this.ex = new TransactionServiceException();
6488
                this.ex.read(iprot);
6489
              } else { 
6490
                TProtocolUtil.skip(iprot, field.type);
6491
              }
6492
              break;
6493
          }
6494
          iprot.readFieldEnd();
6495
        }
6496
      }
6497
      iprot.readStructEnd();
6498
      validate();
6499
    }
6500
 
6501
    public void write(TProtocol oprot) throws TException {
6502
      oprot.writeStructBegin(STRUCT_DESC);
6503
 
6504
      if (this.isSetSuccess()) {
6505
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6506
        oprot.writeI32(this.success.getValue());
6507
        oprot.writeFieldEnd();
6508
      } else if (this.isSetEx()) {
6509
        oprot.writeFieldBegin(EX_FIELD_DESC);
6510
        this.ex.write(oprot);
6511
        oprot.writeFieldEnd();
6512
      }
6513
      oprot.writeFieldStop();
6514
      oprot.writeStructEnd();
6515
    }
6516
 
6517
    @Override
6518
    public String toString() {
6519
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6520
      boolean first = true;
6521
 
6522
      sb.append("success:");
6523
      if (this.success == null) {
6524
        sb.append("null");
6525
      } else {
6526
        String success_name = success.name();
6527
        if (success_name != null) {
6528
          sb.append(success_name);
6529
          sb.append(" (");
6530
        }
6531
        sb.append(this.success);
6532
        if (success_name != null) {
6533
          sb.append(")");
6534
        }
6535
      }
6536
      first = false;
6537
      if (!first) sb.append(", ");
6538
      sb.append("ex:");
6539
      if (this.ex == null) {
6540
        sb.append("null");
6541
      } else {
6542
        sb.append(this.ex);
6543
      }
6544
      first = false;
6545
      sb.append(")");
6546
      return sb.toString();
6547
    }
6548
 
6549
    public void validate() throws TException {
6550
      // check for required fields
6551
    }
6552
 
6553
  }
6554
 
6555
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6556
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6557
 
6558
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6559
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6560
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6561
 
6562
    private long transactionId;
6563
    private TransactionStatus status;
6564
    private String description;
6565
 
6566
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6567
    public enum _Fields implements TFieldIdEnum {
6568
      TRANSACTION_ID((short)1, "transactionId"),
6569
      /**
6570
       * 
6571
       * @see TransactionStatus
6572
       */
6573
      STATUS((short)2, "status"),
6574
      DESCRIPTION((short)3, "description");
6575
 
6576
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6577
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6578
 
6579
      static {
6580
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6581
          byId.put((int)field._thriftId, field);
6582
          byName.put(field.getFieldName(), field);
6583
        }
6584
      }
6585
 
6586
      /**
6587
       * Find the _Fields constant that matches fieldId, or null if its not found.
6588
       */
6589
      public static _Fields findByThriftId(int fieldId) {
6590
        return byId.get(fieldId);
6591
      }
6592
 
6593
      /**
6594
       * Find the _Fields constant that matches fieldId, throwing an exception
6595
       * if it is not found.
6596
       */
6597
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6598
        _Fields fields = findByThriftId(fieldId);
6599
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6600
        return fields;
6601
      }
6602
 
6603
      /**
6604
       * Find the _Fields constant that matches name, or null if its not found.
6605
       */
6606
      public static _Fields findByName(String name) {
6607
        return byName.get(name);
6608
      }
6609
 
6610
      private final short _thriftId;
6611
      private final String _fieldName;
6612
 
6613
      _Fields(short thriftId, String fieldName) {
6614
        _thriftId = thriftId;
6615
        _fieldName = fieldName;
6616
      }
6617
 
6618
      public short getThriftFieldId() {
6619
        return _thriftId;
6620
      }
6621
 
6622
      public String getFieldName() {
6623
        return _fieldName;
6624
      }
6625
    }
6626
 
6627
    // isset id assignments
6628
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6629
    private BitSet __isset_bit_vector = new BitSet(1);
6630
 
6631
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6632
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6633
          new FieldValueMetaData(TType.I64)));
6634
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6635
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6636
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6637
          new FieldValueMetaData(TType.STRING)));
6638
    }});
6639
 
6640
    static {
6641
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6642
    }
6643
 
6644
    public changeTransactionStatus_args() {
6645
    }
6646
 
6647
    public changeTransactionStatus_args(
6648
      long transactionId,
6649
      TransactionStatus status,
6650
      String description)
6651
    {
6652
      this();
6653
      this.transactionId = transactionId;
6654
      setTransactionIdIsSet(true);
6655
      this.status = status;
6656
      this.description = description;
6657
    }
6658
 
6659
    /**
6660
     * Performs a deep copy on <i>other</i>.
6661
     */
6662
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6663
      __isset_bit_vector.clear();
6664
      __isset_bit_vector.or(other.__isset_bit_vector);
6665
      this.transactionId = other.transactionId;
6666
      if (other.isSetStatus()) {
6667
        this.status = other.status;
6668
      }
6669
      if (other.isSetDescription()) {
6670
        this.description = other.description;
6671
      }
6672
    }
6673
 
6674
    public changeTransactionStatus_args deepCopy() {
6675
      return new changeTransactionStatus_args(this);
6676
    }
6677
 
6678
    @Deprecated
6679
    public changeTransactionStatus_args clone() {
6680
      return new changeTransactionStatus_args(this);
6681
    }
6682
 
6683
    public long getTransactionId() {
6684
      return this.transactionId;
6685
    }
6686
 
6687
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6688
      this.transactionId = transactionId;
6689
      setTransactionIdIsSet(true);
6690
      return this;
6691
    }
6692
 
6693
    public void unsetTransactionId() {
6694
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6695
    }
6696
 
6697
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6698
    public boolean isSetTransactionId() {
6699
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6700
    }
6701
 
6702
    public void setTransactionIdIsSet(boolean value) {
6703
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6704
    }
6705
 
6706
    /**
6707
     * 
6708
     * @see TransactionStatus
6709
     */
6710
    public TransactionStatus getStatus() {
6711
      return this.status;
6712
    }
6713
 
6714
    /**
6715
     * 
6716
     * @see TransactionStatus
6717
     */
6718
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6719
      this.status = status;
6720
      return this;
6721
    }
6722
 
6723
    public void unsetStatus() {
6724
      this.status = null;
6725
    }
6726
 
6727
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6728
    public boolean isSetStatus() {
6729
      return this.status != null;
6730
    }
6731
 
6732
    public void setStatusIsSet(boolean value) {
6733
      if (!value) {
6734
        this.status = null;
6735
      }
6736
    }
6737
 
6738
    public String getDescription() {
6739
      return this.description;
6740
    }
6741
 
6742
    public changeTransactionStatus_args setDescription(String description) {
6743
      this.description = description;
6744
      return this;
6745
    }
6746
 
6747
    public void unsetDescription() {
6748
      this.description = null;
6749
    }
6750
 
6751
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6752
    public boolean isSetDescription() {
6753
      return this.description != null;
6754
    }
6755
 
6756
    public void setDescriptionIsSet(boolean value) {
6757
      if (!value) {
6758
        this.description = null;
6759
      }
6760
    }
6761
 
6762
    public void setFieldValue(_Fields field, Object value) {
6763
      switch (field) {
6764
      case TRANSACTION_ID:
6765
        if (value == null) {
6766
          unsetTransactionId();
6767
        } else {
6768
          setTransactionId((Long)value);
6769
        }
6770
        break;
6771
 
6772
      case STATUS:
6773
        if (value == null) {
6774
          unsetStatus();
6775
        } else {
6776
          setStatus((TransactionStatus)value);
6777
        }
6778
        break;
6779
 
6780
      case DESCRIPTION:
6781
        if (value == null) {
6782
          unsetDescription();
6783
        } else {
6784
          setDescription((String)value);
6785
        }
6786
        break;
6787
 
6788
      }
6789
    }
6790
 
6791
    public void setFieldValue(int fieldID, Object value) {
6792
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6793
    }
6794
 
6795
    public Object getFieldValue(_Fields field) {
6796
      switch (field) {
6797
      case TRANSACTION_ID:
6798
        return new Long(getTransactionId());
6799
 
6800
      case STATUS:
6801
        return getStatus();
6802
 
6803
      case DESCRIPTION:
6804
        return getDescription();
6805
 
6806
      }
6807
      throw new IllegalStateException();
6808
    }
6809
 
6810
    public Object getFieldValue(int fieldId) {
6811
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6812
    }
6813
 
6814
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6815
    public boolean isSet(_Fields field) {
6816
      switch (field) {
6817
      case TRANSACTION_ID:
6818
        return isSetTransactionId();
6819
      case STATUS:
6820
        return isSetStatus();
6821
      case DESCRIPTION:
6822
        return isSetDescription();
6823
      }
6824
      throw new IllegalStateException();
6825
    }
6826
 
6827
    public boolean isSet(int fieldID) {
6828
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6829
    }
6830
 
6831
    @Override
6832
    public boolean equals(Object that) {
6833
      if (that == null)
6834
        return false;
6835
      if (that instanceof changeTransactionStatus_args)
6836
        return this.equals((changeTransactionStatus_args)that);
6837
      return false;
6838
    }
6839
 
6840
    public boolean equals(changeTransactionStatus_args that) {
6841
      if (that == null)
6842
        return false;
6843
 
6844
      boolean this_present_transactionId = true;
6845
      boolean that_present_transactionId = true;
6846
      if (this_present_transactionId || that_present_transactionId) {
6847
        if (!(this_present_transactionId && that_present_transactionId))
6848
          return false;
6849
        if (this.transactionId != that.transactionId)
6850
          return false;
6851
      }
6852
 
6853
      boolean this_present_status = true && this.isSetStatus();
6854
      boolean that_present_status = true && that.isSetStatus();
6855
      if (this_present_status || that_present_status) {
6856
        if (!(this_present_status && that_present_status))
6857
          return false;
6858
        if (!this.status.equals(that.status))
6859
          return false;
6860
      }
6861
 
6862
      boolean this_present_description = true && this.isSetDescription();
6863
      boolean that_present_description = true && that.isSetDescription();
6864
      if (this_present_description || that_present_description) {
6865
        if (!(this_present_description && that_present_description))
6866
          return false;
6867
        if (!this.description.equals(that.description))
6868
          return false;
6869
      }
6870
 
6871
      return true;
6872
    }
6873
 
6874
    @Override
6875
    public int hashCode() {
6876
      return 0;
6877
    }
6878
 
6879
    public int compareTo(changeTransactionStatus_args other) {
6880
      if (!getClass().equals(other.getClass())) {
6881
        return getClass().getName().compareTo(other.getClass().getName());
6882
      }
6883
 
6884
      int lastComparison = 0;
6885
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6886
 
6887
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6888
      if (lastComparison != 0) {
6889
        return lastComparison;
6890
      }
6891
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6892
      if (lastComparison != 0) {
6893
        return lastComparison;
6894
      }
6895
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6896
      if (lastComparison != 0) {
6897
        return lastComparison;
6898
      }
6899
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6900
      if (lastComparison != 0) {
6901
        return lastComparison;
6902
      }
6903
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6904
      if (lastComparison != 0) {
6905
        return lastComparison;
6906
      }
6907
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6908
      if (lastComparison != 0) {
6909
        return lastComparison;
6910
      }
6911
      return 0;
6912
    }
6913
 
6914
    public void read(TProtocol iprot) throws TException {
6915
      TField field;
6916
      iprot.readStructBegin();
6917
      while (true)
6918
      {
6919
        field = iprot.readFieldBegin();
6920
        if (field.type == TType.STOP) { 
6921
          break;
6922
        }
6923
        _Fields fieldId = _Fields.findByThriftId(field.id);
6924
        if (fieldId == null) {
6925
          TProtocolUtil.skip(iprot, field.type);
6926
        } else {
6927
          switch (fieldId) {
6928
            case TRANSACTION_ID:
6929
              if (field.type == TType.I64) {
6930
                this.transactionId = iprot.readI64();
6931
                setTransactionIdIsSet(true);
6932
              } else { 
6933
                TProtocolUtil.skip(iprot, field.type);
6934
              }
6935
              break;
6936
            case STATUS:
6937
              if (field.type == TType.I32) {
6938
                this.status = TransactionStatus.findByValue(iprot.readI32());
6939
              } else { 
6940
                TProtocolUtil.skip(iprot, field.type);
6941
              }
6942
              break;
6943
            case DESCRIPTION:
6944
              if (field.type == TType.STRING) {
6945
                this.description = iprot.readString();
6946
              } else { 
6947
                TProtocolUtil.skip(iprot, field.type);
6948
              }
6949
              break;
6950
          }
6951
          iprot.readFieldEnd();
6952
        }
6953
      }
6954
      iprot.readStructEnd();
6955
      validate();
6956
    }
6957
 
6958
    public void write(TProtocol oprot) throws TException {
6959
      validate();
6960
 
6961
      oprot.writeStructBegin(STRUCT_DESC);
6962
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6963
      oprot.writeI64(this.transactionId);
6964
      oprot.writeFieldEnd();
6965
      if (this.status != null) {
6966
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6967
        oprot.writeI32(this.status.getValue());
6968
        oprot.writeFieldEnd();
6969
      }
6970
      if (this.description != null) {
6971
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6972
        oprot.writeString(this.description);
6973
        oprot.writeFieldEnd();
6974
      }
6975
      oprot.writeFieldStop();
6976
      oprot.writeStructEnd();
6977
    }
6978
 
6979
    @Override
6980
    public String toString() {
6981
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6982
      boolean first = true;
6983
 
6984
      sb.append("transactionId:");
6985
      sb.append(this.transactionId);
6986
      first = false;
6987
      if (!first) sb.append(", ");
6988
      sb.append("status:");
6989
      if (this.status == null) {
6990
        sb.append("null");
6991
      } else {
6992
        String status_name = status.name();
6993
        if (status_name != null) {
6994
          sb.append(status_name);
6995
          sb.append(" (");
6996
        }
6997
        sb.append(this.status);
6998
        if (status_name != null) {
6999
          sb.append(")");
7000
        }
7001
      }
7002
      first = false;
7003
      if (!first) sb.append(", ");
7004
      sb.append("description:");
7005
      if (this.description == null) {
7006
        sb.append("null");
7007
      } else {
7008
        sb.append(this.description);
7009
      }
7010
      first = false;
7011
      sb.append(")");
7012
      return sb.toString();
7013
    }
7014
 
7015
    public void validate() throws TException {
7016
      // check for required fields
7017
    }
7018
 
7019
  }
7020
 
7021
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
7022
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
7023
 
7024
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7025
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7026
 
7027
    private boolean success;
7028
    private TransactionServiceException ex;
7029
 
7030
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7031
    public enum _Fields implements TFieldIdEnum {
7032
      SUCCESS((short)0, "success"),
7033
      EX((short)1, "ex");
7034
 
7035
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7036
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7037
 
7038
      static {
7039
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7040
          byId.put((int)field._thriftId, field);
7041
          byName.put(field.getFieldName(), field);
7042
        }
7043
      }
7044
 
7045
      /**
7046
       * Find the _Fields constant that matches fieldId, or null if its not found.
7047
       */
7048
      public static _Fields findByThriftId(int fieldId) {
7049
        return byId.get(fieldId);
7050
      }
7051
 
7052
      /**
7053
       * Find the _Fields constant that matches fieldId, throwing an exception
7054
       * if it is not found.
7055
       */
7056
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7057
        _Fields fields = findByThriftId(fieldId);
7058
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7059
        return fields;
7060
      }
7061
 
7062
      /**
7063
       * Find the _Fields constant that matches name, or null if its not found.
7064
       */
7065
      public static _Fields findByName(String name) {
7066
        return byName.get(name);
7067
      }
7068
 
7069
      private final short _thriftId;
7070
      private final String _fieldName;
7071
 
7072
      _Fields(short thriftId, String fieldName) {
7073
        _thriftId = thriftId;
7074
        _fieldName = fieldName;
7075
      }
7076
 
7077
      public short getThriftFieldId() {
7078
        return _thriftId;
7079
      }
7080
 
7081
      public String getFieldName() {
7082
        return _fieldName;
7083
      }
7084
    }
7085
 
7086
    // isset id assignments
7087
    private static final int __SUCCESS_ISSET_ID = 0;
7088
    private BitSet __isset_bit_vector = new BitSet(1);
7089
 
7090
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7091
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7092
          new FieldValueMetaData(TType.BOOL)));
7093
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7094
          new FieldValueMetaData(TType.STRUCT)));
7095
    }});
7096
 
7097
    static {
7098
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
7099
    }
7100
 
7101
    public changeTransactionStatus_result() {
7102
    }
7103
 
7104
    public changeTransactionStatus_result(
7105
      boolean success,
7106
      TransactionServiceException ex)
7107
    {
7108
      this();
7109
      this.success = success;
7110
      setSuccessIsSet(true);
7111
      this.ex = ex;
7112
    }
7113
 
7114
    /**
7115
     * Performs a deep copy on <i>other</i>.
7116
     */
7117
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
7118
      __isset_bit_vector.clear();
7119
      __isset_bit_vector.or(other.__isset_bit_vector);
7120
      this.success = other.success;
7121
      if (other.isSetEx()) {
7122
        this.ex = new TransactionServiceException(other.ex);
7123
      }
7124
    }
7125
 
7126
    public changeTransactionStatus_result deepCopy() {
7127
      return new changeTransactionStatus_result(this);
7128
    }
7129
 
7130
    @Deprecated
7131
    public changeTransactionStatus_result clone() {
7132
      return new changeTransactionStatus_result(this);
7133
    }
7134
 
7135
    public boolean isSuccess() {
7136
      return this.success;
7137
    }
7138
 
7139
    public changeTransactionStatus_result setSuccess(boolean success) {
7140
      this.success = success;
7141
      setSuccessIsSet(true);
7142
      return this;
7143
    }
7144
 
7145
    public void unsetSuccess() {
7146
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7147
    }
7148
 
7149
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7150
    public boolean isSetSuccess() {
7151
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7152
    }
7153
 
7154
    public void setSuccessIsSet(boolean value) {
7155
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7156
    }
7157
 
7158
    public TransactionServiceException getEx() {
7159
      return this.ex;
7160
    }
7161
 
7162
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
7163
      this.ex = ex;
7164
      return this;
7165
    }
7166
 
7167
    public void unsetEx() {
7168
      this.ex = null;
7169
    }
7170
 
7171
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7172
    public boolean isSetEx() {
7173
      return this.ex != null;
7174
    }
7175
 
7176
    public void setExIsSet(boolean value) {
7177
      if (!value) {
7178
        this.ex = null;
7179
      }
7180
    }
7181
 
7182
    public void setFieldValue(_Fields field, Object value) {
7183
      switch (field) {
7184
      case SUCCESS:
7185
        if (value == null) {
7186
          unsetSuccess();
7187
        } else {
7188
          setSuccess((Boolean)value);
7189
        }
7190
        break;
7191
 
7192
      case EX:
7193
        if (value == null) {
7194
          unsetEx();
7195
        } else {
7196
          setEx((TransactionServiceException)value);
7197
        }
7198
        break;
7199
 
7200
      }
7201
    }
7202
 
7203
    public void setFieldValue(int fieldID, Object value) {
7204
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7205
    }
7206
 
7207
    public Object getFieldValue(_Fields field) {
7208
      switch (field) {
7209
      case SUCCESS:
7210
        return new Boolean(isSuccess());
7211
 
7212
      case EX:
7213
        return getEx();
7214
 
7215
      }
7216
      throw new IllegalStateException();
7217
    }
7218
 
7219
    public Object getFieldValue(int fieldId) {
7220
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7221
    }
7222
 
7223
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7224
    public boolean isSet(_Fields field) {
7225
      switch (field) {
7226
      case SUCCESS:
7227
        return isSetSuccess();
7228
      case EX:
7229
        return isSetEx();
7230
      }
7231
      throw new IllegalStateException();
7232
    }
7233
 
7234
    public boolean isSet(int fieldID) {
7235
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7236
    }
7237
 
7238
    @Override
7239
    public boolean equals(Object that) {
7240
      if (that == null)
7241
        return false;
7242
      if (that instanceof changeTransactionStatus_result)
7243
        return this.equals((changeTransactionStatus_result)that);
7244
      return false;
7245
    }
7246
 
7247
    public boolean equals(changeTransactionStatus_result that) {
7248
      if (that == null)
7249
        return false;
7250
 
7251
      boolean this_present_success = true;
7252
      boolean that_present_success = true;
7253
      if (this_present_success || that_present_success) {
7254
        if (!(this_present_success && that_present_success))
7255
          return false;
7256
        if (this.success != that.success)
7257
          return false;
7258
      }
7259
 
7260
      boolean this_present_ex = true && this.isSetEx();
7261
      boolean that_present_ex = true && that.isSetEx();
7262
      if (this_present_ex || that_present_ex) {
7263
        if (!(this_present_ex && that_present_ex))
7264
          return false;
7265
        if (!this.ex.equals(that.ex))
7266
          return false;
7267
      }
7268
 
7269
      return true;
7270
    }
7271
 
7272
    @Override
7273
    public int hashCode() {
7274
      return 0;
7275
    }
7276
 
7277
    public int compareTo(changeTransactionStatus_result other) {
7278
      if (!getClass().equals(other.getClass())) {
7279
        return getClass().getName().compareTo(other.getClass().getName());
7280
      }
7281
 
7282
      int lastComparison = 0;
7283
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
7284
 
7285
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7286
      if (lastComparison != 0) {
7287
        return lastComparison;
7288
      }
7289
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7290
      if (lastComparison != 0) {
7291
        return lastComparison;
7292
      }
7293
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7294
      if (lastComparison != 0) {
7295
        return lastComparison;
7296
      }
7297
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7298
      if (lastComparison != 0) {
7299
        return lastComparison;
7300
      }
7301
      return 0;
7302
    }
7303
 
7304
    public void read(TProtocol iprot) throws TException {
7305
      TField field;
7306
      iprot.readStructBegin();
7307
      while (true)
7308
      {
7309
        field = iprot.readFieldBegin();
7310
        if (field.type == TType.STOP) { 
7311
          break;
7312
        }
7313
        _Fields fieldId = _Fields.findByThriftId(field.id);
7314
        if (fieldId == null) {
7315
          TProtocolUtil.skip(iprot, field.type);
7316
        } else {
7317
          switch (fieldId) {
7318
            case SUCCESS:
7319
              if (field.type == TType.BOOL) {
7320
                this.success = iprot.readBool();
7321
                setSuccessIsSet(true);
7322
              } else { 
7323
                TProtocolUtil.skip(iprot, field.type);
7324
              }
7325
              break;
7326
            case EX:
7327
              if (field.type == TType.STRUCT) {
7328
                this.ex = new TransactionServiceException();
7329
                this.ex.read(iprot);
7330
              } else { 
7331
                TProtocolUtil.skip(iprot, field.type);
7332
              }
7333
              break;
7334
          }
7335
          iprot.readFieldEnd();
7336
        }
7337
      }
7338
      iprot.readStructEnd();
7339
      validate();
7340
    }
7341
 
7342
    public void write(TProtocol oprot) throws TException {
7343
      oprot.writeStructBegin(STRUCT_DESC);
7344
 
7345
      if (this.isSetSuccess()) {
7346
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7347
        oprot.writeBool(this.success);
7348
        oprot.writeFieldEnd();
7349
      } else if (this.isSetEx()) {
7350
        oprot.writeFieldBegin(EX_FIELD_DESC);
7351
        this.ex.write(oprot);
7352
        oprot.writeFieldEnd();
7353
      }
7354
      oprot.writeFieldStop();
7355
      oprot.writeStructEnd();
7356
    }
7357
 
7358
    @Override
7359
    public String toString() {
7360
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7361
      boolean first = true;
7362
 
7363
      sb.append("success:");
7364
      sb.append(this.success);
7365
      first = false;
7366
      if (!first) sb.append(", ");
7367
      sb.append("ex:");
7368
      if (this.ex == null) {
7369
        sb.append("null");
7370
      } else {
7371
        sb.append(this.ex);
7372
      }
7373
      first = false;
7374
      sb.append(")");
7375
      return sb.toString();
7376
    }
7377
 
7378
    public void validate() throws TException {
7379
      // check for required fields
7380
    }
7381
 
7382
  }
7383
 
1398 varun.gupt 7384
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7385
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7386
 
7387
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7388
 
7389
    private long transactionId;
7390
 
7391
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7392
    public enum _Fields implements TFieldIdEnum {
7393
      TRANSACTION_ID((short)1, "transactionId");
7394
 
7395
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7396
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7397
 
7398
      static {
7399
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7400
          byId.put((int)field._thriftId, field);
7401
          byName.put(field.getFieldName(), field);
7402
        }
7403
      }
7404
 
7405
      /**
7406
       * Find the _Fields constant that matches fieldId, or null if its not found.
7407
       */
7408
      public static _Fields findByThriftId(int fieldId) {
7409
        return byId.get(fieldId);
7410
      }
7411
 
7412
      /**
7413
       * Find the _Fields constant that matches fieldId, throwing an exception
7414
       * if it is not found.
7415
       */
7416
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7417
        _Fields fields = findByThriftId(fieldId);
7418
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7419
        return fields;
7420
      }
7421
 
7422
      /**
7423
       * Find the _Fields constant that matches name, or null if its not found.
7424
       */
7425
      public static _Fields findByName(String name) {
7426
        return byName.get(name);
7427
      }
7428
 
7429
      private final short _thriftId;
7430
      private final String _fieldName;
7431
 
7432
      _Fields(short thriftId, String fieldName) {
7433
        _thriftId = thriftId;
7434
        _fieldName = fieldName;
7435
      }
7436
 
7437
      public short getThriftFieldId() {
7438
        return _thriftId;
7439
      }
7440
 
7441
      public String getFieldName() {
7442
        return _fieldName;
7443
      }
7444
    }
7445
 
7446
    // isset id assignments
7447
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7448
    private BitSet __isset_bit_vector = new BitSet(1);
7449
 
7450
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7451
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7452
          new FieldValueMetaData(TType.I64)));
7453
    }});
7454
 
7455
    static {
1398 varun.gupt 7456
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7457
    }
7458
 
1398 varun.gupt 7459
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7460
    }
7461
 
1398 varun.gupt 7462
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7463
      long transactionId)
7464
    {
7465
      this();
7466
      this.transactionId = transactionId;
7467
      setTransactionIdIsSet(true);
7468
    }
7469
 
7470
    /**
7471
     * Performs a deep copy on <i>other</i>.
7472
     */
1398 varun.gupt 7473
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7474
      __isset_bit_vector.clear();
7475
      __isset_bit_vector.or(other.__isset_bit_vector);
7476
      this.transactionId = other.transactionId;
7477
    }
7478
 
1398 varun.gupt 7479
    public enqueueTransactionInfoEmail_args deepCopy() {
7480
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7481
    }
7482
 
7483
    @Deprecated
1398 varun.gupt 7484
    public enqueueTransactionInfoEmail_args clone() {
7485
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7486
    }
7487
 
7488
    public long getTransactionId() {
7489
      return this.transactionId;
7490
    }
7491
 
1398 varun.gupt 7492
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7493
      this.transactionId = transactionId;
7494
      setTransactionIdIsSet(true);
7495
      return this;
7496
    }
7497
 
7498
    public void unsetTransactionId() {
7499
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7500
    }
7501
 
7502
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7503
    public boolean isSetTransactionId() {
7504
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7505
    }
7506
 
7507
    public void setTransactionIdIsSet(boolean value) {
7508
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7509
    }
7510
 
7511
    public void setFieldValue(_Fields field, Object value) {
7512
      switch (field) {
7513
      case TRANSACTION_ID:
7514
        if (value == null) {
7515
          unsetTransactionId();
7516
        } else {
7517
          setTransactionId((Long)value);
7518
        }
7519
        break;
7520
 
7521
      }
7522
    }
7523
 
7524
    public void setFieldValue(int fieldID, Object value) {
7525
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7526
    }
7527
 
7528
    public Object getFieldValue(_Fields field) {
7529
      switch (field) {
7530
      case TRANSACTION_ID:
7531
        return new Long(getTransactionId());
7532
 
7533
      }
7534
      throw new IllegalStateException();
7535
    }
7536
 
7537
    public Object getFieldValue(int fieldId) {
7538
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7539
    }
7540
 
7541
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7542
    public boolean isSet(_Fields field) {
7543
      switch (field) {
7544
      case TRANSACTION_ID:
7545
        return isSetTransactionId();
7546
      }
7547
      throw new IllegalStateException();
7548
    }
7549
 
7550
    public boolean isSet(int fieldID) {
7551
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7552
    }
7553
 
7554
    @Override
7555
    public boolean equals(Object that) {
7556
      if (that == null)
7557
        return false;
1398 varun.gupt 7558
      if (that instanceof enqueueTransactionInfoEmail_args)
7559
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7560
      return false;
7561
    }
7562
 
1398 varun.gupt 7563
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7564
      if (that == null)
7565
        return false;
7566
 
7567
      boolean this_present_transactionId = true;
7568
      boolean that_present_transactionId = true;
7569
      if (this_present_transactionId || that_present_transactionId) {
7570
        if (!(this_present_transactionId && that_present_transactionId))
7571
          return false;
7572
        if (this.transactionId != that.transactionId)
7573
          return false;
7574
      }
7575
 
7576
      return true;
7577
    }
7578
 
7579
    @Override
7580
    public int hashCode() {
7581
      return 0;
7582
    }
7583
 
1398 varun.gupt 7584
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7585
      if (!getClass().equals(other.getClass())) {
7586
        return getClass().getName().compareTo(other.getClass().getName());
7587
      }
7588
 
7589
      int lastComparison = 0;
1398 varun.gupt 7590
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7591
 
7592
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7593
      if (lastComparison != 0) {
7594
        return lastComparison;
7595
      }
7596
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7597
      if (lastComparison != 0) {
7598
        return lastComparison;
7599
      }
7600
      return 0;
7601
    }
7602
 
7603
    public void read(TProtocol iprot) throws TException {
7604
      TField field;
7605
      iprot.readStructBegin();
7606
      while (true)
7607
      {
7608
        field = iprot.readFieldBegin();
7609
        if (field.type == TType.STOP) { 
7610
          break;
7611
        }
7612
        _Fields fieldId = _Fields.findByThriftId(field.id);
7613
        if (fieldId == null) {
7614
          TProtocolUtil.skip(iprot, field.type);
7615
        } else {
7616
          switch (fieldId) {
7617
            case TRANSACTION_ID:
7618
              if (field.type == TType.I64) {
7619
                this.transactionId = iprot.readI64();
7620
                setTransactionIdIsSet(true);
7621
              } else { 
7622
                TProtocolUtil.skip(iprot, field.type);
7623
              }
7624
              break;
7625
          }
7626
          iprot.readFieldEnd();
7627
        }
7628
      }
7629
      iprot.readStructEnd();
7630
      validate();
7631
    }
7632
 
7633
    public void write(TProtocol oprot) throws TException {
7634
      validate();
7635
 
7636
      oprot.writeStructBegin(STRUCT_DESC);
7637
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7638
      oprot.writeI64(this.transactionId);
7639
      oprot.writeFieldEnd();
7640
      oprot.writeFieldStop();
7641
      oprot.writeStructEnd();
7642
    }
7643
 
7644
    @Override
7645
    public String toString() {
1398 varun.gupt 7646
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 7647
      boolean first = true;
7648
 
7649
      sb.append("transactionId:");
7650
      sb.append(this.transactionId);
7651
      first = false;
7652
      sb.append(")");
7653
      return sb.toString();
7654
    }
7655
 
7656
    public void validate() throws TException {
7657
      // check for required fields
7658
    }
7659
 
7660
  }
7661
 
1398 varun.gupt 7662
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
7663
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 7664
 
7665
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7666
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7667
 
7668
    private boolean success;
7669
    private TransactionServiceException ex;
7670
 
7671
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7672
    public enum _Fields implements TFieldIdEnum {
7673
      SUCCESS((short)0, "success"),
7674
      EX((short)1, "ex");
7675
 
7676
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7677
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7678
 
7679
      static {
7680
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7681
          byId.put((int)field._thriftId, field);
7682
          byName.put(field.getFieldName(), field);
7683
        }
7684
      }
7685
 
7686
      /**
7687
       * Find the _Fields constant that matches fieldId, or null if its not found.
7688
       */
7689
      public static _Fields findByThriftId(int fieldId) {
7690
        return byId.get(fieldId);
7691
      }
7692
 
7693
      /**
7694
       * Find the _Fields constant that matches fieldId, throwing an exception
7695
       * if it is not found.
7696
       */
7697
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7698
        _Fields fields = findByThriftId(fieldId);
7699
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7700
        return fields;
7701
      }
7702
 
7703
      /**
7704
       * Find the _Fields constant that matches name, or null if its not found.
7705
       */
7706
      public static _Fields findByName(String name) {
7707
        return byName.get(name);
7708
      }
7709
 
7710
      private final short _thriftId;
7711
      private final String _fieldName;
7712
 
7713
      _Fields(short thriftId, String fieldName) {
7714
        _thriftId = thriftId;
7715
        _fieldName = fieldName;
7716
      }
7717
 
7718
      public short getThriftFieldId() {
7719
        return _thriftId;
7720
      }
7721
 
7722
      public String getFieldName() {
7723
        return _fieldName;
7724
      }
7725
    }
7726
 
7727
    // isset id assignments
7728
    private static final int __SUCCESS_ISSET_ID = 0;
7729
    private BitSet __isset_bit_vector = new BitSet(1);
7730
 
7731
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7732
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7733
          new FieldValueMetaData(TType.BOOL)));
7734
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7735
          new FieldValueMetaData(TType.STRUCT)));
7736
    }});
7737
 
7738
    static {
1398 varun.gupt 7739
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 7740
    }
7741
 
1398 varun.gupt 7742
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 7743
    }
7744
 
1398 varun.gupt 7745
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 7746
      boolean success,
7747
      TransactionServiceException ex)
7748
    {
7749
      this();
7750
      this.success = success;
7751
      setSuccessIsSet(true);
7752
      this.ex = ex;
7753
    }
7754
 
7755
    /**
7756
     * Performs a deep copy on <i>other</i>.
7757
     */
1398 varun.gupt 7758
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7759
      __isset_bit_vector.clear();
7760
      __isset_bit_vector.or(other.__isset_bit_vector);
7761
      this.success = other.success;
7762
      if (other.isSetEx()) {
7763
        this.ex = new TransactionServiceException(other.ex);
7764
      }
7765
    }
7766
 
1398 varun.gupt 7767
    public enqueueTransactionInfoEmail_result deepCopy() {
7768
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7769
    }
7770
 
7771
    @Deprecated
1398 varun.gupt 7772
    public enqueueTransactionInfoEmail_result clone() {
7773
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7774
    }
7775
 
7776
    public boolean isSuccess() {
7777
      return this.success;
7778
    }
7779
 
1398 varun.gupt 7780
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 7781
      this.success = success;
7782
      setSuccessIsSet(true);
7783
      return this;
7784
    }
7785
 
7786
    public void unsetSuccess() {
7787
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7788
    }
7789
 
7790
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7791
    public boolean isSetSuccess() {
7792
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7793
    }
7794
 
7795
    public void setSuccessIsSet(boolean value) {
7796
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7797
    }
7798
 
7799
    public TransactionServiceException getEx() {
7800
      return this.ex;
7801
    }
7802
 
1398 varun.gupt 7803
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 7804
      this.ex = ex;
7805
      return this;
7806
    }
7807
 
7808
    public void unsetEx() {
7809
      this.ex = null;
7810
    }
7811
 
7812
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7813
    public boolean isSetEx() {
7814
      return this.ex != null;
7815
    }
7816
 
7817
    public void setExIsSet(boolean value) {
7818
      if (!value) {
7819
        this.ex = null;
7820
      }
7821
    }
7822
 
7823
    public void setFieldValue(_Fields field, Object value) {
7824
      switch (field) {
7825
      case SUCCESS:
7826
        if (value == null) {
7827
          unsetSuccess();
7828
        } else {
7829
          setSuccess((Boolean)value);
7830
        }
7831
        break;
7832
 
7833
      case EX:
7834
        if (value == null) {
7835
          unsetEx();
7836
        } else {
7837
          setEx((TransactionServiceException)value);
7838
        }
7839
        break;
7840
 
7841
      }
7842
    }
7843
 
7844
    public void setFieldValue(int fieldID, Object value) {
7845
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7846
    }
7847
 
7848
    public Object getFieldValue(_Fields field) {
7849
      switch (field) {
7850
      case SUCCESS:
7851
        return new Boolean(isSuccess());
7852
 
7853
      case EX:
7854
        return getEx();
7855
 
7856
      }
7857
      throw new IllegalStateException();
7858
    }
7859
 
7860
    public Object getFieldValue(int fieldId) {
7861
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7862
    }
7863
 
7864
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7865
    public boolean isSet(_Fields field) {
7866
      switch (field) {
7867
      case SUCCESS:
7868
        return isSetSuccess();
7869
      case EX:
7870
        return isSetEx();
7871
      }
7872
      throw new IllegalStateException();
7873
    }
7874
 
7875
    public boolean isSet(int fieldID) {
7876
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7877
    }
7878
 
7879
    @Override
7880
    public boolean equals(Object that) {
7881
      if (that == null)
7882
        return false;
1398 varun.gupt 7883
      if (that instanceof enqueueTransactionInfoEmail_result)
7884
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 7885
      return false;
7886
    }
7887
 
1398 varun.gupt 7888
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 7889
      if (that == null)
7890
        return false;
7891
 
7892
      boolean this_present_success = true;
7893
      boolean that_present_success = true;
7894
      if (this_present_success || that_present_success) {
7895
        if (!(this_present_success && that_present_success))
7896
          return false;
7897
        if (this.success != that.success)
7898
          return false;
7899
      }
7900
 
7901
      boolean this_present_ex = true && this.isSetEx();
7902
      boolean that_present_ex = true && that.isSetEx();
7903
      if (this_present_ex || that_present_ex) {
7904
        if (!(this_present_ex && that_present_ex))
7905
          return false;
7906
        if (!this.ex.equals(that.ex))
7907
          return false;
7908
      }
7909
 
7910
      return true;
7911
    }
7912
 
7913
    @Override
7914
    public int hashCode() {
7915
      return 0;
7916
    }
7917
 
1398 varun.gupt 7918
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7919
      if (!getClass().equals(other.getClass())) {
7920
        return getClass().getName().compareTo(other.getClass().getName());
7921
      }
7922
 
7923
      int lastComparison = 0;
1398 varun.gupt 7924
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 7925
 
7926
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7927
      if (lastComparison != 0) {
7928
        return lastComparison;
7929
      }
7930
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7931
      if (lastComparison != 0) {
7932
        return lastComparison;
7933
      }
7934
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7935
      if (lastComparison != 0) {
7936
        return lastComparison;
7937
      }
7938
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7939
      if (lastComparison != 0) {
7940
        return lastComparison;
7941
      }
7942
      return 0;
7943
    }
7944
 
7945
    public void read(TProtocol iprot) throws TException {
7946
      TField field;
7947
      iprot.readStructBegin();
7948
      while (true)
7949
      {
7950
        field = iprot.readFieldBegin();
7951
        if (field.type == TType.STOP) { 
7952
          break;
7953
        }
7954
        _Fields fieldId = _Fields.findByThriftId(field.id);
7955
        if (fieldId == null) {
7956
          TProtocolUtil.skip(iprot, field.type);
7957
        } else {
7958
          switch (fieldId) {
7959
            case SUCCESS:
7960
              if (field.type == TType.BOOL) {
7961
                this.success = iprot.readBool();
7962
                setSuccessIsSet(true);
7963
              } else { 
7964
                TProtocolUtil.skip(iprot, field.type);
7965
              }
7966
              break;
7967
            case EX:
7968
              if (field.type == TType.STRUCT) {
7969
                this.ex = new TransactionServiceException();
7970
                this.ex.read(iprot);
7971
              } else { 
7972
                TProtocolUtil.skip(iprot, field.type);
7973
              }
7974
              break;
7975
          }
7976
          iprot.readFieldEnd();
7977
        }
7978
      }
7979
      iprot.readStructEnd();
7980
      validate();
7981
    }
7982
 
7983
    public void write(TProtocol oprot) throws TException {
7984
      oprot.writeStructBegin(STRUCT_DESC);
7985
 
7986
      if (this.isSetSuccess()) {
7987
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7988
        oprot.writeBool(this.success);
7989
        oprot.writeFieldEnd();
7990
      } else if (this.isSetEx()) {
7991
        oprot.writeFieldBegin(EX_FIELD_DESC);
7992
        this.ex.write(oprot);
7993
        oprot.writeFieldEnd();
7994
      }
7995
      oprot.writeFieldStop();
7996
      oprot.writeStructEnd();
7997
    }
7998
 
7999
    @Override
8000
    public String toString() {
1398 varun.gupt 8001
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 8002
      boolean first = true;
8003
 
8004
      sb.append("success:");
8005
      sb.append(this.success);
8006
      first = false;
8007
      if (!first) sb.append(", ");
8008
      sb.append("ex:");
8009
      if (this.ex == null) {
8010
        sb.append("null");
8011
      } else {
8012
        sb.append(this.ex);
8013
      }
8014
      first = false;
8015
      sb.append(")");
8016
      return sb.toString();
8017
    }
8018
 
8019
    public void validate() throws TException {
8020
      // check for required fields
8021
    }
8022
 
8023
  }
8024
 
483 rajveer 8025
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
8026
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 8027
 
483 rajveer 8028
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8029
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
8030
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
8031
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 8032
 
483 rajveer 8033
    private OrderStatus status;
8034
    private long from_date;
8035
    private long to_date;
8036
    private long warehouse_id;
68 ashish 8037
 
8038
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8039
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8040
      /**
8041
       * 
8042
       * @see OrderStatus
8043
       */
8044
      STATUS((short)1, "status"),
8045
      FROM_DATE((short)2, "from_date"),
8046
      TO_DATE((short)3, "to_date"),
8047
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 8048
 
8049
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8050
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8051
 
8052
      static {
8053
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8054
          byId.put((int)field._thriftId, field);
8055
          byName.put(field.getFieldName(), field);
8056
        }
8057
      }
8058
 
8059
      /**
8060
       * Find the _Fields constant that matches fieldId, or null if its not found.
8061
       */
8062
      public static _Fields findByThriftId(int fieldId) {
8063
        return byId.get(fieldId);
8064
      }
8065
 
8066
      /**
8067
       * Find the _Fields constant that matches fieldId, throwing an exception
8068
       * if it is not found.
8069
       */
8070
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8071
        _Fields fields = findByThriftId(fieldId);
8072
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8073
        return fields;
8074
      }
8075
 
8076
      /**
8077
       * Find the _Fields constant that matches name, or null if its not found.
8078
       */
8079
      public static _Fields findByName(String name) {
8080
        return byName.get(name);
8081
      }
8082
 
8083
      private final short _thriftId;
8084
      private final String _fieldName;
8085
 
8086
      _Fields(short thriftId, String fieldName) {
8087
        _thriftId = thriftId;
8088
        _fieldName = fieldName;
8089
      }
8090
 
8091
      public short getThriftFieldId() {
8092
        return _thriftId;
8093
      }
8094
 
8095
      public String getFieldName() {
8096
        return _fieldName;
8097
      }
8098
    }
8099
 
8100
    // isset id assignments
483 rajveer 8101
    private static final int __FROM_DATE_ISSET_ID = 0;
8102
    private static final int __TO_DATE_ISSET_ID = 1;
8103
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8104
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 8105
 
8106
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8107
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8108
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8109
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 8110
          new FieldValueMetaData(TType.I64)));
483 rajveer 8111
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
8112
          new FieldValueMetaData(TType.I64)));
8113
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8114
          new FieldValueMetaData(TType.I64)));
68 ashish 8115
    }});
8116
 
8117
    static {
483 rajveer 8118
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 8119
    }
8120
 
483 rajveer 8121
    public getAllOrders_args() {
68 ashish 8122
    }
8123
 
483 rajveer 8124
    public getAllOrders_args(
8125
      OrderStatus status,
8126
      long from_date,
8127
      long to_date,
8128
      long warehouse_id)
68 ashish 8129
    {
8130
      this();
483 rajveer 8131
      this.status = status;
8132
      this.from_date = from_date;
8133
      setFrom_dateIsSet(true);
8134
      this.to_date = to_date;
8135
      setTo_dateIsSet(true);
8136
      this.warehouse_id = warehouse_id;
8137
      setWarehouse_idIsSet(true);
68 ashish 8138
    }
8139
 
8140
    /**
8141
     * Performs a deep copy on <i>other</i>.
8142
     */
483 rajveer 8143
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 8144
      __isset_bit_vector.clear();
8145
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8146
      if (other.isSetStatus()) {
8147
        this.status = other.status;
8148
      }
8149
      this.from_date = other.from_date;
8150
      this.to_date = other.to_date;
8151
      this.warehouse_id = other.warehouse_id;
68 ashish 8152
    }
8153
 
483 rajveer 8154
    public getAllOrders_args deepCopy() {
8155
      return new getAllOrders_args(this);
68 ashish 8156
    }
8157
 
8158
    @Deprecated
483 rajveer 8159
    public getAllOrders_args clone() {
8160
      return new getAllOrders_args(this);
68 ashish 8161
    }
8162
 
483 rajveer 8163
    /**
8164
     * 
8165
     * @see OrderStatus
8166
     */
8167
    public OrderStatus getStatus() {
8168
      return this.status;
68 ashish 8169
    }
8170
 
483 rajveer 8171
    /**
8172
     * 
8173
     * @see OrderStatus
8174
     */
8175
    public getAllOrders_args setStatus(OrderStatus status) {
8176
      this.status = status;
68 ashish 8177
      return this;
8178
    }
8179
 
483 rajveer 8180
    public void unsetStatus() {
8181
      this.status = null;
68 ashish 8182
    }
8183
 
483 rajveer 8184
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8185
    public boolean isSetStatus() {
8186
      return this.status != null;
68 ashish 8187
    }
8188
 
483 rajveer 8189
    public void setStatusIsSet(boolean value) {
8190
      if (!value) {
8191
        this.status = null;
68 ashish 8192
      }
8193
    }
8194
 
483 rajveer 8195
    public long getFrom_date() {
8196
      return this.from_date;
68 ashish 8197
    }
8198
 
483 rajveer 8199
    public getAllOrders_args setFrom_date(long from_date) {
8200
      this.from_date = from_date;
8201
      setFrom_dateIsSet(true);
8202
      return this;
68 ashish 8203
    }
8204
 
483 rajveer 8205
    public void unsetFrom_date() {
8206
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 8207
    }
8208
 
483 rajveer 8209
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
8210
    public boolean isSetFrom_date() {
8211
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 8212
    }
8213
 
483 rajveer 8214
    public void setFrom_dateIsSet(boolean value) {
8215
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 8216
    }
8217
 
483 rajveer 8218
    public long getTo_date() {
8219
      return this.to_date;
68 ashish 8220
    }
8221
 
483 rajveer 8222
    public getAllOrders_args setTo_date(long to_date) {
8223
      this.to_date = to_date;
8224
      setTo_dateIsSet(true);
68 ashish 8225
      return this;
8226
    }
8227
 
483 rajveer 8228
    public void unsetTo_date() {
8229
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 8230
    }
8231
 
483 rajveer 8232
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
8233
    public boolean isSetTo_date() {
8234
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 8235
    }
8236
 
483 rajveer 8237
    public void setTo_dateIsSet(boolean value) {
8238
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 8239
    }
8240
 
483 rajveer 8241
    public long getWarehouse_id() {
8242
      return this.warehouse_id;
68 ashish 8243
    }
8244
 
483 rajveer 8245
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
8246
      this.warehouse_id = warehouse_id;
8247
      setWarehouse_idIsSet(true);
68 ashish 8248
      return this;
8249
    }
8250
 
483 rajveer 8251
    public void unsetWarehouse_id() {
8252
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8253
    }
8254
 
483 rajveer 8255
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8256
    public boolean isSetWarehouse_id() {
8257
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8258
    }
8259
 
483 rajveer 8260
    public void setWarehouse_idIsSet(boolean value) {
8261
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 8262
    }
8263
 
8264
    public void setFieldValue(_Fields field, Object value) {
8265
      switch (field) {
483 rajveer 8266
      case STATUS:
68 ashish 8267
        if (value == null) {
483 rajveer 8268
          unsetStatus();
68 ashish 8269
        } else {
483 rajveer 8270
          setStatus((OrderStatus)value);
68 ashish 8271
        }
8272
        break;
8273
 
483 rajveer 8274
      case FROM_DATE:
68 ashish 8275
        if (value == null) {
483 rajveer 8276
          unsetFrom_date();
68 ashish 8277
        } else {
483 rajveer 8278
          setFrom_date((Long)value);
68 ashish 8279
        }
8280
        break;
8281
 
483 rajveer 8282
      case TO_DATE:
8283
        if (value == null) {
8284
          unsetTo_date();
8285
        } else {
8286
          setTo_date((Long)value);
8287
        }
8288
        break;
8289
 
8290
      case WAREHOUSE_ID:
8291
        if (value == null) {
8292
          unsetWarehouse_id();
8293
        } else {
8294
          setWarehouse_id((Long)value);
8295
        }
8296
        break;
8297
 
68 ashish 8298
      }
8299
    }
8300
 
8301
    public void setFieldValue(int fieldID, Object value) {
8302
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8303
    }
8304
 
8305
    public Object getFieldValue(_Fields field) {
8306
      switch (field) {
483 rajveer 8307
      case STATUS:
8308
        return getStatus();
68 ashish 8309
 
483 rajveer 8310
      case FROM_DATE:
8311
        return new Long(getFrom_date());
68 ashish 8312
 
483 rajveer 8313
      case TO_DATE:
8314
        return new Long(getTo_date());
8315
 
8316
      case WAREHOUSE_ID:
8317
        return new Long(getWarehouse_id());
8318
 
68 ashish 8319
      }
8320
      throw new IllegalStateException();
8321
    }
8322
 
8323
    public Object getFieldValue(int fieldId) {
8324
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8325
    }
8326
 
8327
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8328
    public boolean isSet(_Fields field) {
8329
      switch (field) {
483 rajveer 8330
      case STATUS:
8331
        return isSetStatus();
8332
      case FROM_DATE:
8333
        return isSetFrom_date();
8334
      case TO_DATE:
8335
        return isSetTo_date();
8336
      case WAREHOUSE_ID:
8337
        return isSetWarehouse_id();
68 ashish 8338
      }
8339
      throw new IllegalStateException();
8340
    }
8341
 
8342
    public boolean isSet(int fieldID) {
8343
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8344
    }
8345
 
8346
    @Override
8347
    public boolean equals(Object that) {
8348
      if (that == null)
8349
        return false;
483 rajveer 8350
      if (that instanceof getAllOrders_args)
8351
        return this.equals((getAllOrders_args)that);
68 ashish 8352
      return false;
8353
    }
8354
 
483 rajveer 8355
    public boolean equals(getAllOrders_args that) {
68 ashish 8356
      if (that == null)
8357
        return false;
8358
 
483 rajveer 8359
      boolean this_present_status = true && this.isSetStatus();
8360
      boolean that_present_status = true && that.isSetStatus();
8361
      if (this_present_status || that_present_status) {
8362
        if (!(this_present_status && that_present_status))
68 ashish 8363
          return false;
483 rajveer 8364
        if (!this.status.equals(that.status))
68 ashish 8365
          return false;
8366
      }
8367
 
483 rajveer 8368
      boolean this_present_from_date = true;
8369
      boolean that_present_from_date = true;
8370
      if (this_present_from_date || that_present_from_date) {
8371
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8372
          return false;
483 rajveer 8373
        if (this.from_date != that.from_date)
68 ashish 8374
          return false;
8375
      }
8376
 
483 rajveer 8377
      boolean this_present_to_date = true;
8378
      boolean that_present_to_date = true;
8379
      if (this_present_to_date || that_present_to_date) {
8380
        if (!(this_present_to_date && that_present_to_date))
8381
          return false;
8382
        if (this.to_date != that.to_date)
8383
          return false;
68 ashish 8384
      }
8385
 
483 rajveer 8386
      boolean this_present_warehouse_id = true;
8387
      boolean that_present_warehouse_id = true;
8388
      if (this_present_warehouse_id || that_present_warehouse_id) {
8389
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8390
          return false;
483 rajveer 8391
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8392
          return false;
8393
      }
8394
 
8395
      return true;
8396
    }
8397
 
8398
    @Override
8399
    public int hashCode() {
8400
      return 0;
8401
    }
8402
 
483 rajveer 8403
    public int compareTo(getAllOrders_args other) {
68 ashish 8404
      if (!getClass().equals(other.getClass())) {
8405
        return getClass().getName().compareTo(other.getClass().getName());
8406
      }
8407
 
8408
      int lastComparison = 0;
483 rajveer 8409
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8410
 
483 rajveer 8411
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8412
      if (lastComparison != 0) {
8413
        return lastComparison;
8414
      }
483 rajveer 8415
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8416
      if (lastComparison != 0) {
8417
        return lastComparison;
8418
      }
483 rajveer 8419
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8420
      if (lastComparison != 0) {
8421
        return lastComparison;
8422
      }
8423
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8424
      if (lastComparison != 0) {
8425
        return lastComparison;
8426
      }
8427
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8428
      if (lastComparison != 0) {
8429
        return lastComparison;
8430
      }
8431
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8432
      if (lastComparison != 0) {
8433
        return lastComparison;
8434
      }
8435
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8436
      if (lastComparison != 0) {
8437
        return lastComparison;
8438
      }
8439
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8440
      if (lastComparison != 0) {
8441
        return lastComparison;
8442
      }
68 ashish 8443
      return 0;
8444
    }
8445
 
8446
    public void read(TProtocol iprot) throws TException {
8447
      TField field;
8448
      iprot.readStructBegin();
8449
      while (true)
8450
      {
8451
        field = iprot.readFieldBegin();
8452
        if (field.type == TType.STOP) { 
8453
          break;
8454
        }
8455
        _Fields fieldId = _Fields.findByThriftId(field.id);
8456
        if (fieldId == null) {
8457
          TProtocolUtil.skip(iprot, field.type);
8458
        } else {
8459
          switch (fieldId) {
483 rajveer 8460
            case STATUS:
8461
              if (field.type == TType.I32) {
8462
                this.status = OrderStatus.findByValue(iprot.readI32());
8463
              } else { 
8464
                TProtocolUtil.skip(iprot, field.type);
8465
              }
8466
              break;
8467
            case FROM_DATE:
68 ashish 8468
              if (field.type == TType.I64) {
483 rajveer 8469
                this.from_date = iprot.readI64();
8470
                setFrom_dateIsSet(true);
68 ashish 8471
              } else { 
8472
                TProtocolUtil.skip(iprot, field.type);
8473
              }
8474
              break;
483 rajveer 8475
            case TO_DATE:
8476
              if (field.type == TType.I64) {
8477
                this.to_date = iprot.readI64();
8478
                setTo_dateIsSet(true);
8479
              } else { 
8480
                TProtocolUtil.skip(iprot, field.type);
8481
              }
8482
              break;
8483
            case WAREHOUSE_ID:
8484
              if (field.type == TType.I64) {
8485
                this.warehouse_id = iprot.readI64();
8486
                setWarehouse_idIsSet(true);
8487
              } else { 
8488
                TProtocolUtil.skip(iprot, field.type);
8489
              }
8490
              break;
68 ashish 8491
          }
8492
          iprot.readFieldEnd();
8493
        }
8494
      }
8495
      iprot.readStructEnd();
8496
      validate();
8497
    }
8498
 
8499
    public void write(TProtocol oprot) throws TException {
8500
      validate();
8501
 
8502
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8503
      if (this.status != null) {
8504
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8505
        oprot.writeI32(this.status.getValue());
8506
        oprot.writeFieldEnd();
8507
      }
8508
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8509
      oprot.writeI64(this.from_date);
68 ashish 8510
      oprot.writeFieldEnd();
483 rajveer 8511
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8512
      oprot.writeI64(this.to_date);
8513
      oprot.writeFieldEnd();
8514
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8515
      oprot.writeI64(this.warehouse_id);
8516
      oprot.writeFieldEnd();
68 ashish 8517
      oprot.writeFieldStop();
8518
      oprot.writeStructEnd();
8519
    }
8520
 
8521
    @Override
8522
    public String toString() {
483 rajveer 8523
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8524
      boolean first = true;
8525
 
483 rajveer 8526
      sb.append("status:");
8527
      if (this.status == null) {
8528
        sb.append("null");
8529
      } else {
8530
        String status_name = status.name();
8531
        if (status_name != null) {
8532
          sb.append(status_name);
8533
          sb.append(" (");
8534
        }
8535
        sb.append(this.status);
8536
        if (status_name != null) {
8537
          sb.append(")");
8538
        }
8539
      }
68 ashish 8540
      first = false;
483 rajveer 8541
      if (!first) sb.append(", ");
8542
      sb.append("from_date:");
8543
      sb.append(this.from_date);
8544
      first = false;
8545
      if (!first) sb.append(", ");
8546
      sb.append("to_date:");
8547
      sb.append(this.to_date);
8548
      first = false;
8549
      if (!first) sb.append(", ");
8550
      sb.append("warehouse_id:");
8551
      sb.append(this.warehouse_id);
8552
      first = false;
68 ashish 8553
      sb.append(")");
8554
      return sb.toString();
8555
    }
8556
 
8557
    public void validate() throws TException {
8558
      // check for required fields
8559
    }
8560
 
8561
  }
8562
 
483 rajveer 8563
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8564
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8565
 
483 rajveer 8566
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8567
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8568
 
483 rajveer 8569
    private List<Order> success;
68 ashish 8570
    private TransactionServiceException ex;
8571
 
8572
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8573
    public enum _Fields implements TFieldIdEnum {
8574
      SUCCESS((short)0, "success"),
8575
      EX((short)1, "ex");
8576
 
8577
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8578
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8579
 
8580
      static {
8581
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8582
          byId.put((int)field._thriftId, field);
8583
          byName.put(field.getFieldName(), field);
8584
        }
8585
      }
8586
 
8587
      /**
8588
       * Find the _Fields constant that matches fieldId, or null if its not found.
8589
       */
8590
      public static _Fields findByThriftId(int fieldId) {
8591
        return byId.get(fieldId);
8592
      }
8593
 
8594
      /**
8595
       * Find the _Fields constant that matches fieldId, throwing an exception
8596
       * if it is not found.
8597
       */
8598
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8599
        _Fields fields = findByThriftId(fieldId);
8600
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8601
        return fields;
8602
      }
8603
 
8604
      /**
8605
       * Find the _Fields constant that matches name, or null if its not found.
8606
       */
8607
      public static _Fields findByName(String name) {
8608
        return byName.get(name);
8609
      }
8610
 
8611
      private final short _thriftId;
8612
      private final String _fieldName;
8613
 
8614
      _Fields(short thriftId, String fieldName) {
8615
        _thriftId = thriftId;
8616
        _fieldName = fieldName;
8617
      }
8618
 
8619
      public short getThriftFieldId() {
8620
        return _thriftId;
8621
      }
8622
 
8623
      public String getFieldName() {
8624
        return _fieldName;
8625
      }
8626
    }
8627
 
8628
    // isset id assignments
8629
 
8630
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8631
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 8632
          new ListMetaData(TType.LIST, 
8633
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 8634
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8635
          new FieldValueMetaData(TType.STRUCT)));
8636
    }});
8637
 
8638
    static {
483 rajveer 8639
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 8640
    }
8641
 
483 rajveer 8642
    public getAllOrders_result() {
68 ashish 8643
    }
8644
 
483 rajveer 8645
    public getAllOrders_result(
8646
      List<Order> success,
68 ashish 8647
      TransactionServiceException ex)
8648
    {
8649
      this();
8650
      this.success = success;
8651
      this.ex = ex;
8652
    }
8653
 
8654
    /**
8655
     * Performs a deep copy on <i>other</i>.
8656
     */
483 rajveer 8657
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 8658
      if (other.isSetSuccess()) {
483 rajveer 8659
        List<Order> __this__success = new ArrayList<Order>();
8660
        for (Order other_element : other.success) {
8661
          __this__success.add(new Order(other_element));
8662
        }
8663
        this.success = __this__success;
68 ashish 8664
      }
8665
      if (other.isSetEx()) {
8666
        this.ex = new TransactionServiceException(other.ex);
8667
      }
8668
    }
8669
 
483 rajveer 8670
    public getAllOrders_result deepCopy() {
8671
      return new getAllOrders_result(this);
68 ashish 8672
    }
8673
 
8674
    @Deprecated
483 rajveer 8675
    public getAllOrders_result clone() {
8676
      return new getAllOrders_result(this);
68 ashish 8677
    }
8678
 
483 rajveer 8679
    public int getSuccessSize() {
8680
      return (this.success == null) ? 0 : this.success.size();
8681
    }
8682
 
8683
    public java.util.Iterator<Order> getSuccessIterator() {
8684
      return (this.success == null) ? null : this.success.iterator();
8685
    }
8686
 
8687
    public void addToSuccess(Order elem) {
8688
      if (this.success == null) {
8689
        this.success = new ArrayList<Order>();
8690
      }
8691
      this.success.add(elem);
8692
    }
8693
 
8694
    public List<Order> getSuccess() {
68 ashish 8695
      return this.success;
8696
    }
8697
 
483 rajveer 8698
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 8699
      this.success = success;
8700
      return this;
8701
    }
8702
 
8703
    public void unsetSuccess() {
8704
      this.success = null;
8705
    }
8706
 
8707
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8708
    public boolean isSetSuccess() {
8709
      return this.success != null;
8710
    }
8711
 
8712
    public void setSuccessIsSet(boolean value) {
8713
      if (!value) {
8714
        this.success = null;
8715
      }
8716
    }
8717
 
8718
    public TransactionServiceException getEx() {
8719
      return this.ex;
8720
    }
8721
 
483 rajveer 8722
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 8723
      this.ex = ex;
8724
      return this;
8725
    }
8726
 
8727
    public void unsetEx() {
8728
      this.ex = null;
8729
    }
8730
 
8731
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8732
    public boolean isSetEx() {
8733
      return this.ex != null;
8734
    }
8735
 
8736
    public void setExIsSet(boolean value) {
8737
      if (!value) {
8738
        this.ex = null;
8739
      }
8740
    }
8741
 
8742
    public void setFieldValue(_Fields field, Object value) {
8743
      switch (field) {
8744
      case SUCCESS:
8745
        if (value == null) {
8746
          unsetSuccess();
8747
        } else {
483 rajveer 8748
          setSuccess((List<Order>)value);
68 ashish 8749
        }
8750
        break;
8751
 
8752
      case EX:
8753
        if (value == null) {
8754
          unsetEx();
8755
        } else {
8756
          setEx((TransactionServiceException)value);
8757
        }
8758
        break;
8759
 
8760
      }
8761
    }
8762
 
8763
    public void setFieldValue(int fieldID, Object value) {
8764
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8765
    }
8766
 
8767
    public Object getFieldValue(_Fields field) {
8768
      switch (field) {
8769
      case SUCCESS:
8770
        return getSuccess();
8771
 
8772
      case EX:
8773
        return getEx();
8774
 
8775
      }
8776
      throw new IllegalStateException();
8777
    }
8778
 
8779
    public Object getFieldValue(int fieldId) {
8780
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8781
    }
8782
 
8783
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8784
    public boolean isSet(_Fields field) {
8785
      switch (field) {
8786
      case SUCCESS:
8787
        return isSetSuccess();
8788
      case EX:
8789
        return isSetEx();
8790
      }
8791
      throw new IllegalStateException();
8792
    }
8793
 
8794
    public boolean isSet(int fieldID) {
8795
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8796
    }
8797
 
8798
    @Override
8799
    public boolean equals(Object that) {
8800
      if (that == null)
8801
        return false;
483 rajveer 8802
      if (that instanceof getAllOrders_result)
8803
        return this.equals((getAllOrders_result)that);
68 ashish 8804
      return false;
8805
    }
8806
 
483 rajveer 8807
    public boolean equals(getAllOrders_result that) {
68 ashish 8808
      if (that == null)
8809
        return false;
8810
 
8811
      boolean this_present_success = true && this.isSetSuccess();
8812
      boolean that_present_success = true && that.isSetSuccess();
8813
      if (this_present_success || that_present_success) {
8814
        if (!(this_present_success && that_present_success))
8815
          return false;
8816
        if (!this.success.equals(that.success))
8817
          return false;
8818
      }
8819
 
8820
      boolean this_present_ex = true && this.isSetEx();
8821
      boolean that_present_ex = true && that.isSetEx();
8822
      if (this_present_ex || that_present_ex) {
8823
        if (!(this_present_ex && that_present_ex))
8824
          return false;
8825
        if (!this.ex.equals(that.ex))
8826
          return false;
8827
      }
8828
 
8829
      return true;
8830
    }
8831
 
8832
    @Override
8833
    public int hashCode() {
8834
      return 0;
8835
    }
8836
 
483 rajveer 8837
    public int compareTo(getAllOrders_result other) {
8838
      if (!getClass().equals(other.getClass())) {
8839
        return getClass().getName().compareTo(other.getClass().getName());
8840
      }
8841
 
8842
      int lastComparison = 0;
8843
      getAllOrders_result typedOther = (getAllOrders_result)other;
8844
 
8845
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8846
      if (lastComparison != 0) {
8847
        return lastComparison;
8848
      }
8849
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8850
      if (lastComparison != 0) {
8851
        return lastComparison;
8852
      }
8853
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8854
      if (lastComparison != 0) {
8855
        return lastComparison;
8856
      }
8857
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8858
      if (lastComparison != 0) {
8859
        return lastComparison;
8860
      }
8861
      return 0;
8862
    }
8863
 
68 ashish 8864
    public void read(TProtocol iprot) throws TException {
8865
      TField field;
8866
      iprot.readStructBegin();
8867
      while (true)
8868
      {
8869
        field = iprot.readFieldBegin();
8870
        if (field.type == TType.STOP) { 
8871
          break;
8872
        }
8873
        _Fields fieldId = _Fields.findByThriftId(field.id);
8874
        if (fieldId == null) {
8875
          TProtocolUtil.skip(iprot, field.type);
8876
        } else {
8877
          switch (fieldId) {
8878
            case SUCCESS:
483 rajveer 8879
              if (field.type == TType.LIST) {
8880
                {
684 chandransh 8881
                  TList _list16 = iprot.readListBegin();
8882
                  this.success = new ArrayList<Order>(_list16.size);
8883
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 8884
                  {
684 chandransh 8885
                    Order _elem18;
8886
                    _elem18 = new Order();
8887
                    _elem18.read(iprot);
8888
                    this.success.add(_elem18);
483 rajveer 8889
                  }
8890
                  iprot.readListEnd();
8891
                }
68 ashish 8892
              } else { 
8893
                TProtocolUtil.skip(iprot, field.type);
8894
              }
8895
              break;
8896
            case EX:
8897
              if (field.type == TType.STRUCT) {
8898
                this.ex = new TransactionServiceException();
8899
                this.ex.read(iprot);
8900
              } else { 
8901
                TProtocolUtil.skip(iprot, field.type);
8902
              }
8903
              break;
8904
          }
8905
          iprot.readFieldEnd();
8906
        }
8907
      }
8908
      iprot.readStructEnd();
8909
      validate();
8910
    }
8911
 
8912
    public void write(TProtocol oprot) throws TException {
8913
      oprot.writeStructBegin(STRUCT_DESC);
8914
 
8915
      if (this.isSetSuccess()) {
8916
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 8917
        {
8918
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 8919
          for (Order _iter19 : this.success)
483 rajveer 8920
          {
684 chandransh 8921
            _iter19.write(oprot);
483 rajveer 8922
          }
8923
          oprot.writeListEnd();
8924
        }
68 ashish 8925
        oprot.writeFieldEnd();
8926
      } else if (this.isSetEx()) {
8927
        oprot.writeFieldBegin(EX_FIELD_DESC);
8928
        this.ex.write(oprot);
8929
        oprot.writeFieldEnd();
8930
      }
8931
      oprot.writeFieldStop();
8932
      oprot.writeStructEnd();
8933
    }
8934
 
8935
    @Override
8936
    public String toString() {
483 rajveer 8937
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 8938
      boolean first = true;
8939
 
8940
      sb.append("success:");
8941
      if (this.success == null) {
8942
        sb.append("null");
8943
      } else {
8944
        sb.append(this.success);
8945
      }
8946
      first = false;
8947
      if (!first) sb.append(", ");
8948
      sb.append("ex:");
8949
      if (this.ex == null) {
8950
        sb.append("null");
8951
      } else {
8952
        sb.append(this.ex);
8953
      }
8954
      first = false;
8955
      sb.append(")");
8956
      return sb.toString();
8957
    }
8958
 
8959
    public void validate() throws TException {
8960
      // check for required fields
8961
    }
8962
 
8963
  }
8964
 
1022 varun.gupt 8965
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
8966
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
8967
 
8968
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8969
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
8970
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
8971
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
8972
 
8973
    private OrderStatus status;
8974
    private long start_billing_date;
8975
    private long end_billing_date;
8976
    private long warehouse_id;
8977
 
8978
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8979
    public enum _Fields implements TFieldIdEnum {
8980
      /**
8981
       * 
8982
       * @see OrderStatus
8983
       */
8984
      STATUS((short)1, "status"),
8985
      START_BILLING_DATE((short)2, "start_billing_date"),
8986
      END_BILLING_DATE((short)3, "end_billing_date"),
8987
      WAREHOUSE_ID((short)4, "warehouse_id");
8988
 
8989
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8990
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8991
 
8992
      static {
8993
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8994
          byId.put((int)field._thriftId, field);
8995
          byName.put(field.getFieldName(), field);
8996
        }
8997
      }
8998
 
8999
      /**
9000
       * Find the _Fields constant that matches fieldId, or null if its not found.
9001
       */
9002
      public static _Fields findByThriftId(int fieldId) {
9003
        return byId.get(fieldId);
9004
      }
9005
 
9006
      /**
9007
       * Find the _Fields constant that matches fieldId, throwing an exception
9008
       * if it is not found.
9009
       */
9010
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9011
        _Fields fields = findByThriftId(fieldId);
9012
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9013
        return fields;
9014
      }
9015
 
9016
      /**
9017
       * Find the _Fields constant that matches name, or null if its not found.
9018
       */
9019
      public static _Fields findByName(String name) {
9020
        return byName.get(name);
9021
      }
9022
 
9023
      private final short _thriftId;
9024
      private final String _fieldName;
9025
 
9026
      _Fields(short thriftId, String fieldName) {
9027
        _thriftId = thriftId;
9028
        _fieldName = fieldName;
9029
      }
9030
 
9031
      public short getThriftFieldId() {
9032
        return _thriftId;
9033
      }
9034
 
9035
      public String getFieldName() {
9036
        return _fieldName;
9037
      }
9038
    }
9039
 
9040
    // isset id assignments
9041
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
9042
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
9043
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
9044
    private BitSet __isset_bit_vector = new BitSet(3);
9045
 
9046
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9047
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
9048
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
9049
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
9050
          new FieldValueMetaData(TType.I64)));
9051
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
9052
          new FieldValueMetaData(TType.I64)));
9053
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
9054
          new FieldValueMetaData(TType.I64)));
9055
    }});
9056
 
9057
    static {
9058
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
9059
    }
9060
 
9061
    public getOrdersByBillingDate_args() {
9062
    }
9063
 
9064
    public getOrdersByBillingDate_args(
9065
      OrderStatus status,
9066
      long start_billing_date,
9067
      long end_billing_date,
9068
      long warehouse_id)
9069
    {
9070
      this();
9071
      this.status = status;
9072
      this.start_billing_date = start_billing_date;
9073
      setStart_billing_dateIsSet(true);
9074
      this.end_billing_date = end_billing_date;
9075
      setEnd_billing_dateIsSet(true);
9076
      this.warehouse_id = warehouse_id;
9077
      setWarehouse_idIsSet(true);
9078
    }
9079
 
9080
    /**
9081
     * Performs a deep copy on <i>other</i>.
9082
     */
9083
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
9084
      __isset_bit_vector.clear();
9085
      __isset_bit_vector.or(other.__isset_bit_vector);
9086
      if (other.isSetStatus()) {
9087
        this.status = other.status;
9088
      }
9089
      this.start_billing_date = other.start_billing_date;
9090
      this.end_billing_date = other.end_billing_date;
9091
      this.warehouse_id = other.warehouse_id;
9092
    }
9093
 
9094
    public getOrdersByBillingDate_args deepCopy() {
9095
      return new getOrdersByBillingDate_args(this);
9096
    }
9097
 
9098
    @Deprecated
9099
    public getOrdersByBillingDate_args clone() {
9100
      return new getOrdersByBillingDate_args(this);
9101
    }
9102
 
9103
    /**
9104
     * 
9105
     * @see OrderStatus
9106
     */
9107
    public OrderStatus getStatus() {
9108
      return this.status;
9109
    }
9110
 
9111
    /**
9112
     * 
9113
     * @see OrderStatus
9114
     */
9115
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
9116
      this.status = status;
9117
      return this;
9118
    }
9119
 
9120
    public void unsetStatus() {
9121
      this.status = null;
9122
    }
9123
 
9124
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9125
    public boolean isSetStatus() {
9126
      return this.status != null;
9127
    }
9128
 
9129
    public void setStatusIsSet(boolean value) {
9130
      if (!value) {
9131
        this.status = null;
9132
      }
9133
    }
9134
 
9135
    public long getStart_billing_date() {
9136
      return this.start_billing_date;
9137
    }
9138
 
9139
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
9140
      this.start_billing_date = start_billing_date;
9141
      setStart_billing_dateIsSet(true);
9142
      return this;
9143
    }
9144
 
9145
    public void unsetStart_billing_date() {
9146
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
9147
    }
9148
 
9149
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
9150
    public boolean isSetStart_billing_date() {
9151
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
9152
    }
9153
 
9154
    public void setStart_billing_dateIsSet(boolean value) {
9155
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
9156
    }
9157
 
9158
    public long getEnd_billing_date() {
9159
      return this.end_billing_date;
9160
    }
9161
 
9162
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
9163
      this.end_billing_date = end_billing_date;
9164
      setEnd_billing_dateIsSet(true);
9165
      return this;
9166
    }
9167
 
9168
    public void unsetEnd_billing_date() {
9169
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
9170
    }
9171
 
9172
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
9173
    public boolean isSetEnd_billing_date() {
9174
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
9175
    }
9176
 
9177
    public void setEnd_billing_dateIsSet(boolean value) {
9178
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
9179
    }
9180
 
9181
    public long getWarehouse_id() {
9182
      return this.warehouse_id;
9183
    }
9184
 
9185
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
9186
      this.warehouse_id = warehouse_id;
9187
      setWarehouse_idIsSet(true);
9188
      return this;
9189
    }
9190
 
9191
    public void unsetWarehouse_id() {
9192
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
9193
    }
9194
 
9195
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9196
    public boolean isSetWarehouse_id() {
9197
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
9198
    }
9199
 
9200
    public void setWarehouse_idIsSet(boolean value) {
9201
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
9202
    }
9203
 
9204
    public void setFieldValue(_Fields field, Object value) {
9205
      switch (field) {
9206
      case STATUS:
9207
        if (value == null) {
9208
          unsetStatus();
9209
        } else {
9210
          setStatus((OrderStatus)value);
9211
        }
9212
        break;
9213
 
9214
      case START_BILLING_DATE:
9215
        if (value == null) {
9216
          unsetStart_billing_date();
9217
        } else {
9218
          setStart_billing_date((Long)value);
9219
        }
9220
        break;
9221
 
9222
      case END_BILLING_DATE:
9223
        if (value == null) {
9224
          unsetEnd_billing_date();
9225
        } else {
9226
          setEnd_billing_date((Long)value);
9227
        }
9228
        break;
9229
 
9230
      case WAREHOUSE_ID:
9231
        if (value == null) {
9232
          unsetWarehouse_id();
9233
        } else {
9234
          setWarehouse_id((Long)value);
9235
        }
9236
        break;
9237
 
9238
      }
9239
    }
9240
 
9241
    public void setFieldValue(int fieldID, Object value) {
9242
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9243
    }
9244
 
9245
    public Object getFieldValue(_Fields field) {
9246
      switch (field) {
9247
      case STATUS:
9248
        return getStatus();
9249
 
9250
      case START_BILLING_DATE:
9251
        return new Long(getStart_billing_date());
9252
 
9253
      case END_BILLING_DATE:
9254
        return new Long(getEnd_billing_date());
9255
 
9256
      case WAREHOUSE_ID:
9257
        return new Long(getWarehouse_id());
9258
 
9259
      }
9260
      throw new IllegalStateException();
9261
    }
9262
 
9263
    public Object getFieldValue(int fieldId) {
9264
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9265
    }
9266
 
9267
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9268
    public boolean isSet(_Fields field) {
9269
      switch (field) {
9270
      case STATUS:
9271
        return isSetStatus();
9272
      case START_BILLING_DATE:
9273
        return isSetStart_billing_date();
9274
      case END_BILLING_DATE:
9275
        return isSetEnd_billing_date();
9276
      case WAREHOUSE_ID:
9277
        return isSetWarehouse_id();
9278
      }
9279
      throw new IllegalStateException();
9280
    }
9281
 
9282
    public boolean isSet(int fieldID) {
9283
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9284
    }
9285
 
9286
    @Override
9287
    public boolean equals(Object that) {
9288
      if (that == null)
9289
        return false;
9290
      if (that instanceof getOrdersByBillingDate_args)
9291
        return this.equals((getOrdersByBillingDate_args)that);
9292
      return false;
9293
    }
9294
 
9295
    public boolean equals(getOrdersByBillingDate_args that) {
9296
      if (that == null)
9297
        return false;
9298
 
9299
      boolean this_present_status = true && this.isSetStatus();
9300
      boolean that_present_status = true && that.isSetStatus();
9301
      if (this_present_status || that_present_status) {
9302
        if (!(this_present_status && that_present_status))
9303
          return false;
9304
        if (!this.status.equals(that.status))
9305
          return false;
9306
      }
9307
 
9308
      boolean this_present_start_billing_date = true;
9309
      boolean that_present_start_billing_date = true;
9310
      if (this_present_start_billing_date || that_present_start_billing_date) {
9311
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9312
          return false;
9313
        if (this.start_billing_date != that.start_billing_date)
9314
          return false;
9315
      }
9316
 
9317
      boolean this_present_end_billing_date = true;
9318
      boolean that_present_end_billing_date = true;
9319
      if (this_present_end_billing_date || that_present_end_billing_date) {
9320
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9321
          return false;
9322
        if (this.end_billing_date != that.end_billing_date)
9323
          return false;
9324
      }
9325
 
9326
      boolean this_present_warehouse_id = true;
9327
      boolean that_present_warehouse_id = true;
9328
      if (this_present_warehouse_id || that_present_warehouse_id) {
9329
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9330
          return false;
9331
        if (this.warehouse_id != that.warehouse_id)
9332
          return false;
9333
      }
9334
 
9335
      return true;
9336
    }
9337
 
9338
    @Override
9339
    public int hashCode() {
9340
      return 0;
9341
    }
9342
 
9343
    public int compareTo(getOrdersByBillingDate_args other) {
9344
      if (!getClass().equals(other.getClass())) {
9345
        return getClass().getName().compareTo(other.getClass().getName());
9346
      }
9347
 
9348
      int lastComparison = 0;
9349
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9350
 
9351
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9352
      if (lastComparison != 0) {
9353
        return lastComparison;
9354
      }
9355
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9356
      if (lastComparison != 0) {
9357
        return lastComparison;
9358
      }
9359
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9360
      if (lastComparison != 0) {
9361
        return lastComparison;
9362
      }
9363
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9364
      if (lastComparison != 0) {
9365
        return lastComparison;
9366
      }
9367
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9368
      if (lastComparison != 0) {
9369
        return lastComparison;
9370
      }
9371
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9372
      if (lastComparison != 0) {
9373
        return lastComparison;
9374
      }
9375
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9376
      if (lastComparison != 0) {
9377
        return lastComparison;
9378
      }
9379
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9380
      if (lastComparison != 0) {
9381
        return lastComparison;
9382
      }
9383
      return 0;
9384
    }
9385
 
9386
    public void read(TProtocol iprot) throws TException {
9387
      TField field;
9388
      iprot.readStructBegin();
9389
      while (true)
9390
      {
9391
        field = iprot.readFieldBegin();
9392
        if (field.type == TType.STOP) { 
9393
          break;
9394
        }
9395
        _Fields fieldId = _Fields.findByThriftId(field.id);
9396
        if (fieldId == null) {
9397
          TProtocolUtil.skip(iprot, field.type);
9398
        } else {
9399
          switch (fieldId) {
9400
            case STATUS:
9401
              if (field.type == TType.I32) {
9402
                this.status = OrderStatus.findByValue(iprot.readI32());
9403
              } else { 
9404
                TProtocolUtil.skip(iprot, field.type);
9405
              }
9406
              break;
9407
            case START_BILLING_DATE:
9408
              if (field.type == TType.I64) {
9409
                this.start_billing_date = iprot.readI64();
9410
                setStart_billing_dateIsSet(true);
9411
              } else { 
9412
                TProtocolUtil.skip(iprot, field.type);
9413
              }
9414
              break;
9415
            case END_BILLING_DATE:
9416
              if (field.type == TType.I64) {
9417
                this.end_billing_date = iprot.readI64();
9418
                setEnd_billing_dateIsSet(true);
9419
              } else { 
9420
                TProtocolUtil.skip(iprot, field.type);
9421
              }
9422
              break;
9423
            case WAREHOUSE_ID:
9424
              if (field.type == TType.I64) {
9425
                this.warehouse_id = iprot.readI64();
9426
                setWarehouse_idIsSet(true);
9427
              } else { 
9428
                TProtocolUtil.skip(iprot, field.type);
9429
              }
9430
              break;
9431
          }
9432
          iprot.readFieldEnd();
9433
        }
9434
      }
9435
      iprot.readStructEnd();
9436
      validate();
9437
    }
9438
 
9439
    public void write(TProtocol oprot) throws TException {
9440
      validate();
9441
 
9442
      oprot.writeStructBegin(STRUCT_DESC);
9443
      if (this.status != null) {
9444
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9445
        oprot.writeI32(this.status.getValue());
9446
        oprot.writeFieldEnd();
9447
      }
9448
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9449
      oprot.writeI64(this.start_billing_date);
9450
      oprot.writeFieldEnd();
9451
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9452
      oprot.writeI64(this.end_billing_date);
9453
      oprot.writeFieldEnd();
9454
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9455
      oprot.writeI64(this.warehouse_id);
9456
      oprot.writeFieldEnd();
9457
      oprot.writeFieldStop();
9458
      oprot.writeStructEnd();
9459
    }
9460
 
9461
    @Override
9462
    public String toString() {
9463
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9464
      boolean first = true;
9465
 
9466
      sb.append("status:");
9467
      if (this.status == null) {
9468
        sb.append("null");
9469
      } else {
9470
        String status_name = status.name();
9471
        if (status_name != null) {
9472
          sb.append(status_name);
9473
          sb.append(" (");
9474
        }
9475
        sb.append(this.status);
9476
        if (status_name != null) {
9477
          sb.append(")");
9478
        }
9479
      }
9480
      first = false;
9481
      if (!first) sb.append(", ");
9482
      sb.append("start_billing_date:");
9483
      sb.append(this.start_billing_date);
9484
      first = false;
9485
      if (!first) sb.append(", ");
9486
      sb.append("end_billing_date:");
9487
      sb.append(this.end_billing_date);
9488
      first = false;
9489
      if (!first) sb.append(", ");
9490
      sb.append("warehouse_id:");
9491
      sb.append(this.warehouse_id);
9492
      first = false;
9493
      sb.append(")");
9494
      return sb.toString();
9495
    }
9496
 
9497
    public void validate() throws TException {
9498
      // check for required fields
9499
    }
9500
 
9501
  }
9502
 
9503
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9504
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9505
 
9506
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9507
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9508
 
9509
    private List<Order> success;
9510
    private TransactionServiceException ex;
9511
 
9512
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9513
    public enum _Fields implements TFieldIdEnum {
9514
      SUCCESS((short)0, "success"),
9515
      EX((short)1, "ex");
9516
 
9517
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9518
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9519
 
9520
      static {
9521
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9522
          byId.put((int)field._thriftId, field);
9523
          byName.put(field.getFieldName(), field);
9524
        }
9525
      }
9526
 
9527
      /**
9528
       * Find the _Fields constant that matches fieldId, or null if its not found.
9529
       */
9530
      public static _Fields findByThriftId(int fieldId) {
9531
        return byId.get(fieldId);
9532
      }
9533
 
9534
      /**
9535
       * Find the _Fields constant that matches fieldId, throwing an exception
9536
       * if it is not found.
9537
       */
9538
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9539
        _Fields fields = findByThriftId(fieldId);
9540
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9541
        return fields;
9542
      }
9543
 
9544
      /**
9545
       * Find the _Fields constant that matches name, or null if its not found.
9546
       */
9547
      public static _Fields findByName(String name) {
9548
        return byName.get(name);
9549
      }
9550
 
9551
      private final short _thriftId;
9552
      private final String _fieldName;
9553
 
9554
      _Fields(short thriftId, String fieldName) {
9555
        _thriftId = thriftId;
9556
        _fieldName = fieldName;
9557
      }
9558
 
9559
      public short getThriftFieldId() {
9560
        return _thriftId;
9561
      }
9562
 
9563
      public String getFieldName() {
9564
        return _fieldName;
9565
      }
9566
    }
9567
 
9568
    // isset id assignments
9569
 
9570
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9571
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9572
          new ListMetaData(TType.LIST, 
9573
              new StructMetaData(TType.STRUCT, Order.class))));
9574
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9575
          new FieldValueMetaData(TType.STRUCT)));
9576
    }});
9577
 
9578
    static {
9579
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9580
    }
9581
 
9582
    public getOrdersByBillingDate_result() {
9583
    }
9584
 
9585
    public getOrdersByBillingDate_result(
9586
      List<Order> success,
9587
      TransactionServiceException ex)
9588
    {
9589
      this();
9590
      this.success = success;
9591
      this.ex = ex;
9592
    }
9593
 
9594
    /**
9595
     * Performs a deep copy on <i>other</i>.
9596
     */
9597
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9598
      if (other.isSetSuccess()) {
9599
        List<Order> __this__success = new ArrayList<Order>();
9600
        for (Order other_element : other.success) {
9601
          __this__success.add(new Order(other_element));
9602
        }
9603
        this.success = __this__success;
9604
      }
9605
      if (other.isSetEx()) {
9606
        this.ex = new TransactionServiceException(other.ex);
9607
      }
9608
    }
9609
 
9610
    public getOrdersByBillingDate_result deepCopy() {
9611
      return new getOrdersByBillingDate_result(this);
9612
    }
9613
 
9614
    @Deprecated
9615
    public getOrdersByBillingDate_result clone() {
9616
      return new getOrdersByBillingDate_result(this);
9617
    }
9618
 
9619
    public int getSuccessSize() {
9620
      return (this.success == null) ? 0 : this.success.size();
9621
    }
9622
 
9623
    public java.util.Iterator<Order> getSuccessIterator() {
9624
      return (this.success == null) ? null : this.success.iterator();
9625
    }
9626
 
9627
    public void addToSuccess(Order elem) {
9628
      if (this.success == null) {
9629
        this.success = new ArrayList<Order>();
9630
      }
9631
      this.success.add(elem);
9632
    }
9633
 
9634
    public List<Order> getSuccess() {
9635
      return this.success;
9636
    }
9637
 
9638
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
9639
      this.success = success;
9640
      return this;
9641
    }
9642
 
9643
    public void unsetSuccess() {
9644
      this.success = null;
9645
    }
9646
 
9647
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9648
    public boolean isSetSuccess() {
9649
      return this.success != null;
9650
    }
9651
 
9652
    public void setSuccessIsSet(boolean value) {
9653
      if (!value) {
9654
        this.success = null;
9655
      }
9656
    }
9657
 
9658
    public TransactionServiceException getEx() {
9659
      return this.ex;
9660
    }
9661
 
9662
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
9663
      this.ex = ex;
9664
      return this;
9665
    }
9666
 
9667
    public void unsetEx() {
9668
      this.ex = null;
9669
    }
9670
 
9671
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9672
    public boolean isSetEx() {
9673
      return this.ex != null;
9674
    }
9675
 
9676
    public void setExIsSet(boolean value) {
9677
      if (!value) {
9678
        this.ex = null;
9679
      }
9680
    }
9681
 
9682
    public void setFieldValue(_Fields field, Object value) {
9683
      switch (field) {
9684
      case SUCCESS:
9685
        if (value == null) {
9686
          unsetSuccess();
9687
        } else {
9688
          setSuccess((List<Order>)value);
9689
        }
9690
        break;
9691
 
9692
      case EX:
9693
        if (value == null) {
9694
          unsetEx();
9695
        } else {
9696
          setEx((TransactionServiceException)value);
9697
        }
9698
        break;
9699
 
9700
      }
9701
    }
9702
 
9703
    public void setFieldValue(int fieldID, Object value) {
9704
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9705
    }
9706
 
9707
    public Object getFieldValue(_Fields field) {
9708
      switch (field) {
9709
      case SUCCESS:
9710
        return getSuccess();
9711
 
9712
      case EX:
9713
        return getEx();
9714
 
9715
      }
9716
      throw new IllegalStateException();
9717
    }
9718
 
9719
    public Object getFieldValue(int fieldId) {
9720
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9721
    }
9722
 
9723
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9724
    public boolean isSet(_Fields field) {
9725
      switch (field) {
9726
      case SUCCESS:
9727
        return isSetSuccess();
9728
      case EX:
9729
        return isSetEx();
9730
      }
9731
      throw new IllegalStateException();
9732
    }
9733
 
9734
    public boolean isSet(int fieldID) {
9735
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9736
    }
9737
 
9738
    @Override
9739
    public boolean equals(Object that) {
9740
      if (that == null)
9741
        return false;
9742
      if (that instanceof getOrdersByBillingDate_result)
9743
        return this.equals((getOrdersByBillingDate_result)that);
9744
      return false;
9745
    }
9746
 
9747
    public boolean equals(getOrdersByBillingDate_result that) {
9748
      if (that == null)
9749
        return false;
9750
 
9751
      boolean this_present_success = true && this.isSetSuccess();
9752
      boolean that_present_success = true && that.isSetSuccess();
9753
      if (this_present_success || that_present_success) {
9754
        if (!(this_present_success && that_present_success))
9755
          return false;
9756
        if (!this.success.equals(that.success))
9757
          return false;
9758
      }
9759
 
9760
      boolean this_present_ex = true && this.isSetEx();
9761
      boolean that_present_ex = true && that.isSetEx();
9762
      if (this_present_ex || that_present_ex) {
9763
        if (!(this_present_ex && that_present_ex))
9764
          return false;
9765
        if (!this.ex.equals(that.ex))
9766
          return false;
9767
      }
9768
 
9769
      return true;
9770
    }
9771
 
9772
    @Override
9773
    public int hashCode() {
9774
      return 0;
9775
    }
9776
 
9777
    public int compareTo(getOrdersByBillingDate_result other) {
9778
      if (!getClass().equals(other.getClass())) {
9779
        return getClass().getName().compareTo(other.getClass().getName());
9780
      }
9781
 
9782
      int lastComparison = 0;
9783
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
9784
 
9785
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9786
      if (lastComparison != 0) {
9787
        return lastComparison;
9788
      }
9789
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9790
      if (lastComparison != 0) {
9791
        return lastComparison;
9792
      }
9793
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9794
      if (lastComparison != 0) {
9795
        return lastComparison;
9796
      }
9797
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9798
      if (lastComparison != 0) {
9799
        return lastComparison;
9800
      }
9801
      return 0;
9802
    }
9803
 
9804
    public void read(TProtocol iprot) throws TException {
9805
      TField field;
9806
      iprot.readStructBegin();
9807
      while (true)
9808
      {
9809
        field = iprot.readFieldBegin();
9810
        if (field.type == TType.STOP) { 
9811
          break;
9812
        }
9813
        _Fields fieldId = _Fields.findByThriftId(field.id);
9814
        if (fieldId == null) {
9815
          TProtocolUtil.skip(iprot, field.type);
9816
        } else {
9817
          switch (fieldId) {
9818
            case SUCCESS:
9819
              if (field.type == TType.LIST) {
9820
                {
9821
                  TList _list20 = iprot.readListBegin();
9822
                  this.success = new ArrayList<Order>(_list20.size);
9823
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
9824
                  {
9825
                    Order _elem22;
9826
                    _elem22 = new Order();
9827
                    _elem22.read(iprot);
9828
                    this.success.add(_elem22);
9829
                  }
9830
                  iprot.readListEnd();
9831
                }
9832
              } else { 
9833
                TProtocolUtil.skip(iprot, field.type);
9834
              }
9835
              break;
9836
            case EX:
9837
              if (field.type == TType.STRUCT) {
9838
                this.ex = new TransactionServiceException();
9839
                this.ex.read(iprot);
9840
              } else { 
9841
                TProtocolUtil.skip(iprot, field.type);
9842
              }
9843
              break;
9844
          }
9845
          iprot.readFieldEnd();
9846
        }
9847
      }
9848
      iprot.readStructEnd();
9849
      validate();
9850
    }
9851
 
9852
    public void write(TProtocol oprot) throws TException {
9853
      oprot.writeStructBegin(STRUCT_DESC);
9854
 
9855
      if (this.isSetSuccess()) {
9856
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9857
        {
9858
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
9859
          for (Order _iter23 : this.success)
9860
          {
9861
            _iter23.write(oprot);
9862
          }
9863
          oprot.writeListEnd();
9864
        }
9865
        oprot.writeFieldEnd();
9866
      } else if (this.isSetEx()) {
9867
        oprot.writeFieldBegin(EX_FIELD_DESC);
9868
        this.ex.write(oprot);
9869
        oprot.writeFieldEnd();
9870
      }
9871
      oprot.writeFieldStop();
9872
      oprot.writeStructEnd();
9873
    }
9874
 
9875
    @Override
9876
    public String toString() {
9877
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
9878
      boolean first = true;
9879
 
9880
      sb.append("success:");
9881
      if (this.success == null) {
9882
        sb.append("null");
9883
      } else {
9884
        sb.append(this.success);
9885
      }
9886
      first = false;
9887
      if (!first) sb.append(", ");
9888
      sb.append("ex:");
9889
      if (this.ex == null) {
9890
        sb.append("null");
9891
      } else {
9892
        sb.append(this.ex);
9893
      }
9894
      first = false;
9895
      sb.append(")");
9896
      return sb.toString();
9897
    }
9898
 
9899
    public void validate() throws TException {
9900
      // check for required fields
9901
    }
9902
 
9903
  }
9904
 
1382 varun.gupt 9905
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
9906
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
9907
 
9908
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
9909
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
9910
 
9911
    private long customer_id;
9912
    private long limit;
9913
 
9914
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9915
    public enum _Fields implements TFieldIdEnum {
9916
      CUSTOMER_ID((short)1, "customer_id"),
9917
      LIMIT((short)2, "limit");
9918
 
9919
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9920
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9921
 
9922
      static {
9923
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9924
          byId.put((int)field._thriftId, field);
9925
          byName.put(field.getFieldName(), field);
9926
        }
9927
      }
9928
 
9929
      /**
9930
       * Find the _Fields constant that matches fieldId, or null if its not found.
9931
       */
9932
      public static _Fields findByThriftId(int fieldId) {
9933
        return byId.get(fieldId);
9934
      }
9935
 
9936
      /**
9937
       * Find the _Fields constant that matches fieldId, throwing an exception
9938
       * if it is not found.
9939
       */
9940
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9941
        _Fields fields = findByThriftId(fieldId);
9942
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9943
        return fields;
9944
      }
9945
 
9946
      /**
9947
       * Find the _Fields constant that matches name, or null if its not found.
9948
       */
9949
      public static _Fields findByName(String name) {
9950
        return byName.get(name);
9951
      }
9952
 
9953
      private final short _thriftId;
9954
      private final String _fieldName;
9955
 
9956
      _Fields(short thriftId, String fieldName) {
9957
        _thriftId = thriftId;
9958
        _fieldName = fieldName;
9959
      }
9960
 
9961
      public short getThriftFieldId() {
9962
        return _thriftId;
9963
      }
9964
 
9965
      public String getFieldName() {
9966
        return _fieldName;
9967
      }
9968
    }
9969
 
9970
    // isset id assignments
9971
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
9972
    private static final int __LIMIT_ISSET_ID = 1;
9973
    private BitSet __isset_bit_vector = new BitSet(2);
9974
 
9975
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9976
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
9977
          new FieldValueMetaData(TType.I64)));
9978
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
9979
          new FieldValueMetaData(TType.I64)));
9980
    }});
9981
 
9982
    static {
9983
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
9984
    }
9985
 
9986
    public getReturnableOrdersForCustomer_args() {
9987
    }
9988
 
9989
    public getReturnableOrdersForCustomer_args(
9990
      long customer_id,
9991
      long limit)
9992
    {
9993
      this();
9994
      this.customer_id = customer_id;
9995
      setCustomer_idIsSet(true);
9996
      this.limit = limit;
9997
      setLimitIsSet(true);
9998
    }
9999
 
10000
    /**
10001
     * Performs a deep copy on <i>other</i>.
10002
     */
10003
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
10004
      __isset_bit_vector.clear();
10005
      __isset_bit_vector.or(other.__isset_bit_vector);
10006
      this.customer_id = other.customer_id;
10007
      this.limit = other.limit;
10008
    }
10009
 
10010
    public getReturnableOrdersForCustomer_args deepCopy() {
10011
      return new getReturnableOrdersForCustomer_args(this);
10012
    }
10013
 
10014
    @Deprecated
10015
    public getReturnableOrdersForCustomer_args clone() {
10016
      return new getReturnableOrdersForCustomer_args(this);
10017
    }
10018
 
10019
    public long getCustomer_id() {
10020
      return this.customer_id;
10021
    }
10022
 
10023
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
10024
      this.customer_id = customer_id;
10025
      setCustomer_idIsSet(true);
10026
      return this;
10027
    }
10028
 
10029
    public void unsetCustomer_id() {
10030
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10031
    }
10032
 
10033
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10034
    public boolean isSetCustomer_id() {
10035
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10036
    }
10037
 
10038
    public void setCustomer_idIsSet(boolean value) {
10039
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10040
    }
10041
 
10042
    public long getLimit() {
10043
      return this.limit;
10044
    }
10045
 
10046
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
10047
      this.limit = limit;
10048
      setLimitIsSet(true);
10049
      return this;
10050
    }
10051
 
10052
    public void unsetLimit() {
10053
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10054
    }
10055
 
10056
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10057
    public boolean isSetLimit() {
10058
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10059
    }
10060
 
10061
    public void setLimitIsSet(boolean value) {
10062
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10063
    }
10064
 
10065
    public void setFieldValue(_Fields field, Object value) {
10066
      switch (field) {
10067
      case CUSTOMER_ID:
10068
        if (value == null) {
10069
          unsetCustomer_id();
10070
        } else {
10071
          setCustomer_id((Long)value);
10072
        }
10073
        break;
10074
 
10075
      case LIMIT:
10076
        if (value == null) {
10077
          unsetLimit();
10078
        } else {
10079
          setLimit((Long)value);
10080
        }
10081
        break;
10082
 
10083
      }
10084
    }
10085
 
10086
    public void setFieldValue(int fieldID, Object value) {
10087
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10088
    }
10089
 
10090
    public Object getFieldValue(_Fields field) {
10091
      switch (field) {
10092
      case CUSTOMER_ID:
10093
        return new Long(getCustomer_id());
10094
 
10095
      case LIMIT:
10096
        return new Long(getLimit());
10097
 
10098
      }
10099
      throw new IllegalStateException();
10100
    }
10101
 
10102
    public Object getFieldValue(int fieldId) {
10103
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10104
    }
10105
 
10106
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10107
    public boolean isSet(_Fields field) {
10108
      switch (field) {
10109
      case CUSTOMER_ID:
10110
        return isSetCustomer_id();
10111
      case LIMIT:
10112
        return isSetLimit();
10113
      }
10114
      throw new IllegalStateException();
10115
    }
10116
 
10117
    public boolean isSet(int fieldID) {
10118
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10119
    }
10120
 
10121
    @Override
10122
    public boolean equals(Object that) {
10123
      if (that == null)
10124
        return false;
10125
      if (that instanceof getReturnableOrdersForCustomer_args)
10126
        return this.equals((getReturnableOrdersForCustomer_args)that);
10127
      return false;
10128
    }
10129
 
10130
    public boolean equals(getReturnableOrdersForCustomer_args that) {
10131
      if (that == null)
10132
        return false;
10133
 
10134
      boolean this_present_customer_id = true;
10135
      boolean that_present_customer_id = true;
10136
      if (this_present_customer_id || that_present_customer_id) {
10137
        if (!(this_present_customer_id && that_present_customer_id))
10138
          return false;
10139
        if (this.customer_id != that.customer_id)
10140
          return false;
10141
      }
10142
 
10143
      boolean this_present_limit = true;
10144
      boolean that_present_limit = true;
10145
      if (this_present_limit || that_present_limit) {
10146
        if (!(this_present_limit && that_present_limit))
10147
          return false;
10148
        if (this.limit != that.limit)
10149
          return false;
10150
      }
10151
 
10152
      return true;
10153
    }
10154
 
10155
    @Override
10156
    public int hashCode() {
10157
      return 0;
10158
    }
10159
 
10160
    public int compareTo(getReturnableOrdersForCustomer_args other) {
10161
      if (!getClass().equals(other.getClass())) {
10162
        return getClass().getName().compareTo(other.getClass().getName());
10163
      }
10164
 
10165
      int lastComparison = 0;
10166
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
10167
 
10168
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10169
      if (lastComparison != 0) {
10170
        return lastComparison;
10171
      }
10172
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10173
      if (lastComparison != 0) {
10174
        return lastComparison;
10175
      }
10176
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10177
      if (lastComparison != 0) {
10178
        return lastComparison;
10179
      }
10180
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10181
      if (lastComparison != 0) {
10182
        return lastComparison;
10183
      }
10184
      return 0;
10185
    }
10186
 
10187
    public void read(TProtocol iprot) throws TException {
10188
      TField field;
10189
      iprot.readStructBegin();
10190
      while (true)
10191
      {
10192
        field = iprot.readFieldBegin();
10193
        if (field.type == TType.STOP) { 
10194
          break;
10195
        }
10196
        _Fields fieldId = _Fields.findByThriftId(field.id);
10197
        if (fieldId == null) {
10198
          TProtocolUtil.skip(iprot, field.type);
10199
        } else {
10200
          switch (fieldId) {
10201
            case CUSTOMER_ID:
10202
              if (field.type == TType.I64) {
10203
                this.customer_id = iprot.readI64();
10204
                setCustomer_idIsSet(true);
10205
              } else { 
10206
                TProtocolUtil.skip(iprot, field.type);
10207
              }
10208
              break;
10209
            case LIMIT:
10210
              if (field.type == TType.I64) {
10211
                this.limit = iprot.readI64();
10212
                setLimitIsSet(true);
10213
              } else { 
10214
                TProtocolUtil.skip(iprot, field.type);
10215
              }
10216
              break;
10217
          }
10218
          iprot.readFieldEnd();
10219
        }
10220
      }
10221
      iprot.readStructEnd();
10222
      validate();
10223
    }
10224
 
10225
    public void write(TProtocol oprot) throws TException {
10226
      validate();
10227
 
10228
      oprot.writeStructBegin(STRUCT_DESC);
10229
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10230
      oprot.writeI64(this.customer_id);
10231
      oprot.writeFieldEnd();
10232
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10233
      oprot.writeI64(this.limit);
10234
      oprot.writeFieldEnd();
10235
      oprot.writeFieldStop();
10236
      oprot.writeStructEnd();
10237
    }
10238
 
10239
    @Override
10240
    public String toString() {
10241
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
10242
      boolean first = true;
10243
 
10244
      sb.append("customer_id:");
10245
      sb.append(this.customer_id);
10246
      first = false;
10247
      if (!first) sb.append(", ");
10248
      sb.append("limit:");
10249
      sb.append(this.limit);
10250
      first = false;
10251
      sb.append(")");
10252
      return sb.toString();
10253
    }
10254
 
10255
    public void validate() throws TException {
10256
      // check for required fields
10257
    }
10258
 
10259
  }
10260
 
10261
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
10262
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
10263
 
10264
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10265
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10266
 
10267
    private List<Long> success;
10268
    private TransactionServiceException ex;
10269
 
10270
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10271
    public enum _Fields implements TFieldIdEnum {
10272
      SUCCESS((short)0, "success"),
10273
      EX((short)1, "ex");
10274
 
10275
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10276
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10277
 
10278
      static {
10279
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10280
          byId.put((int)field._thriftId, field);
10281
          byName.put(field.getFieldName(), field);
10282
        }
10283
      }
10284
 
10285
      /**
10286
       * Find the _Fields constant that matches fieldId, or null if its not found.
10287
       */
10288
      public static _Fields findByThriftId(int fieldId) {
10289
        return byId.get(fieldId);
10290
      }
10291
 
10292
      /**
10293
       * Find the _Fields constant that matches fieldId, throwing an exception
10294
       * if it is not found.
10295
       */
10296
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10297
        _Fields fields = findByThriftId(fieldId);
10298
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10299
        return fields;
10300
      }
10301
 
10302
      /**
10303
       * Find the _Fields constant that matches name, or null if its not found.
10304
       */
10305
      public static _Fields findByName(String name) {
10306
        return byName.get(name);
10307
      }
10308
 
10309
      private final short _thriftId;
10310
      private final String _fieldName;
10311
 
10312
      _Fields(short thriftId, String fieldName) {
10313
        _thriftId = thriftId;
10314
        _fieldName = fieldName;
10315
      }
10316
 
10317
      public short getThriftFieldId() {
10318
        return _thriftId;
10319
      }
10320
 
10321
      public String getFieldName() {
10322
        return _fieldName;
10323
      }
10324
    }
10325
 
10326
    // isset id assignments
10327
 
10328
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10329
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10330
          new ListMetaData(TType.LIST, 
10331
              new FieldValueMetaData(TType.I64))));
10332
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10333
          new FieldValueMetaData(TType.STRUCT)));
10334
    }});
10335
 
10336
    static {
10337
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10338
    }
10339
 
10340
    public getReturnableOrdersForCustomer_result() {
10341
    }
10342
 
10343
    public getReturnableOrdersForCustomer_result(
10344
      List<Long> success,
10345
      TransactionServiceException ex)
10346
    {
10347
      this();
10348
      this.success = success;
10349
      this.ex = ex;
10350
    }
10351
 
10352
    /**
10353
     * Performs a deep copy on <i>other</i>.
10354
     */
10355
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10356
      if (other.isSetSuccess()) {
10357
        List<Long> __this__success = new ArrayList<Long>();
10358
        for (Long other_element : other.success) {
10359
          __this__success.add(other_element);
10360
        }
10361
        this.success = __this__success;
10362
      }
10363
      if (other.isSetEx()) {
10364
        this.ex = new TransactionServiceException(other.ex);
10365
      }
10366
    }
10367
 
10368
    public getReturnableOrdersForCustomer_result deepCopy() {
10369
      return new getReturnableOrdersForCustomer_result(this);
10370
    }
10371
 
10372
    @Deprecated
10373
    public getReturnableOrdersForCustomer_result clone() {
10374
      return new getReturnableOrdersForCustomer_result(this);
10375
    }
10376
 
10377
    public int getSuccessSize() {
10378
      return (this.success == null) ? 0 : this.success.size();
10379
    }
10380
 
10381
    public java.util.Iterator<Long> getSuccessIterator() {
10382
      return (this.success == null) ? null : this.success.iterator();
10383
    }
10384
 
10385
    public void addToSuccess(long elem) {
10386
      if (this.success == null) {
10387
        this.success = new ArrayList<Long>();
10388
      }
10389
      this.success.add(elem);
10390
    }
10391
 
10392
    public List<Long> getSuccess() {
10393
      return this.success;
10394
    }
10395
 
10396
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10397
      this.success = success;
10398
      return this;
10399
    }
10400
 
10401
    public void unsetSuccess() {
10402
      this.success = null;
10403
    }
10404
 
10405
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10406
    public boolean isSetSuccess() {
10407
      return this.success != null;
10408
    }
10409
 
10410
    public void setSuccessIsSet(boolean value) {
10411
      if (!value) {
10412
        this.success = null;
10413
      }
10414
    }
10415
 
10416
    public TransactionServiceException getEx() {
10417
      return this.ex;
10418
    }
10419
 
10420
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10421
      this.ex = ex;
10422
      return this;
10423
    }
10424
 
10425
    public void unsetEx() {
10426
      this.ex = null;
10427
    }
10428
 
10429
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10430
    public boolean isSetEx() {
10431
      return this.ex != null;
10432
    }
10433
 
10434
    public void setExIsSet(boolean value) {
10435
      if (!value) {
10436
        this.ex = null;
10437
      }
10438
    }
10439
 
10440
    public void setFieldValue(_Fields field, Object value) {
10441
      switch (field) {
10442
      case SUCCESS:
10443
        if (value == null) {
10444
          unsetSuccess();
10445
        } else {
10446
          setSuccess((List<Long>)value);
10447
        }
10448
        break;
10449
 
10450
      case EX:
10451
        if (value == null) {
10452
          unsetEx();
10453
        } else {
10454
          setEx((TransactionServiceException)value);
10455
        }
10456
        break;
10457
 
10458
      }
10459
    }
10460
 
10461
    public void setFieldValue(int fieldID, Object value) {
10462
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10463
    }
10464
 
10465
    public Object getFieldValue(_Fields field) {
10466
      switch (field) {
10467
      case SUCCESS:
10468
        return getSuccess();
10469
 
10470
      case EX:
10471
        return getEx();
10472
 
10473
      }
10474
      throw new IllegalStateException();
10475
    }
10476
 
10477
    public Object getFieldValue(int fieldId) {
10478
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10479
    }
10480
 
10481
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10482
    public boolean isSet(_Fields field) {
10483
      switch (field) {
10484
      case SUCCESS:
10485
        return isSetSuccess();
10486
      case EX:
10487
        return isSetEx();
10488
      }
10489
      throw new IllegalStateException();
10490
    }
10491
 
10492
    public boolean isSet(int fieldID) {
10493
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10494
    }
10495
 
10496
    @Override
10497
    public boolean equals(Object that) {
10498
      if (that == null)
10499
        return false;
10500
      if (that instanceof getReturnableOrdersForCustomer_result)
10501
        return this.equals((getReturnableOrdersForCustomer_result)that);
10502
      return false;
10503
    }
10504
 
10505
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10506
      if (that == null)
10507
        return false;
10508
 
10509
      boolean this_present_success = true && this.isSetSuccess();
10510
      boolean that_present_success = true && that.isSetSuccess();
10511
      if (this_present_success || that_present_success) {
10512
        if (!(this_present_success && that_present_success))
10513
          return false;
10514
        if (!this.success.equals(that.success))
10515
          return false;
10516
      }
10517
 
10518
      boolean this_present_ex = true && this.isSetEx();
10519
      boolean that_present_ex = true && that.isSetEx();
10520
      if (this_present_ex || that_present_ex) {
10521
        if (!(this_present_ex && that_present_ex))
10522
          return false;
10523
        if (!this.ex.equals(that.ex))
10524
          return false;
10525
      }
10526
 
10527
      return true;
10528
    }
10529
 
10530
    @Override
10531
    public int hashCode() {
10532
      return 0;
10533
    }
10534
 
10535
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10536
      if (!getClass().equals(other.getClass())) {
10537
        return getClass().getName().compareTo(other.getClass().getName());
10538
      }
10539
 
10540
      int lastComparison = 0;
10541
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10542
 
10543
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10544
      if (lastComparison != 0) {
10545
        return lastComparison;
10546
      }
10547
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10548
      if (lastComparison != 0) {
10549
        return lastComparison;
10550
      }
10551
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10552
      if (lastComparison != 0) {
10553
        return lastComparison;
10554
      }
10555
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10556
      if (lastComparison != 0) {
10557
        return lastComparison;
10558
      }
10559
      return 0;
10560
    }
10561
 
10562
    public void read(TProtocol iprot) throws TException {
10563
      TField field;
10564
      iprot.readStructBegin();
10565
      while (true)
10566
      {
10567
        field = iprot.readFieldBegin();
10568
        if (field.type == TType.STOP) { 
10569
          break;
10570
        }
10571
        _Fields fieldId = _Fields.findByThriftId(field.id);
10572
        if (fieldId == null) {
10573
          TProtocolUtil.skip(iprot, field.type);
10574
        } else {
10575
          switch (fieldId) {
10576
            case SUCCESS:
10577
              if (field.type == TType.LIST) {
10578
                {
10579
                  TList _list24 = iprot.readListBegin();
10580
                  this.success = new ArrayList<Long>(_list24.size);
10581
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10582
                  {
10583
                    long _elem26;
10584
                    _elem26 = iprot.readI64();
10585
                    this.success.add(_elem26);
10586
                  }
10587
                  iprot.readListEnd();
10588
                }
10589
              } else { 
10590
                TProtocolUtil.skip(iprot, field.type);
10591
              }
10592
              break;
10593
            case EX:
10594
              if (field.type == TType.STRUCT) {
10595
                this.ex = new TransactionServiceException();
10596
                this.ex.read(iprot);
10597
              } else { 
10598
                TProtocolUtil.skip(iprot, field.type);
10599
              }
10600
              break;
10601
          }
10602
          iprot.readFieldEnd();
10603
        }
10604
      }
10605
      iprot.readStructEnd();
10606
      validate();
10607
    }
10608
 
10609
    public void write(TProtocol oprot) throws TException {
10610
      oprot.writeStructBegin(STRUCT_DESC);
10611
 
10612
      if (this.isSetSuccess()) {
10613
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10614
        {
10615
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
10616
          for (long _iter27 : this.success)
10617
          {
10618
            oprot.writeI64(_iter27);
10619
          }
10620
          oprot.writeListEnd();
10621
        }
10622
        oprot.writeFieldEnd();
10623
      } else if (this.isSetEx()) {
10624
        oprot.writeFieldBegin(EX_FIELD_DESC);
10625
        this.ex.write(oprot);
10626
        oprot.writeFieldEnd();
10627
      }
10628
      oprot.writeFieldStop();
10629
      oprot.writeStructEnd();
10630
    }
10631
 
10632
    @Override
10633
    public String toString() {
10634
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
10635
      boolean first = true;
10636
 
10637
      sb.append("success:");
10638
      if (this.success == null) {
10639
        sb.append("null");
10640
      } else {
10641
        sb.append(this.success);
10642
      }
10643
      first = false;
10644
      if (!first) sb.append(", ");
10645
      sb.append("ex:");
10646
      if (this.ex == null) {
10647
        sb.append("null");
10648
      } else {
10649
        sb.append(this.ex);
10650
      }
10651
      first = false;
10652
      sb.append(")");
10653
      return sb.toString();
10654
    }
10655
 
10656
    public void validate() throws TException {
10657
      // check for required fields
10658
    }
10659
 
10660
  }
10661
 
10662
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
10663
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
10664
 
10665
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10666
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10667
 
10668
    private long customer_id;
10669
    private long limit;
10670
 
10671
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10672
    public enum _Fields implements TFieldIdEnum {
10673
      CUSTOMER_ID((short)1, "customer_id"),
10674
      LIMIT((short)2, "limit");
10675
 
10676
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10677
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10678
 
10679
      static {
10680
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10681
          byId.put((int)field._thriftId, field);
10682
          byName.put(field.getFieldName(), field);
10683
        }
10684
      }
10685
 
10686
      /**
10687
       * Find the _Fields constant that matches fieldId, or null if its not found.
10688
       */
10689
      public static _Fields findByThriftId(int fieldId) {
10690
        return byId.get(fieldId);
10691
      }
10692
 
10693
      /**
10694
       * Find the _Fields constant that matches fieldId, throwing an exception
10695
       * if it is not found.
10696
       */
10697
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10698
        _Fields fields = findByThriftId(fieldId);
10699
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10700
        return fields;
10701
      }
10702
 
10703
      /**
10704
       * Find the _Fields constant that matches name, or null if its not found.
10705
       */
10706
      public static _Fields findByName(String name) {
10707
        return byName.get(name);
10708
      }
10709
 
10710
      private final short _thriftId;
10711
      private final String _fieldName;
10712
 
10713
      _Fields(short thriftId, String fieldName) {
10714
        _thriftId = thriftId;
10715
        _fieldName = fieldName;
10716
      }
10717
 
10718
      public short getThriftFieldId() {
10719
        return _thriftId;
10720
      }
10721
 
10722
      public String getFieldName() {
10723
        return _fieldName;
10724
      }
10725
    }
10726
 
10727
    // isset id assignments
10728
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10729
    private static final int __LIMIT_ISSET_ID = 1;
10730
    private BitSet __isset_bit_vector = new BitSet(2);
10731
 
10732
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10733
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10734
          new FieldValueMetaData(TType.I64)));
10735
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10736
          new FieldValueMetaData(TType.I64)));
10737
    }});
10738
 
10739
    static {
10740
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
10741
    }
10742
 
10743
    public getCancellableOrdersForCustomer_args() {
10744
    }
10745
 
10746
    public getCancellableOrdersForCustomer_args(
10747
      long customer_id,
10748
      long limit)
10749
    {
10750
      this();
10751
      this.customer_id = customer_id;
10752
      setCustomer_idIsSet(true);
10753
      this.limit = limit;
10754
      setLimitIsSet(true);
10755
    }
10756
 
10757
    /**
10758
     * Performs a deep copy on <i>other</i>.
10759
     */
10760
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
10761
      __isset_bit_vector.clear();
10762
      __isset_bit_vector.or(other.__isset_bit_vector);
10763
      this.customer_id = other.customer_id;
10764
      this.limit = other.limit;
10765
    }
10766
 
10767
    public getCancellableOrdersForCustomer_args deepCopy() {
10768
      return new getCancellableOrdersForCustomer_args(this);
10769
    }
10770
 
10771
    @Deprecated
10772
    public getCancellableOrdersForCustomer_args clone() {
10773
      return new getCancellableOrdersForCustomer_args(this);
10774
    }
10775
 
10776
    public long getCustomer_id() {
10777
      return this.customer_id;
10778
    }
10779
 
10780
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
10781
      this.customer_id = customer_id;
10782
      setCustomer_idIsSet(true);
10783
      return this;
10784
    }
10785
 
10786
    public void unsetCustomer_id() {
10787
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10788
    }
10789
 
10790
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10791
    public boolean isSetCustomer_id() {
10792
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10793
    }
10794
 
10795
    public void setCustomer_idIsSet(boolean value) {
10796
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10797
    }
10798
 
10799
    public long getLimit() {
10800
      return this.limit;
10801
    }
10802
 
10803
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
10804
      this.limit = limit;
10805
      setLimitIsSet(true);
10806
      return this;
10807
    }
10808
 
10809
    public void unsetLimit() {
10810
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10811
    }
10812
 
10813
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10814
    public boolean isSetLimit() {
10815
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10816
    }
10817
 
10818
    public void setLimitIsSet(boolean value) {
10819
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10820
    }
10821
 
10822
    public void setFieldValue(_Fields field, Object value) {
10823
      switch (field) {
10824
      case CUSTOMER_ID:
10825
        if (value == null) {
10826
          unsetCustomer_id();
10827
        } else {
10828
          setCustomer_id((Long)value);
10829
        }
10830
        break;
10831
 
10832
      case LIMIT:
10833
        if (value == null) {
10834
          unsetLimit();
10835
        } else {
10836
          setLimit((Long)value);
10837
        }
10838
        break;
10839
 
10840
      }
10841
    }
10842
 
10843
    public void setFieldValue(int fieldID, Object value) {
10844
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10845
    }
10846
 
10847
    public Object getFieldValue(_Fields field) {
10848
      switch (field) {
10849
      case CUSTOMER_ID:
10850
        return new Long(getCustomer_id());
10851
 
10852
      case LIMIT:
10853
        return new Long(getLimit());
10854
 
10855
      }
10856
      throw new IllegalStateException();
10857
    }
10858
 
10859
    public Object getFieldValue(int fieldId) {
10860
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10861
    }
10862
 
10863
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10864
    public boolean isSet(_Fields field) {
10865
      switch (field) {
10866
      case CUSTOMER_ID:
10867
        return isSetCustomer_id();
10868
      case LIMIT:
10869
        return isSetLimit();
10870
      }
10871
      throw new IllegalStateException();
10872
    }
10873
 
10874
    public boolean isSet(int fieldID) {
10875
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10876
    }
10877
 
10878
    @Override
10879
    public boolean equals(Object that) {
10880
      if (that == null)
10881
        return false;
10882
      if (that instanceof getCancellableOrdersForCustomer_args)
10883
        return this.equals((getCancellableOrdersForCustomer_args)that);
10884
      return false;
10885
    }
10886
 
10887
    public boolean equals(getCancellableOrdersForCustomer_args that) {
10888
      if (that == null)
10889
        return false;
10890
 
10891
      boolean this_present_customer_id = true;
10892
      boolean that_present_customer_id = true;
10893
      if (this_present_customer_id || that_present_customer_id) {
10894
        if (!(this_present_customer_id && that_present_customer_id))
10895
          return false;
10896
        if (this.customer_id != that.customer_id)
10897
          return false;
10898
      }
10899
 
10900
      boolean this_present_limit = true;
10901
      boolean that_present_limit = true;
10902
      if (this_present_limit || that_present_limit) {
10903
        if (!(this_present_limit && that_present_limit))
10904
          return false;
10905
        if (this.limit != that.limit)
10906
          return false;
10907
      }
10908
 
10909
      return true;
10910
    }
10911
 
10912
    @Override
10913
    public int hashCode() {
10914
      return 0;
10915
    }
10916
 
10917
    public int compareTo(getCancellableOrdersForCustomer_args other) {
10918
      if (!getClass().equals(other.getClass())) {
10919
        return getClass().getName().compareTo(other.getClass().getName());
10920
      }
10921
 
10922
      int lastComparison = 0;
10923
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
10924
 
10925
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10926
      if (lastComparison != 0) {
10927
        return lastComparison;
10928
      }
10929
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10930
      if (lastComparison != 0) {
10931
        return lastComparison;
10932
      }
10933
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10934
      if (lastComparison != 0) {
10935
        return lastComparison;
10936
      }
10937
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10938
      if (lastComparison != 0) {
10939
        return lastComparison;
10940
      }
10941
      return 0;
10942
    }
10943
 
10944
    public void read(TProtocol iprot) throws TException {
10945
      TField field;
10946
      iprot.readStructBegin();
10947
      while (true)
10948
      {
10949
        field = iprot.readFieldBegin();
10950
        if (field.type == TType.STOP) { 
10951
          break;
10952
        }
10953
        _Fields fieldId = _Fields.findByThriftId(field.id);
10954
        if (fieldId == null) {
10955
          TProtocolUtil.skip(iprot, field.type);
10956
        } else {
10957
          switch (fieldId) {
10958
            case CUSTOMER_ID:
10959
              if (field.type == TType.I64) {
10960
                this.customer_id = iprot.readI64();
10961
                setCustomer_idIsSet(true);
10962
              } else { 
10963
                TProtocolUtil.skip(iprot, field.type);
10964
              }
10965
              break;
10966
            case LIMIT:
10967
              if (field.type == TType.I64) {
10968
                this.limit = iprot.readI64();
10969
                setLimitIsSet(true);
10970
              } else { 
10971
                TProtocolUtil.skip(iprot, field.type);
10972
              }
10973
              break;
10974
          }
10975
          iprot.readFieldEnd();
10976
        }
10977
      }
10978
      iprot.readStructEnd();
10979
      validate();
10980
    }
10981
 
10982
    public void write(TProtocol oprot) throws TException {
10983
      validate();
10984
 
10985
      oprot.writeStructBegin(STRUCT_DESC);
10986
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10987
      oprot.writeI64(this.customer_id);
10988
      oprot.writeFieldEnd();
10989
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10990
      oprot.writeI64(this.limit);
10991
      oprot.writeFieldEnd();
10992
      oprot.writeFieldStop();
10993
      oprot.writeStructEnd();
10994
    }
10995
 
10996
    @Override
10997
    public String toString() {
10998
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
10999
      boolean first = true;
11000
 
11001
      sb.append("customer_id:");
11002
      sb.append(this.customer_id);
11003
      first = false;
11004
      if (!first) sb.append(", ");
11005
      sb.append("limit:");
11006
      sb.append(this.limit);
11007
      first = false;
11008
      sb.append(")");
11009
      return sb.toString();
11010
    }
11011
 
11012
    public void validate() throws TException {
11013
      // check for required fields
11014
    }
11015
 
11016
  }
11017
 
11018
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
11019
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
11020
 
11021
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11022
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11023
 
11024
    private List<Long> success;
11025
    private TransactionServiceException ex;
11026
 
11027
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11028
    public enum _Fields implements TFieldIdEnum {
11029
      SUCCESS((short)0, "success"),
11030
      EX((short)1, "ex");
11031
 
11032
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11033
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11034
 
11035
      static {
11036
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11037
          byId.put((int)field._thriftId, field);
11038
          byName.put(field.getFieldName(), field);
11039
        }
11040
      }
11041
 
11042
      /**
11043
       * Find the _Fields constant that matches fieldId, or null if its not found.
11044
       */
11045
      public static _Fields findByThriftId(int fieldId) {
11046
        return byId.get(fieldId);
11047
      }
11048
 
11049
      /**
11050
       * Find the _Fields constant that matches fieldId, throwing an exception
11051
       * if it is not found.
11052
       */
11053
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11054
        _Fields fields = findByThriftId(fieldId);
11055
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11056
        return fields;
11057
      }
11058
 
11059
      /**
11060
       * Find the _Fields constant that matches name, or null if its not found.
11061
       */
11062
      public static _Fields findByName(String name) {
11063
        return byName.get(name);
11064
      }
11065
 
11066
      private final short _thriftId;
11067
      private final String _fieldName;
11068
 
11069
      _Fields(short thriftId, String fieldName) {
11070
        _thriftId = thriftId;
11071
        _fieldName = fieldName;
11072
      }
11073
 
11074
      public short getThriftFieldId() {
11075
        return _thriftId;
11076
      }
11077
 
11078
      public String getFieldName() {
11079
        return _fieldName;
11080
      }
11081
    }
11082
 
11083
    // isset id assignments
11084
 
11085
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11086
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11087
          new ListMetaData(TType.LIST, 
11088
              new FieldValueMetaData(TType.I64))));
11089
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11090
          new FieldValueMetaData(TType.STRUCT)));
11091
    }});
11092
 
11093
    static {
11094
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
11095
    }
11096
 
11097
    public getCancellableOrdersForCustomer_result() {
11098
    }
11099
 
11100
    public getCancellableOrdersForCustomer_result(
11101
      List<Long> success,
11102
      TransactionServiceException ex)
11103
    {
11104
      this();
11105
      this.success = success;
11106
      this.ex = ex;
11107
    }
11108
 
11109
    /**
11110
     * Performs a deep copy on <i>other</i>.
11111
     */
11112
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
11113
      if (other.isSetSuccess()) {
11114
        List<Long> __this__success = new ArrayList<Long>();
11115
        for (Long other_element : other.success) {
11116
          __this__success.add(other_element);
11117
        }
11118
        this.success = __this__success;
11119
      }
11120
      if (other.isSetEx()) {
11121
        this.ex = new TransactionServiceException(other.ex);
11122
      }
11123
    }
11124
 
11125
    public getCancellableOrdersForCustomer_result deepCopy() {
11126
      return new getCancellableOrdersForCustomer_result(this);
11127
    }
11128
 
11129
    @Deprecated
11130
    public getCancellableOrdersForCustomer_result clone() {
11131
      return new getCancellableOrdersForCustomer_result(this);
11132
    }
11133
 
11134
    public int getSuccessSize() {
11135
      return (this.success == null) ? 0 : this.success.size();
11136
    }
11137
 
11138
    public java.util.Iterator<Long> getSuccessIterator() {
11139
      return (this.success == null) ? null : this.success.iterator();
11140
    }
11141
 
11142
    public void addToSuccess(long elem) {
11143
      if (this.success == null) {
11144
        this.success = new ArrayList<Long>();
11145
      }
11146
      this.success.add(elem);
11147
    }
11148
 
11149
    public List<Long> getSuccess() {
11150
      return this.success;
11151
    }
11152
 
11153
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
11154
      this.success = success;
11155
      return this;
11156
    }
11157
 
11158
    public void unsetSuccess() {
11159
      this.success = null;
11160
    }
11161
 
11162
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11163
    public boolean isSetSuccess() {
11164
      return this.success != null;
11165
    }
11166
 
11167
    public void setSuccessIsSet(boolean value) {
11168
      if (!value) {
11169
        this.success = null;
11170
      }
11171
    }
11172
 
11173
    public TransactionServiceException getEx() {
11174
      return this.ex;
11175
    }
11176
 
11177
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11178
      this.ex = ex;
11179
      return this;
11180
    }
11181
 
11182
    public void unsetEx() {
11183
      this.ex = null;
11184
    }
11185
 
11186
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11187
    public boolean isSetEx() {
11188
      return this.ex != null;
11189
    }
11190
 
11191
    public void setExIsSet(boolean value) {
11192
      if (!value) {
11193
        this.ex = null;
11194
      }
11195
    }
11196
 
11197
    public void setFieldValue(_Fields field, Object value) {
11198
      switch (field) {
11199
      case SUCCESS:
11200
        if (value == null) {
11201
          unsetSuccess();
11202
        } else {
11203
          setSuccess((List<Long>)value);
11204
        }
11205
        break;
11206
 
11207
      case EX:
11208
        if (value == null) {
11209
          unsetEx();
11210
        } else {
11211
          setEx((TransactionServiceException)value);
11212
        }
11213
        break;
11214
 
11215
      }
11216
    }
11217
 
11218
    public void setFieldValue(int fieldID, Object value) {
11219
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11220
    }
11221
 
11222
    public Object getFieldValue(_Fields field) {
11223
      switch (field) {
11224
      case SUCCESS:
11225
        return getSuccess();
11226
 
11227
      case EX:
11228
        return getEx();
11229
 
11230
      }
11231
      throw new IllegalStateException();
11232
    }
11233
 
11234
    public Object getFieldValue(int fieldId) {
11235
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11236
    }
11237
 
11238
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11239
    public boolean isSet(_Fields field) {
11240
      switch (field) {
11241
      case SUCCESS:
11242
        return isSetSuccess();
11243
      case EX:
11244
        return isSetEx();
11245
      }
11246
      throw new IllegalStateException();
11247
    }
11248
 
11249
    public boolean isSet(int fieldID) {
11250
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11251
    }
11252
 
11253
    @Override
11254
    public boolean equals(Object that) {
11255
      if (that == null)
11256
        return false;
11257
      if (that instanceof getCancellableOrdersForCustomer_result)
11258
        return this.equals((getCancellableOrdersForCustomer_result)that);
11259
      return false;
11260
    }
11261
 
11262
    public boolean equals(getCancellableOrdersForCustomer_result that) {
11263
      if (that == null)
11264
        return false;
11265
 
11266
      boolean this_present_success = true && this.isSetSuccess();
11267
      boolean that_present_success = true && that.isSetSuccess();
11268
      if (this_present_success || that_present_success) {
11269
        if (!(this_present_success && that_present_success))
11270
          return false;
11271
        if (!this.success.equals(that.success))
11272
          return false;
11273
      }
11274
 
11275
      boolean this_present_ex = true && this.isSetEx();
11276
      boolean that_present_ex = true && that.isSetEx();
11277
      if (this_present_ex || that_present_ex) {
11278
        if (!(this_present_ex && that_present_ex))
11279
          return false;
11280
        if (!this.ex.equals(that.ex))
11281
          return false;
11282
      }
11283
 
11284
      return true;
11285
    }
11286
 
11287
    @Override
11288
    public int hashCode() {
11289
      return 0;
11290
    }
11291
 
11292
    public int compareTo(getCancellableOrdersForCustomer_result other) {
11293
      if (!getClass().equals(other.getClass())) {
11294
        return getClass().getName().compareTo(other.getClass().getName());
11295
      }
11296
 
11297
      int lastComparison = 0;
11298
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
11299
 
11300
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11301
      if (lastComparison != 0) {
11302
        return lastComparison;
11303
      }
11304
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11305
      if (lastComparison != 0) {
11306
        return lastComparison;
11307
      }
11308
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11309
      if (lastComparison != 0) {
11310
        return lastComparison;
11311
      }
11312
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11313
      if (lastComparison != 0) {
11314
        return lastComparison;
11315
      }
11316
      return 0;
11317
    }
11318
 
11319
    public void read(TProtocol iprot) throws TException {
11320
      TField field;
11321
      iprot.readStructBegin();
11322
      while (true)
11323
      {
11324
        field = iprot.readFieldBegin();
11325
        if (field.type == TType.STOP) { 
11326
          break;
11327
        }
11328
        _Fields fieldId = _Fields.findByThriftId(field.id);
11329
        if (fieldId == null) {
11330
          TProtocolUtil.skip(iprot, field.type);
11331
        } else {
11332
          switch (fieldId) {
11333
            case SUCCESS:
11334
              if (field.type == TType.LIST) {
11335
                {
11336
                  TList _list28 = iprot.readListBegin();
11337
                  this.success = new ArrayList<Long>(_list28.size);
11338
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11339
                  {
11340
                    long _elem30;
11341
                    _elem30 = iprot.readI64();
11342
                    this.success.add(_elem30);
11343
                  }
11344
                  iprot.readListEnd();
11345
                }
11346
              } else { 
11347
                TProtocolUtil.skip(iprot, field.type);
11348
              }
11349
              break;
11350
            case EX:
11351
              if (field.type == TType.STRUCT) {
11352
                this.ex = new TransactionServiceException();
11353
                this.ex.read(iprot);
11354
              } else { 
11355
                TProtocolUtil.skip(iprot, field.type);
11356
              }
11357
              break;
11358
          }
11359
          iprot.readFieldEnd();
11360
        }
11361
      }
11362
      iprot.readStructEnd();
11363
      validate();
11364
    }
11365
 
11366
    public void write(TProtocol oprot) throws TException {
11367
      oprot.writeStructBegin(STRUCT_DESC);
11368
 
11369
      if (this.isSetSuccess()) {
11370
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11371
        {
11372
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11373
          for (long _iter31 : this.success)
11374
          {
11375
            oprot.writeI64(_iter31);
11376
          }
11377
          oprot.writeListEnd();
11378
        }
11379
        oprot.writeFieldEnd();
11380
      } else if (this.isSetEx()) {
11381
        oprot.writeFieldBegin(EX_FIELD_DESC);
11382
        this.ex.write(oprot);
11383
        oprot.writeFieldEnd();
11384
      }
11385
      oprot.writeFieldStop();
11386
      oprot.writeStructEnd();
11387
    }
11388
 
11389
    @Override
11390
    public String toString() {
11391
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11392
      boolean first = true;
11393
 
11394
      sb.append("success:");
11395
      if (this.success == null) {
11396
        sb.append("null");
11397
      } else {
11398
        sb.append(this.success);
11399
      }
11400
      first = false;
11401
      if (!first) sb.append(", ");
11402
      sb.append("ex:");
11403
      if (this.ex == null) {
11404
        sb.append("null");
11405
      } else {
11406
        sb.append(this.ex);
11407
      }
11408
      first = false;
11409
      sb.append(")");
11410
      return sb.toString();
11411
    }
11412
 
11413
    public void validate() throws TException {
11414
      // check for required fields
11415
    }
11416
 
11417
  }
11418
 
483 rajveer 11419
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11420
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11421
 
483 rajveer 11422
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11423
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11424
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11425
 
483 rajveer 11426
    private long orderId;
11427
    private OrderStatus status;
11428
    private String description;
68 ashish 11429
 
11430
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11431
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11432
      ORDER_ID((short)1, "orderId"),
11433
      /**
11434
       * 
11435
       * @see OrderStatus
11436
       */
11437
      STATUS((short)2, "status"),
11438
      DESCRIPTION((short)3, "description");
68 ashish 11439
 
11440
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11441
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11442
 
11443
      static {
11444
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11445
          byId.put((int)field._thriftId, field);
11446
          byName.put(field.getFieldName(), field);
11447
        }
11448
      }
11449
 
11450
      /**
11451
       * Find the _Fields constant that matches fieldId, or null if its not found.
11452
       */
11453
      public static _Fields findByThriftId(int fieldId) {
11454
        return byId.get(fieldId);
11455
      }
11456
 
11457
      /**
11458
       * Find the _Fields constant that matches fieldId, throwing an exception
11459
       * if it is not found.
11460
       */
11461
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11462
        _Fields fields = findByThriftId(fieldId);
11463
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11464
        return fields;
11465
      }
11466
 
11467
      /**
11468
       * Find the _Fields constant that matches name, or null if its not found.
11469
       */
11470
      public static _Fields findByName(String name) {
11471
        return byName.get(name);
11472
      }
11473
 
11474
      private final short _thriftId;
11475
      private final String _fieldName;
11476
 
11477
      _Fields(short thriftId, String fieldName) {
11478
        _thriftId = thriftId;
11479
        _fieldName = fieldName;
11480
      }
11481
 
11482
      public short getThriftFieldId() {
11483
        return _thriftId;
11484
      }
11485
 
11486
      public String getFieldName() {
11487
        return _fieldName;
11488
      }
11489
    }
11490
 
11491
    // isset id assignments
483 rajveer 11492
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11493
    private BitSet __isset_bit_vector = new BitSet(1);
11494
 
11495
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11496
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11497
          new FieldValueMetaData(TType.I64)));
483 rajveer 11498
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11499
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11500
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11501
          new FieldValueMetaData(TType.STRING)));
68 ashish 11502
    }});
11503
 
11504
    static {
483 rajveer 11505
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11506
    }
11507
 
483 rajveer 11508
    public changeOrderStatus_args() {
68 ashish 11509
    }
11510
 
483 rajveer 11511
    public changeOrderStatus_args(
11512
      long orderId,
11513
      OrderStatus status,
11514
      String description)
68 ashish 11515
    {
11516
      this();
483 rajveer 11517
      this.orderId = orderId;
11518
      setOrderIdIsSet(true);
11519
      this.status = status;
11520
      this.description = description;
68 ashish 11521
    }
11522
 
11523
    /**
11524
     * Performs a deep copy on <i>other</i>.
11525
     */
483 rajveer 11526
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11527
      __isset_bit_vector.clear();
11528
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11529
      this.orderId = other.orderId;
11530
      if (other.isSetStatus()) {
11531
        this.status = other.status;
11532
      }
11533
      if (other.isSetDescription()) {
11534
        this.description = other.description;
11535
      }
68 ashish 11536
    }
11537
 
483 rajveer 11538
    public changeOrderStatus_args deepCopy() {
11539
      return new changeOrderStatus_args(this);
68 ashish 11540
    }
11541
 
11542
    @Deprecated
483 rajveer 11543
    public changeOrderStatus_args clone() {
11544
      return new changeOrderStatus_args(this);
68 ashish 11545
    }
11546
 
483 rajveer 11547
    public long getOrderId() {
11548
      return this.orderId;
68 ashish 11549
    }
11550
 
483 rajveer 11551
    public changeOrderStatus_args setOrderId(long orderId) {
11552
      this.orderId = orderId;
11553
      setOrderIdIsSet(true);
68 ashish 11554
      return this;
11555
    }
11556
 
483 rajveer 11557
    public void unsetOrderId() {
11558
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11559
    }
11560
 
483 rajveer 11561
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11562
    public boolean isSetOrderId() {
11563
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11564
    }
11565
 
483 rajveer 11566
    public void setOrderIdIsSet(boolean value) {
11567
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11568
    }
11569
 
483 rajveer 11570
    /**
11571
     * 
11572
     * @see OrderStatus
11573
     */
11574
    public OrderStatus getStatus() {
11575
      return this.status;
68 ashish 11576
    }
11577
 
11578
    /**
483 rajveer 11579
     * 
11580
     * @see OrderStatus
68 ashish 11581
     */
483 rajveer 11582
    public changeOrderStatus_args setStatus(OrderStatus status) {
11583
      this.status = status;
68 ashish 11584
      return this;
11585
    }
11586
 
483 rajveer 11587
    public void unsetStatus() {
11588
      this.status = null;
68 ashish 11589
    }
11590
 
483 rajveer 11591
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11592
    public boolean isSetStatus() {
11593
      return this.status != null;
68 ashish 11594
    }
11595
 
483 rajveer 11596
    public void setStatusIsSet(boolean value) {
68 ashish 11597
      if (!value) {
483 rajveer 11598
        this.status = null;
68 ashish 11599
      }
11600
    }
11601
 
483 rajveer 11602
    public String getDescription() {
11603
      return this.description;
68 ashish 11604
    }
11605
 
483 rajveer 11606
    public changeOrderStatus_args setDescription(String description) {
11607
      this.description = description;
68 ashish 11608
      return this;
11609
    }
11610
 
483 rajveer 11611
    public void unsetDescription() {
11612
      this.description = null;
68 ashish 11613
    }
11614
 
483 rajveer 11615
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
11616
    public boolean isSetDescription() {
11617
      return this.description != null;
68 ashish 11618
    }
11619
 
483 rajveer 11620
    public void setDescriptionIsSet(boolean value) {
68 ashish 11621
      if (!value) {
483 rajveer 11622
        this.description = null;
68 ashish 11623
      }
11624
    }
11625
 
11626
    public void setFieldValue(_Fields field, Object value) {
11627
      switch (field) {
483 rajveer 11628
      case ORDER_ID:
68 ashish 11629
        if (value == null) {
483 rajveer 11630
          unsetOrderId();
68 ashish 11631
        } else {
483 rajveer 11632
          setOrderId((Long)value);
68 ashish 11633
        }
11634
        break;
11635
 
483 rajveer 11636
      case STATUS:
68 ashish 11637
        if (value == null) {
483 rajveer 11638
          unsetStatus();
68 ashish 11639
        } else {
483 rajveer 11640
          setStatus((OrderStatus)value);
68 ashish 11641
        }
11642
        break;
11643
 
483 rajveer 11644
      case DESCRIPTION:
11645
        if (value == null) {
11646
          unsetDescription();
11647
        } else {
11648
          setDescription((String)value);
11649
        }
11650
        break;
11651
 
68 ashish 11652
      }
11653
    }
11654
 
11655
    public void setFieldValue(int fieldID, Object value) {
11656
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11657
    }
11658
 
11659
    public Object getFieldValue(_Fields field) {
11660
      switch (field) {
483 rajveer 11661
      case ORDER_ID:
11662
        return new Long(getOrderId());
68 ashish 11663
 
483 rajveer 11664
      case STATUS:
11665
        return getStatus();
68 ashish 11666
 
483 rajveer 11667
      case DESCRIPTION:
11668
        return getDescription();
11669
 
68 ashish 11670
      }
11671
      throw new IllegalStateException();
11672
    }
11673
 
11674
    public Object getFieldValue(int fieldId) {
11675
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11676
    }
11677
 
11678
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11679
    public boolean isSet(_Fields field) {
11680
      switch (field) {
483 rajveer 11681
      case ORDER_ID:
11682
        return isSetOrderId();
11683
      case STATUS:
11684
        return isSetStatus();
11685
      case DESCRIPTION:
11686
        return isSetDescription();
68 ashish 11687
      }
11688
      throw new IllegalStateException();
11689
    }
11690
 
11691
    public boolean isSet(int fieldID) {
11692
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11693
    }
11694
 
11695
    @Override
11696
    public boolean equals(Object that) {
11697
      if (that == null)
11698
        return false;
483 rajveer 11699
      if (that instanceof changeOrderStatus_args)
11700
        return this.equals((changeOrderStatus_args)that);
68 ashish 11701
      return false;
11702
    }
11703
 
483 rajveer 11704
    public boolean equals(changeOrderStatus_args that) {
68 ashish 11705
      if (that == null)
11706
        return false;
11707
 
483 rajveer 11708
      boolean this_present_orderId = true;
11709
      boolean that_present_orderId = true;
11710
      if (this_present_orderId || that_present_orderId) {
11711
        if (!(this_present_orderId && that_present_orderId))
68 ashish 11712
          return false;
483 rajveer 11713
        if (this.orderId != that.orderId)
68 ashish 11714
          return false;
11715
      }
11716
 
483 rajveer 11717
      boolean this_present_status = true && this.isSetStatus();
11718
      boolean that_present_status = true && that.isSetStatus();
11719
      if (this_present_status || that_present_status) {
11720
        if (!(this_present_status && that_present_status))
68 ashish 11721
          return false;
483 rajveer 11722
        if (!this.status.equals(that.status))
68 ashish 11723
          return false;
11724
      }
11725
 
483 rajveer 11726
      boolean this_present_description = true && this.isSetDescription();
11727
      boolean that_present_description = true && that.isSetDescription();
11728
      if (this_present_description || that_present_description) {
11729
        if (!(this_present_description && that_present_description))
11730
          return false;
11731
        if (!this.description.equals(that.description))
11732
          return false;
11733
      }
11734
 
68 ashish 11735
      return true;
11736
    }
11737
 
11738
    @Override
11739
    public int hashCode() {
11740
      return 0;
11741
    }
11742
 
483 rajveer 11743
    public int compareTo(changeOrderStatus_args other) {
11744
      if (!getClass().equals(other.getClass())) {
11745
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 11746
      }
11747
 
483 rajveer 11748
      int lastComparison = 0;
11749
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 11750
 
483 rajveer 11751
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11752
      if (lastComparison != 0) {
11753
        return lastComparison;
68 ashish 11754
      }
483 rajveer 11755
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11756
      if (lastComparison != 0) {
11757
        return lastComparison;
68 ashish 11758
      }
483 rajveer 11759
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11760
      if (lastComparison != 0) {
11761
        return lastComparison;
68 ashish 11762
      }
483 rajveer 11763
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11764
      if (lastComparison != 0) {
11765
        return lastComparison;
68 ashish 11766
      }
483 rajveer 11767
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
11768
      if (lastComparison != 0) {
11769
        return lastComparison;
68 ashish 11770
      }
483 rajveer 11771
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
11772
      if (lastComparison != 0) {
11773
        return lastComparison;
68 ashish 11774
      }
11775
      return 0;
11776
    }
11777
 
11778
    public void read(TProtocol iprot) throws TException {
11779
      TField field;
11780
      iprot.readStructBegin();
11781
      while (true)
11782
      {
11783
        field = iprot.readFieldBegin();
11784
        if (field.type == TType.STOP) { 
11785
          break;
11786
        }
11787
        _Fields fieldId = _Fields.findByThriftId(field.id);
11788
        if (fieldId == null) {
11789
          TProtocolUtil.skip(iprot, field.type);
11790
        } else {
11791
          switch (fieldId) {
483 rajveer 11792
            case ORDER_ID:
68 ashish 11793
              if (field.type == TType.I64) {
483 rajveer 11794
                this.orderId = iprot.readI64();
11795
                setOrderIdIsSet(true);
68 ashish 11796
              } else { 
11797
                TProtocolUtil.skip(iprot, field.type);
11798
              }
11799
              break;
483 rajveer 11800
            case STATUS:
11801
              if (field.type == TType.I32) {
11802
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 11803
              } else { 
11804
                TProtocolUtil.skip(iprot, field.type);
11805
              }
11806
              break;
483 rajveer 11807
            case DESCRIPTION:
11808
              if (field.type == TType.STRING) {
11809
                this.description = iprot.readString();
11810
              } else { 
11811
                TProtocolUtil.skip(iprot, field.type);
11812
              }
11813
              break;
68 ashish 11814
          }
11815
          iprot.readFieldEnd();
11816
        }
11817
      }
11818
      iprot.readStructEnd();
11819
      validate();
11820
    }
11821
 
11822
    public void write(TProtocol oprot) throws TException {
11823
      validate();
11824
 
11825
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 11826
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11827
      oprot.writeI64(this.orderId);
68 ashish 11828
      oprot.writeFieldEnd();
483 rajveer 11829
      if (this.status != null) {
11830
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11831
        oprot.writeI32(this.status.getValue());
68 ashish 11832
        oprot.writeFieldEnd();
11833
      }
483 rajveer 11834
      if (this.description != null) {
11835
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11836
        oprot.writeString(this.description);
11837
        oprot.writeFieldEnd();
11838
      }
68 ashish 11839
      oprot.writeFieldStop();
11840
      oprot.writeStructEnd();
11841
    }
11842
 
11843
    @Override
11844
    public String toString() {
483 rajveer 11845
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 11846
      boolean first = true;
11847
 
483 rajveer 11848
      sb.append("orderId:");
11849
      sb.append(this.orderId);
68 ashish 11850
      first = false;
11851
      if (!first) sb.append(", ");
483 rajveer 11852
      sb.append("status:");
11853
      if (this.status == null) {
68 ashish 11854
        sb.append("null");
11855
      } else {
483 rajveer 11856
        String status_name = status.name();
11857
        if (status_name != null) {
11858
          sb.append(status_name);
11859
          sb.append(" (");
11860
        }
11861
        sb.append(this.status);
11862
        if (status_name != null) {
11863
          sb.append(")");
11864
        }
68 ashish 11865
      }
11866
      first = false;
483 rajveer 11867
      if (!first) sb.append(", ");
11868
      sb.append("description:");
11869
      if (this.description == null) {
11870
        sb.append("null");
11871
      } else {
11872
        sb.append(this.description);
11873
      }
11874
      first = false;
68 ashish 11875
      sb.append(")");
11876
      return sb.toString();
11877
    }
11878
 
11879
    public void validate() throws TException {
11880
      // check for required fields
11881
    }
11882
 
11883
  }
11884
 
483 rajveer 11885
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
11886
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 11887
 
11888
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11889
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11890
 
11891
    private boolean success;
11892
    private TransactionServiceException ex;
11893
 
11894
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11895
    public enum _Fields implements TFieldIdEnum {
11896
      SUCCESS((short)0, "success"),
11897
      EX((short)1, "ex");
11898
 
11899
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11900
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11901
 
11902
      static {
11903
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11904
          byId.put((int)field._thriftId, field);
11905
          byName.put(field.getFieldName(), field);
11906
        }
11907
      }
11908
 
11909
      /**
11910
       * Find the _Fields constant that matches fieldId, or null if its not found.
11911
       */
11912
      public static _Fields findByThriftId(int fieldId) {
11913
        return byId.get(fieldId);
11914
      }
11915
 
11916
      /**
11917
       * Find the _Fields constant that matches fieldId, throwing an exception
11918
       * if it is not found.
11919
       */
11920
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11921
        _Fields fields = findByThriftId(fieldId);
11922
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11923
        return fields;
11924
      }
11925
 
11926
      /**
11927
       * Find the _Fields constant that matches name, or null if its not found.
11928
       */
11929
      public static _Fields findByName(String name) {
11930
        return byName.get(name);
11931
      }
11932
 
11933
      private final short _thriftId;
11934
      private final String _fieldName;
11935
 
11936
      _Fields(short thriftId, String fieldName) {
11937
        _thriftId = thriftId;
11938
        _fieldName = fieldName;
11939
      }
11940
 
11941
      public short getThriftFieldId() {
11942
        return _thriftId;
11943
      }
11944
 
11945
      public String getFieldName() {
11946
        return _fieldName;
11947
      }
11948
    }
11949
 
11950
    // isset id assignments
11951
    private static final int __SUCCESS_ISSET_ID = 0;
11952
    private BitSet __isset_bit_vector = new BitSet(1);
11953
 
11954
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11955
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11956
          new FieldValueMetaData(TType.BOOL)));
11957
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11958
          new FieldValueMetaData(TType.STRUCT)));
11959
    }});
11960
 
11961
    static {
483 rajveer 11962
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 11963
    }
11964
 
483 rajveer 11965
    public changeOrderStatus_result() {
68 ashish 11966
    }
11967
 
483 rajveer 11968
    public changeOrderStatus_result(
68 ashish 11969
      boolean success,
11970
      TransactionServiceException ex)
11971
    {
11972
      this();
11973
      this.success = success;
11974
      setSuccessIsSet(true);
11975
      this.ex = ex;
11976
    }
11977
 
11978
    /**
11979
     * Performs a deep copy on <i>other</i>.
11980
     */
483 rajveer 11981
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 11982
      __isset_bit_vector.clear();
11983
      __isset_bit_vector.or(other.__isset_bit_vector);
11984
      this.success = other.success;
11985
      if (other.isSetEx()) {
11986
        this.ex = new TransactionServiceException(other.ex);
11987
      }
11988
    }
11989
 
483 rajveer 11990
    public changeOrderStatus_result deepCopy() {
11991
      return new changeOrderStatus_result(this);
68 ashish 11992
    }
11993
 
11994
    @Deprecated
483 rajveer 11995
    public changeOrderStatus_result clone() {
11996
      return new changeOrderStatus_result(this);
68 ashish 11997
    }
11998
 
11999
    public boolean isSuccess() {
12000
      return this.success;
12001
    }
12002
 
483 rajveer 12003
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 12004
      this.success = success;
12005
      setSuccessIsSet(true);
12006
      return this;
12007
    }
12008
 
12009
    public void unsetSuccess() {
12010
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12011
    }
12012
 
12013
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12014
    public boolean isSetSuccess() {
12015
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12016
    }
12017
 
12018
    public void setSuccessIsSet(boolean value) {
12019
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12020
    }
12021
 
12022
    public TransactionServiceException getEx() {
12023
      return this.ex;
12024
    }
12025
 
483 rajveer 12026
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 12027
      this.ex = ex;
12028
      return this;
12029
    }
12030
 
12031
    public void unsetEx() {
12032
      this.ex = null;
12033
    }
12034
 
12035
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12036
    public boolean isSetEx() {
12037
      return this.ex != null;
12038
    }
12039
 
12040
    public void setExIsSet(boolean value) {
12041
      if (!value) {
12042
        this.ex = null;
12043
      }
12044
    }
12045
 
12046
    public void setFieldValue(_Fields field, Object value) {
12047
      switch (field) {
12048
      case SUCCESS:
12049
        if (value == null) {
12050
          unsetSuccess();
12051
        } else {
12052
          setSuccess((Boolean)value);
12053
        }
12054
        break;
12055
 
12056
      case EX:
12057
        if (value == null) {
12058
          unsetEx();
12059
        } else {
12060
          setEx((TransactionServiceException)value);
12061
        }
12062
        break;
12063
 
12064
      }
12065
    }
12066
 
12067
    public void setFieldValue(int fieldID, Object value) {
12068
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12069
    }
12070
 
12071
    public Object getFieldValue(_Fields field) {
12072
      switch (field) {
12073
      case SUCCESS:
12074
        return new Boolean(isSuccess());
12075
 
12076
      case EX:
12077
        return getEx();
12078
 
12079
      }
12080
      throw new IllegalStateException();
12081
    }
12082
 
12083
    public Object getFieldValue(int fieldId) {
12084
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12085
    }
12086
 
12087
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12088
    public boolean isSet(_Fields field) {
12089
      switch (field) {
12090
      case SUCCESS:
12091
        return isSetSuccess();
12092
      case EX:
12093
        return isSetEx();
12094
      }
12095
      throw new IllegalStateException();
12096
    }
12097
 
12098
    public boolean isSet(int fieldID) {
12099
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12100
    }
12101
 
12102
    @Override
12103
    public boolean equals(Object that) {
12104
      if (that == null)
12105
        return false;
483 rajveer 12106
      if (that instanceof changeOrderStatus_result)
12107
        return this.equals((changeOrderStatus_result)that);
68 ashish 12108
      return false;
12109
    }
12110
 
483 rajveer 12111
    public boolean equals(changeOrderStatus_result that) {
68 ashish 12112
      if (that == null)
12113
        return false;
12114
 
12115
      boolean this_present_success = true;
12116
      boolean that_present_success = true;
12117
      if (this_present_success || that_present_success) {
12118
        if (!(this_present_success && that_present_success))
12119
          return false;
12120
        if (this.success != that.success)
12121
          return false;
12122
      }
12123
 
12124
      boolean this_present_ex = true && this.isSetEx();
12125
      boolean that_present_ex = true && that.isSetEx();
12126
      if (this_present_ex || that_present_ex) {
12127
        if (!(this_present_ex && that_present_ex))
12128
          return false;
12129
        if (!this.ex.equals(that.ex))
12130
          return false;
12131
      }
12132
 
12133
      return true;
12134
    }
12135
 
12136
    @Override
12137
    public int hashCode() {
12138
      return 0;
12139
    }
12140
 
483 rajveer 12141
    public int compareTo(changeOrderStatus_result other) {
68 ashish 12142
      if (!getClass().equals(other.getClass())) {
12143
        return getClass().getName().compareTo(other.getClass().getName());
12144
      }
12145
 
12146
      int lastComparison = 0;
483 rajveer 12147
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 12148
 
12149
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12150
      if (lastComparison != 0) {
12151
        return lastComparison;
12152
      }
12153
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12154
      if (lastComparison != 0) {
12155
        return lastComparison;
12156
      }
12157
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12158
      if (lastComparison != 0) {
12159
        return lastComparison;
12160
      }
12161
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12162
      if (lastComparison != 0) {
12163
        return lastComparison;
12164
      }
12165
      return 0;
12166
    }
12167
 
12168
    public void read(TProtocol iprot) throws TException {
12169
      TField field;
12170
      iprot.readStructBegin();
12171
      while (true)
12172
      {
12173
        field = iprot.readFieldBegin();
12174
        if (field.type == TType.STOP) { 
12175
          break;
12176
        }
12177
        _Fields fieldId = _Fields.findByThriftId(field.id);
12178
        if (fieldId == null) {
12179
          TProtocolUtil.skip(iprot, field.type);
12180
        } else {
12181
          switch (fieldId) {
12182
            case SUCCESS:
12183
              if (field.type == TType.BOOL) {
12184
                this.success = iprot.readBool();
12185
                setSuccessIsSet(true);
12186
              } else { 
12187
                TProtocolUtil.skip(iprot, field.type);
12188
              }
12189
              break;
12190
            case EX:
12191
              if (field.type == TType.STRUCT) {
12192
                this.ex = new TransactionServiceException();
12193
                this.ex.read(iprot);
12194
              } else { 
12195
                TProtocolUtil.skip(iprot, field.type);
12196
              }
12197
              break;
12198
          }
12199
          iprot.readFieldEnd();
12200
        }
12201
      }
12202
      iprot.readStructEnd();
12203
      validate();
12204
    }
12205
 
12206
    public void write(TProtocol oprot) throws TException {
12207
      oprot.writeStructBegin(STRUCT_DESC);
12208
 
12209
      if (this.isSetSuccess()) {
12210
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12211
        oprot.writeBool(this.success);
12212
        oprot.writeFieldEnd();
12213
      } else if (this.isSetEx()) {
12214
        oprot.writeFieldBegin(EX_FIELD_DESC);
12215
        this.ex.write(oprot);
12216
        oprot.writeFieldEnd();
12217
      }
12218
      oprot.writeFieldStop();
12219
      oprot.writeStructEnd();
12220
    }
12221
 
12222
    @Override
12223
    public String toString() {
483 rajveer 12224
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 12225
      boolean first = true;
12226
 
12227
      sb.append("success:");
12228
      sb.append(this.success);
12229
      first = false;
12230
      if (!first) sb.append(", ");
12231
      sb.append("ex:");
12232
      if (this.ex == null) {
12233
        sb.append("null");
12234
      } else {
12235
        sb.append(this.ex);
12236
      }
12237
      first = false;
12238
      sb.append(")");
12239
      return sb.toString();
12240
    }
12241
 
12242
    public void validate() throws TException {
12243
      // check for required fields
12244
    }
12245
 
12246
  }
12247
 
495 rajveer 12248
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
12249
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
12250
 
12251
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12252
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 12253
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 12254
 
12255
    private long orderId;
12256
    private String invoice_number;
12257
    private String billed_by;
12258
 
12259
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12260
    public enum _Fields implements TFieldIdEnum {
12261
      ORDER_ID((short)1, "orderId"),
12262
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 12263
      BILLED_BY((short)3, "billed_by");
495 rajveer 12264
 
12265
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12266
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12267
 
12268
      static {
12269
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12270
          byId.put((int)field._thriftId, field);
12271
          byName.put(field.getFieldName(), field);
12272
        }
12273
      }
12274
 
12275
      /**
12276
       * Find the _Fields constant that matches fieldId, or null if its not found.
12277
       */
12278
      public static _Fields findByThriftId(int fieldId) {
12279
        return byId.get(fieldId);
12280
      }
12281
 
12282
      /**
12283
       * Find the _Fields constant that matches fieldId, throwing an exception
12284
       * if it is not found.
12285
       */
12286
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12287
        _Fields fields = findByThriftId(fieldId);
12288
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12289
        return fields;
12290
      }
12291
 
12292
      /**
12293
       * Find the _Fields constant that matches name, or null if its not found.
12294
       */
12295
      public static _Fields findByName(String name) {
12296
        return byName.get(name);
12297
      }
12298
 
12299
      private final short _thriftId;
12300
      private final String _fieldName;
12301
 
12302
      _Fields(short thriftId, String fieldName) {
12303
        _thriftId = thriftId;
12304
        _fieldName = fieldName;
12305
      }
12306
 
12307
      public short getThriftFieldId() {
12308
        return _thriftId;
12309
      }
12310
 
12311
      public String getFieldName() {
12312
        return _fieldName;
12313
      }
12314
    }
12315
 
12316
    // isset id assignments
12317
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12318
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12319
 
12320
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12321
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12322
          new FieldValueMetaData(TType.I64)));
12323
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12324
          new FieldValueMetaData(TType.STRING)));
12325
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12326
          new FieldValueMetaData(TType.STRING)));
12327
    }});
12328
 
12329
    static {
12330
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12331
    }
12332
 
12333
    public addBillingDetails_args() {
12334
    }
12335
 
12336
    public addBillingDetails_args(
12337
      long orderId,
12338
      String invoice_number,
12339
      String billed_by)
12340
    {
12341
      this();
12342
      this.orderId = orderId;
12343
      setOrderIdIsSet(true);
12344
      this.invoice_number = invoice_number;
12345
      this.billed_by = billed_by;
12346
    }
12347
 
12348
    /**
12349
     * Performs a deep copy on <i>other</i>.
12350
     */
12351
    public addBillingDetails_args(addBillingDetails_args other) {
12352
      __isset_bit_vector.clear();
12353
      __isset_bit_vector.or(other.__isset_bit_vector);
12354
      this.orderId = other.orderId;
12355
      if (other.isSetInvoice_number()) {
12356
        this.invoice_number = other.invoice_number;
12357
      }
12358
      if (other.isSetBilled_by()) {
12359
        this.billed_by = other.billed_by;
12360
      }
12361
    }
12362
 
12363
    public addBillingDetails_args deepCopy() {
12364
      return new addBillingDetails_args(this);
12365
    }
12366
 
12367
    @Deprecated
12368
    public addBillingDetails_args clone() {
12369
      return new addBillingDetails_args(this);
12370
    }
12371
 
12372
    public long getOrderId() {
12373
      return this.orderId;
12374
    }
12375
 
12376
    public addBillingDetails_args setOrderId(long orderId) {
12377
      this.orderId = orderId;
12378
      setOrderIdIsSet(true);
12379
      return this;
12380
    }
12381
 
12382
    public void unsetOrderId() {
12383
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12384
    }
12385
 
12386
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12387
    public boolean isSetOrderId() {
12388
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12389
    }
12390
 
12391
    public void setOrderIdIsSet(boolean value) {
12392
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12393
    }
12394
 
12395
    public String getInvoice_number() {
12396
      return this.invoice_number;
12397
    }
12398
 
12399
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12400
      this.invoice_number = invoice_number;
12401
      return this;
12402
    }
12403
 
12404
    public void unsetInvoice_number() {
12405
      this.invoice_number = null;
12406
    }
12407
 
12408
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12409
    public boolean isSetInvoice_number() {
12410
      return this.invoice_number != null;
12411
    }
12412
 
12413
    public void setInvoice_numberIsSet(boolean value) {
12414
      if (!value) {
12415
        this.invoice_number = null;
12416
      }
12417
    }
12418
 
12419
    public String getBilled_by() {
12420
      return this.billed_by;
12421
    }
12422
 
12423
    public addBillingDetails_args setBilled_by(String billed_by) {
12424
      this.billed_by = billed_by;
12425
      return this;
12426
    }
12427
 
12428
    public void unsetBilled_by() {
12429
      this.billed_by = null;
12430
    }
12431
 
12432
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12433
    public boolean isSetBilled_by() {
12434
      return this.billed_by != null;
12435
    }
12436
 
12437
    public void setBilled_byIsSet(boolean value) {
12438
      if (!value) {
12439
        this.billed_by = null;
12440
      }
12441
    }
12442
 
12443
    public void setFieldValue(_Fields field, Object value) {
12444
      switch (field) {
12445
      case ORDER_ID:
12446
        if (value == null) {
12447
          unsetOrderId();
12448
        } else {
12449
          setOrderId((Long)value);
12450
        }
12451
        break;
12452
 
12453
      case INVOICE_NUMBER:
12454
        if (value == null) {
12455
          unsetInvoice_number();
12456
        } else {
12457
          setInvoice_number((String)value);
12458
        }
12459
        break;
12460
 
12461
      case BILLED_BY:
12462
        if (value == null) {
12463
          unsetBilled_by();
12464
        } else {
12465
          setBilled_by((String)value);
12466
        }
12467
        break;
12468
 
12469
      }
12470
    }
12471
 
12472
    public void setFieldValue(int fieldID, Object value) {
12473
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12474
    }
12475
 
12476
    public Object getFieldValue(_Fields field) {
12477
      switch (field) {
12478
      case ORDER_ID:
12479
        return new Long(getOrderId());
12480
 
12481
      case INVOICE_NUMBER:
12482
        return getInvoice_number();
12483
 
12484
      case BILLED_BY:
12485
        return getBilled_by();
12486
 
12487
      }
12488
      throw new IllegalStateException();
12489
    }
12490
 
12491
    public Object getFieldValue(int fieldId) {
12492
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12493
    }
12494
 
12495
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12496
    public boolean isSet(_Fields field) {
12497
      switch (field) {
12498
      case ORDER_ID:
12499
        return isSetOrderId();
12500
      case INVOICE_NUMBER:
12501
        return isSetInvoice_number();
12502
      case BILLED_BY:
12503
        return isSetBilled_by();
12504
      }
12505
      throw new IllegalStateException();
12506
    }
12507
 
12508
    public boolean isSet(int fieldID) {
12509
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12510
    }
12511
 
12512
    @Override
12513
    public boolean equals(Object that) {
12514
      if (that == null)
12515
        return false;
12516
      if (that instanceof addBillingDetails_args)
12517
        return this.equals((addBillingDetails_args)that);
12518
      return false;
12519
    }
12520
 
12521
    public boolean equals(addBillingDetails_args that) {
12522
      if (that == null)
12523
        return false;
12524
 
12525
      boolean this_present_orderId = true;
12526
      boolean that_present_orderId = true;
12527
      if (this_present_orderId || that_present_orderId) {
12528
        if (!(this_present_orderId && that_present_orderId))
12529
          return false;
12530
        if (this.orderId != that.orderId)
12531
          return false;
12532
      }
12533
 
12534
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12535
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12536
      if (this_present_invoice_number || that_present_invoice_number) {
12537
        if (!(this_present_invoice_number && that_present_invoice_number))
12538
          return false;
12539
        if (!this.invoice_number.equals(that.invoice_number))
12540
          return false;
12541
      }
12542
 
12543
      boolean this_present_billed_by = true && this.isSetBilled_by();
12544
      boolean that_present_billed_by = true && that.isSetBilled_by();
12545
      if (this_present_billed_by || that_present_billed_by) {
12546
        if (!(this_present_billed_by && that_present_billed_by))
12547
          return false;
12548
        if (!this.billed_by.equals(that.billed_by))
12549
          return false;
12550
      }
12551
 
12552
      return true;
12553
    }
12554
 
12555
    @Override
12556
    public int hashCode() {
12557
      return 0;
12558
    }
12559
 
12560
    public int compareTo(addBillingDetails_args other) {
12561
      if (!getClass().equals(other.getClass())) {
12562
        return getClass().getName().compareTo(other.getClass().getName());
12563
      }
12564
 
12565
      int lastComparison = 0;
12566
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12567
 
12568
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12569
      if (lastComparison != 0) {
12570
        return lastComparison;
12571
      }
12572
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12573
      if (lastComparison != 0) {
12574
        return lastComparison;
12575
      }
12576
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12577
      if (lastComparison != 0) {
12578
        return lastComparison;
12579
      }
12580
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12581
      if (lastComparison != 0) {
12582
        return lastComparison;
12583
      }
12584
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12585
      if (lastComparison != 0) {
12586
        return lastComparison;
12587
      }
12588
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12589
      if (lastComparison != 0) {
12590
        return lastComparison;
12591
      }
12592
      return 0;
12593
    }
12594
 
12595
    public void read(TProtocol iprot) throws TException {
12596
      TField field;
12597
      iprot.readStructBegin();
12598
      while (true)
12599
      {
12600
        field = iprot.readFieldBegin();
12601
        if (field.type == TType.STOP) { 
12602
          break;
12603
        }
12604
        _Fields fieldId = _Fields.findByThriftId(field.id);
12605
        if (fieldId == null) {
12606
          TProtocolUtil.skip(iprot, field.type);
12607
        } else {
12608
          switch (fieldId) {
12609
            case ORDER_ID:
12610
              if (field.type == TType.I64) {
12611
                this.orderId = iprot.readI64();
12612
                setOrderIdIsSet(true);
12613
              } else { 
12614
                TProtocolUtil.skip(iprot, field.type);
12615
              }
12616
              break;
12617
            case INVOICE_NUMBER:
12618
              if (field.type == TType.STRING) {
12619
                this.invoice_number = iprot.readString();
12620
              } else { 
12621
                TProtocolUtil.skip(iprot, field.type);
12622
              }
12623
              break;
12624
            case BILLED_BY:
12625
              if (field.type == TType.STRING) {
12626
                this.billed_by = iprot.readString();
12627
              } else { 
12628
                TProtocolUtil.skip(iprot, field.type);
12629
              }
12630
              break;
12631
          }
12632
          iprot.readFieldEnd();
12633
        }
12634
      }
12635
      iprot.readStructEnd();
12636
      validate();
12637
    }
12638
 
12639
    public void write(TProtocol oprot) throws TException {
12640
      validate();
12641
 
12642
      oprot.writeStructBegin(STRUCT_DESC);
12643
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12644
      oprot.writeI64(this.orderId);
12645
      oprot.writeFieldEnd();
12646
      if (this.invoice_number != null) {
12647
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
12648
        oprot.writeString(this.invoice_number);
12649
        oprot.writeFieldEnd();
12650
      }
12651
      if (this.billed_by != null) {
12652
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
12653
        oprot.writeString(this.billed_by);
12654
        oprot.writeFieldEnd();
12655
      }
12656
      oprot.writeFieldStop();
12657
      oprot.writeStructEnd();
12658
    }
12659
 
12660
    @Override
12661
    public String toString() {
12662
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
12663
      boolean first = true;
12664
 
12665
      sb.append("orderId:");
12666
      sb.append(this.orderId);
12667
      first = false;
12668
      if (!first) sb.append(", ");
12669
      sb.append("invoice_number:");
12670
      if (this.invoice_number == null) {
12671
        sb.append("null");
12672
      } else {
12673
        sb.append(this.invoice_number);
12674
      }
12675
      first = false;
12676
      if (!first) sb.append(", ");
12677
      sb.append("billed_by:");
12678
      if (this.billed_by == null) {
12679
        sb.append("null");
12680
      } else {
12681
        sb.append(this.billed_by);
12682
      }
12683
      first = false;
12684
      sb.append(")");
12685
      return sb.toString();
12686
    }
12687
 
12688
    public void validate() throws TException {
12689
      // check for required fields
12690
    }
12691
 
12692
  }
12693
 
12694
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
12695
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
12696
 
12697
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12698
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12699
 
12700
    private boolean success;
12701
    private TransactionServiceException ex;
12702
 
12703
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12704
    public enum _Fields implements TFieldIdEnum {
12705
      SUCCESS((short)0, "success"),
12706
      EX((short)1, "ex");
12707
 
12708
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12709
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12710
 
12711
      static {
12712
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12713
          byId.put((int)field._thriftId, field);
12714
          byName.put(field.getFieldName(), field);
12715
        }
12716
      }
12717
 
12718
      /**
12719
       * Find the _Fields constant that matches fieldId, or null if its not found.
12720
       */
12721
      public static _Fields findByThriftId(int fieldId) {
12722
        return byId.get(fieldId);
12723
      }
12724
 
12725
      /**
12726
       * Find the _Fields constant that matches fieldId, throwing an exception
12727
       * if it is not found.
12728
       */
12729
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12730
        _Fields fields = findByThriftId(fieldId);
12731
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12732
        return fields;
12733
      }
12734
 
12735
      /**
12736
       * Find the _Fields constant that matches name, or null if its not found.
12737
       */
12738
      public static _Fields findByName(String name) {
12739
        return byName.get(name);
12740
      }
12741
 
12742
      private final short _thriftId;
12743
      private final String _fieldName;
12744
 
12745
      _Fields(short thriftId, String fieldName) {
12746
        _thriftId = thriftId;
12747
        _fieldName = fieldName;
12748
      }
12749
 
12750
      public short getThriftFieldId() {
12751
        return _thriftId;
12752
      }
12753
 
12754
      public String getFieldName() {
12755
        return _fieldName;
12756
      }
12757
    }
12758
 
12759
    // isset id assignments
12760
    private static final int __SUCCESS_ISSET_ID = 0;
12761
    private BitSet __isset_bit_vector = new BitSet(1);
12762
 
12763
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12764
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12765
          new FieldValueMetaData(TType.BOOL)));
12766
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12767
          new FieldValueMetaData(TType.STRUCT)));
12768
    }});
12769
 
12770
    static {
12771
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
12772
    }
12773
 
12774
    public addBillingDetails_result() {
12775
    }
12776
 
12777
    public addBillingDetails_result(
12778
      boolean success,
12779
      TransactionServiceException ex)
12780
    {
12781
      this();
12782
      this.success = success;
12783
      setSuccessIsSet(true);
12784
      this.ex = ex;
12785
    }
12786
 
12787
    /**
12788
     * Performs a deep copy on <i>other</i>.
12789
     */
12790
    public addBillingDetails_result(addBillingDetails_result other) {
12791
      __isset_bit_vector.clear();
12792
      __isset_bit_vector.or(other.__isset_bit_vector);
12793
      this.success = other.success;
12794
      if (other.isSetEx()) {
12795
        this.ex = new TransactionServiceException(other.ex);
12796
      }
12797
    }
12798
 
12799
    public addBillingDetails_result deepCopy() {
12800
      return new addBillingDetails_result(this);
12801
    }
12802
 
12803
    @Deprecated
12804
    public addBillingDetails_result clone() {
12805
      return new addBillingDetails_result(this);
12806
    }
12807
 
12808
    public boolean isSuccess() {
12809
      return this.success;
12810
    }
12811
 
12812
    public addBillingDetails_result setSuccess(boolean success) {
12813
      this.success = success;
12814
      setSuccessIsSet(true);
12815
      return this;
12816
    }
12817
 
12818
    public void unsetSuccess() {
12819
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12820
    }
12821
 
12822
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12823
    public boolean isSetSuccess() {
12824
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12825
    }
12826
 
12827
    public void setSuccessIsSet(boolean value) {
12828
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12829
    }
12830
 
12831
    public TransactionServiceException getEx() {
12832
      return this.ex;
12833
    }
12834
 
12835
    public addBillingDetails_result setEx(TransactionServiceException ex) {
12836
      this.ex = ex;
12837
      return this;
12838
    }
12839
 
12840
    public void unsetEx() {
12841
      this.ex = null;
12842
    }
12843
 
12844
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12845
    public boolean isSetEx() {
12846
      return this.ex != null;
12847
    }
12848
 
12849
    public void setExIsSet(boolean value) {
12850
      if (!value) {
12851
        this.ex = null;
12852
      }
12853
    }
12854
 
12855
    public void setFieldValue(_Fields field, Object value) {
12856
      switch (field) {
12857
      case SUCCESS:
12858
        if (value == null) {
12859
          unsetSuccess();
12860
        } else {
12861
          setSuccess((Boolean)value);
12862
        }
12863
        break;
12864
 
12865
      case EX:
12866
        if (value == null) {
12867
          unsetEx();
12868
        } else {
12869
          setEx((TransactionServiceException)value);
12870
        }
12871
        break;
12872
 
12873
      }
12874
    }
12875
 
12876
    public void setFieldValue(int fieldID, Object value) {
12877
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12878
    }
12879
 
12880
    public Object getFieldValue(_Fields field) {
12881
      switch (field) {
12882
      case SUCCESS:
12883
        return new Boolean(isSuccess());
12884
 
12885
      case EX:
12886
        return getEx();
12887
 
12888
      }
12889
      throw new IllegalStateException();
12890
    }
12891
 
12892
    public Object getFieldValue(int fieldId) {
12893
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12894
    }
12895
 
12896
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12897
    public boolean isSet(_Fields field) {
12898
      switch (field) {
12899
      case SUCCESS:
12900
        return isSetSuccess();
12901
      case EX:
12902
        return isSetEx();
12903
      }
12904
      throw new IllegalStateException();
12905
    }
12906
 
12907
    public boolean isSet(int fieldID) {
12908
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12909
    }
12910
 
12911
    @Override
12912
    public boolean equals(Object that) {
12913
      if (that == null)
12914
        return false;
12915
      if (that instanceof addBillingDetails_result)
12916
        return this.equals((addBillingDetails_result)that);
12917
      return false;
12918
    }
12919
 
12920
    public boolean equals(addBillingDetails_result that) {
12921
      if (that == null)
12922
        return false;
12923
 
12924
      boolean this_present_success = true;
12925
      boolean that_present_success = true;
12926
      if (this_present_success || that_present_success) {
12927
        if (!(this_present_success && that_present_success))
12928
          return false;
12929
        if (this.success != that.success)
12930
          return false;
12931
      }
12932
 
12933
      boolean this_present_ex = true && this.isSetEx();
12934
      boolean that_present_ex = true && that.isSetEx();
12935
      if (this_present_ex || that_present_ex) {
12936
        if (!(this_present_ex && that_present_ex))
12937
          return false;
12938
        if (!this.ex.equals(that.ex))
12939
          return false;
12940
      }
12941
 
12942
      return true;
12943
    }
12944
 
12945
    @Override
12946
    public int hashCode() {
12947
      return 0;
12948
    }
12949
 
12950
    public int compareTo(addBillingDetails_result other) {
12951
      if (!getClass().equals(other.getClass())) {
12952
        return getClass().getName().compareTo(other.getClass().getName());
12953
      }
12954
 
12955
      int lastComparison = 0;
12956
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
12957
 
12958
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12959
      if (lastComparison != 0) {
12960
        return lastComparison;
12961
      }
12962
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12963
      if (lastComparison != 0) {
12964
        return lastComparison;
12965
      }
12966
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12967
      if (lastComparison != 0) {
12968
        return lastComparison;
12969
      }
12970
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12971
      if (lastComparison != 0) {
12972
        return lastComparison;
12973
      }
12974
      return 0;
12975
    }
12976
 
12977
    public void read(TProtocol iprot) throws TException {
12978
      TField field;
12979
      iprot.readStructBegin();
12980
      while (true)
12981
      {
12982
        field = iprot.readFieldBegin();
12983
        if (field.type == TType.STOP) { 
12984
          break;
12985
        }
12986
        _Fields fieldId = _Fields.findByThriftId(field.id);
12987
        if (fieldId == null) {
12988
          TProtocolUtil.skip(iprot, field.type);
12989
        } else {
12990
          switch (fieldId) {
12991
            case SUCCESS:
12992
              if (field.type == TType.BOOL) {
12993
                this.success = iprot.readBool();
12994
                setSuccessIsSet(true);
12995
              } else { 
12996
                TProtocolUtil.skip(iprot, field.type);
12997
              }
12998
              break;
12999
            case EX:
13000
              if (field.type == TType.STRUCT) {
13001
                this.ex = new TransactionServiceException();
13002
                this.ex.read(iprot);
13003
              } else { 
13004
                TProtocolUtil.skip(iprot, field.type);
13005
              }
13006
              break;
13007
          }
13008
          iprot.readFieldEnd();
13009
        }
13010
      }
13011
      iprot.readStructEnd();
13012
      validate();
13013
    }
13014
 
13015
    public void write(TProtocol oprot) throws TException {
13016
      oprot.writeStructBegin(STRUCT_DESC);
13017
 
13018
      if (this.isSetSuccess()) {
13019
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13020
        oprot.writeBool(this.success);
13021
        oprot.writeFieldEnd();
13022
      } else if (this.isSetEx()) {
13023
        oprot.writeFieldBegin(EX_FIELD_DESC);
13024
        this.ex.write(oprot);
13025
        oprot.writeFieldEnd();
13026
      }
13027
      oprot.writeFieldStop();
13028
      oprot.writeStructEnd();
13029
    }
13030
 
13031
    @Override
13032
    public String toString() {
13033
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
13034
      boolean first = true;
13035
 
13036
      sb.append("success:");
13037
      sb.append(this.success);
13038
      first = false;
13039
      if (!first) sb.append(", ");
13040
      sb.append("ex:");
13041
      if (this.ex == null) {
13042
        sb.append("null");
13043
      } else {
13044
        sb.append(this.ex);
13045
      }
13046
      first = false;
13047
      sb.append(")");
13048
      return sb.toString();
13049
    }
13050
 
13051
    public void validate() throws TException {
13052
      // check for required fields
13053
    }
13054
 
13055
  }
13056
 
1148 chandransh 13057
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
13058
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
13059
 
13060
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13061
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
13062
 
13063
    private long orderId;
13064
    private long jacketNumber;
13065
 
13066
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13067
    public enum _Fields implements TFieldIdEnum {
13068
      ORDER_ID((short)1, "orderId"),
2383 rajveer 13069
      JACKET_NUMBER((short)2, "jacketNumber");
1148 chandransh 13070
 
13071
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13072
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13073
 
13074
      static {
13075
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13076
          byId.put((int)field._thriftId, field);
13077
          byName.put(field.getFieldName(), field);
13078
        }
13079
      }
13080
 
13081
      /**
13082
       * Find the _Fields constant that matches fieldId, or null if its not found.
13083
       */
13084
      public static _Fields findByThriftId(int fieldId) {
13085
        return byId.get(fieldId);
13086
      }
13087
 
13088
      /**
13089
       * Find the _Fields constant that matches fieldId, throwing an exception
13090
       * if it is not found.
13091
       */
13092
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13093
        _Fields fields = findByThriftId(fieldId);
13094
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13095
        return fields;
13096
      }
13097
 
13098
      /**
13099
       * Find the _Fields constant that matches name, or null if its not found.
13100
       */
13101
      public static _Fields findByName(String name) {
13102
        return byName.get(name);
13103
      }
13104
 
13105
      private final short _thriftId;
13106
      private final String _fieldName;
13107
 
13108
      _Fields(short thriftId, String fieldName) {
13109
        _thriftId = thriftId;
13110
        _fieldName = fieldName;
13111
      }
13112
 
13113
      public short getThriftFieldId() {
13114
        return _thriftId;
13115
      }
13116
 
13117
      public String getFieldName() {
13118
        return _fieldName;
13119
      }
13120
    }
13121
 
13122
    // isset id assignments
13123
    private static final int __ORDERID_ISSET_ID = 0;
13124
    private static final int __JACKETNUMBER_ISSET_ID = 1;
2383 rajveer 13125
    private BitSet __isset_bit_vector = new BitSet(2);
1148 chandransh 13126
 
13127
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13128
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13129
          new FieldValueMetaData(TType.I64)));
13130
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
13131
          new FieldValueMetaData(TType.I64)));
13132
    }});
13133
 
13134
    static {
13135
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
13136
    }
13137
 
13138
    public addJacketNumber_args() {
13139
    }
13140
 
13141
    public addJacketNumber_args(
13142
      long orderId,
2383 rajveer 13143
      long jacketNumber)
1148 chandransh 13144
    {
13145
      this();
13146
      this.orderId = orderId;
13147
      setOrderIdIsSet(true);
13148
      this.jacketNumber = jacketNumber;
13149
      setJacketNumberIsSet(true);
13150
    }
13151
 
13152
    /**
13153
     * Performs a deep copy on <i>other</i>.
13154
     */
13155
    public addJacketNumber_args(addJacketNumber_args other) {
13156
      __isset_bit_vector.clear();
13157
      __isset_bit_vector.or(other.__isset_bit_vector);
13158
      this.orderId = other.orderId;
13159
      this.jacketNumber = other.jacketNumber;
13160
    }
13161
 
13162
    public addJacketNumber_args deepCopy() {
13163
      return new addJacketNumber_args(this);
13164
    }
13165
 
13166
    @Deprecated
13167
    public addJacketNumber_args clone() {
13168
      return new addJacketNumber_args(this);
13169
    }
13170
 
13171
    public long getOrderId() {
13172
      return this.orderId;
13173
    }
13174
 
13175
    public addJacketNumber_args setOrderId(long orderId) {
13176
      this.orderId = orderId;
13177
      setOrderIdIsSet(true);
13178
      return this;
13179
    }
13180
 
13181
    public void unsetOrderId() {
13182
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13183
    }
13184
 
13185
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13186
    public boolean isSetOrderId() {
13187
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13188
    }
13189
 
13190
    public void setOrderIdIsSet(boolean value) {
13191
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13192
    }
13193
 
13194
    public long getJacketNumber() {
13195
      return this.jacketNumber;
13196
    }
13197
 
13198
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
13199
      this.jacketNumber = jacketNumber;
13200
      setJacketNumberIsSet(true);
13201
      return this;
13202
    }
13203
 
13204
    public void unsetJacketNumber() {
13205
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
13206
    }
13207
 
13208
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
13209
    public boolean isSetJacketNumber() {
13210
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
13211
    }
13212
 
13213
    public void setJacketNumberIsSet(boolean value) {
13214
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
13215
    }
13216
 
13217
    public void setFieldValue(_Fields field, Object value) {
13218
      switch (field) {
13219
      case ORDER_ID:
13220
        if (value == null) {
13221
          unsetOrderId();
13222
        } else {
13223
          setOrderId((Long)value);
13224
        }
13225
        break;
13226
 
13227
      case JACKET_NUMBER:
13228
        if (value == null) {
13229
          unsetJacketNumber();
13230
        } else {
13231
          setJacketNumber((Long)value);
13232
        }
13233
        break;
13234
 
13235
      }
13236
    }
13237
 
13238
    public void setFieldValue(int fieldID, Object value) {
13239
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13240
    }
13241
 
13242
    public Object getFieldValue(_Fields field) {
13243
      switch (field) {
13244
      case ORDER_ID:
13245
        return new Long(getOrderId());
13246
 
13247
      case JACKET_NUMBER:
13248
        return new Long(getJacketNumber());
13249
 
13250
      }
13251
      throw new IllegalStateException();
13252
    }
13253
 
13254
    public Object getFieldValue(int fieldId) {
13255
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13256
    }
13257
 
13258
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13259
    public boolean isSet(_Fields field) {
13260
      switch (field) {
13261
      case ORDER_ID:
13262
        return isSetOrderId();
13263
      case JACKET_NUMBER:
13264
        return isSetJacketNumber();
13265
      }
13266
      throw new IllegalStateException();
13267
    }
13268
 
13269
    public boolean isSet(int fieldID) {
13270
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13271
    }
13272
 
13273
    @Override
13274
    public boolean equals(Object that) {
13275
      if (that == null)
13276
        return false;
13277
      if (that instanceof addJacketNumber_args)
13278
        return this.equals((addJacketNumber_args)that);
13279
      return false;
13280
    }
13281
 
13282
    public boolean equals(addJacketNumber_args that) {
13283
      if (that == null)
13284
        return false;
13285
 
13286
      boolean this_present_orderId = true;
13287
      boolean that_present_orderId = true;
13288
      if (this_present_orderId || that_present_orderId) {
13289
        if (!(this_present_orderId && that_present_orderId))
13290
          return false;
13291
        if (this.orderId != that.orderId)
13292
          return false;
13293
      }
13294
 
13295
      boolean this_present_jacketNumber = true;
13296
      boolean that_present_jacketNumber = true;
13297
      if (this_present_jacketNumber || that_present_jacketNumber) {
13298
        if (!(this_present_jacketNumber && that_present_jacketNumber))
13299
          return false;
13300
        if (this.jacketNumber != that.jacketNumber)
13301
          return false;
13302
      }
13303
 
13304
      return true;
13305
    }
13306
 
13307
    @Override
13308
    public int hashCode() {
13309
      return 0;
13310
    }
13311
 
13312
    public int compareTo(addJacketNumber_args other) {
13313
      if (!getClass().equals(other.getClass())) {
13314
        return getClass().getName().compareTo(other.getClass().getName());
13315
      }
13316
 
13317
      int lastComparison = 0;
13318
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13319
 
13320
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13321
      if (lastComparison != 0) {
13322
        return lastComparison;
13323
      }
13324
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13325
      if (lastComparison != 0) {
13326
        return lastComparison;
13327
      }
13328
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13329
      if (lastComparison != 0) {
13330
        return lastComparison;
13331
      }
13332
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13333
      if (lastComparison != 0) {
13334
        return lastComparison;
13335
      }
13336
      return 0;
13337
    }
13338
 
13339
    public void read(TProtocol iprot) throws TException {
13340
      TField field;
13341
      iprot.readStructBegin();
13342
      while (true)
13343
      {
13344
        field = iprot.readFieldBegin();
13345
        if (field.type == TType.STOP) { 
13346
          break;
13347
        }
13348
        _Fields fieldId = _Fields.findByThriftId(field.id);
13349
        if (fieldId == null) {
13350
          TProtocolUtil.skip(iprot, field.type);
13351
        } else {
13352
          switch (fieldId) {
13353
            case ORDER_ID:
13354
              if (field.type == TType.I64) {
13355
                this.orderId = iprot.readI64();
13356
                setOrderIdIsSet(true);
13357
              } else { 
13358
                TProtocolUtil.skip(iprot, field.type);
13359
              }
13360
              break;
13361
            case JACKET_NUMBER:
13362
              if (field.type == TType.I64) {
13363
                this.jacketNumber = iprot.readI64();
13364
                setJacketNumberIsSet(true);
13365
              } else { 
13366
                TProtocolUtil.skip(iprot, field.type);
13367
              }
13368
              break;
13369
          }
13370
          iprot.readFieldEnd();
13371
        }
13372
      }
13373
      iprot.readStructEnd();
13374
      validate();
13375
    }
13376
 
13377
    public void write(TProtocol oprot) throws TException {
13378
      validate();
13379
 
13380
      oprot.writeStructBegin(STRUCT_DESC);
13381
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13382
      oprot.writeI64(this.orderId);
13383
      oprot.writeFieldEnd();
13384
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13385
      oprot.writeI64(this.jacketNumber);
13386
      oprot.writeFieldEnd();
13387
      oprot.writeFieldStop();
13388
      oprot.writeStructEnd();
13389
    }
13390
 
13391
    @Override
13392
    public String toString() {
13393
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13394
      boolean first = true;
13395
 
13396
      sb.append("orderId:");
13397
      sb.append(this.orderId);
13398
      first = false;
13399
      if (!first) sb.append(", ");
13400
      sb.append("jacketNumber:");
13401
      sb.append(this.jacketNumber);
13402
      first = false;
13403
      sb.append(")");
13404
      return sb.toString();
13405
    }
13406
 
13407
    public void validate() throws TException {
13408
      // check for required fields
13409
    }
13410
 
13411
  }
13412
 
13413
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13414
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13415
 
13416
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13417
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13418
 
13419
    private boolean success;
13420
    private TransactionServiceException ex;
13421
 
13422
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13423
    public enum _Fields implements TFieldIdEnum {
13424
      SUCCESS((short)0, "success"),
13425
      EX((short)1, "ex");
13426
 
13427
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13428
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13429
 
13430
      static {
13431
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13432
          byId.put((int)field._thriftId, field);
13433
          byName.put(field.getFieldName(), field);
13434
        }
13435
      }
13436
 
13437
      /**
13438
       * Find the _Fields constant that matches fieldId, or null if its not found.
13439
       */
13440
      public static _Fields findByThriftId(int fieldId) {
13441
        return byId.get(fieldId);
13442
      }
13443
 
13444
      /**
13445
       * Find the _Fields constant that matches fieldId, throwing an exception
13446
       * if it is not found.
13447
       */
13448
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13449
        _Fields fields = findByThriftId(fieldId);
13450
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13451
        return fields;
13452
      }
13453
 
13454
      /**
13455
       * Find the _Fields constant that matches name, or null if its not found.
13456
       */
13457
      public static _Fields findByName(String name) {
13458
        return byName.get(name);
13459
      }
13460
 
13461
      private final short _thriftId;
13462
      private final String _fieldName;
13463
 
13464
      _Fields(short thriftId, String fieldName) {
13465
        _thriftId = thriftId;
13466
        _fieldName = fieldName;
13467
      }
13468
 
13469
      public short getThriftFieldId() {
13470
        return _thriftId;
13471
      }
13472
 
13473
      public String getFieldName() {
13474
        return _fieldName;
13475
      }
13476
    }
13477
 
13478
    // isset id assignments
13479
    private static final int __SUCCESS_ISSET_ID = 0;
13480
    private BitSet __isset_bit_vector = new BitSet(1);
13481
 
13482
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13483
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13484
          new FieldValueMetaData(TType.BOOL)));
13485
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13486
          new FieldValueMetaData(TType.STRUCT)));
13487
    }});
13488
 
13489
    static {
13490
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13491
    }
13492
 
13493
    public addJacketNumber_result() {
13494
    }
13495
 
13496
    public addJacketNumber_result(
13497
      boolean success,
13498
      TransactionServiceException ex)
13499
    {
13500
      this();
13501
      this.success = success;
13502
      setSuccessIsSet(true);
13503
      this.ex = ex;
13504
    }
13505
 
13506
    /**
13507
     * Performs a deep copy on <i>other</i>.
13508
     */
13509
    public addJacketNumber_result(addJacketNumber_result other) {
13510
      __isset_bit_vector.clear();
13511
      __isset_bit_vector.or(other.__isset_bit_vector);
13512
      this.success = other.success;
13513
      if (other.isSetEx()) {
13514
        this.ex = new TransactionServiceException(other.ex);
13515
      }
13516
    }
13517
 
13518
    public addJacketNumber_result deepCopy() {
13519
      return new addJacketNumber_result(this);
13520
    }
13521
 
13522
    @Deprecated
13523
    public addJacketNumber_result clone() {
13524
      return new addJacketNumber_result(this);
13525
    }
13526
 
13527
    public boolean isSuccess() {
13528
      return this.success;
13529
    }
13530
 
13531
    public addJacketNumber_result setSuccess(boolean success) {
13532
      this.success = success;
13533
      setSuccessIsSet(true);
13534
      return this;
13535
    }
13536
 
13537
    public void unsetSuccess() {
13538
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13539
    }
13540
 
13541
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13542
    public boolean isSetSuccess() {
13543
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13544
    }
13545
 
13546
    public void setSuccessIsSet(boolean value) {
13547
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13548
    }
13549
 
13550
    public TransactionServiceException getEx() {
13551
      return this.ex;
13552
    }
13553
 
13554
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13555
      this.ex = ex;
13556
      return this;
13557
    }
13558
 
13559
    public void unsetEx() {
13560
      this.ex = null;
13561
    }
13562
 
13563
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13564
    public boolean isSetEx() {
13565
      return this.ex != null;
13566
    }
13567
 
13568
    public void setExIsSet(boolean value) {
13569
      if (!value) {
13570
        this.ex = null;
13571
      }
13572
    }
13573
 
13574
    public void setFieldValue(_Fields field, Object value) {
13575
      switch (field) {
13576
      case SUCCESS:
13577
        if (value == null) {
13578
          unsetSuccess();
13579
        } else {
13580
          setSuccess((Boolean)value);
13581
        }
13582
        break;
13583
 
13584
      case EX:
13585
        if (value == null) {
13586
          unsetEx();
13587
        } else {
13588
          setEx((TransactionServiceException)value);
13589
        }
13590
        break;
13591
 
13592
      }
13593
    }
13594
 
13595
    public void setFieldValue(int fieldID, Object value) {
13596
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13597
    }
13598
 
13599
    public Object getFieldValue(_Fields field) {
13600
      switch (field) {
13601
      case SUCCESS:
13602
        return new Boolean(isSuccess());
13603
 
13604
      case EX:
13605
        return getEx();
13606
 
13607
      }
13608
      throw new IllegalStateException();
13609
    }
13610
 
13611
    public Object getFieldValue(int fieldId) {
13612
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13613
    }
13614
 
13615
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13616
    public boolean isSet(_Fields field) {
13617
      switch (field) {
13618
      case SUCCESS:
13619
        return isSetSuccess();
13620
      case EX:
13621
        return isSetEx();
13622
      }
13623
      throw new IllegalStateException();
13624
    }
13625
 
13626
    public boolean isSet(int fieldID) {
13627
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13628
    }
13629
 
13630
    @Override
13631
    public boolean equals(Object that) {
13632
      if (that == null)
13633
        return false;
13634
      if (that instanceof addJacketNumber_result)
13635
        return this.equals((addJacketNumber_result)that);
13636
      return false;
13637
    }
13638
 
13639
    public boolean equals(addJacketNumber_result that) {
13640
      if (that == null)
13641
        return false;
13642
 
13643
      boolean this_present_success = true;
13644
      boolean that_present_success = true;
13645
      if (this_present_success || that_present_success) {
13646
        if (!(this_present_success && that_present_success))
13647
          return false;
13648
        if (this.success != that.success)
13649
          return false;
13650
      }
13651
 
13652
      boolean this_present_ex = true && this.isSetEx();
13653
      boolean that_present_ex = true && that.isSetEx();
13654
      if (this_present_ex || that_present_ex) {
13655
        if (!(this_present_ex && that_present_ex))
13656
          return false;
13657
        if (!this.ex.equals(that.ex))
13658
          return false;
13659
      }
13660
 
13661
      return true;
13662
    }
13663
 
13664
    @Override
13665
    public int hashCode() {
13666
      return 0;
13667
    }
13668
 
13669
    public int compareTo(addJacketNumber_result other) {
13670
      if (!getClass().equals(other.getClass())) {
13671
        return getClass().getName().compareTo(other.getClass().getName());
13672
      }
13673
 
13674
      int lastComparison = 0;
13675
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
13676
 
13677
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13678
      if (lastComparison != 0) {
13679
        return lastComparison;
13680
      }
13681
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13682
      if (lastComparison != 0) {
13683
        return lastComparison;
13684
      }
13685
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13686
      if (lastComparison != 0) {
13687
        return lastComparison;
13688
      }
13689
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13690
      if (lastComparison != 0) {
13691
        return lastComparison;
13692
      }
13693
      return 0;
13694
    }
13695
 
13696
    public void read(TProtocol iprot) throws TException {
13697
      TField field;
13698
      iprot.readStructBegin();
13699
      while (true)
13700
      {
13701
        field = iprot.readFieldBegin();
13702
        if (field.type == TType.STOP) { 
13703
          break;
13704
        }
13705
        _Fields fieldId = _Fields.findByThriftId(field.id);
13706
        if (fieldId == null) {
13707
          TProtocolUtil.skip(iprot, field.type);
13708
        } else {
13709
          switch (fieldId) {
13710
            case SUCCESS:
13711
              if (field.type == TType.BOOL) {
13712
                this.success = iprot.readBool();
13713
                setSuccessIsSet(true);
13714
              } else { 
13715
                TProtocolUtil.skip(iprot, field.type);
13716
              }
13717
              break;
13718
            case EX:
13719
              if (field.type == TType.STRUCT) {
13720
                this.ex = new TransactionServiceException();
13721
                this.ex.read(iprot);
13722
              } else { 
13723
                TProtocolUtil.skip(iprot, field.type);
13724
              }
13725
              break;
13726
          }
13727
          iprot.readFieldEnd();
13728
        }
13729
      }
13730
      iprot.readStructEnd();
13731
      validate();
13732
    }
13733
 
13734
    public void write(TProtocol oprot) throws TException {
13735
      oprot.writeStructBegin(STRUCT_DESC);
13736
 
13737
      if (this.isSetSuccess()) {
13738
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13739
        oprot.writeBool(this.success);
13740
        oprot.writeFieldEnd();
13741
      } else if (this.isSetEx()) {
13742
        oprot.writeFieldBegin(EX_FIELD_DESC);
13743
        this.ex.write(oprot);
13744
        oprot.writeFieldEnd();
13745
      }
13746
      oprot.writeFieldStop();
13747
      oprot.writeStructEnd();
13748
    }
13749
 
13750
    @Override
13751
    public String toString() {
13752
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
13753
      boolean first = true;
13754
 
13755
      sb.append("success:");
13756
      sb.append(this.success);
13757
      first = false;
13758
      if (!first) sb.append(", ");
13759
      sb.append("ex:");
13760
      if (this.ex == null) {
13761
        sb.append("null");
13762
      } else {
13763
        sb.append(this.ex);
13764
      }
13765
      first = false;
13766
      sb.append(")");
13767
      return sb.toString();
13768
    }
13769
 
13770
    public void validate() throws TException {
13771
      // check for required fields
13772
    }
13773
 
13774
  }
13775
 
923 rajveer 13776
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
13777
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
13778
 
13779
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13780
 
13781
    private long orderId;
13782
 
13783
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13784
    public enum _Fields implements TFieldIdEnum {
13785
      ORDER_ID((short)1, "orderId");
13786
 
13787
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13788
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13789
 
13790
      static {
13791
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13792
          byId.put((int)field._thriftId, field);
13793
          byName.put(field.getFieldName(), field);
13794
        }
13795
      }
13796
 
13797
      /**
13798
       * Find the _Fields constant that matches fieldId, or null if its not found.
13799
       */
13800
      public static _Fields findByThriftId(int fieldId) {
13801
        return byId.get(fieldId);
13802
      }
13803
 
13804
      /**
13805
       * Find the _Fields constant that matches fieldId, throwing an exception
13806
       * if it is not found.
13807
       */
13808
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13809
        _Fields fields = findByThriftId(fieldId);
13810
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13811
        return fields;
13812
      }
13813
 
13814
      /**
13815
       * Find the _Fields constant that matches name, or null if its not found.
13816
       */
13817
      public static _Fields findByName(String name) {
13818
        return byName.get(name);
13819
      }
13820
 
13821
      private final short _thriftId;
13822
      private final String _fieldName;
13823
 
13824
      _Fields(short thriftId, String fieldName) {
13825
        _thriftId = thriftId;
13826
        _fieldName = fieldName;
13827
      }
13828
 
13829
      public short getThriftFieldId() {
13830
        return _thriftId;
13831
      }
13832
 
13833
      public String getFieldName() {
13834
        return _fieldName;
13835
      }
13836
    }
13837
 
13838
    // isset id assignments
13839
    private static final int __ORDERID_ISSET_ID = 0;
13840
    private BitSet __isset_bit_vector = new BitSet(1);
13841
 
13842
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13843
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13844
          new FieldValueMetaData(TType.I64)));
13845
    }});
13846
 
13847
    static {
13848
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
13849
    }
13850
 
13851
    public acceptOrder_args() {
13852
    }
13853
 
13854
    public acceptOrder_args(
13855
      long orderId)
13856
    {
13857
      this();
13858
      this.orderId = orderId;
13859
      setOrderIdIsSet(true);
13860
    }
13861
 
13862
    /**
13863
     * Performs a deep copy on <i>other</i>.
13864
     */
13865
    public acceptOrder_args(acceptOrder_args other) {
13866
      __isset_bit_vector.clear();
13867
      __isset_bit_vector.or(other.__isset_bit_vector);
13868
      this.orderId = other.orderId;
13869
    }
13870
 
13871
    public acceptOrder_args deepCopy() {
13872
      return new acceptOrder_args(this);
13873
    }
13874
 
13875
    @Deprecated
13876
    public acceptOrder_args clone() {
13877
      return new acceptOrder_args(this);
13878
    }
13879
 
13880
    public long getOrderId() {
13881
      return this.orderId;
13882
    }
13883
 
13884
    public acceptOrder_args setOrderId(long orderId) {
13885
      this.orderId = orderId;
13886
      setOrderIdIsSet(true);
13887
      return this;
13888
    }
13889
 
13890
    public void unsetOrderId() {
13891
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13892
    }
13893
 
13894
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13895
    public boolean isSetOrderId() {
13896
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13897
    }
13898
 
13899
    public void setOrderIdIsSet(boolean value) {
13900
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13901
    }
13902
 
13903
    public void setFieldValue(_Fields field, Object value) {
13904
      switch (field) {
13905
      case ORDER_ID:
13906
        if (value == null) {
13907
          unsetOrderId();
13908
        } else {
13909
          setOrderId((Long)value);
13910
        }
13911
        break;
13912
 
13913
      }
13914
    }
13915
 
13916
    public void setFieldValue(int fieldID, Object value) {
13917
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13918
    }
13919
 
13920
    public Object getFieldValue(_Fields field) {
13921
      switch (field) {
13922
      case ORDER_ID:
13923
        return new Long(getOrderId());
13924
 
13925
      }
13926
      throw new IllegalStateException();
13927
    }
13928
 
13929
    public Object getFieldValue(int fieldId) {
13930
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13931
    }
13932
 
13933
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13934
    public boolean isSet(_Fields field) {
13935
      switch (field) {
13936
      case ORDER_ID:
13937
        return isSetOrderId();
13938
      }
13939
      throw new IllegalStateException();
13940
    }
13941
 
13942
    public boolean isSet(int fieldID) {
13943
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13944
    }
13945
 
13946
    @Override
13947
    public boolean equals(Object that) {
13948
      if (that == null)
13949
        return false;
13950
      if (that instanceof acceptOrder_args)
13951
        return this.equals((acceptOrder_args)that);
13952
      return false;
13953
    }
13954
 
13955
    public boolean equals(acceptOrder_args that) {
13956
      if (that == null)
13957
        return false;
13958
 
13959
      boolean this_present_orderId = true;
13960
      boolean that_present_orderId = true;
13961
      if (this_present_orderId || that_present_orderId) {
13962
        if (!(this_present_orderId && that_present_orderId))
13963
          return false;
13964
        if (this.orderId != that.orderId)
13965
          return false;
13966
      }
13967
 
13968
      return true;
13969
    }
13970
 
13971
    @Override
13972
    public int hashCode() {
13973
      return 0;
13974
    }
13975
 
13976
    public int compareTo(acceptOrder_args other) {
13977
      if (!getClass().equals(other.getClass())) {
13978
        return getClass().getName().compareTo(other.getClass().getName());
13979
      }
13980
 
13981
      int lastComparison = 0;
13982
      acceptOrder_args typedOther = (acceptOrder_args)other;
13983
 
13984
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13985
      if (lastComparison != 0) {
13986
        return lastComparison;
13987
      }
13988
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13989
      if (lastComparison != 0) {
13990
        return lastComparison;
13991
      }
13992
      return 0;
13993
    }
13994
 
13995
    public void read(TProtocol iprot) throws TException {
13996
      TField field;
13997
      iprot.readStructBegin();
13998
      while (true)
13999
      {
14000
        field = iprot.readFieldBegin();
14001
        if (field.type == TType.STOP) { 
14002
          break;
14003
        }
14004
        _Fields fieldId = _Fields.findByThriftId(field.id);
14005
        if (fieldId == null) {
14006
          TProtocolUtil.skip(iprot, field.type);
14007
        } else {
14008
          switch (fieldId) {
14009
            case ORDER_ID:
14010
              if (field.type == TType.I64) {
14011
                this.orderId = iprot.readI64();
14012
                setOrderIdIsSet(true);
14013
              } else { 
14014
                TProtocolUtil.skip(iprot, field.type);
14015
              }
14016
              break;
14017
          }
14018
          iprot.readFieldEnd();
14019
        }
14020
      }
14021
      iprot.readStructEnd();
14022
      validate();
14023
    }
14024
 
14025
    public void write(TProtocol oprot) throws TException {
14026
      validate();
14027
 
14028
      oprot.writeStructBegin(STRUCT_DESC);
14029
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14030
      oprot.writeI64(this.orderId);
14031
      oprot.writeFieldEnd();
14032
      oprot.writeFieldStop();
14033
      oprot.writeStructEnd();
14034
    }
14035
 
14036
    @Override
14037
    public String toString() {
14038
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
14039
      boolean first = true;
14040
 
14041
      sb.append("orderId:");
14042
      sb.append(this.orderId);
14043
      first = false;
14044
      sb.append(")");
14045
      return sb.toString();
14046
    }
14047
 
14048
    public void validate() throws TException {
14049
      // check for required fields
14050
    }
14051
 
14052
  }
14053
 
14054
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
14055
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
14056
 
14057
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14058
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14059
 
14060
    private boolean success;
14061
    private TransactionServiceException ex;
14062
 
14063
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14064
    public enum _Fields implements TFieldIdEnum {
14065
      SUCCESS((short)0, "success"),
14066
      EX((short)1, "ex");
14067
 
14068
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14069
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14070
 
14071
      static {
14072
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14073
          byId.put((int)field._thriftId, field);
14074
          byName.put(field.getFieldName(), field);
14075
        }
14076
      }
14077
 
14078
      /**
14079
       * Find the _Fields constant that matches fieldId, or null if its not found.
14080
       */
14081
      public static _Fields findByThriftId(int fieldId) {
14082
        return byId.get(fieldId);
14083
      }
14084
 
14085
      /**
14086
       * Find the _Fields constant that matches fieldId, throwing an exception
14087
       * if it is not found.
14088
       */
14089
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14090
        _Fields fields = findByThriftId(fieldId);
14091
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14092
        return fields;
14093
      }
14094
 
14095
      /**
14096
       * Find the _Fields constant that matches name, or null if its not found.
14097
       */
14098
      public static _Fields findByName(String name) {
14099
        return byName.get(name);
14100
      }
14101
 
14102
      private final short _thriftId;
14103
      private final String _fieldName;
14104
 
14105
      _Fields(short thriftId, String fieldName) {
14106
        _thriftId = thriftId;
14107
        _fieldName = fieldName;
14108
      }
14109
 
14110
      public short getThriftFieldId() {
14111
        return _thriftId;
14112
      }
14113
 
14114
      public String getFieldName() {
14115
        return _fieldName;
14116
      }
14117
    }
14118
 
14119
    // isset id assignments
14120
    private static final int __SUCCESS_ISSET_ID = 0;
14121
    private BitSet __isset_bit_vector = new BitSet(1);
14122
 
14123
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14124
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14125
          new FieldValueMetaData(TType.BOOL)));
14126
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14127
          new FieldValueMetaData(TType.STRUCT)));
14128
    }});
14129
 
14130
    static {
14131
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
14132
    }
14133
 
14134
    public acceptOrder_result() {
14135
    }
14136
 
14137
    public acceptOrder_result(
14138
      boolean success,
14139
      TransactionServiceException ex)
14140
    {
14141
      this();
14142
      this.success = success;
14143
      setSuccessIsSet(true);
14144
      this.ex = ex;
14145
    }
14146
 
14147
    /**
14148
     * Performs a deep copy on <i>other</i>.
14149
     */
14150
    public acceptOrder_result(acceptOrder_result other) {
14151
      __isset_bit_vector.clear();
14152
      __isset_bit_vector.or(other.__isset_bit_vector);
14153
      this.success = other.success;
14154
      if (other.isSetEx()) {
14155
        this.ex = new TransactionServiceException(other.ex);
14156
      }
14157
    }
14158
 
14159
    public acceptOrder_result deepCopy() {
14160
      return new acceptOrder_result(this);
14161
    }
14162
 
14163
    @Deprecated
14164
    public acceptOrder_result clone() {
14165
      return new acceptOrder_result(this);
14166
    }
14167
 
14168
    public boolean isSuccess() {
14169
      return this.success;
14170
    }
14171
 
14172
    public acceptOrder_result setSuccess(boolean success) {
14173
      this.success = success;
14174
      setSuccessIsSet(true);
14175
      return this;
14176
    }
14177
 
14178
    public void unsetSuccess() {
14179
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14180
    }
14181
 
14182
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14183
    public boolean isSetSuccess() {
14184
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14185
    }
14186
 
14187
    public void setSuccessIsSet(boolean value) {
14188
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14189
    }
14190
 
14191
    public TransactionServiceException getEx() {
14192
      return this.ex;
14193
    }
14194
 
14195
    public acceptOrder_result setEx(TransactionServiceException ex) {
14196
      this.ex = ex;
14197
      return this;
14198
    }
14199
 
14200
    public void unsetEx() {
14201
      this.ex = null;
14202
    }
14203
 
14204
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14205
    public boolean isSetEx() {
14206
      return this.ex != null;
14207
    }
14208
 
14209
    public void setExIsSet(boolean value) {
14210
      if (!value) {
14211
        this.ex = null;
14212
      }
14213
    }
14214
 
14215
    public void setFieldValue(_Fields field, Object value) {
14216
      switch (field) {
14217
      case SUCCESS:
14218
        if (value == null) {
14219
          unsetSuccess();
14220
        } else {
14221
          setSuccess((Boolean)value);
14222
        }
14223
        break;
14224
 
14225
      case EX:
14226
        if (value == null) {
14227
          unsetEx();
14228
        } else {
14229
          setEx((TransactionServiceException)value);
14230
        }
14231
        break;
14232
 
14233
      }
14234
    }
14235
 
14236
    public void setFieldValue(int fieldID, Object value) {
14237
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14238
    }
14239
 
14240
    public Object getFieldValue(_Fields field) {
14241
      switch (field) {
14242
      case SUCCESS:
14243
        return new Boolean(isSuccess());
14244
 
14245
      case EX:
14246
        return getEx();
14247
 
14248
      }
14249
      throw new IllegalStateException();
14250
    }
14251
 
14252
    public Object getFieldValue(int fieldId) {
14253
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14254
    }
14255
 
14256
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14257
    public boolean isSet(_Fields field) {
14258
      switch (field) {
14259
      case SUCCESS:
14260
        return isSetSuccess();
14261
      case EX:
14262
        return isSetEx();
14263
      }
14264
      throw new IllegalStateException();
14265
    }
14266
 
14267
    public boolean isSet(int fieldID) {
14268
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14269
    }
14270
 
14271
    @Override
14272
    public boolean equals(Object that) {
14273
      if (that == null)
14274
        return false;
14275
      if (that instanceof acceptOrder_result)
14276
        return this.equals((acceptOrder_result)that);
14277
      return false;
14278
    }
14279
 
14280
    public boolean equals(acceptOrder_result that) {
14281
      if (that == null)
14282
        return false;
14283
 
14284
      boolean this_present_success = true;
14285
      boolean that_present_success = true;
14286
      if (this_present_success || that_present_success) {
14287
        if (!(this_present_success && that_present_success))
14288
          return false;
14289
        if (this.success != that.success)
14290
          return false;
14291
      }
14292
 
14293
      boolean this_present_ex = true && this.isSetEx();
14294
      boolean that_present_ex = true && that.isSetEx();
14295
      if (this_present_ex || that_present_ex) {
14296
        if (!(this_present_ex && that_present_ex))
14297
          return false;
14298
        if (!this.ex.equals(that.ex))
14299
          return false;
14300
      }
14301
 
14302
      return true;
14303
    }
14304
 
14305
    @Override
14306
    public int hashCode() {
14307
      return 0;
14308
    }
14309
 
14310
    public int compareTo(acceptOrder_result other) {
14311
      if (!getClass().equals(other.getClass())) {
14312
        return getClass().getName().compareTo(other.getClass().getName());
14313
      }
14314
 
14315
      int lastComparison = 0;
14316
      acceptOrder_result typedOther = (acceptOrder_result)other;
14317
 
14318
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14319
      if (lastComparison != 0) {
14320
        return lastComparison;
14321
      }
14322
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14323
      if (lastComparison != 0) {
14324
        return lastComparison;
14325
      }
14326
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14327
      if (lastComparison != 0) {
14328
        return lastComparison;
14329
      }
14330
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14331
      if (lastComparison != 0) {
14332
        return lastComparison;
14333
      }
14334
      return 0;
14335
    }
14336
 
14337
    public void read(TProtocol iprot) throws TException {
14338
      TField field;
14339
      iprot.readStructBegin();
14340
      while (true)
14341
      {
14342
        field = iprot.readFieldBegin();
14343
        if (field.type == TType.STOP) { 
14344
          break;
14345
        }
14346
        _Fields fieldId = _Fields.findByThriftId(field.id);
14347
        if (fieldId == null) {
14348
          TProtocolUtil.skip(iprot, field.type);
14349
        } else {
14350
          switch (fieldId) {
14351
            case SUCCESS:
14352
              if (field.type == TType.BOOL) {
14353
                this.success = iprot.readBool();
14354
                setSuccessIsSet(true);
14355
              } else { 
14356
                TProtocolUtil.skip(iprot, field.type);
14357
              }
14358
              break;
14359
            case EX:
14360
              if (field.type == TType.STRUCT) {
14361
                this.ex = new TransactionServiceException();
14362
                this.ex.read(iprot);
14363
              } else { 
14364
                TProtocolUtil.skip(iprot, field.type);
14365
              }
14366
              break;
14367
          }
14368
          iprot.readFieldEnd();
14369
        }
14370
      }
14371
      iprot.readStructEnd();
14372
      validate();
14373
    }
14374
 
14375
    public void write(TProtocol oprot) throws TException {
14376
      oprot.writeStructBegin(STRUCT_DESC);
14377
 
14378
      if (this.isSetSuccess()) {
14379
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14380
        oprot.writeBool(this.success);
14381
        oprot.writeFieldEnd();
14382
      } else if (this.isSetEx()) {
14383
        oprot.writeFieldBegin(EX_FIELD_DESC);
14384
        this.ex.write(oprot);
14385
        oprot.writeFieldEnd();
14386
      }
14387
      oprot.writeFieldStop();
14388
      oprot.writeStructEnd();
14389
    }
14390
 
14391
    @Override
14392
    public String toString() {
14393
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14394
      boolean first = true;
14395
 
14396
      sb.append("success:");
14397
      sb.append(this.success);
14398
      first = false;
14399
      if (!first) sb.append(", ");
14400
      sb.append("ex:");
14401
      if (this.ex == null) {
14402
        sb.append("null");
14403
      } else {
14404
        sb.append(this.ex);
14405
      }
14406
      first = false;
14407
      sb.append(")");
14408
      return sb.toString();
14409
    }
14410
 
14411
    public void validate() throws TException {
14412
      // check for required fields
14413
    }
14414
 
14415
  }
14416
 
14417
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14418
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14419
 
14420
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14421
 
14422
    private long orderId;
14423
 
14424
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14425
    public enum _Fields implements TFieldIdEnum {
14426
      ORDER_ID((short)1, "orderId");
14427
 
14428
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14429
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14430
 
14431
      static {
14432
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14433
          byId.put((int)field._thriftId, field);
14434
          byName.put(field.getFieldName(), field);
14435
        }
14436
      }
14437
 
14438
      /**
14439
       * Find the _Fields constant that matches fieldId, or null if its not found.
14440
       */
14441
      public static _Fields findByThriftId(int fieldId) {
14442
        return byId.get(fieldId);
14443
      }
14444
 
14445
      /**
14446
       * Find the _Fields constant that matches fieldId, throwing an exception
14447
       * if it is not found.
14448
       */
14449
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14450
        _Fields fields = findByThriftId(fieldId);
14451
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14452
        return fields;
14453
      }
14454
 
14455
      /**
14456
       * Find the _Fields constant that matches name, or null if its not found.
14457
       */
14458
      public static _Fields findByName(String name) {
14459
        return byName.get(name);
14460
      }
14461
 
14462
      private final short _thriftId;
14463
      private final String _fieldName;
14464
 
14465
      _Fields(short thriftId, String fieldName) {
14466
        _thriftId = thriftId;
14467
        _fieldName = fieldName;
14468
      }
14469
 
14470
      public short getThriftFieldId() {
14471
        return _thriftId;
14472
      }
14473
 
14474
      public String getFieldName() {
14475
        return _fieldName;
14476
      }
14477
    }
14478
 
14479
    // isset id assignments
14480
    private static final int __ORDERID_ISSET_ID = 0;
14481
    private BitSet __isset_bit_vector = new BitSet(1);
14482
 
14483
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14484
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14485
          new FieldValueMetaData(TType.I64)));
14486
    }});
14487
 
14488
    static {
14489
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14490
    }
14491
 
14492
    public billOrder_args() {
14493
    }
14494
 
14495
    public billOrder_args(
14496
      long orderId)
14497
    {
14498
      this();
14499
      this.orderId = orderId;
14500
      setOrderIdIsSet(true);
14501
    }
14502
 
14503
    /**
14504
     * Performs a deep copy on <i>other</i>.
14505
     */
14506
    public billOrder_args(billOrder_args other) {
14507
      __isset_bit_vector.clear();
14508
      __isset_bit_vector.or(other.__isset_bit_vector);
14509
      this.orderId = other.orderId;
14510
    }
14511
 
14512
    public billOrder_args deepCopy() {
14513
      return new billOrder_args(this);
14514
    }
14515
 
14516
    @Deprecated
14517
    public billOrder_args clone() {
14518
      return new billOrder_args(this);
14519
    }
14520
 
14521
    public long getOrderId() {
14522
      return this.orderId;
14523
    }
14524
 
14525
    public billOrder_args setOrderId(long orderId) {
14526
      this.orderId = orderId;
14527
      setOrderIdIsSet(true);
14528
      return this;
14529
    }
14530
 
14531
    public void unsetOrderId() {
14532
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14533
    }
14534
 
14535
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14536
    public boolean isSetOrderId() {
14537
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14538
    }
14539
 
14540
    public void setOrderIdIsSet(boolean value) {
14541
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14542
    }
14543
 
14544
    public void setFieldValue(_Fields field, Object value) {
14545
      switch (field) {
14546
      case ORDER_ID:
14547
        if (value == null) {
14548
          unsetOrderId();
14549
        } else {
14550
          setOrderId((Long)value);
14551
        }
14552
        break;
14553
 
14554
      }
14555
    }
14556
 
14557
    public void setFieldValue(int fieldID, Object value) {
14558
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14559
    }
14560
 
14561
    public Object getFieldValue(_Fields field) {
14562
      switch (field) {
14563
      case ORDER_ID:
14564
        return new Long(getOrderId());
14565
 
14566
      }
14567
      throw new IllegalStateException();
14568
    }
14569
 
14570
    public Object getFieldValue(int fieldId) {
14571
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14572
    }
14573
 
14574
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14575
    public boolean isSet(_Fields field) {
14576
      switch (field) {
14577
      case ORDER_ID:
14578
        return isSetOrderId();
14579
      }
14580
      throw new IllegalStateException();
14581
    }
14582
 
14583
    public boolean isSet(int fieldID) {
14584
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14585
    }
14586
 
14587
    @Override
14588
    public boolean equals(Object that) {
14589
      if (that == null)
14590
        return false;
14591
      if (that instanceof billOrder_args)
14592
        return this.equals((billOrder_args)that);
14593
      return false;
14594
    }
14595
 
14596
    public boolean equals(billOrder_args that) {
14597
      if (that == null)
14598
        return false;
14599
 
14600
      boolean this_present_orderId = true;
14601
      boolean that_present_orderId = true;
14602
      if (this_present_orderId || that_present_orderId) {
14603
        if (!(this_present_orderId && that_present_orderId))
14604
          return false;
14605
        if (this.orderId != that.orderId)
14606
          return false;
14607
      }
14608
 
14609
      return true;
14610
    }
14611
 
14612
    @Override
14613
    public int hashCode() {
14614
      return 0;
14615
    }
14616
 
14617
    public int compareTo(billOrder_args other) {
14618
      if (!getClass().equals(other.getClass())) {
14619
        return getClass().getName().compareTo(other.getClass().getName());
14620
      }
14621
 
14622
      int lastComparison = 0;
14623
      billOrder_args typedOther = (billOrder_args)other;
14624
 
14625
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14626
      if (lastComparison != 0) {
14627
        return lastComparison;
14628
      }
14629
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14630
      if (lastComparison != 0) {
14631
        return lastComparison;
14632
      }
14633
      return 0;
14634
    }
14635
 
14636
    public void read(TProtocol iprot) throws TException {
14637
      TField field;
14638
      iprot.readStructBegin();
14639
      while (true)
14640
      {
14641
        field = iprot.readFieldBegin();
14642
        if (field.type == TType.STOP) { 
14643
          break;
14644
        }
14645
        _Fields fieldId = _Fields.findByThriftId(field.id);
14646
        if (fieldId == null) {
14647
          TProtocolUtil.skip(iprot, field.type);
14648
        } else {
14649
          switch (fieldId) {
14650
            case ORDER_ID:
14651
              if (field.type == TType.I64) {
14652
                this.orderId = iprot.readI64();
14653
                setOrderIdIsSet(true);
14654
              } else { 
14655
                TProtocolUtil.skip(iprot, field.type);
14656
              }
14657
              break;
14658
          }
14659
          iprot.readFieldEnd();
14660
        }
14661
      }
14662
      iprot.readStructEnd();
14663
      validate();
14664
    }
14665
 
14666
    public void write(TProtocol oprot) throws TException {
14667
      validate();
14668
 
14669
      oprot.writeStructBegin(STRUCT_DESC);
14670
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14671
      oprot.writeI64(this.orderId);
14672
      oprot.writeFieldEnd();
14673
      oprot.writeFieldStop();
14674
      oprot.writeStructEnd();
14675
    }
14676
 
14677
    @Override
14678
    public String toString() {
14679
      StringBuilder sb = new StringBuilder("billOrder_args(");
14680
      boolean first = true;
14681
 
14682
      sb.append("orderId:");
14683
      sb.append(this.orderId);
14684
      first = false;
14685
      sb.append(")");
14686
      return sb.toString();
14687
    }
14688
 
14689
    public void validate() throws TException {
14690
      // check for required fields
14691
    }
14692
 
14693
  }
14694
 
14695
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
14696
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
14697
 
14698
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14699
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14700
 
14701
    private boolean success;
14702
    private TransactionServiceException ex;
14703
 
14704
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14705
    public enum _Fields implements TFieldIdEnum {
14706
      SUCCESS((short)0, "success"),
14707
      EX((short)1, "ex");
14708
 
14709
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14710
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14711
 
14712
      static {
14713
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14714
          byId.put((int)field._thriftId, field);
14715
          byName.put(field.getFieldName(), field);
14716
        }
14717
      }
14718
 
14719
      /**
14720
       * Find the _Fields constant that matches fieldId, or null if its not found.
14721
       */
14722
      public static _Fields findByThriftId(int fieldId) {
14723
        return byId.get(fieldId);
14724
      }
14725
 
14726
      /**
14727
       * Find the _Fields constant that matches fieldId, throwing an exception
14728
       * if it is not found.
14729
       */
14730
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14731
        _Fields fields = findByThriftId(fieldId);
14732
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14733
        return fields;
14734
      }
14735
 
14736
      /**
14737
       * Find the _Fields constant that matches name, or null if its not found.
14738
       */
14739
      public static _Fields findByName(String name) {
14740
        return byName.get(name);
14741
      }
14742
 
14743
      private final short _thriftId;
14744
      private final String _fieldName;
14745
 
14746
      _Fields(short thriftId, String fieldName) {
14747
        _thriftId = thriftId;
14748
        _fieldName = fieldName;
14749
      }
14750
 
14751
      public short getThriftFieldId() {
14752
        return _thriftId;
14753
      }
14754
 
14755
      public String getFieldName() {
14756
        return _fieldName;
14757
      }
14758
    }
14759
 
14760
    // isset id assignments
14761
    private static final int __SUCCESS_ISSET_ID = 0;
14762
    private BitSet __isset_bit_vector = new BitSet(1);
14763
 
14764
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14765
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14766
          new FieldValueMetaData(TType.BOOL)));
14767
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14768
          new FieldValueMetaData(TType.STRUCT)));
14769
    }});
14770
 
14771
    static {
14772
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
14773
    }
14774
 
14775
    public billOrder_result() {
14776
    }
14777
 
14778
    public billOrder_result(
14779
      boolean success,
14780
      TransactionServiceException ex)
14781
    {
14782
      this();
14783
      this.success = success;
14784
      setSuccessIsSet(true);
14785
      this.ex = ex;
14786
    }
14787
 
14788
    /**
14789
     * Performs a deep copy on <i>other</i>.
14790
     */
14791
    public billOrder_result(billOrder_result other) {
14792
      __isset_bit_vector.clear();
14793
      __isset_bit_vector.or(other.__isset_bit_vector);
14794
      this.success = other.success;
14795
      if (other.isSetEx()) {
14796
        this.ex = new TransactionServiceException(other.ex);
14797
      }
14798
    }
14799
 
14800
    public billOrder_result deepCopy() {
14801
      return new billOrder_result(this);
14802
    }
14803
 
14804
    @Deprecated
14805
    public billOrder_result clone() {
14806
      return new billOrder_result(this);
14807
    }
14808
 
14809
    public boolean isSuccess() {
14810
      return this.success;
14811
    }
14812
 
14813
    public billOrder_result setSuccess(boolean success) {
14814
      this.success = success;
14815
      setSuccessIsSet(true);
14816
      return this;
14817
    }
14818
 
14819
    public void unsetSuccess() {
14820
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14821
    }
14822
 
14823
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14824
    public boolean isSetSuccess() {
14825
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14826
    }
14827
 
14828
    public void setSuccessIsSet(boolean value) {
14829
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14830
    }
14831
 
14832
    public TransactionServiceException getEx() {
14833
      return this.ex;
14834
    }
14835
 
14836
    public billOrder_result setEx(TransactionServiceException ex) {
14837
      this.ex = ex;
14838
      return this;
14839
    }
14840
 
14841
    public void unsetEx() {
14842
      this.ex = null;
14843
    }
14844
 
14845
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14846
    public boolean isSetEx() {
14847
      return this.ex != null;
14848
    }
14849
 
14850
    public void setExIsSet(boolean value) {
14851
      if (!value) {
14852
        this.ex = null;
14853
      }
14854
    }
14855
 
14856
    public void setFieldValue(_Fields field, Object value) {
14857
      switch (field) {
14858
      case SUCCESS:
14859
        if (value == null) {
14860
          unsetSuccess();
14861
        } else {
14862
          setSuccess((Boolean)value);
14863
        }
14864
        break;
14865
 
14866
      case EX:
14867
        if (value == null) {
14868
          unsetEx();
14869
        } else {
14870
          setEx((TransactionServiceException)value);
14871
        }
14872
        break;
14873
 
14874
      }
14875
    }
14876
 
14877
    public void setFieldValue(int fieldID, Object value) {
14878
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14879
    }
14880
 
14881
    public Object getFieldValue(_Fields field) {
14882
      switch (field) {
14883
      case SUCCESS:
14884
        return new Boolean(isSuccess());
14885
 
14886
      case EX:
14887
        return getEx();
14888
 
14889
      }
14890
      throw new IllegalStateException();
14891
    }
14892
 
14893
    public Object getFieldValue(int fieldId) {
14894
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14895
    }
14896
 
14897
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14898
    public boolean isSet(_Fields field) {
14899
      switch (field) {
14900
      case SUCCESS:
14901
        return isSetSuccess();
14902
      case EX:
14903
        return isSetEx();
14904
      }
14905
      throw new IllegalStateException();
14906
    }
14907
 
14908
    public boolean isSet(int fieldID) {
14909
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14910
    }
14911
 
14912
    @Override
14913
    public boolean equals(Object that) {
14914
      if (that == null)
14915
        return false;
14916
      if (that instanceof billOrder_result)
14917
        return this.equals((billOrder_result)that);
14918
      return false;
14919
    }
14920
 
14921
    public boolean equals(billOrder_result that) {
14922
      if (that == null)
14923
        return false;
14924
 
14925
      boolean this_present_success = true;
14926
      boolean that_present_success = true;
14927
      if (this_present_success || that_present_success) {
14928
        if (!(this_present_success && that_present_success))
14929
          return false;
14930
        if (this.success != that.success)
14931
          return false;
14932
      }
14933
 
14934
      boolean this_present_ex = true && this.isSetEx();
14935
      boolean that_present_ex = true && that.isSetEx();
14936
      if (this_present_ex || that_present_ex) {
14937
        if (!(this_present_ex && that_present_ex))
14938
          return false;
14939
        if (!this.ex.equals(that.ex))
14940
          return false;
14941
      }
14942
 
14943
      return true;
14944
    }
14945
 
14946
    @Override
14947
    public int hashCode() {
14948
      return 0;
14949
    }
14950
 
14951
    public int compareTo(billOrder_result other) {
14952
      if (!getClass().equals(other.getClass())) {
14953
        return getClass().getName().compareTo(other.getClass().getName());
14954
      }
14955
 
14956
      int lastComparison = 0;
14957
      billOrder_result typedOther = (billOrder_result)other;
14958
 
14959
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14960
      if (lastComparison != 0) {
14961
        return lastComparison;
14962
      }
14963
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14964
      if (lastComparison != 0) {
14965
        return lastComparison;
14966
      }
14967
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14968
      if (lastComparison != 0) {
14969
        return lastComparison;
14970
      }
14971
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14972
      if (lastComparison != 0) {
14973
        return lastComparison;
14974
      }
14975
      return 0;
14976
    }
14977
 
14978
    public void read(TProtocol iprot) throws TException {
14979
      TField field;
14980
      iprot.readStructBegin();
14981
      while (true)
14982
      {
14983
        field = iprot.readFieldBegin();
14984
        if (field.type == TType.STOP) { 
14985
          break;
14986
        }
14987
        _Fields fieldId = _Fields.findByThriftId(field.id);
14988
        if (fieldId == null) {
14989
          TProtocolUtil.skip(iprot, field.type);
14990
        } else {
14991
          switch (fieldId) {
14992
            case SUCCESS:
14993
              if (field.type == TType.BOOL) {
14994
                this.success = iprot.readBool();
14995
                setSuccessIsSet(true);
14996
              } else { 
14997
                TProtocolUtil.skip(iprot, field.type);
14998
              }
14999
              break;
15000
            case EX:
15001
              if (field.type == TType.STRUCT) {
15002
                this.ex = new TransactionServiceException();
15003
                this.ex.read(iprot);
15004
              } else { 
15005
                TProtocolUtil.skip(iprot, field.type);
15006
              }
15007
              break;
15008
          }
15009
          iprot.readFieldEnd();
15010
        }
15011
      }
15012
      iprot.readStructEnd();
15013
      validate();
15014
    }
15015
 
15016
    public void write(TProtocol oprot) throws TException {
15017
      oprot.writeStructBegin(STRUCT_DESC);
15018
 
15019
      if (this.isSetSuccess()) {
15020
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15021
        oprot.writeBool(this.success);
15022
        oprot.writeFieldEnd();
15023
      } else if (this.isSetEx()) {
15024
        oprot.writeFieldBegin(EX_FIELD_DESC);
15025
        this.ex.write(oprot);
15026
        oprot.writeFieldEnd();
15027
      }
15028
      oprot.writeFieldStop();
15029
      oprot.writeStructEnd();
15030
    }
15031
 
15032
    @Override
15033
    public String toString() {
15034
      StringBuilder sb = new StringBuilder("billOrder_result(");
15035
      boolean first = true;
15036
 
15037
      sb.append("success:");
15038
      sb.append(this.success);
15039
      first = false;
15040
      if (!first) sb.append(", ");
15041
      sb.append("ex:");
15042
      if (this.ex == null) {
15043
        sb.append("null");
15044
      } else {
15045
        sb.append(this.ex);
15046
      }
15047
      first = false;
15048
      sb.append(")");
15049
      return sb.toString();
15050
    }
15051
 
15052
    public void validate() throws TException {
15053
      // check for required fields
15054
    }
15055
 
15056
  }
15057
 
483 rajveer 15058
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
15059
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 15060
 
15061
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 15062
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 15063
 
15064
    private long transactionId;
1529 ankur.sing 15065
    private long customerId;
68 ashish 15066
 
15067
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15068
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 15069
      TRANSACTION_ID((short)1, "transactionId"),
15070
      CUSTOMER_ID((short)2, "customerId");
68 ashish 15071
 
15072
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15073
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15074
 
15075
      static {
15076
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15077
          byId.put((int)field._thriftId, field);
15078
          byName.put(field.getFieldName(), field);
15079
        }
15080
      }
15081
 
15082
      /**
15083
       * Find the _Fields constant that matches fieldId, or null if its not found.
15084
       */
15085
      public static _Fields findByThriftId(int fieldId) {
15086
        return byId.get(fieldId);
15087
      }
15088
 
15089
      /**
15090
       * Find the _Fields constant that matches fieldId, throwing an exception
15091
       * if it is not found.
15092
       */
15093
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15094
        _Fields fields = findByThriftId(fieldId);
15095
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15096
        return fields;
15097
      }
15098
 
15099
      /**
15100
       * Find the _Fields constant that matches name, or null if its not found.
15101
       */
15102
      public static _Fields findByName(String name) {
15103
        return byName.get(name);
15104
      }
15105
 
15106
      private final short _thriftId;
15107
      private final String _fieldName;
15108
 
15109
      _Fields(short thriftId, String fieldName) {
15110
        _thriftId = thriftId;
15111
        _fieldName = fieldName;
15112
      }
15113
 
15114
      public short getThriftFieldId() {
15115
        return _thriftId;
15116
      }
15117
 
15118
      public String getFieldName() {
15119
        return _fieldName;
15120
      }
15121
    }
15122
 
15123
    // isset id assignments
15124
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 15125
    private static final int __CUSTOMERID_ISSET_ID = 1;
15126
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 15127
 
15128
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15129
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15130
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 15131
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
15132
          new FieldValueMetaData(TType.I64)));
68 ashish 15133
    }});
15134
 
15135
    static {
483 rajveer 15136
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 15137
    }
15138
 
483 rajveer 15139
    public getOrdersForTransaction_args() {
68 ashish 15140
    }
15141
 
483 rajveer 15142
    public getOrdersForTransaction_args(
1529 ankur.sing 15143
      long transactionId,
15144
      long customerId)
68 ashish 15145
    {
15146
      this();
15147
      this.transactionId = transactionId;
15148
      setTransactionIdIsSet(true);
1529 ankur.sing 15149
      this.customerId = customerId;
15150
      setCustomerIdIsSet(true);
68 ashish 15151
    }
15152
 
15153
    /**
15154
     * Performs a deep copy on <i>other</i>.
15155
     */
483 rajveer 15156
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 15157
      __isset_bit_vector.clear();
15158
      __isset_bit_vector.or(other.__isset_bit_vector);
15159
      this.transactionId = other.transactionId;
1529 ankur.sing 15160
      this.customerId = other.customerId;
68 ashish 15161
    }
15162
 
483 rajveer 15163
    public getOrdersForTransaction_args deepCopy() {
15164
      return new getOrdersForTransaction_args(this);
68 ashish 15165
    }
15166
 
15167
    @Deprecated
483 rajveer 15168
    public getOrdersForTransaction_args clone() {
15169
      return new getOrdersForTransaction_args(this);
68 ashish 15170
    }
15171
 
15172
    public long getTransactionId() {
15173
      return this.transactionId;
15174
    }
15175
 
483 rajveer 15176
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 15177
      this.transactionId = transactionId;
15178
      setTransactionIdIsSet(true);
15179
      return this;
15180
    }
15181
 
15182
    public void unsetTransactionId() {
15183
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15184
    }
15185
 
15186
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15187
    public boolean isSetTransactionId() {
15188
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15189
    }
15190
 
15191
    public void setTransactionIdIsSet(boolean value) {
15192
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15193
    }
15194
 
1529 ankur.sing 15195
    public long getCustomerId() {
15196
      return this.customerId;
15197
    }
15198
 
15199
    public getOrdersForTransaction_args setCustomerId(long customerId) {
15200
      this.customerId = customerId;
15201
      setCustomerIdIsSet(true);
15202
      return this;
15203
    }
15204
 
15205
    public void unsetCustomerId() {
15206
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
15207
    }
15208
 
15209
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15210
    public boolean isSetCustomerId() {
15211
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
15212
    }
15213
 
15214
    public void setCustomerIdIsSet(boolean value) {
15215
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
15216
    }
15217
 
68 ashish 15218
    public void setFieldValue(_Fields field, Object value) {
15219
      switch (field) {
15220
      case TRANSACTION_ID:
15221
        if (value == null) {
15222
          unsetTransactionId();
15223
        } else {
15224
          setTransactionId((Long)value);
15225
        }
15226
        break;
15227
 
1529 ankur.sing 15228
      case CUSTOMER_ID:
15229
        if (value == null) {
15230
          unsetCustomerId();
15231
        } else {
15232
          setCustomerId((Long)value);
15233
        }
15234
        break;
15235
 
68 ashish 15236
      }
15237
    }
15238
 
15239
    public void setFieldValue(int fieldID, Object value) {
15240
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15241
    }
15242
 
15243
    public Object getFieldValue(_Fields field) {
15244
      switch (field) {
15245
      case TRANSACTION_ID:
15246
        return new Long(getTransactionId());
15247
 
1529 ankur.sing 15248
      case CUSTOMER_ID:
15249
        return new Long(getCustomerId());
15250
 
68 ashish 15251
      }
15252
      throw new IllegalStateException();
15253
    }
15254
 
15255
    public Object getFieldValue(int fieldId) {
15256
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15257
    }
15258
 
15259
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15260
    public boolean isSet(_Fields field) {
15261
      switch (field) {
15262
      case TRANSACTION_ID:
15263
        return isSetTransactionId();
1529 ankur.sing 15264
      case CUSTOMER_ID:
15265
        return isSetCustomerId();
68 ashish 15266
      }
15267
      throw new IllegalStateException();
15268
    }
15269
 
15270
    public boolean isSet(int fieldID) {
15271
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15272
    }
15273
 
15274
    @Override
15275
    public boolean equals(Object that) {
15276
      if (that == null)
15277
        return false;
483 rajveer 15278
      if (that instanceof getOrdersForTransaction_args)
15279
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 15280
      return false;
15281
    }
15282
 
483 rajveer 15283
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 15284
      if (that == null)
15285
        return false;
15286
 
15287
      boolean this_present_transactionId = true;
15288
      boolean that_present_transactionId = true;
15289
      if (this_present_transactionId || that_present_transactionId) {
15290
        if (!(this_present_transactionId && that_present_transactionId))
15291
          return false;
15292
        if (this.transactionId != that.transactionId)
15293
          return false;
15294
      }
15295
 
1529 ankur.sing 15296
      boolean this_present_customerId = true;
15297
      boolean that_present_customerId = true;
15298
      if (this_present_customerId || that_present_customerId) {
15299
        if (!(this_present_customerId && that_present_customerId))
15300
          return false;
15301
        if (this.customerId != that.customerId)
15302
          return false;
15303
      }
15304
 
68 ashish 15305
      return true;
15306
    }
15307
 
15308
    @Override
15309
    public int hashCode() {
15310
      return 0;
15311
    }
15312
 
483 rajveer 15313
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 15314
      if (!getClass().equals(other.getClass())) {
15315
        return getClass().getName().compareTo(other.getClass().getName());
15316
      }
15317
 
15318
      int lastComparison = 0;
483 rajveer 15319
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 15320
 
15321
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15322
      if (lastComparison != 0) {
15323
        return lastComparison;
15324
      }
15325
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15326
      if (lastComparison != 0) {
15327
        return lastComparison;
15328
      }
1529 ankur.sing 15329
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
15330
      if (lastComparison != 0) {
15331
        return lastComparison;
15332
      }
15333
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
15334
      if (lastComparison != 0) {
15335
        return lastComparison;
15336
      }
68 ashish 15337
      return 0;
15338
    }
15339
 
15340
    public void read(TProtocol iprot) throws TException {
15341
      TField field;
15342
      iprot.readStructBegin();
15343
      while (true)
15344
      {
15345
        field = iprot.readFieldBegin();
15346
        if (field.type == TType.STOP) { 
15347
          break;
15348
        }
15349
        _Fields fieldId = _Fields.findByThriftId(field.id);
15350
        if (fieldId == null) {
15351
          TProtocolUtil.skip(iprot, field.type);
15352
        } else {
15353
          switch (fieldId) {
15354
            case TRANSACTION_ID:
15355
              if (field.type == TType.I64) {
15356
                this.transactionId = iprot.readI64();
15357
                setTransactionIdIsSet(true);
15358
              } else { 
15359
                TProtocolUtil.skip(iprot, field.type);
15360
              }
15361
              break;
1529 ankur.sing 15362
            case CUSTOMER_ID:
15363
              if (field.type == TType.I64) {
15364
                this.customerId = iprot.readI64();
15365
                setCustomerIdIsSet(true);
15366
              } else { 
15367
                TProtocolUtil.skip(iprot, field.type);
15368
              }
15369
              break;
68 ashish 15370
          }
15371
          iprot.readFieldEnd();
15372
        }
15373
      }
15374
      iprot.readStructEnd();
15375
      validate();
15376
    }
15377
 
15378
    public void write(TProtocol oprot) throws TException {
15379
      validate();
15380
 
15381
      oprot.writeStructBegin(STRUCT_DESC);
15382
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15383
      oprot.writeI64(this.transactionId);
15384
      oprot.writeFieldEnd();
1529 ankur.sing 15385
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15386
      oprot.writeI64(this.customerId);
15387
      oprot.writeFieldEnd();
68 ashish 15388
      oprot.writeFieldStop();
15389
      oprot.writeStructEnd();
15390
    }
15391
 
15392
    @Override
15393
    public String toString() {
483 rajveer 15394
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15395
      boolean first = true;
15396
 
15397
      sb.append("transactionId:");
15398
      sb.append(this.transactionId);
15399
      first = false;
1529 ankur.sing 15400
      if (!first) sb.append(", ");
15401
      sb.append("customerId:");
15402
      sb.append(this.customerId);
15403
      first = false;
68 ashish 15404
      sb.append(")");
15405
      return sb.toString();
15406
    }
15407
 
15408
    public void validate() throws TException {
15409
      // check for required fields
15410
    }
15411
 
15412
  }
15413
 
483 rajveer 15414
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15415
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15416
 
483 rajveer 15417
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15418
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15419
 
483 rajveer 15420
    private List<Order> success;
68 ashish 15421
    private TransactionServiceException ex;
15422
 
15423
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15424
    public enum _Fields implements TFieldIdEnum {
15425
      SUCCESS((short)0, "success"),
15426
      EX((short)1, "ex");
15427
 
15428
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15429
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15430
 
15431
      static {
15432
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15433
          byId.put((int)field._thriftId, field);
15434
          byName.put(field.getFieldName(), field);
15435
        }
15436
      }
15437
 
15438
      /**
15439
       * Find the _Fields constant that matches fieldId, or null if its not found.
15440
       */
15441
      public static _Fields findByThriftId(int fieldId) {
15442
        return byId.get(fieldId);
15443
      }
15444
 
15445
      /**
15446
       * Find the _Fields constant that matches fieldId, throwing an exception
15447
       * if it is not found.
15448
       */
15449
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15450
        _Fields fields = findByThriftId(fieldId);
15451
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15452
        return fields;
15453
      }
15454
 
15455
      /**
15456
       * Find the _Fields constant that matches name, or null if its not found.
15457
       */
15458
      public static _Fields findByName(String name) {
15459
        return byName.get(name);
15460
      }
15461
 
15462
      private final short _thriftId;
15463
      private final String _fieldName;
15464
 
15465
      _Fields(short thriftId, String fieldName) {
15466
        _thriftId = thriftId;
15467
        _fieldName = fieldName;
15468
      }
15469
 
15470
      public short getThriftFieldId() {
15471
        return _thriftId;
15472
      }
15473
 
15474
      public String getFieldName() {
15475
        return _fieldName;
15476
      }
15477
    }
15478
 
15479
    // isset id assignments
15480
 
15481
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15482
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15483
          new ListMetaData(TType.LIST, 
15484
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15485
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15486
          new FieldValueMetaData(TType.STRUCT)));
15487
    }});
15488
 
15489
    static {
483 rajveer 15490
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15491
    }
15492
 
483 rajveer 15493
    public getOrdersForTransaction_result() {
68 ashish 15494
    }
15495
 
483 rajveer 15496
    public getOrdersForTransaction_result(
15497
      List<Order> success,
68 ashish 15498
      TransactionServiceException ex)
15499
    {
15500
      this();
15501
      this.success = success;
15502
      this.ex = ex;
15503
    }
15504
 
15505
    /**
15506
     * Performs a deep copy on <i>other</i>.
15507
     */
483 rajveer 15508
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15509
      if (other.isSetSuccess()) {
15510
        List<Order> __this__success = new ArrayList<Order>();
15511
        for (Order other_element : other.success) {
15512
          __this__success.add(new Order(other_element));
15513
        }
15514
        this.success = __this__success;
15515
      }
68 ashish 15516
      if (other.isSetEx()) {
15517
        this.ex = new TransactionServiceException(other.ex);
15518
      }
15519
    }
15520
 
483 rajveer 15521
    public getOrdersForTransaction_result deepCopy() {
15522
      return new getOrdersForTransaction_result(this);
68 ashish 15523
    }
15524
 
15525
    @Deprecated
483 rajveer 15526
    public getOrdersForTransaction_result clone() {
15527
      return new getOrdersForTransaction_result(this);
68 ashish 15528
    }
15529
 
483 rajveer 15530
    public int getSuccessSize() {
15531
      return (this.success == null) ? 0 : this.success.size();
15532
    }
15533
 
15534
    public java.util.Iterator<Order> getSuccessIterator() {
15535
      return (this.success == null) ? null : this.success.iterator();
15536
    }
15537
 
15538
    public void addToSuccess(Order elem) {
15539
      if (this.success == null) {
15540
        this.success = new ArrayList<Order>();
15541
      }
15542
      this.success.add(elem);
15543
    }
15544
 
15545
    public List<Order> getSuccess() {
68 ashish 15546
      return this.success;
15547
    }
15548
 
483 rajveer 15549
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15550
      this.success = success;
15551
      return this;
15552
    }
15553
 
15554
    public void unsetSuccess() {
483 rajveer 15555
      this.success = null;
68 ashish 15556
    }
15557
 
15558
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15559
    public boolean isSetSuccess() {
483 rajveer 15560
      return this.success != null;
68 ashish 15561
    }
15562
 
15563
    public void setSuccessIsSet(boolean value) {
483 rajveer 15564
      if (!value) {
15565
        this.success = null;
15566
      }
68 ashish 15567
    }
15568
 
15569
    public TransactionServiceException getEx() {
15570
      return this.ex;
15571
    }
15572
 
483 rajveer 15573
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15574
      this.ex = ex;
15575
      return this;
15576
    }
15577
 
15578
    public void unsetEx() {
15579
      this.ex = null;
15580
    }
15581
 
15582
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15583
    public boolean isSetEx() {
15584
      return this.ex != null;
15585
    }
15586
 
15587
    public void setExIsSet(boolean value) {
15588
      if (!value) {
15589
        this.ex = null;
15590
      }
15591
    }
15592
 
15593
    public void setFieldValue(_Fields field, Object value) {
15594
      switch (field) {
15595
      case SUCCESS:
15596
        if (value == null) {
15597
          unsetSuccess();
15598
        } else {
483 rajveer 15599
          setSuccess((List<Order>)value);
68 ashish 15600
        }
15601
        break;
15602
 
15603
      case EX:
15604
        if (value == null) {
15605
          unsetEx();
15606
        } else {
15607
          setEx((TransactionServiceException)value);
15608
        }
15609
        break;
15610
 
15611
      }
15612
    }
15613
 
15614
    public void setFieldValue(int fieldID, Object value) {
15615
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15616
    }
15617
 
15618
    public Object getFieldValue(_Fields field) {
15619
      switch (field) {
15620
      case SUCCESS:
483 rajveer 15621
        return getSuccess();
68 ashish 15622
 
15623
      case EX:
15624
        return getEx();
15625
 
15626
      }
15627
      throw new IllegalStateException();
15628
    }
15629
 
15630
    public Object getFieldValue(int fieldId) {
15631
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15632
    }
15633
 
15634
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15635
    public boolean isSet(_Fields field) {
15636
      switch (field) {
15637
      case SUCCESS:
15638
        return isSetSuccess();
15639
      case EX:
15640
        return isSetEx();
15641
      }
15642
      throw new IllegalStateException();
15643
    }
15644
 
15645
    public boolean isSet(int fieldID) {
15646
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15647
    }
15648
 
15649
    @Override
15650
    public boolean equals(Object that) {
15651
      if (that == null)
15652
        return false;
483 rajveer 15653
      if (that instanceof getOrdersForTransaction_result)
15654
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 15655
      return false;
15656
    }
15657
 
483 rajveer 15658
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 15659
      if (that == null)
15660
        return false;
15661
 
483 rajveer 15662
      boolean this_present_success = true && this.isSetSuccess();
15663
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15664
      if (this_present_success || that_present_success) {
15665
        if (!(this_present_success && that_present_success))
15666
          return false;
483 rajveer 15667
        if (!this.success.equals(that.success))
68 ashish 15668
          return false;
15669
      }
15670
 
15671
      boolean this_present_ex = true && this.isSetEx();
15672
      boolean that_present_ex = true && that.isSetEx();
15673
      if (this_present_ex || that_present_ex) {
15674
        if (!(this_present_ex && that_present_ex))
15675
          return false;
15676
        if (!this.ex.equals(that.ex))
15677
          return false;
15678
      }
15679
 
15680
      return true;
15681
    }
15682
 
15683
    @Override
15684
    public int hashCode() {
15685
      return 0;
15686
    }
15687
 
483 rajveer 15688
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 15689
      if (!getClass().equals(other.getClass())) {
15690
        return getClass().getName().compareTo(other.getClass().getName());
15691
      }
15692
 
15693
      int lastComparison = 0;
483 rajveer 15694
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 15695
 
15696
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15697
      if (lastComparison != 0) {
15698
        return lastComparison;
15699
      }
15700
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15701
      if (lastComparison != 0) {
15702
        return lastComparison;
15703
      }
15704
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15705
      if (lastComparison != 0) {
15706
        return lastComparison;
15707
      }
15708
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15709
      if (lastComparison != 0) {
15710
        return lastComparison;
15711
      }
15712
      return 0;
15713
    }
15714
 
15715
    public void read(TProtocol iprot) throws TException {
15716
      TField field;
15717
      iprot.readStructBegin();
15718
      while (true)
15719
      {
15720
        field = iprot.readFieldBegin();
15721
        if (field.type == TType.STOP) { 
15722
          break;
15723
        }
15724
        _Fields fieldId = _Fields.findByThriftId(field.id);
15725
        if (fieldId == null) {
15726
          TProtocolUtil.skip(iprot, field.type);
15727
        } else {
15728
          switch (fieldId) {
15729
            case SUCCESS:
483 rajveer 15730
              if (field.type == TType.LIST) {
15731
                {
1382 varun.gupt 15732
                  TList _list32 = iprot.readListBegin();
15733
                  this.success = new ArrayList<Order>(_list32.size);
15734
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15735
                  {
1382 varun.gupt 15736
                    Order _elem34;
15737
                    _elem34 = new Order();
15738
                    _elem34.read(iprot);
15739
                    this.success.add(_elem34);
483 rajveer 15740
                  }
15741
                  iprot.readListEnd();
15742
                }
68 ashish 15743
              } else { 
15744
                TProtocolUtil.skip(iprot, field.type);
15745
              }
15746
              break;
15747
            case EX:
15748
              if (field.type == TType.STRUCT) {
15749
                this.ex = new TransactionServiceException();
15750
                this.ex.read(iprot);
15751
              } else { 
15752
                TProtocolUtil.skip(iprot, field.type);
15753
              }
15754
              break;
15755
          }
15756
          iprot.readFieldEnd();
15757
        }
15758
      }
15759
      iprot.readStructEnd();
15760
      validate();
15761
    }
15762
 
15763
    public void write(TProtocol oprot) throws TException {
15764
      oprot.writeStructBegin(STRUCT_DESC);
15765
 
15766
      if (this.isSetSuccess()) {
15767
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15768
        {
15769
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 15770
          for (Order _iter35 : this.success)
483 rajveer 15771
          {
1382 varun.gupt 15772
            _iter35.write(oprot);
483 rajveer 15773
          }
15774
          oprot.writeListEnd();
15775
        }
68 ashish 15776
        oprot.writeFieldEnd();
15777
      } else if (this.isSetEx()) {
15778
        oprot.writeFieldBegin(EX_FIELD_DESC);
15779
        this.ex.write(oprot);
15780
        oprot.writeFieldEnd();
15781
      }
15782
      oprot.writeFieldStop();
15783
      oprot.writeStructEnd();
15784
    }
15785
 
15786
    @Override
15787
    public String toString() {
483 rajveer 15788
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 15789
      boolean first = true;
15790
 
15791
      sb.append("success:");
483 rajveer 15792
      if (this.success == null) {
15793
        sb.append("null");
15794
      } else {
15795
        sb.append(this.success);
15796
      }
68 ashish 15797
      first = false;
15798
      if (!first) sb.append(", ");
15799
      sb.append("ex:");
15800
      if (this.ex == null) {
15801
        sb.append("null");
15802
      } else {
15803
        sb.append(this.ex);
15804
      }
15805
      first = false;
15806
      sb.append(")");
15807
      return sb.toString();
15808
    }
15809
 
15810
    public void validate() throws TException {
15811
      // check for required fields
15812
    }
15813
 
15814
  }
15815
 
483 rajveer 15816
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
15817
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 15818
 
483 rajveer 15819
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
15820
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
15821
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
15822
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 15823
 
483 rajveer 15824
    private long customerId;
15825
    private long from_date;
15826
    private long to_date;
15827
    private OrderStatus status;
68 ashish 15828
 
15829
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15830
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15831
      CUSTOMER_ID((short)1, "customerId"),
15832
      FROM_DATE((short)2, "from_date"),
15833
      TO_DATE((short)3, "to_date"),
15834
      /**
15835
       * 
15836
       * @see OrderStatus
15837
       */
15838
      STATUS((short)4, "status");
68 ashish 15839
 
15840
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15841
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15842
 
15843
      static {
15844
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15845
          byId.put((int)field._thriftId, field);
15846
          byName.put(field.getFieldName(), field);
15847
        }
15848
      }
15849
 
15850
      /**
15851
       * Find the _Fields constant that matches fieldId, or null if its not found.
15852
       */
15853
      public static _Fields findByThriftId(int fieldId) {
15854
        return byId.get(fieldId);
15855
      }
15856
 
15857
      /**
15858
       * Find the _Fields constant that matches fieldId, throwing an exception
15859
       * if it is not found.
15860
       */
15861
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15862
        _Fields fields = findByThriftId(fieldId);
15863
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15864
        return fields;
15865
      }
15866
 
15867
      /**
15868
       * Find the _Fields constant that matches name, or null if its not found.
15869
       */
15870
      public static _Fields findByName(String name) {
15871
        return byName.get(name);
15872
      }
15873
 
15874
      private final short _thriftId;
15875
      private final String _fieldName;
15876
 
15877
      _Fields(short thriftId, String fieldName) {
15878
        _thriftId = thriftId;
15879
        _fieldName = fieldName;
15880
      }
15881
 
15882
      public short getThriftFieldId() {
15883
        return _thriftId;
15884
      }
15885
 
15886
      public String getFieldName() {
15887
        return _fieldName;
15888
      }
15889
    }
15890
 
15891
    // isset id assignments
483 rajveer 15892
    private static final int __CUSTOMERID_ISSET_ID = 0;
15893
    private static final int __FROM_DATE_ISSET_ID = 1;
15894
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 15895
    private BitSet __isset_bit_vector = new BitSet(3);
15896
 
15897
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15898
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 15899
          new FieldValueMetaData(TType.I64)));
483 rajveer 15900
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 15901
          new FieldValueMetaData(TType.I64)));
483 rajveer 15902
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 15903
          new FieldValueMetaData(TType.I64)));
483 rajveer 15904
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15905
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 15906
    }});
15907
 
15908
    static {
483 rajveer 15909
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 15910
    }
15911
 
483 rajveer 15912
    public getOrdersForCustomer_args() {
68 ashish 15913
    }
15914
 
483 rajveer 15915
    public getOrdersForCustomer_args(
15916
      long customerId,
15917
      long from_date,
15918
      long to_date,
15919
      OrderStatus status)
68 ashish 15920
    {
15921
      this();
483 rajveer 15922
      this.customerId = customerId;
15923
      setCustomerIdIsSet(true);
15924
      this.from_date = from_date;
15925
      setFrom_dateIsSet(true);
15926
      this.to_date = to_date;
15927
      setTo_dateIsSet(true);
15928
      this.status = status;
68 ashish 15929
    }
15930
 
15931
    /**
15932
     * Performs a deep copy on <i>other</i>.
15933
     */
483 rajveer 15934
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 15935
      __isset_bit_vector.clear();
15936
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15937
      this.customerId = other.customerId;
15938
      this.from_date = other.from_date;
15939
      this.to_date = other.to_date;
15940
      if (other.isSetStatus()) {
15941
        this.status = other.status;
15942
      }
68 ashish 15943
    }
15944
 
483 rajveer 15945
    public getOrdersForCustomer_args deepCopy() {
15946
      return new getOrdersForCustomer_args(this);
68 ashish 15947
    }
15948
 
15949
    @Deprecated
483 rajveer 15950
    public getOrdersForCustomer_args clone() {
15951
      return new getOrdersForCustomer_args(this);
68 ashish 15952
    }
15953
 
483 rajveer 15954
    public long getCustomerId() {
15955
      return this.customerId;
68 ashish 15956
    }
15957
 
483 rajveer 15958
    public getOrdersForCustomer_args setCustomerId(long customerId) {
15959
      this.customerId = customerId;
15960
      setCustomerIdIsSet(true);
68 ashish 15961
      return this;
15962
    }
15963
 
483 rajveer 15964
    public void unsetCustomerId() {
15965
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 15966
    }
15967
 
483 rajveer 15968
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15969
    public boolean isSetCustomerId() {
15970
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 15971
    }
15972
 
483 rajveer 15973
    public void setCustomerIdIsSet(boolean value) {
15974
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 15975
    }
15976
 
483 rajveer 15977
    public long getFrom_date() {
15978
      return this.from_date;
68 ashish 15979
    }
15980
 
483 rajveer 15981
    public getOrdersForCustomer_args setFrom_date(long from_date) {
15982
      this.from_date = from_date;
15983
      setFrom_dateIsSet(true);
68 ashish 15984
      return this;
15985
    }
15986
 
483 rajveer 15987
    public void unsetFrom_date() {
15988
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 15989
    }
15990
 
483 rajveer 15991
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
15992
    public boolean isSetFrom_date() {
15993
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 15994
    }
15995
 
483 rajveer 15996
    public void setFrom_dateIsSet(boolean value) {
15997
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 15998
    }
15999
 
483 rajveer 16000
    public long getTo_date() {
16001
      return this.to_date;
68 ashish 16002
    }
16003
 
483 rajveer 16004
    public getOrdersForCustomer_args setTo_date(long to_date) {
16005
      this.to_date = to_date;
16006
      setTo_dateIsSet(true);
68 ashish 16007
      return this;
16008
    }
16009
 
483 rajveer 16010
    public void unsetTo_date() {
16011
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 16012
    }
16013
 
483 rajveer 16014
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
16015
    public boolean isSetTo_date() {
16016
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 16017
    }
16018
 
483 rajveer 16019
    public void setTo_dateIsSet(boolean value) {
16020
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 16021
    }
16022
 
483 rajveer 16023
    /**
16024
     * 
16025
     * @see OrderStatus
16026
     */
16027
    public OrderStatus getStatus() {
16028
      return this.status;
16029
    }
16030
 
16031
    /**
16032
     * 
16033
     * @see OrderStatus
16034
     */
16035
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
16036
      this.status = status;
16037
      return this;
16038
    }
16039
 
16040
    public void unsetStatus() {
16041
      this.status = null;
16042
    }
16043
 
16044
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16045
    public boolean isSetStatus() {
16046
      return this.status != null;
16047
    }
16048
 
16049
    public void setStatusIsSet(boolean value) {
16050
      if (!value) {
16051
        this.status = null;
16052
      }
16053
    }
16054
 
68 ashish 16055
    public void setFieldValue(_Fields field, Object value) {
16056
      switch (field) {
483 rajveer 16057
      case CUSTOMER_ID:
68 ashish 16058
        if (value == null) {
483 rajveer 16059
          unsetCustomerId();
68 ashish 16060
        } else {
483 rajveer 16061
          setCustomerId((Long)value);
68 ashish 16062
        }
16063
        break;
16064
 
483 rajveer 16065
      case FROM_DATE:
68 ashish 16066
        if (value == null) {
483 rajveer 16067
          unsetFrom_date();
68 ashish 16068
        } else {
483 rajveer 16069
          setFrom_date((Long)value);
68 ashish 16070
        }
16071
        break;
16072
 
483 rajveer 16073
      case TO_DATE:
68 ashish 16074
        if (value == null) {
483 rajveer 16075
          unsetTo_date();
68 ashish 16076
        } else {
483 rajveer 16077
          setTo_date((Long)value);
68 ashish 16078
        }
16079
        break;
16080
 
483 rajveer 16081
      case STATUS:
16082
        if (value == null) {
16083
          unsetStatus();
16084
        } else {
16085
          setStatus((OrderStatus)value);
16086
        }
16087
        break;
16088
 
68 ashish 16089
      }
16090
    }
16091
 
16092
    public void setFieldValue(int fieldID, Object value) {
16093
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16094
    }
16095
 
16096
    public Object getFieldValue(_Fields field) {
16097
      switch (field) {
483 rajveer 16098
      case CUSTOMER_ID:
16099
        return new Long(getCustomerId());
68 ashish 16100
 
483 rajveer 16101
      case FROM_DATE:
16102
        return new Long(getFrom_date());
68 ashish 16103
 
483 rajveer 16104
      case TO_DATE:
16105
        return new Long(getTo_date());
68 ashish 16106
 
483 rajveer 16107
      case STATUS:
16108
        return getStatus();
16109
 
68 ashish 16110
      }
16111
      throw new IllegalStateException();
16112
    }
16113
 
16114
    public Object getFieldValue(int fieldId) {
16115
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16116
    }
16117
 
16118
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16119
    public boolean isSet(_Fields field) {
16120
      switch (field) {
483 rajveer 16121
      case CUSTOMER_ID:
16122
        return isSetCustomerId();
16123
      case FROM_DATE:
16124
        return isSetFrom_date();
16125
      case TO_DATE:
16126
        return isSetTo_date();
16127
      case STATUS:
16128
        return isSetStatus();
68 ashish 16129
      }
16130
      throw new IllegalStateException();
16131
    }
16132
 
16133
    public boolean isSet(int fieldID) {
16134
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16135
    }
16136
 
16137
    @Override
16138
    public boolean equals(Object that) {
16139
      if (that == null)
16140
        return false;
483 rajveer 16141
      if (that instanceof getOrdersForCustomer_args)
16142
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 16143
      return false;
16144
    }
16145
 
483 rajveer 16146
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 16147
      if (that == null)
16148
        return false;
16149
 
483 rajveer 16150
      boolean this_present_customerId = true;
16151
      boolean that_present_customerId = true;
16152
      if (this_present_customerId || that_present_customerId) {
16153
        if (!(this_present_customerId && that_present_customerId))
68 ashish 16154
          return false;
483 rajveer 16155
        if (this.customerId != that.customerId)
68 ashish 16156
          return false;
16157
      }
16158
 
483 rajveer 16159
      boolean this_present_from_date = true;
16160
      boolean that_present_from_date = true;
16161
      if (this_present_from_date || that_present_from_date) {
16162
        if (!(this_present_from_date && that_present_from_date))
68 ashish 16163
          return false;
483 rajveer 16164
        if (this.from_date != that.from_date)
68 ashish 16165
          return false;
16166
      }
16167
 
483 rajveer 16168
      boolean this_present_to_date = true;
16169
      boolean that_present_to_date = true;
16170
      if (this_present_to_date || that_present_to_date) {
16171
        if (!(this_present_to_date && that_present_to_date))
68 ashish 16172
          return false;
483 rajveer 16173
        if (this.to_date != that.to_date)
68 ashish 16174
          return false;
16175
      }
16176
 
483 rajveer 16177
      boolean this_present_status = true && this.isSetStatus();
16178
      boolean that_present_status = true && that.isSetStatus();
16179
      if (this_present_status || that_present_status) {
16180
        if (!(this_present_status && that_present_status))
16181
          return false;
16182
        if (!this.status.equals(that.status))
16183
          return false;
16184
      }
16185
 
68 ashish 16186
      return true;
16187
    }
16188
 
16189
    @Override
16190
    public int hashCode() {
16191
      return 0;
16192
    }
16193
 
483 rajveer 16194
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 16195
      if (!getClass().equals(other.getClass())) {
16196
        return getClass().getName().compareTo(other.getClass().getName());
16197
      }
16198
 
16199
      int lastComparison = 0;
483 rajveer 16200
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 16201
 
483 rajveer 16202
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 16203
      if (lastComparison != 0) {
16204
        return lastComparison;
16205
      }
483 rajveer 16206
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 16207
      if (lastComparison != 0) {
16208
        return lastComparison;
16209
      }
483 rajveer 16210
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 16211
      if (lastComparison != 0) {
16212
        return lastComparison;
16213
      }
483 rajveer 16214
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 16215
      if (lastComparison != 0) {
16216
        return lastComparison;
16217
      }
483 rajveer 16218
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 16219
      if (lastComparison != 0) {
16220
        return lastComparison;
16221
      }
483 rajveer 16222
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 16223
      if (lastComparison != 0) {
16224
        return lastComparison;
16225
      }
483 rajveer 16226
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16227
      if (lastComparison != 0) {
16228
        return lastComparison;
16229
      }
16230
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16231
      if (lastComparison != 0) {
16232
        return lastComparison;
16233
      }
68 ashish 16234
      return 0;
16235
    }
16236
 
16237
    public void read(TProtocol iprot) throws TException {
16238
      TField field;
16239
      iprot.readStructBegin();
16240
      while (true)
16241
      {
16242
        field = iprot.readFieldBegin();
16243
        if (field.type == TType.STOP) { 
16244
          break;
16245
        }
16246
        _Fields fieldId = _Fields.findByThriftId(field.id);
16247
        if (fieldId == null) {
16248
          TProtocolUtil.skip(iprot, field.type);
16249
        } else {
16250
          switch (fieldId) {
483 rajveer 16251
            case CUSTOMER_ID:
68 ashish 16252
              if (field.type == TType.I64) {
483 rajveer 16253
                this.customerId = iprot.readI64();
16254
                setCustomerIdIsSet(true);
68 ashish 16255
              } else { 
16256
                TProtocolUtil.skip(iprot, field.type);
16257
              }
16258
              break;
483 rajveer 16259
            case FROM_DATE:
68 ashish 16260
              if (field.type == TType.I64) {
483 rajveer 16261
                this.from_date = iprot.readI64();
16262
                setFrom_dateIsSet(true);
68 ashish 16263
              } else { 
16264
                TProtocolUtil.skip(iprot, field.type);
16265
              }
16266
              break;
483 rajveer 16267
            case TO_DATE:
68 ashish 16268
              if (field.type == TType.I64) {
483 rajveer 16269
                this.to_date = iprot.readI64();
16270
                setTo_dateIsSet(true);
68 ashish 16271
              } else { 
16272
                TProtocolUtil.skip(iprot, field.type);
16273
              }
16274
              break;
483 rajveer 16275
            case STATUS:
16276
              if (field.type == TType.I32) {
16277
                this.status = OrderStatus.findByValue(iprot.readI32());
16278
              } else { 
16279
                TProtocolUtil.skip(iprot, field.type);
16280
              }
16281
              break;
68 ashish 16282
          }
16283
          iprot.readFieldEnd();
16284
        }
16285
      }
16286
      iprot.readStructEnd();
16287
      validate();
16288
    }
16289
 
16290
    public void write(TProtocol oprot) throws TException {
16291
      validate();
16292
 
16293
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16294
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16295
      oprot.writeI64(this.customerId);
68 ashish 16296
      oprot.writeFieldEnd();
483 rajveer 16297
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
16298
      oprot.writeI64(this.from_date);
68 ashish 16299
      oprot.writeFieldEnd();
483 rajveer 16300
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
16301
      oprot.writeI64(this.to_date);
68 ashish 16302
      oprot.writeFieldEnd();
483 rajveer 16303
      if (this.status != null) {
16304
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16305
        oprot.writeI32(this.status.getValue());
16306
        oprot.writeFieldEnd();
16307
      }
68 ashish 16308
      oprot.writeFieldStop();
16309
      oprot.writeStructEnd();
16310
    }
16311
 
16312
    @Override
16313
    public String toString() {
483 rajveer 16314
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 16315
      boolean first = true;
16316
 
483 rajveer 16317
      sb.append("customerId:");
16318
      sb.append(this.customerId);
68 ashish 16319
      first = false;
16320
      if (!first) sb.append(", ");
483 rajveer 16321
      sb.append("from_date:");
16322
      sb.append(this.from_date);
68 ashish 16323
      first = false;
16324
      if (!first) sb.append(", ");
483 rajveer 16325
      sb.append("to_date:");
16326
      sb.append(this.to_date);
68 ashish 16327
      first = false;
483 rajveer 16328
      if (!first) sb.append(", ");
16329
      sb.append("status:");
16330
      if (this.status == null) {
16331
        sb.append("null");
16332
      } else {
16333
        String status_name = status.name();
16334
        if (status_name != null) {
16335
          sb.append(status_name);
16336
          sb.append(" (");
16337
        }
16338
        sb.append(this.status);
16339
        if (status_name != null) {
16340
          sb.append(")");
16341
        }
16342
      }
16343
      first = false;
68 ashish 16344
      sb.append(")");
16345
      return sb.toString();
16346
    }
16347
 
16348
    public void validate() throws TException {
16349
      // check for required fields
16350
    }
16351
 
16352
  }
16353
 
483 rajveer 16354
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
16355
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 16356
 
483 rajveer 16357
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16358
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16359
 
483 rajveer 16360
    private List<Order> success;
68 ashish 16361
    private TransactionServiceException ex;
16362
 
16363
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16364
    public enum _Fields implements TFieldIdEnum {
16365
      SUCCESS((short)0, "success"),
16366
      EX((short)1, "ex");
16367
 
16368
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16369
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16370
 
16371
      static {
16372
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16373
          byId.put((int)field._thriftId, field);
16374
          byName.put(field.getFieldName(), field);
16375
        }
16376
      }
16377
 
16378
      /**
16379
       * Find the _Fields constant that matches fieldId, or null if its not found.
16380
       */
16381
      public static _Fields findByThriftId(int fieldId) {
16382
        return byId.get(fieldId);
16383
      }
16384
 
16385
      /**
16386
       * Find the _Fields constant that matches fieldId, throwing an exception
16387
       * if it is not found.
16388
       */
16389
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16390
        _Fields fields = findByThriftId(fieldId);
16391
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16392
        return fields;
16393
      }
16394
 
16395
      /**
16396
       * Find the _Fields constant that matches name, or null if its not found.
16397
       */
16398
      public static _Fields findByName(String name) {
16399
        return byName.get(name);
16400
      }
16401
 
16402
      private final short _thriftId;
16403
      private final String _fieldName;
16404
 
16405
      _Fields(short thriftId, String fieldName) {
16406
        _thriftId = thriftId;
16407
        _fieldName = fieldName;
16408
      }
16409
 
16410
      public short getThriftFieldId() {
16411
        return _thriftId;
16412
      }
16413
 
16414
      public String getFieldName() {
16415
        return _fieldName;
16416
      }
16417
    }
16418
 
16419
    // isset id assignments
16420
 
16421
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16422
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16423
          new ListMetaData(TType.LIST, 
16424
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16425
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16426
          new FieldValueMetaData(TType.STRUCT)));
16427
    }});
16428
 
16429
    static {
483 rajveer 16430
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16431
    }
16432
 
483 rajveer 16433
    public getOrdersForCustomer_result() {
68 ashish 16434
    }
16435
 
483 rajveer 16436
    public getOrdersForCustomer_result(
16437
      List<Order> success,
68 ashish 16438
      TransactionServiceException ex)
16439
    {
16440
      this();
16441
      this.success = success;
16442
      this.ex = ex;
16443
    }
16444
 
16445
    /**
16446
     * Performs a deep copy on <i>other</i>.
16447
     */
483 rajveer 16448
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16449
      if (other.isSetSuccess()) {
16450
        List<Order> __this__success = new ArrayList<Order>();
16451
        for (Order other_element : other.success) {
16452
          __this__success.add(new Order(other_element));
16453
        }
16454
        this.success = __this__success;
16455
      }
68 ashish 16456
      if (other.isSetEx()) {
16457
        this.ex = new TransactionServiceException(other.ex);
16458
      }
16459
    }
16460
 
483 rajveer 16461
    public getOrdersForCustomer_result deepCopy() {
16462
      return new getOrdersForCustomer_result(this);
68 ashish 16463
    }
16464
 
16465
    @Deprecated
483 rajveer 16466
    public getOrdersForCustomer_result clone() {
16467
      return new getOrdersForCustomer_result(this);
68 ashish 16468
    }
16469
 
483 rajveer 16470
    public int getSuccessSize() {
16471
      return (this.success == null) ? 0 : this.success.size();
16472
    }
16473
 
16474
    public java.util.Iterator<Order> getSuccessIterator() {
16475
      return (this.success == null) ? null : this.success.iterator();
16476
    }
16477
 
16478
    public void addToSuccess(Order elem) {
16479
      if (this.success == null) {
16480
        this.success = new ArrayList<Order>();
16481
      }
16482
      this.success.add(elem);
16483
    }
16484
 
16485
    public List<Order> getSuccess() {
68 ashish 16486
      return this.success;
16487
    }
16488
 
483 rajveer 16489
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16490
      this.success = success;
16491
      return this;
16492
    }
16493
 
16494
    public void unsetSuccess() {
483 rajveer 16495
      this.success = null;
68 ashish 16496
    }
16497
 
16498
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16499
    public boolean isSetSuccess() {
483 rajveer 16500
      return this.success != null;
68 ashish 16501
    }
16502
 
16503
    public void setSuccessIsSet(boolean value) {
483 rajveer 16504
      if (!value) {
16505
        this.success = null;
16506
      }
68 ashish 16507
    }
16508
 
16509
    public TransactionServiceException getEx() {
16510
      return this.ex;
16511
    }
16512
 
483 rajveer 16513
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16514
      this.ex = ex;
16515
      return this;
16516
    }
16517
 
16518
    public void unsetEx() {
16519
      this.ex = null;
16520
    }
16521
 
16522
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16523
    public boolean isSetEx() {
16524
      return this.ex != null;
16525
    }
16526
 
16527
    public void setExIsSet(boolean value) {
16528
      if (!value) {
16529
        this.ex = null;
16530
      }
16531
    }
16532
 
16533
    public void setFieldValue(_Fields field, Object value) {
16534
      switch (field) {
16535
      case SUCCESS:
16536
        if (value == null) {
16537
          unsetSuccess();
16538
        } else {
483 rajveer 16539
          setSuccess((List<Order>)value);
68 ashish 16540
        }
16541
        break;
16542
 
16543
      case EX:
16544
        if (value == null) {
16545
          unsetEx();
16546
        } else {
16547
          setEx((TransactionServiceException)value);
16548
        }
16549
        break;
16550
 
16551
      }
16552
    }
16553
 
16554
    public void setFieldValue(int fieldID, Object value) {
16555
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16556
    }
16557
 
16558
    public Object getFieldValue(_Fields field) {
16559
      switch (field) {
16560
      case SUCCESS:
483 rajveer 16561
        return getSuccess();
68 ashish 16562
 
16563
      case EX:
16564
        return getEx();
16565
 
16566
      }
16567
      throw new IllegalStateException();
16568
    }
16569
 
16570
    public Object getFieldValue(int fieldId) {
16571
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16572
    }
16573
 
16574
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16575
    public boolean isSet(_Fields field) {
16576
      switch (field) {
16577
      case SUCCESS:
16578
        return isSetSuccess();
16579
      case EX:
16580
        return isSetEx();
16581
      }
16582
      throw new IllegalStateException();
16583
    }
16584
 
16585
    public boolean isSet(int fieldID) {
16586
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16587
    }
16588
 
16589
    @Override
16590
    public boolean equals(Object that) {
16591
      if (that == null)
16592
        return false;
483 rajveer 16593
      if (that instanceof getOrdersForCustomer_result)
16594
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16595
      return false;
16596
    }
16597
 
483 rajveer 16598
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16599
      if (that == null)
16600
        return false;
16601
 
483 rajveer 16602
      boolean this_present_success = true && this.isSetSuccess();
16603
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16604
      if (this_present_success || that_present_success) {
16605
        if (!(this_present_success && that_present_success))
16606
          return false;
483 rajveer 16607
        if (!this.success.equals(that.success))
68 ashish 16608
          return false;
16609
      }
16610
 
16611
      boolean this_present_ex = true && this.isSetEx();
16612
      boolean that_present_ex = true && that.isSetEx();
16613
      if (this_present_ex || that_present_ex) {
16614
        if (!(this_present_ex && that_present_ex))
16615
          return false;
16616
        if (!this.ex.equals(that.ex))
16617
          return false;
16618
      }
16619
 
16620
      return true;
16621
    }
16622
 
16623
    @Override
16624
    public int hashCode() {
16625
      return 0;
16626
    }
16627
 
483 rajveer 16628
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 16629
      if (!getClass().equals(other.getClass())) {
16630
        return getClass().getName().compareTo(other.getClass().getName());
16631
      }
16632
 
16633
      int lastComparison = 0;
483 rajveer 16634
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 16635
 
16636
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16637
      if (lastComparison != 0) {
16638
        return lastComparison;
16639
      }
16640
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16641
      if (lastComparison != 0) {
16642
        return lastComparison;
16643
      }
16644
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16645
      if (lastComparison != 0) {
16646
        return lastComparison;
16647
      }
16648
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16649
      if (lastComparison != 0) {
16650
        return lastComparison;
16651
      }
16652
      return 0;
16653
    }
16654
 
16655
    public void read(TProtocol iprot) throws TException {
16656
      TField field;
16657
      iprot.readStructBegin();
16658
      while (true)
16659
      {
16660
        field = iprot.readFieldBegin();
16661
        if (field.type == TType.STOP) { 
16662
          break;
16663
        }
16664
        _Fields fieldId = _Fields.findByThriftId(field.id);
16665
        if (fieldId == null) {
16666
          TProtocolUtil.skip(iprot, field.type);
16667
        } else {
16668
          switch (fieldId) {
16669
            case SUCCESS:
483 rajveer 16670
              if (field.type == TType.LIST) {
16671
                {
1382 varun.gupt 16672
                  TList _list36 = iprot.readListBegin();
16673
                  this.success = new ArrayList<Order>(_list36.size);
16674
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 16675
                  {
1382 varun.gupt 16676
                    Order _elem38;
16677
                    _elem38 = new Order();
16678
                    _elem38.read(iprot);
16679
                    this.success.add(_elem38);
483 rajveer 16680
                  }
16681
                  iprot.readListEnd();
16682
                }
68 ashish 16683
              } else { 
16684
                TProtocolUtil.skip(iprot, field.type);
16685
              }
16686
              break;
16687
            case EX:
16688
              if (field.type == TType.STRUCT) {
16689
                this.ex = new TransactionServiceException();
16690
                this.ex.read(iprot);
16691
              } else { 
16692
                TProtocolUtil.skip(iprot, field.type);
16693
              }
16694
              break;
16695
          }
16696
          iprot.readFieldEnd();
16697
        }
16698
      }
16699
      iprot.readStructEnd();
16700
      validate();
16701
    }
16702
 
16703
    public void write(TProtocol oprot) throws TException {
16704
      oprot.writeStructBegin(STRUCT_DESC);
16705
 
16706
      if (this.isSetSuccess()) {
16707
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16708
        {
16709
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16710
          for (Order _iter39 : this.success)
483 rajveer 16711
          {
1382 varun.gupt 16712
            _iter39.write(oprot);
483 rajveer 16713
          }
16714
          oprot.writeListEnd();
16715
        }
68 ashish 16716
        oprot.writeFieldEnd();
16717
      } else if (this.isSetEx()) {
16718
        oprot.writeFieldBegin(EX_FIELD_DESC);
16719
        this.ex.write(oprot);
16720
        oprot.writeFieldEnd();
16721
      }
16722
      oprot.writeFieldStop();
16723
      oprot.writeStructEnd();
16724
    }
16725
 
16726
    @Override
16727
    public String toString() {
483 rajveer 16728
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 16729
      boolean first = true;
16730
 
16731
      sb.append("success:");
483 rajveer 16732
      if (this.success == null) {
16733
        sb.append("null");
16734
      } else {
16735
        sb.append(this.success);
16736
      }
68 ashish 16737
      first = false;
16738
      if (!first) sb.append(", ");
16739
      sb.append("ex:");
16740
      if (this.ex == null) {
16741
        sb.append("null");
16742
      } else {
16743
        sb.append(this.ex);
16744
      }
16745
      first = false;
16746
      sb.append(")");
16747
      return sb.toString();
16748
    }
16749
 
16750
    public void validate() throws TException {
16751
      // check for required fields
16752
    }
16753
 
16754
  }
16755
 
483 rajveer 16756
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
16757
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 16758
 
483 rajveer 16759
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 16760
 
483 rajveer 16761
    private Order order;
68 ashish 16762
 
16763
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16764
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16765
      ORDER((short)1, "order");
68 ashish 16766
 
16767
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16768
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16769
 
16770
      static {
16771
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16772
          byId.put((int)field._thriftId, field);
16773
          byName.put(field.getFieldName(), field);
16774
        }
16775
      }
16776
 
16777
      /**
16778
       * Find the _Fields constant that matches fieldId, or null if its not found.
16779
       */
16780
      public static _Fields findByThriftId(int fieldId) {
16781
        return byId.get(fieldId);
16782
      }
16783
 
16784
      /**
16785
       * Find the _Fields constant that matches fieldId, throwing an exception
16786
       * if it is not found.
16787
       */
16788
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16789
        _Fields fields = findByThriftId(fieldId);
16790
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16791
        return fields;
16792
      }
16793
 
16794
      /**
16795
       * Find the _Fields constant that matches name, or null if its not found.
16796
       */
16797
      public static _Fields findByName(String name) {
16798
        return byName.get(name);
16799
      }
16800
 
16801
      private final short _thriftId;
16802
      private final String _fieldName;
16803
 
16804
      _Fields(short thriftId, String fieldName) {
16805
        _thriftId = thriftId;
16806
        _fieldName = fieldName;
16807
      }
16808
 
16809
      public short getThriftFieldId() {
16810
        return _thriftId;
16811
      }
16812
 
16813
      public String getFieldName() {
16814
        return _fieldName;
16815
      }
16816
    }
16817
 
16818
    // isset id assignments
16819
 
16820
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16821
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
16822
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 16823
    }});
16824
 
16825
    static {
483 rajveer 16826
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 16827
    }
16828
 
483 rajveer 16829
    public createOrder_args() {
68 ashish 16830
    }
16831
 
483 rajveer 16832
    public createOrder_args(
16833
      Order order)
68 ashish 16834
    {
16835
      this();
483 rajveer 16836
      this.order = order;
68 ashish 16837
    }
16838
 
16839
    /**
16840
     * Performs a deep copy on <i>other</i>.
16841
     */
483 rajveer 16842
    public createOrder_args(createOrder_args other) {
16843
      if (other.isSetOrder()) {
16844
        this.order = new Order(other.order);
16845
      }
68 ashish 16846
    }
16847
 
483 rajveer 16848
    public createOrder_args deepCopy() {
16849
      return new createOrder_args(this);
68 ashish 16850
    }
16851
 
16852
    @Deprecated
483 rajveer 16853
    public createOrder_args clone() {
16854
      return new createOrder_args(this);
68 ashish 16855
    }
16856
 
483 rajveer 16857
    public Order getOrder() {
16858
      return this.order;
68 ashish 16859
    }
16860
 
483 rajveer 16861
    public createOrder_args setOrder(Order order) {
16862
      this.order = order;
68 ashish 16863
      return this;
16864
    }
16865
 
483 rajveer 16866
    public void unsetOrder() {
16867
      this.order = null;
68 ashish 16868
    }
16869
 
483 rajveer 16870
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
16871
    public boolean isSetOrder() {
16872
      return this.order != null;
68 ashish 16873
    }
16874
 
483 rajveer 16875
    public void setOrderIsSet(boolean value) {
16876
      if (!value) {
16877
        this.order = null;
16878
      }
68 ashish 16879
    }
16880
 
16881
    public void setFieldValue(_Fields field, Object value) {
16882
      switch (field) {
483 rajveer 16883
      case ORDER:
68 ashish 16884
        if (value == null) {
483 rajveer 16885
          unsetOrder();
68 ashish 16886
        } else {
483 rajveer 16887
          setOrder((Order)value);
68 ashish 16888
        }
16889
        break;
16890
 
16891
      }
16892
    }
16893
 
16894
    public void setFieldValue(int fieldID, Object value) {
16895
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16896
    }
16897
 
16898
    public Object getFieldValue(_Fields field) {
16899
      switch (field) {
483 rajveer 16900
      case ORDER:
16901
        return getOrder();
68 ashish 16902
 
16903
      }
16904
      throw new IllegalStateException();
16905
    }
16906
 
16907
    public Object getFieldValue(int fieldId) {
16908
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16909
    }
16910
 
16911
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16912
    public boolean isSet(_Fields field) {
16913
      switch (field) {
483 rajveer 16914
      case ORDER:
16915
        return isSetOrder();
68 ashish 16916
      }
16917
      throw new IllegalStateException();
16918
    }
16919
 
16920
    public boolean isSet(int fieldID) {
16921
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16922
    }
16923
 
16924
    @Override
16925
    public boolean equals(Object that) {
16926
      if (that == null)
16927
        return false;
483 rajveer 16928
      if (that instanceof createOrder_args)
16929
        return this.equals((createOrder_args)that);
68 ashish 16930
      return false;
16931
    }
16932
 
483 rajveer 16933
    public boolean equals(createOrder_args that) {
68 ashish 16934
      if (that == null)
16935
        return false;
16936
 
483 rajveer 16937
      boolean this_present_order = true && this.isSetOrder();
16938
      boolean that_present_order = true && that.isSetOrder();
16939
      if (this_present_order || that_present_order) {
16940
        if (!(this_present_order && that_present_order))
68 ashish 16941
          return false;
483 rajveer 16942
        if (!this.order.equals(that.order))
68 ashish 16943
          return false;
16944
      }
16945
 
16946
      return true;
16947
    }
16948
 
16949
    @Override
16950
    public int hashCode() {
16951
      return 0;
16952
    }
16953
 
483 rajveer 16954
    public int compareTo(createOrder_args other) {
68 ashish 16955
      if (!getClass().equals(other.getClass())) {
16956
        return getClass().getName().compareTo(other.getClass().getName());
16957
      }
16958
 
16959
      int lastComparison = 0;
483 rajveer 16960
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 16961
 
483 rajveer 16962
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 16963
      if (lastComparison != 0) {
16964
        return lastComparison;
16965
      }
483 rajveer 16966
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 16967
      if (lastComparison != 0) {
16968
        return lastComparison;
16969
      }
16970
      return 0;
16971
    }
16972
 
16973
    public void read(TProtocol iprot) throws TException {
16974
      TField field;
16975
      iprot.readStructBegin();
16976
      while (true)
16977
      {
16978
        field = iprot.readFieldBegin();
16979
        if (field.type == TType.STOP) { 
16980
          break;
16981
        }
16982
        _Fields fieldId = _Fields.findByThriftId(field.id);
16983
        if (fieldId == null) {
16984
          TProtocolUtil.skip(iprot, field.type);
16985
        } else {
16986
          switch (fieldId) {
483 rajveer 16987
            case ORDER:
16988
              if (field.type == TType.STRUCT) {
16989
                this.order = new Order();
16990
                this.order.read(iprot);
68 ashish 16991
              } else { 
16992
                TProtocolUtil.skip(iprot, field.type);
16993
              }
16994
              break;
16995
          }
16996
          iprot.readFieldEnd();
16997
        }
16998
      }
16999
      iprot.readStructEnd();
17000
      validate();
17001
    }
17002
 
17003
    public void write(TProtocol oprot) throws TException {
17004
      validate();
17005
 
17006
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17007
      if (this.order != null) {
17008
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
17009
        this.order.write(oprot);
17010
        oprot.writeFieldEnd();
17011
      }
68 ashish 17012
      oprot.writeFieldStop();
17013
      oprot.writeStructEnd();
17014
    }
17015
 
17016
    @Override
17017
    public String toString() {
483 rajveer 17018
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 17019
      boolean first = true;
17020
 
483 rajveer 17021
      sb.append("order:");
17022
      if (this.order == null) {
17023
        sb.append("null");
17024
      } else {
17025
        sb.append(this.order);
17026
      }
68 ashish 17027
      first = false;
17028
      sb.append(")");
17029
      return sb.toString();
17030
    }
17031
 
17032
    public void validate() throws TException {
17033
      // check for required fields
17034
    }
17035
 
17036
  }
17037
 
483 rajveer 17038
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
17039
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 17040
 
483 rajveer 17041
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 17042
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17043
 
483 rajveer 17044
    private long success;
68 ashish 17045
    private TransactionServiceException ex;
17046
 
17047
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17048
    public enum _Fields implements TFieldIdEnum {
17049
      SUCCESS((short)0, "success"),
17050
      EX((short)1, "ex");
17051
 
17052
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17053
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17054
 
17055
      static {
17056
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17057
          byId.put((int)field._thriftId, field);
17058
          byName.put(field.getFieldName(), field);
17059
        }
17060
      }
17061
 
17062
      /**
17063
       * Find the _Fields constant that matches fieldId, or null if its not found.
17064
       */
17065
      public static _Fields findByThriftId(int fieldId) {
17066
        return byId.get(fieldId);
17067
      }
17068
 
17069
      /**
17070
       * Find the _Fields constant that matches fieldId, throwing an exception
17071
       * if it is not found.
17072
       */
17073
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17074
        _Fields fields = findByThriftId(fieldId);
17075
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17076
        return fields;
17077
      }
17078
 
17079
      /**
17080
       * Find the _Fields constant that matches name, or null if its not found.
17081
       */
17082
      public static _Fields findByName(String name) {
17083
        return byName.get(name);
17084
      }
17085
 
17086
      private final short _thriftId;
17087
      private final String _fieldName;
17088
 
17089
      _Fields(short thriftId, String fieldName) {
17090
        _thriftId = thriftId;
17091
        _fieldName = fieldName;
17092
      }
17093
 
17094
      public short getThriftFieldId() {
17095
        return _thriftId;
17096
      }
17097
 
17098
      public String getFieldName() {
17099
        return _fieldName;
17100
      }
17101
    }
17102
 
17103
    // isset id assignments
17104
    private static final int __SUCCESS_ISSET_ID = 0;
17105
    private BitSet __isset_bit_vector = new BitSet(1);
17106
 
17107
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17108
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17109
          new FieldValueMetaData(TType.I64)));
68 ashish 17110
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17111
          new FieldValueMetaData(TType.STRUCT)));
17112
    }});
17113
 
17114
    static {
483 rajveer 17115
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 17116
    }
17117
 
483 rajveer 17118
    public createOrder_result() {
68 ashish 17119
    }
17120
 
483 rajveer 17121
    public createOrder_result(
17122
      long success,
68 ashish 17123
      TransactionServiceException ex)
17124
    {
17125
      this();
17126
      this.success = success;
17127
      setSuccessIsSet(true);
17128
      this.ex = ex;
17129
    }
17130
 
17131
    /**
17132
     * Performs a deep copy on <i>other</i>.
17133
     */
483 rajveer 17134
    public createOrder_result(createOrder_result other) {
68 ashish 17135
      __isset_bit_vector.clear();
17136
      __isset_bit_vector.or(other.__isset_bit_vector);
17137
      this.success = other.success;
17138
      if (other.isSetEx()) {
17139
        this.ex = new TransactionServiceException(other.ex);
17140
      }
17141
    }
17142
 
483 rajveer 17143
    public createOrder_result deepCopy() {
17144
      return new createOrder_result(this);
68 ashish 17145
    }
17146
 
17147
    @Deprecated
483 rajveer 17148
    public createOrder_result clone() {
17149
      return new createOrder_result(this);
68 ashish 17150
    }
17151
 
483 rajveer 17152
    public long getSuccess() {
68 ashish 17153
      return this.success;
17154
    }
17155
 
483 rajveer 17156
    public createOrder_result setSuccess(long success) {
68 ashish 17157
      this.success = success;
17158
      setSuccessIsSet(true);
17159
      return this;
17160
    }
17161
 
17162
    public void unsetSuccess() {
17163
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17164
    }
17165
 
17166
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17167
    public boolean isSetSuccess() {
17168
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17169
    }
17170
 
17171
    public void setSuccessIsSet(boolean value) {
17172
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17173
    }
17174
 
17175
    public TransactionServiceException getEx() {
17176
      return this.ex;
17177
    }
17178
 
483 rajveer 17179
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 17180
      this.ex = ex;
17181
      return this;
17182
    }
17183
 
17184
    public void unsetEx() {
17185
      this.ex = null;
17186
    }
17187
 
17188
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17189
    public boolean isSetEx() {
17190
      return this.ex != null;
17191
    }
17192
 
17193
    public void setExIsSet(boolean value) {
17194
      if (!value) {
17195
        this.ex = null;
17196
      }
17197
    }
17198
 
17199
    public void setFieldValue(_Fields field, Object value) {
17200
      switch (field) {
17201
      case SUCCESS:
17202
        if (value == null) {
17203
          unsetSuccess();
17204
        } else {
483 rajveer 17205
          setSuccess((Long)value);
68 ashish 17206
        }
17207
        break;
17208
 
17209
      case EX:
17210
        if (value == null) {
17211
          unsetEx();
17212
        } else {
17213
          setEx((TransactionServiceException)value);
17214
        }
17215
        break;
17216
 
17217
      }
17218
    }
17219
 
17220
    public void setFieldValue(int fieldID, Object value) {
17221
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17222
    }
17223
 
17224
    public Object getFieldValue(_Fields field) {
17225
      switch (field) {
17226
      case SUCCESS:
483 rajveer 17227
        return new Long(getSuccess());
68 ashish 17228
 
17229
      case EX:
17230
        return getEx();
17231
 
17232
      }
17233
      throw new IllegalStateException();
17234
    }
17235
 
17236
    public Object getFieldValue(int fieldId) {
17237
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17238
    }
17239
 
17240
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17241
    public boolean isSet(_Fields field) {
17242
      switch (field) {
17243
      case SUCCESS:
17244
        return isSetSuccess();
17245
      case EX:
17246
        return isSetEx();
17247
      }
17248
      throw new IllegalStateException();
17249
    }
17250
 
17251
    public boolean isSet(int fieldID) {
17252
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17253
    }
17254
 
17255
    @Override
17256
    public boolean equals(Object that) {
17257
      if (that == null)
17258
        return false;
483 rajveer 17259
      if (that instanceof createOrder_result)
17260
        return this.equals((createOrder_result)that);
68 ashish 17261
      return false;
17262
    }
17263
 
483 rajveer 17264
    public boolean equals(createOrder_result that) {
68 ashish 17265
      if (that == null)
17266
        return false;
17267
 
17268
      boolean this_present_success = true;
17269
      boolean that_present_success = true;
17270
      if (this_present_success || that_present_success) {
17271
        if (!(this_present_success && that_present_success))
17272
          return false;
17273
        if (this.success != that.success)
17274
          return false;
17275
      }
17276
 
17277
      boolean this_present_ex = true && this.isSetEx();
17278
      boolean that_present_ex = true && that.isSetEx();
17279
      if (this_present_ex || that_present_ex) {
17280
        if (!(this_present_ex && that_present_ex))
17281
          return false;
17282
        if (!this.ex.equals(that.ex))
17283
          return false;
17284
      }
17285
 
17286
      return true;
17287
    }
17288
 
17289
    @Override
17290
    public int hashCode() {
17291
      return 0;
17292
    }
17293
 
483 rajveer 17294
    public int compareTo(createOrder_result other) {
68 ashish 17295
      if (!getClass().equals(other.getClass())) {
17296
        return getClass().getName().compareTo(other.getClass().getName());
17297
      }
17298
 
17299
      int lastComparison = 0;
483 rajveer 17300
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 17301
 
17302
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17303
      if (lastComparison != 0) {
17304
        return lastComparison;
17305
      }
17306
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17307
      if (lastComparison != 0) {
17308
        return lastComparison;
17309
      }
17310
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17311
      if (lastComparison != 0) {
17312
        return lastComparison;
17313
      }
17314
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17315
      if (lastComparison != 0) {
17316
        return lastComparison;
17317
      }
17318
      return 0;
17319
    }
17320
 
17321
    public void read(TProtocol iprot) throws TException {
17322
      TField field;
17323
      iprot.readStructBegin();
17324
      while (true)
17325
      {
17326
        field = iprot.readFieldBegin();
17327
        if (field.type == TType.STOP) { 
17328
          break;
17329
        }
17330
        _Fields fieldId = _Fields.findByThriftId(field.id);
17331
        if (fieldId == null) {
17332
          TProtocolUtil.skip(iprot, field.type);
17333
        } else {
17334
          switch (fieldId) {
17335
            case SUCCESS:
483 rajveer 17336
              if (field.type == TType.I64) {
17337
                this.success = iprot.readI64();
68 ashish 17338
                setSuccessIsSet(true);
17339
              } else { 
17340
                TProtocolUtil.skip(iprot, field.type);
17341
              }
17342
              break;
17343
            case EX:
17344
              if (field.type == TType.STRUCT) {
17345
                this.ex = new TransactionServiceException();
17346
                this.ex.read(iprot);
17347
              } else { 
17348
                TProtocolUtil.skip(iprot, field.type);
17349
              }
17350
              break;
17351
          }
17352
          iprot.readFieldEnd();
17353
        }
17354
      }
17355
      iprot.readStructEnd();
17356
      validate();
17357
    }
17358
 
17359
    public void write(TProtocol oprot) throws TException {
17360
      oprot.writeStructBegin(STRUCT_DESC);
17361
 
17362
      if (this.isSetSuccess()) {
17363
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17364
        oprot.writeI64(this.success);
68 ashish 17365
        oprot.writeFieldEnd();
17366
      } else if (this.isSetEx()) {
17367
        oprot.writeFieldBegin(EX_FIELD_DESC);
17368
        this.ex.write(oprot);
17369
        oprot.writeFieldEnd();
17370
      }
17371
      oprot.writeFieldStop();
17372
      oprot.writeStructEnd();
17373
    }
17374
 
17375
    @Override
17376
    public String toString() {
483 rajveer 17377
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 17378
      boolean first = true;
17379
 
17380
      sb.append("success:");
17381
      sb.append(this.success);
17382
      first = false;
17383
      if (!first) sb.append(", ");
17384
      sb.append("ex:");
17385
      if (this.ex == null) {
17386
        sb.append("null");
17387
      } else {
17388
        sb.append(this.ex);
17389
      }
17390
      first = false;
17391
      sb.append(")");
17392
      return sb.toString();
17393
    }
17394
 
17395
    public void validate() throws TException {
17396
      // check for required fields
17397
    }
17398
 
17399
  }
17400
 
483 rajveer 17401
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17402
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17403
 
483 rajveer 17404
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17405
 
483 rajveer 17406
    private long id;
68 ashish 17407
 
17408
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17409
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17410
      ID((short)1, "id");
68 ashish 17411
 
17412
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17413
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17414
 
17415
      static {
17416
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17417
          byId.put((int)field._thriftId, field);
17418
          byName.put(field.getFieldName(), field);
17419
        }
17420
      }
17421
 
17422
      /**
17423
       * Find the _Fields constant that matches fieldId, or null if its not found.
17424
       */
17425
      public static _Fields findByThriftId(int fieldId) {
17426
        return byId.get(fieldId);
17427
      }
17428
 
17429
      /**
17430
       * Find the _Fields constant that matches fieldId, throwing an exception
17431
       * if it is not found.
17432
       */
17433
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17434
        _Fields fields = findByThriftId(fieldId);
17435
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17436
        return fields;
17437
      }
17438
 
17439
      /**
17440
       * Find the _Fields constant that matches name, or null if its not found.
17441
       */
17442
      public static _Fields findByName(String name) {
17443
        return byName.get(name);
17444
      }
17445
 
17446
      private final short _thriftId;
17447
      private final String _fieldName;
17448
 
17449
      _Fields(short thriftId, String fieldName) {
17450
        _thriftId = thriftId;
17451
        _fieldName = fieldName;
17452
      }
17453
 
17454
      public short getThriftFieldId() {
17455
        return _thriftId;
17456
      }
17457
 
17458
      public String getFieldName() {
17459
        return _fieldName;
17460
      }
17461
    }
17462
 
17463
    // isset id assignments
483 rajveer 17464
    private static final int __ID_ISSET_ID = 0;
17465
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17466
 
17467
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17468
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17469
          new FieldValueMetaData(TType.I64)));
17470
    }});
17471
 
17472
    static {
483 rajveer 17473
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17474
    }
17475
 
483 rajveer 17476
    public getOrder_args() {
68 ashish 17477
    }
17478
 
483 rajveer 17479
    public getOrder_args(
17480
      long id)
68 ashish 17481
    {
17482
      this();
483 rajveer 17483
      this.id = id;
17484
      setIdIsSet(true);
68 ashish 17485
    }
17486
 
17487
    /**
17488
     * Performs a deep copy on <i>other</i>.
17489
     */
483 rajveer 17490
    public getOrder_args(getOrder_args other) {
68 ashish 17491
      __isset_bit_vector.clear();
17492
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17493
      this.id = other.id;
68 ashish 17494
    }
17495
 
483 rajveer 17496
    public getOrder_args deepCopy() {
17497
      return new getOrder_args(this);
68 ashish 17498
    }
17499
 
17500
    @Deprecated
483 rajveer 17501
    public getOrder_args clone() {
17502
      return new getOrder_args(this);
68 ashish 17503
    }
17504
 
483 rajveer 17505
    public long getId() {
17506
      return this.id;
68 ashish 17507
    }
17508
 
483 rajveer 17509
    public getOrder_args setId(long id) {
17510
      this.id = id;
17511
      setIdIsSet(true);
68 ashish 17512
      return this;
17513
    }
17514
 
483 rajveer 17515
    public void unsetId() {
17516
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17517
    }
17518
 
483 rajveer 17519
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17520
    public boolean isSetId() {
17521
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17522
    }
17523
 
483 rajveer 17524
    public void setIdIsSet(boolean value) {
17525
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17526
    }
17527
 
17528
    public void setFieldValue(_Fields field, Object value) {
17529
      switch (field) {
483 rajveer 17530
      case ID:
68 ashish 17531
        if (value == null) {
483 rajveer 17532
          unsetId();
68 ashish 17533
        } else {
483 rajveer 17534
          setId((Long)value);
68 ashish 17535
        }
17536
        break;
17537
 
17538
      }
17539
    }
17540
 
17541
    public void setFieldValue(int fieldID, Object value) {
17542
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17543
    }
17544
 
17545
    public Object getFieldValue(_Fields field) {
17546
      switch (field) {
483 rajveer 17547
      case ID:
17548
        return new Long(getId());
68 ashish 17549
 
17550
      }
17551
      throw new IllegalStateException();
17552
    }
17553
 
17554
    public Object getFieldValue(int fieldId) {
17555
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17556
    }
17557
 
17558
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17559
    public boolean isSet(_Fields field) {
17560
      switch (field) {
483 rajveer 17561
      case ID:
17562
        return isSetId();
68 ashish 17563
      }
17564
      throw new IllegalStateException();
17565
    }
17566
 
17567
    public boolean isSet(int fieldID) {
17568
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17569
    }
17570
 
17571
    @Override
17572
    public boolean equals(Object that) {
17573
      if (that == null)
17574
        return false;
483 rajveer 17575
      if (that instanceof getOrder_args)
17576
        return this.equals((getOrder_args)that);
68 ashish 17577
      return false;
17578
    }
17579
 
483 rajveer 17580
    public boolean equals(getOrder_args that) {
68 ashish 17581
      if (that == null)
17582
        return false;
17583
 
483 rajveer 17584
      boolean this_present_id = true;
17585
      boolean that_present_id = true;
17586
      if (this_present_id || that_present_id) {
17587
        if (!(this_present_id && that_present_id))
68 ashish 17588
          return false;
483 rajveer 17589
        if (this.id != that.id)
68 ashish 17590
          return false;
17591
      }
17592
 
17593
      return true;
17594
    }
17595
 
17596
    @Override
17597
    public int hashCode() {
17598
      return 0;
17599
    }
17600
 
483 rajveer 17601
    public int compareTo(getOrder_args other) {
68 ashish 17602
      if (!getClass().equals(other.getClass())) {
17603
        return getClass().getName().compareTo(other.getClass().getName());
17604
      }
17605
 
17606
      int lastComparison = 0;
483 rajveer 17607
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17608
 
483 rajveer 17609
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17610
      if (lastComparison != 0) {
17611
        return lastComparison;
17612
      }
483 rajveer 17613
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 17614
      if (lastComparison != 0) {
17615
        return lastComparison;
17616
      }
17617
      return 0;
17618
    }
17619
 
17620
    public void read(TProtocol iprot) throws TException {
17621
      TField field;
17622
      iprot.readStructBegin();
17623
      while (true)
17624
      {
17625
        field = iprot.readFieldBegin();
17626
        if (field.type == TType.STOP) { 
17627
          break;
17628
        }
17629
        _Fields fieldId = _Fields.findByThriftId(field.id);
17630
        if (fieldId == null) {
17631
          TProtocolUtil.skip(iprot, field.type);
17632
        } else {
17633
          switch (fieldId) {
483 rajveer 17634
            case ID:
68 ashish 17635
              if (field.type == TType.I64) {
483 rajveer 17636
                this.id = iprot.readI64();
17637
                setIdIsSet(true);
68 ashish 17638
              } else { 
17639
                TProtocolUtil.skip(iprot, field.type);
17640
              }
17641
              break;
17642
          }
17643
          iprot.readFieldEnd();
17644
        }
17645
      }
17646
      iprot.readStructEnd();
17647
      validate();
17648
    }
17649
 
17650
    public void write(TProtocol oprot) throws TException {
17651
      validate();
17652
 
17653
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17654
      oprot.writeFieldBegin(ID_FIELD_DESC);
17655
      oprot.writeI64(this.id);
68 ashish 17656
      oprot.writeFieldEnd();
17657
      oprot.writeFieldStop();
17658
      oprot.writeStructEnd();
17659
    }
17660
 
17661
    @Override
17662
    public String toString() {
483 rajveer 17663
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 17664
      boolean first = true;
17665
 
483 rajveer 17666
      sb.append("id:");
17667
      sb.append(this.id);
68 ashish 17668
      first = false;
17669
      sb.append(")");
17670
      return sb.toString();
17671
    }
17672
 
17673
    public void validate() throws TException {
17674
      // check for required fields
17675
    }
17676
 
17677
  }
17678
 
483 rajveer 17679
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
17680
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 17681
 
483 rajveer 17682
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 17683
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17684
 
483 rajveer 17685
    private Order success;
68 ashish 17686
    private TransactionServiceException ex;
17687
 
17688
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17689
    public enum _Fields implements TFieldIdEnum {
17690
      SUCCESS((short)0, "success"),
17691
      EX((short)1, "ex");
17692
 
17693
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17694
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17695
 
17696
      static {
17697
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17698
          byId.put((int)field._thriftId, field);
17699
          byName.put(field.getFieldName(), field);
17700
        }
17701
      }
17702
 
17703
      /**
17704
       * Find the _Fields constant that matches fieldId, or null if its not found.
17705
       */
17706
      public static _Fields findByThriftId(int fieldId) {
17707
        return byId.get(fieldId);
17708
      }
17709
 
17710
      /**
17711
       * Find the _Fields constant that matches fieldId, throwing an exception
17712
       * if it is not found.
17713
       */
17714
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17715
        _Fields fields = findByThriftId(fieldId);
17716
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17717
        return fields;
17718
      }
17719
 
17720
      /**
17721
       * Find the _Fields constant that matches name, or null if its not found.
17722
       */
17723
      public static _Fields findByName(String name) {
17724
        return byName.get(name);
17725
      }
17726
 
17727
      private final short _thriftId;
17728
      private final String _fieldName;
17729
 
17730
      _Fields(short thriftId, String fieldName) {
17731
        _thriftId = thriftId;
17732
        _fieldName = fieldName;
17733
      }
17734
 
17735
      public short getThriftFieldId() {
17736
        return _thriftId;
17737
      }
17738
 
17739
      public String getFieldName() {
17740
        return _fieldName;
17741
      }
17742
    }
17743
 
17744
    // isset id assignments
17745
 
17746
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17747
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17748
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17749
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17750
          new FieldValueMetaData(TType.STRUCT)));
17751
    }});
17752
 
17753
    static {
483 rajveer 17754
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 17755
    }
17756
 
483 rajveer 17757
    public getOrder_result() {
68 ashish 17758
    }
17759
 
483 rajveer 17760
    public getOrder_result(
17761
      Order success,
68 ashish 17762
      TransactionServiceException ex)
17763
    {
17764
      this();
17765
      this.success = success;
17766
      this.ex = ex;
17767
    }
17768
 
17769
    /**
17770
     * Performs a deep copy on <i>other</i>.
17771
     */
483 rajveer 17772
    public getOrder_result(getOrder_result other) {
17773
      if (other.isSetSuccess()) {
17774
        this.success = new Order(other.success);
17775
      }
68 ashish 17776
      if (other.isSetEx()) {
17777
        this.ex = new TransactionServiceException(other.ex);
17778
      }
17779
    }
17780
 
483 rajveer 17781
    public getOrder_result deepCopy() {
17782
      return new getOrder_result(this);
68 ashish 17783
    }
17784
 
17785
    @Deprecated
483 rajveer 17786
    public getOrder_result clone() {
17787
      return new getOrder_result(this);
68 ashish 17788
    }
17789
 
483 rajveer 17790
    public Order getSuccess() {
68 ashish 17791
      return this.success;
17792
    }
17793
 
483 rajveer 17794
    public getOrder_result setSuccess(Order success) {
68 ashish 17795
      this.success = success;
17796
      return this;
17797
    }
17798
 
17799
    public void unsetSuccess() {
483 rajveer 17800
      this.success = null;
68 ashish 17801
    }
17802
 
17803
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17804
    public boolean isSetSuccess() {
483 rajveer 17805
      return this.success != null;
68 ashish 17806
    }
17807
 
17808
    public void setSuccessIsSet(boolean value) {
483 rajveer 17809
      if (!value) {
17810
        this.success = null;
17811
      }
68 ashish 17812
    }
17813
 
17814
    public TransactionServiceException getEx() {
17815
      return this.ex;
17816
    }
17817
 
483 rajveer 17818
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 17819
      this.ex = ex;
17820
      return this;
17821
    }
17822
 
17823
    public void unsetEx() {
17824
      this.ex = null;
17825
    }
17826
 
17827
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17828
    public boolean isSetEx() {
17829
      return this.ex != null;
17830
    }
17831
 
17832
    public void setExIsSet(boolean value) {
17833
      if (!value) {
17834
        this.ex = null;
17835
      }
17836
    }
17837
 
17838
    public void setFieldValue(_Fields field, Object value) {
17839
      switch (field) {
17840
      case SUCCESS:
17841
        if (value == null) {
17842
          unsetSuccess();
17843
        } else {
483 rajveer 17844
          setSuccess((Order)value);
68 ashish 17845
        }
17846
        break;
17847
 
17848
      case EX:
17849
        if (value == null) {
17850
          unsetEx();
17851
        } else {
17852
          setEx((TransactionServiceException)value);
17853
        }
17854
        break;
17855
 
17856
      }
17857
    }
17858
 
17859
    public void setFieldValue(int fieldID, Object value) {
17860
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17861
    }
17862
 
17863
    public Object getFieldValue(_Fields field) {
17864
      switch (field) {
17865
      case SUCCESS:
483 rajveer 17866
        return getSuccess();
68 ashish 17867
 
17868
      case EX:
17869
        return getEx();
17870
 
17871
      }
17872
      throw new IllegalStateException();
17873
    }
17874
 
17875
    public Object getFieldValue(int fieldId) {
17876
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17877
    }
17878
 
17879
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17880
    public boolean isSet(_Fields field) {
17881
      switch (field) {
17882
      case SUCCESS:
17883
        return isSetSuccess();
17884
      case EX:
17885
        return isSetEx();
17886
      }
17887
      throw new IllegalStateException();
17888
    }
17889
 
17890
    public boolean isSet(int fieldID) {
17891
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17892
    }
17893
 
17894
    @Override
17895
    public boolean equals(Object that) {
17896
      if (that == null)
17897
        return false;
483 rajveer 17898
      if (that instanceof getOrder_result)
17899
        return this.equals((getOrder_result)that);
68 ashish 17900
      return false;
17901
    }
17902
 
483 rajveer 17903
    public boolean equals(getOrder_result that) {
68 ashish 17904
      if (that == null)
17905
        return false;
17906
 
483 rajveer 17907
      boolean this_present_success = true && this.isSetSuccess();
17908
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17909
      if (this_present_success || that_present_success) {
17910
        if (!(this_present_success && that_present_success))
17911
          return false;
483 rajveer 17912
        if (!this.success.equals(that.success))
68 ashish 17913
          return false;
17914
      }
17915
 
17916
      boolean this_present_ex = true && this.isSetEx();
17917
      boolean that_present_ex = true && that.isSetEx();
17918
      if (this_present_ex || that_present_ex) {
17919
        if (!(this_present_ex && that_present_ex))
17920
          return false;
17921
        if (!this.ex.equals(that.ex))
17922
          return false;
17923
      }
17924
 
17925
      return true;
17926
    }
17927
 
17928
    @Override
17929
    public int hashCode() {
17930
      return 0;
17931
    }
17932
 
483 rajveer 17933
    public int compareTo(getOrder_result other) {
68 ashish 17934
      if (!getClass().equals(other.getClass())) {
17935
        return getClass().getName().compareTo(other.getClass().getName());
17936
      }
17937
 
17938
      int lastComparison = 0;
483 rajveer 17939
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 17940
 
17941
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17942
      if (lastComparison != 0) {
17943
        return lastComparison;
17944
      }
17945
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17946
      if (lastComparison != 0) {
17947
        return lastComparison;
17948
      }
17949
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17950
      if (lastComparison != 0) {
17951
        return lastComparison;
17952
      }
17953
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17954
      if (lastComparison != 0) {
17955
        return lastComparison;
17956
      }
17957
      return 0;
17958
    }
17959
 
17960
    public void read(TProtocol iprot) throws TException {
17961
      TField field;
17962
      iprot.readStructBegin();
17963
      while (true)
17964
      {
17965
        field = iprot.readFieldBegin();
17966
        if (field.type == TType.STOP) { 
17967
          break;
17968
        }
17969
        _Fields fieldId = _Fields.findByThriftId(field.id);
17970
        if (fieldId == null) {
17971
          TProtocolUtil.skip(iprot, field.type);
17972
        } else {
17973
          switch (fieldId) {
17974
            case SUCCESS:
483 rajveer 17975
              if (field.type == TType.STRUCT) {
17976
                this.success = new Order();
17977
                this.success.read(iprot);
68 ashish 17978
              } else { 
17979
                TProtocolUtil.skip(iprot, field.type);
17980
              }
17981
              break;
17982
            case EX:
17983
              if (field.type == TType.STRUCT) {
17984
                this.ex = new TransactionServiceException();
17985
                this.ex.read(iprot);
17986
              } else { 
17987
                TProtocolUtil.skip(iprot, field.type);
17988
              }
17989
              break;
17990
          }
17991
          iprot.readFieldEnd();
17992
        }
17993
      }
17994
      iprot.readStructEnd();
17995
      validate();
17996
    }
17997
 
17998
    public void write(TProtocol oprot) throws TException {
17999
      oprot.writeStructBegin(STRUCT_DESC);
18000
 
18001
      if (this.isSetSuccess()) {
18002
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18003
        this.success.write(oprot);
68 ashish 18004
        oprot.writeFieldEnd();
18005
      } else if (this.isSetEx()) {
18006
        oprot.writeFieldBegin(EX_FIELD_DESC);
18007
        this.ex.write(oprot);
18008
        oprot.writeFieldEnd();
18009
      }
18010
      oprot.writeFieldStop();
18011
      oprot.writeStructEnd();
18012
    }
18013
 
18014
    @Override
18015
    public String toString() {
483 rajveer 18016
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 18017
      boolean first = true;
18018
 
18019
      sb.append("success:");
483 rajveer 18020
      if (this.success == null) {
18021
        sb.append("null");
18022
      } else {
18023
        sb.append(this.success);
18024
      }
68 ashish 18025
      first = false;
18026
      if (!first) sb.append(", ");
18027
      sb.append("ex:");
18028
      if (this.ex == null) {
18029
        sb.append("null");
18030
      } else {
18031
        sb.append(this.ex);
18032
      }
18033
      first = false;
18034
      sb.append(")");
18035
      return sb.toString();
18036
    }
18037
 
18038
    public void validate() throws TException {
18039
      // check for required fields
18040
    }
18041
 
18042
  }
18043
 
483 rajveer 18044
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
18045
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 18046
 
483 rajveer 18047
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 18048
 
483 rajveer 18049
    private long orderId;
68 ashish 18050
 
18051
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18052
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18053
      ORDER_ID((short)1, "orderId");
68 ashish 18054
 
18055
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18056
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18057
 
18058
      static {
18059
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18060
          byId.put((int)field._thriftId, field);
18061
          byName.put(field.getFieldName(), field);
18062
        }
18063
      }
18064
 
18065
      /**
18066
       * Find the _Fields constant that matches fieldId, or null if its not found.
18067
       */
18068
      public static _Fields findByThriftId(int fieldId) {
18069
        return byId.get(fieldId);
18070
      }
18071
 
18072
      /**
18073
       * Find the _Fields constant that matches fieldId, throwing an exception
18074
       * if it is not found.
18075
       */
18076
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18077
        _Fields fields = findByThriftId(fieldId);
18078
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18079
        return fields;
18080
      }
18081
 
18082
      /**
18083
       * Find the _Fields constant that matches name, or null if its not found.
18084
       */
18085
      public static _Fields findByName(String name) {
18086
        return byName.get(name);
18087
      }
18088
 
18089
      private final short _thriftId;
18090
      private final String _fieldName;
18091
 
18092
      _Fields(short thriftId, String fieldName) {
18093
        _thriftId = thriftId;
18094
        _fieldName = fieldName;
18095
      }
18096
 
18097
      public short getThriftFieldId() {
18098
        return _thriftId;
18099
      }
18100
 
18101
      public String getFieldName() {
18102
        return _fieldName;
18103
      }
18104
    }
18105
 
18106
    // isset id assignments
483 rajveer 18107
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 18108
    private BitSet __isset_bit_vector = new BitSet(1);
18109
 
18110
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18111
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 18112
          new FieldValueMetaData(TType.I64)));
18113
    }});
18114
 
18115
    static {
483 rajveer 18116
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 18117
    }
18118
 
483 rajveer 18119
    public getLineItemsForOrder_args() {
68 ashish 18120
    }
18121
 
483 rajveer 18122
    public getLineItemsForOrder_args(
18123
      long orderId)
68 ashish 18124
    {
18125
      this();
483 rajveer 18126
      this.orderId = orderId;
18127
      setOrderIdIsSet(true);
68 ashish 18128
    }
18129
 
18130
    /**
18131
     * Performs a deep copy on <i>other</i>.
18132
     */
483 rajveer 18133
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 18134
      __isset_bit_vector.clear();
18135
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18136
      this.orderId = other.orderId;
68 ashish 18137
    }
18138
 
483 rajveer 18139
    public getLineItemsForOrder_args deepCopy() {
18140
      return new getLineItemsForOrder_args(this);
68 ashish 18141
    }
18142
 
18143
    @Deprecated
483 rajveer 18144
    public getLineItemsForOrder_args clone() {
18145
      return new getLineItemsForOrder_args(this);
68 ashish 18146
    }
18147
 
483 rajveer 18148
    public long getOrderId() {
18149
      return this.orderId;
68 ashish 18150
    }
18151
 
483 rajveer 18152
    public getLineItemsForOrder_args setOrderId(long orderId) {
18153
      this.orderId = orderId;
18154
      setOrderIdIsSet(true);
68 ashish 18155
      return this;
18156
    }
18157
 
483 rajveer 18158
    public void unsetOrderId() {
18159
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 18160
    }
18161
 
483 rajveer 18162
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18163
    public boolean isSetOrderId() {
18164
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 18165
    }
18166
 
483 rajveer 18167
    public void setOrderIdIsSet(boolean value) {
18168
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 18169
    }
18170
 
18171
    public void setFieldValue(_Fields field, Object value) {
18172
      switch (field) {
483 rajveer 18173
      case ORDER_ID:
68 ashish 18174
        if (value == null) {
483 rajveer 18175
          unsetOrderId();
68 ashish 18176
        } else {
483 rajveer 18177
          setOrderId((Long)value);
68 ashish 18178
        }
18179
        break;
18180
 
18181
      }
18182
    }
18183
 
18184
    public void setFieldValue(int fieldID, Object value) {
18185
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18186
    }
18187
 
18188
    public Object getFieldValue(_Fields field) {
18189
      switch (field) {
483 rajveer 18190
      case ORDER_ID:
18191
        return new Long(getOrderId());
68 ashish 18192
 
18193
      }
18194
      throw new IllegalStateException();
18195
    }
18196
 
18197
    public Object getFieldValue(int fieldId) {
18198
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18199
    }
18200
 
18201
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18202
    public boolean isSet(_Fields field) {
18203
      switch (field) {
483 rajveer 18204
      case ORDER_ID:
18205
        return isSetOrderId();
68 ashish 18206
      }
18207
      throw new IllegalStateException();
18208
    }
18209
 
18210
    public boolean isSet(int fieldID) {
18211
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18212
    }
18213
 
18214
    @Override
18215
    public boolean equals(Object that) {
18216
      if (that == null)
18217
        return false;
483 rajveer 18218
      if (that instanceof getLineItemsForOrder_args)
18219
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 18220
      return false;
18221
    }
18222
 
483 rajveer 18223
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 18224
      if (that == null)
18225
        return false;
18226
 
483 rajveer 18227
      boolean this_present_orderId = true;
18228
      boolean that_present_orderId = true;
18229
      if (this_present_orderId || that_present_orderId) {
18230
        if (!(this_present_orderId && that_present_orderId))
68 ashish 18231
          return false;
483 rajveer 18232
        if (this.orderId != that.orderId)
68 ashish 18233
          return false;
18234
      }
18235
 
18236
      return true;
18237
    }
18238
 
18239
    @Override
18240
    public int hashCode() {
18241
      return 0;
18242
    }
18243
 
483 rajveer 18244
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 18245
      if (!getClass().equals(other.getClass())) {
18246
        return getClass().getName().compareTo(other.getClass().getName());
18247
      }
18248
 
18249
      int lastComparison = 0;
483 rajveer 18250
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 18251
 
483 rajveer 18252
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 18253
      if (lastComparison != 0) {
18254
        return lastComparison;
18255
      }
483 rajveer 18256
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 18257
      if (lastComparison != 0) {
18258
        return lastComparison;
18259
      }
18260
      return 0;
18261
    }
18262
 
18263
    public void read(TProtocol iprot) throws TException {
18264
      TField field;
18265
      iprot.readStructBegin();
18266
      while (true)
18267
      {
18268
        field = iprot.readFieldBegin();
18269
        if (field.type == TType.STOP) { 
18270
          break;
18271
        }
18272
        _Fields fieldId = _Fields.findByThriftId(field.id);
18273
        if (fieldId == null) {
18274
          TProtocolUtil.skip(iprot, field.type);
18275
        } else {
18276
          switch (fieldId) {
483 rajveer 18277
            case ORDER_ID:
68 ashish 18278
              if (field.type == TType.I64) {
483 rajveer 18279
                this.orderId = iprot.readI64();
18280
                setOrderIdIsSet(true);
68 ashish 18281
              } else { 
18282
                TProtocolUtil.skip(iprot, field.type);
18283
              }
18284
              break;
18285
          }
18286
          iprot.readFieldEnd();
18287
        }
18288
      }
18289
      iprot.readStructEnd();
18290
      validate();
18291
    }
18292
 
18293
    public void write(TProtocol oprot) throws TException {
18294
      validate();
18295
 
18296
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18297
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18298
      oprot.writeI64(this.orderId);
68 ashish 18299
      oprot.writeFieldEnd();
18300
      oprot.writeFieldStop();
18301
      oprot.writeStructEnd();
18302
    }
18303
 
18304
    @Override
18305
    public String toString() {
483 rajveer 18306
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 18307
      boolean first = true;
18308
 
483 rajveer 18309
      sb.append("orderId:");
18310
      sb.append(this.orderId);
68 ashish 18311
      first = false;
18312
      sb.append(")");
18313
      return sb.toString();
18314
    }
18315
 
18316
    public void validate() throws TException {
18317
      // check for required fields
18318
    }
18319
 
18320
  }
18321
 
483 rajveer 18322
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
18323
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 18324
 
483 rajveer 18325
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 18326
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18327
 
483 rajveer 18328
    private List<LineItem> success;
68 ashish 18329
    private TransactionServiceException ex;
18330
 
18331
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18332
    public enum _Fields implements TFieldIdEnum {
18333
      SUCCESS((short)0, "success"),
18334
      EX((short)1, "ex");
18335
 
18336
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18337
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18338
 
18339
      static {
18340
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18341
          byId.put((int)field._thriftId, field);
18342
          byName.put(field.getFieldName(), field);
18343
        }
18344
      }
18345
 
18346
      /**
18347
       * Find the _Fields constant that matches fieldId, or null if its not found.
18348
       */
18349
      public static _Fields findByThriftId(int fieldId) {
18350
        return byId.get(fieldId);
18351
      }
18352
 
18353
      /**
18354
       * Find the _Fields constant that matches fieldId, throwing an exception
18355
       * if it is not found.
18356
       */
18357
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18358
        _Fields fields = findByThriftId(fieldId);
18359
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18360
        return fields;
18361
      }
18362
 
18363
      /**
18364
       * Find the _Fields constant that matches name, or null if its not found.
18365
       */
18366
      public static _Fields findByName(String name) {
18367
        return byName.get(name);
18368
      }
18369
 
18370
      private final short _thriftId;
18371
      private final String _fieldName;
18372
 
18373
      _Fields(short thriftId, String fieldName) {
18374
        _thriftId = thriftId;
18375
        _fieldName = fieldName;
18376
      }
18377
 
18378
      public short getThriftFieldId() {
18379
        return _thriftId;
18380
      }
18381
 
18382
      public String getFieldName() {
18383
        return _fieldName;
18384
      }
18385
    }
18386
 
18387
    // isset id assignments
18388
 
18389
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18390
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18391
          new ListMetaData(TType.LIST, 
18392
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18393
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18394
          new FieldValueMetaData(TType.STRUCT)));
18395
    }});
18396
 
18397
    static {
483 rajveer 18398
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18399
    }
18400
 
483 rajveer 18401
    public getLineItemsForOrder_result() {
68 ashish 18402
    }
18403
 
483 rajveer 18404
    public getLineItemsForOrder_result(
18405
      List<LineItem> success,
68 ashish 18406
      TransactionServiceException ex)
18407
    {
18408
      this();
18409
      this.success = success;
18410
      this.ex = ex;
18411
    }
18412
 
18413
    /**
18414
     * Performs a deep copy on <i>other</i>.
18415
     */
483 rajveer 18416
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18417
      if (other.isSetSuccess()) {
18418
        List<LineItem> __this__success = new ArrayList<LineItem>();
18419
        for (LineItem other_element : other.success) {
18420
          __this__success.add(new LineItem(other_element));
18421
        }
18422
        this.success = __this__success;
18423
      }
68 ashish 18424
      if (other.isSetEx()) {
18425
        this.ex = new TransactionServiceException(other.ex);
18426
      }
18427
    }
18428
 
483 rajveer 18429
    public getLineItemsForOrder_result deepCopy() {
18430
      return new getLineItemsForOrder_result(this);
68 ashish 18431
    }
18432
 
18433
    @Deprecated
483 rajveer 18434
    public getLineItemsForOrder_result clone() {
18435
      return new getLineItemsForOrder_result(this);
68 ashish 18436
    }
18437
 
483 rajveer 18438
    public int getSuccessSize() {
18439
      return (this.success == null) ? 0 : this.success.size();
18440
    }
18441
 
18442
    public java.util.Iterator<LineItem> getSuccessIterator() {
18443
      return (this.success == null) ? null : this.success.iterator();
18444
    }
18445
 
18446
    public void addToSuccess(LineItem elem) {
18447
      if (this.success == null) {
18448
        this.success = new ArrayList<LineItem>();
18449
      }
18450
      this.success.add(elem);
18451
    }
18452
 
18453
    public List<LineItem> getSuccess() {
68 ashish 18454
      return this.success;
18455
    }
18456
 
483 rajveer 18457
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18458
      this.success = success;
18459
      return this;
18460
    }
18461
 
18462
    public void unsetSuccess() {
483 rajveer 18463
      this.success = null;
68 ashish 18464
    }
18465
 
18466
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18467
    public boolean isSetSuccess() {
483 rajveer 18468
      return this.success != null;
68 ashish 18469
    }
18470
 
18471
    public void setSuccessIsSet(boolean value) {
483 rajveer 18472
      if (!value) {
18473
        this.success = null;
18474
      }
68 ashish 18475
    }
18476
 
18477
    public TransactionServiceException getEx() {
18478
      return this.ex;
18479
    }
18480
 
483 rajveer 18481
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18482
      this.ex = ex;
18483
      return this;
18484
    }
18485
 
18486
    public void unsetEx() {
18487
      this.ex = null;
18488
    }
18489
 
18490
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18491
    public boolean isSetEx() {
18492
      return this.ex != null;
18493
    }
18494
 
18495
    public void setExIsSet(boolean value) {
18496
      if (!value) {
18497
        this.ex = null;
18498
      }
18499
    }
18500
 
18501
    public void setFieldValue(_Fields field, Object value) {
18502
      switch (field) {
18503
      case SUCCESS:
18504
        if (value == null) {
18505
          unsetSuccess();
18506
        } else {
483 rajveer 18507
          setSuccess((List<LineItem>)value);
68 ashish 18508
        }
18509
        break;
18510
 
18511
      case EX:
18512
        if (value == null) {
18513
          unsetEx();
18514
        } else {
18515
          setEx((TransactionServiceException)value);
18516
        }
18517
        break;
18518
 
18519
      }
18520
    }
18521
 
18522
    public void setFieldValue(int fieldID, Object value) {
18523
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18524
    }
18525
 
18526
    public Object getFieldValue(_Fields field) {
18527
      switch (field) {
18528
      case SUCCESS:
483 rajveer 18529
        return getSuccess();
68 ashish 18530
 
18531
      case EX:
18532
        return getEx();
18533
 
18534
      }
18535
      throw new IllegalStateException();
18536
    }
18537
 
18538
    public Object getFieldValue(int fieldId) {
18539
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18540
    }
18541
 
18542
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18543
    public boolean isSet(_Fields field) {
18544
      switch (field) {
18545
      case SUCCESS:
18546
        return isSetSuccess();
18547
      case EX:
18548
        return isSetEx();
18549
      }
18550
      throw new IllegalStateException();
18551
    }
18552
 
18553
    public boolean isSet(int fieldID) {
18554
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18555
    }
18556
 
18557
    @Override
18558
    public boolean equals(Object that) {
18559
      if (that == null)
18560
        return false;
483 rajveer 18561
      if (that instanceof getLineItemsForOrder_result)
18562
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18563
      return false;
18564
    }
18565
 
483 rajveer 18566
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18567
      if (that == null)
18568
        return false;
18569
 
483 rajveer 18570
      boolean this_present_success = true && this.isSetSuccess();
18571
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18572
      if (this_present_success || that_present_success) {
18573
        if (!(this_present_success && that_present_success))
18574
          return false;
483 rajveer 18575
        if (!this.success.equals(that.success))
68 ashish 18576
          return false;
18577
      }
18578
 
18579
      boolean this_present_ex = true && this.isSetEx();
18580
      boolean that_present_ex = true && that.isSetEx();
18581
      if (this_present_ex || that_present_ex) {
18582
        if (!(this_present_ex && that_present_ex))
18583
          return false;
18584
        if (!this.ex.equals(that.ex))
18585
          return false;
18586
      }
18587
 
18588
      return true;
18589
    }
18590
 
18591
    @Override
18592
    public int hashCode() {
18593
      return 0;
18594
    }
18595
 
483 rajveer 18596
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18597
      if (!getClass().equals(other.getClass())) {
18598
        return getClass().getName().compareTo(other.getClass().getName());
18599
      }
18600
 
18601
      int lastComparison = 0;
483 rajveer 18602
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18603
 
18604
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18605
      if (lastComparison != 0) {
18606
        return lastComparison;
18607
      }
18608
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18609
      if (lastComparison != 0) {
18610
        return lastComparison;
18611
      }
18612
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18613
      if (lastComparison != 0) {
18614
        return lastComparison;
18615
      }
18616
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18617
      if (lastComparison != 0) {
18618
        return lastComparison;
18619
      }
18620
      return 0;
18621
    }
18622
 
18623
    public void read(TProtocol iprot) throws TException {
18624
      TField field;
18625
      iprot.readStructBegin();
18626
      while (true)
18627
      {
18628
        field = iprot.readFieldBegin();
18629
        if (field.type == TType.STOP) { 
18630
          break;
18631
        }
18632
        _Fields fieldId = _Fields.findByThriftId(field.id);
18633
        if (fieldId == null) {
18634
          TProtocolUtil.skip(iprot, field.type);
18635
        } else {
18636
          switch (fieldId) {
18637
            case SUCCESS:
483 rajveer 18638
              if (field.type == TType.LIST) {
18639
                {
1382 varun.gupt 18640
                  TList _list40 = iprot.readListBegin();
18641
                  this.success = new ArrayList<LineItem>(_list40.size);
18642
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 18643
                  {
1382 varun.gupt 18644
                    LineItem _elem42;
18645
                    _elem42 = new LineItem();
18646
                    _elem42.read(iprot);
18647
                    this.success.add(_elem42);
483 rajveer 18648
                  }
18649
                  iprot.readListEnd();
18650
                }
68 ashish 18651
              } else { 
18652
                TProtocolUtil.skip(iprot, field.type);
18653
              }
18654
              break;
18655
            case EX:
18656
              if (field.type == TType.STRUCT) {
18657
                this.ex = new TransactionServiceException();
18658
                this.ex.read(iprot);
18659
              } else { 
18660
                TProtocolUtil.skip(iprot, field.type);
18661
              }
18662
              break;
18663
          }
18664
          iprot.readFieldEnd();
18665
        }
18666
      }
18667
      iprot.readStructEnd();
18668
      validate();
18669
    }
18670
 
18671
    public void write(TProtocol oprot) throws TException {
18672
      oprot.writeStructBegin(STRUCT_DESC);
18673
 
18674
      if (this.isSetSuccess()) {
18675
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18676
        {
18677
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18678
          for (LineItem _iter43 : this.success)
483 rajveer 18679
          {
1382 varun.gupt 18680
            _iter43.write(oprot);
483 rajveer 18681
          }
18682
          oprot.writeListEnd();
18683
        }
68 ashish 18684
        oprot.writeFieldEnd();
18685
      } else if (this.isSetEx()) {
18686
        oprot.writeFieldBegin(EX_FIELD_DESC);
18687
        this.ex.write(oprot);
18688
        oprot.writeFieldEnd();
18689
      }
18690
      oprot.writeFieldStop();
18691
      oprot.writeStructEnd();
18692
    }
18693
 
18694
    @Override
18695
    public String toString() {
483 rajveer 18696
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 18697
      boolean first = true;
18698
 
18699
      sb.append("success:");
483 rajveer 18700
      if (this.success == null) {
18701
        sb.append("null");
18702
      } else {
18703
        sb.append(this.success);
18704
      }
68 ashish 18705
      first = false;
18706
      if (!first) sb.append(", ");
18707
      sb.append("ex:");
18708
      if (this.ex == null) {
18709
        sb.append("null");
18710
      } else {
18711
        sb.append(this.ex);
18712
      }
18713
      first = false;
18714
      sb.append(")");
18715
      return sb.toString();
18716
    }
18717
 
18718
    public void validate() throws TException {
18719
      // check for required fields
18720
    }
18721
 
18722
  }
18723
 
1529 ankur.sing 18724
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
18725
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
18726
 
18727
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
18728
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
18729
 
18730
    private long orderId;
18731
    private long customerId;
18732
 
18733
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18734
    public enum _Fields implements TFieldIdEnum {
18735
      ORDER_ID((short)1, "orderId"),
18736
      CUSTOMER_ID((short)2, "customerId");
18737
 
18738
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18739
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18740
 
18741
      static {
18742
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18743
          byId.put((int)field._thriftId, field);
18744
          byName.put(field.getFieldName(), field);
18745
        }
18746
      }
18747
 
18748
      /**
18749
       * Find the _Fields constant that matches fieldId, or null if its not found.
18750
       */
18751
      public static _Fields findByThriftId(int fieldId) {
18752
        return byId.get(fieldId);
18753
      }
18754
 
18755
      /**
18756
       * Find the _Fields constant that matches fieldId, throwing an exception
18757
       * if it is not found.
18758
       */
18759
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18760
        _Fields fields = findByThriftId(fieldId);
18761
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18762
        return fields;
18763
      }
18764
 
18765
      /**
18766
       * Find the _Fields constant that matches name, or null if its not found.
18767
       */
18768
      public static _Fields findByName(String name) {
18769
        return byName.get(name);
18770
      }
18771
 
18772
      private final short _thriftId;
18773
      private final String _fieldName;
18774
 
18775
      _Fields(short thriftId, String fieldName) {
18776
        _thriftId = thriftId;
18777
        _fieldName = fieldName;
18778
      }
18779
 
18780
      public short getThriftFieldId() {
18781
        return _thriftId;
18782
      }
18783
 
18784
      public String getFieldName() {
18785
        return _fieldName;
18786
      }
18787
    }
18788
 
18789
    // isset id assignments
18790
    private static final int __ORDERID_ISSET_ID = 0;
18791
    private static final int __CUSTOMERID_ISSET_ID = 1;
18792
    private BitSet __isset_bit_vector = new BitSet(2);
18793
 
18794
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18795
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
18796
          new FieldValueMetaData(TType.I64)));
18797
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
18798
          new FieldValueMetaData(TType.I64)));
18799
    }});
18800
 
18801
    static {
18802
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
18803
    }
18804
 
18805
    public getOrderForCustomer_args() {
18806
    }
18807
 
18808
    public getOrderForCustomer_args(
18809
      long orderId,
18810
      long customerId)
18811
    {
18812
      this();
18813
      this.orderId = orderId;
18814
      setOrderIdIsSet(true);
18815
      this.customerId = customerId;
18816
      setCustomerIdIsSet(true);
18817
    }
18818
 
18819
    /**
18820
     * Performs a deep copy on <i>other</i>.
18821
     */
18822
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
18823
      __isset_bit_vector.clear();
18824
      __isset_bit_vector.or(other.__isset_bit_vector);
18825
      this.orderId = other.orderId;
18826
      this.customerId = other.customerId;
18827
    }
18828
 
18829
    public getOrderForCustomer_args deepCopy() {
18830
      return new getOrderForCustomer_args(this);
18831
    }
18832
 
18833
    @Deprecated
18834
    public getOrderForCustomer_args clone() {
18835
      return new getOrderForCustomer_args(this);
18836
    }
18837
 
18838
    public long getOrderId() {
18839
      return this.orderId;
18840
    }
18841
 
18842
    public getOrderForCustomer_args setOrderId(long orderId) {
18843
      this.orderId = orderId;
18844
      setOrderIdIsSet(true);
18845
      return this;
18846
    }
18847
 
18848
    public void unsetOrderId() {
18849
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
18850
    }
18851
 
18852
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18853
    public boolean isSetOrderId() {
18854
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
18855
    }
18856
 
18857
    public void setOrderIdIsSet(boolean value) {
18858
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
18859
    }
18860
 
18861
    public long getCustomerId() {
18862
      return this.customerId;
18863
    }
18864
 
18865
    public getOrderForCustomer_args setCustomerId(long customerId) {
18866
      this.customerId = customerId;
18867
      setCustomerIdIsSet(true);
18868
      return this;
18869
    }
18870
 
18871
    public void unsetCustomerId() {
18872
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
18873
    }
18874
 
18875
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
18876
    public boolean isSetCustomerId() {
18877
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
18878
    }
18879
 
18880
    public void setCustomerIdIsSet(boolean value) {
18881
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
18882
    }
18883
 
18884
    public void setFieldValue(_Fields field, Object value) {
18885
      switch (field) {
18886
      case ORDER_ID:
18887
        if (value == null) {
18888
          unsetOrderId();
18889
        } else {
18890
          setOrderId((Long)value);
18891
        }
18892
        break;
18893
 
18894
      case CUSTOMER_ID:
18895
        if (value == null) {
18896
          unsetCustomerId();
18897
        } else {
18898
          setCustomerId((Long)value);
18899
        }
18900
        break;
18901
 
18902
      }
18903
    }
18904
 
18905
    public void setFieldValue(int fieldID, Object value) {
18906
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18907
    }
18908
 
18909
    public Object getFieldValue(_Fields field) {
18910
      switch (field) {
18911
      case ORDER_ID:
18912
        return new Long(getOrderId());
18913
 
18914
      case CUSTOMER_ID:
18915
        return new Long(getCustomerId());
18916
 
18917
      }
18918
      throw new IllegalStateException();
18919
    }
18920
 
18921
    public Object getFieldValue(int fieldId) {
18922
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18923
    }
18924
 
18925
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18926
    public boolean isSet(_Fields field) {
18927
      switch (field) {
18928
      case ORDER_ID:
18929
        return isSetOrderId();
18930
      case CUSTOMER_ID:
18931
        return isSetCustomerId();
18932
      }
18933
      throw new IllegalStateException();
18934
    }
18935
 
18936
    public boolean isSet(int fieldID) {
18937
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18938
    }
18939
 
18940
    @Override
18941
    public boolean equals(Object that) {
18942
      if (that == null)
18943
        return false;
18944
      if (that instanceof getOrderForCustomer_args)
18945
        return this.equals((getOrderForCustomer_args)that);
18946
      return false;
18947
    }
18948
 
18949
    public boolean equals(getOrderForCustomer_args that) {
18950
      if (that == null)
18951
        return false;
18952
 
18953
      boolean this_present_orderId = true;
18954
      boolean that_present_orderId = true;
18955
      if (this_present_orderId || that_present_orderId) {
18956
        if (!(this_present_orderId && that_present_orderId))
18957
          return false;
18958
        if (this.orderId != that.orderId)
18959
          return false;
18960
      }
18961
 
18962
      boolean this_present_customerId = true;
18963
      boolean that_present_customerId = true;
18964
      if (this_present_customerId || that_present_customerId) {
18965
        if (!(this_present_customerId && that_present_customerId))
18966
          return false;
18967
        if (this.customerId != that.customerId)
18968
          return false;
18969
      }
18970
 
18971
      return true;
18972
    }
18973
 
18974
    @Override
18975
    public int hashCode() {
18976
      return 0;
18977
    }
18978
 
18979
    public int compareTo(getOrderForCustomer_args other) {
18980
      if (!getClass().equals(other.getClass())) {
18981
        return getClass().getName().compareTo(other.getClass().getName());
18982
      }
18983
 
18984
      int lastComparison = 0;
18985
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
18986
 
18987
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
18988
      if (lastComparison != 0) {
18989
        return lastComparison;
18990
      }
18991
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
18992
      if (lastComparison != 0) {
18993
        return lastComparison;
18994
      }
18995
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
18996
      if (lastComparison != 0) {
18997
        return lastComparison;
18998
      }
18999
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
19000
      if (lastComparison != 0) {
19001
        return lastComparison;
19002
      }
19003
      return 0;
19004
    }
19005
 
19006
    public void read(TProtocol iprot) throws TException {
19007
      TField field;
19008
      iprot.readStructBegin();
19009
      while (true)
19010
      {
19011
        field = iprot.readFieldBegin();
19012
        if (field.type == TType.STOP) { 
19013
          break;
19014
        }
19015
        _Fields fieldId = _Fields.findByThriftId(field.id);
19016
        if (fieldId == null) {
19017
          TProtocolUtil.skip(iprot, field.type);
19018
        } else {
19019
          switch (fieldId) {
19020
            case ORDER_ID:
19021
              if (field.type == TType.I64) {
19022
                this.orderId = iprot.readI64();
19023
                setOrderIdIsSet(true);
19024
              } else { 
19025
                TProtocolUtil.skip(iprot, field.type);
19026
              }
19027
              break;
19028
            case CUSTOMER_ID:
19029
              if (field.type == TType.I64) {
19030
                this.customerId = iprot.readI64();
19031
                setCustomerIdIsSet(true);
19032
              } else { 
19033
                TProtocolUtil.skip(iprot, field.type);
19034
              }
19035
              break;
19036
          }
19037
          iprot.readFieldEnd();
19038
        }
19039
      }
19040
      iprot.readStructEnd();
19041
      validate();
19042
    }
19043
 
19044
    public void write(TProtocol oprot) throws TException {
19045
      validate();
19046
 
19047
      oprot.writeStructBegin(STRUCT_DESC);
19048
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19049
      oprot.writeI64(this.orderId);
19050
      oprot.writeFieldEnd();
19051
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
19052
      oprot.writeI64(this.customerId);
19053
      oprot.writeFieldEnd();
19054
      oprot.writeFieldStop();
19055
      oprot.writeStructEnd();
19056
    }
19057
 
19058
    @Override
19059
    public String toString() {
19060
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
19061
      boolean first = true;
19062
 
19063
      sb.append("orderId:");
19064
      sb.append(this.orderId);
19065
      first = false;
19066
      if (!first) sb.append(", ");
19067
      sb.append("customerId:");
19068
      sb.append(this.customerId);
19069
      first = false;
19070
      sb.append(")");
19071
      return sb.toString();
19072
    }
19073
 
19074
    public void validate() throws TException {
19075
      // check for required fields
19076
    }
19077
 
19078
  }
19079
 
19080
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
19081
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
19082
 
19083
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
19084
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19085
 
19086
    private Order success;
19087
    private TransactionServiceException ex;
19088
 
19089
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19090
    public enum _Fields implements TFieldIdEnum {
19091
      SUCCESS((short)0, "success"),
19092
      EX((short)1, "ex");
19093
 
19094
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19095
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19096
 
19097
      static {
19098
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19099
          byId.put((int)field._thriftId, field);
19100
          byName.put(field.getFieldName(), field);
19101
        }
19102
      }
19103
 
19104
      /**
19105
       * Find the _Fields constant that matches fieldId, or null if its not found.
19106
       */
19107
      public static _Fields findByThriftId(int fieldId) {
19108
        return byId.get(fieldId);
19109
      }
19110
 
19111
      /**
19112
       * Find the _Fields constant that matches fieldId, throwing an exception
19113
       * if it is not found.
19114
       */
19115
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19116
        _Fields fields = findByThriftId(fieldId);
19117
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19118
        return fields;
19119
      }
19120
 
19121
      /**
19122
       * Find the _Fields constant that matches name, or null if its not found.
19123
       */
19124
      public static _Fields findByName(String name) {
19125
        return byName.get(name);
19126
      }
19127
 
19128
      private final short _thriftId;
19129
      private final String _fieldName;
19130
 
19131
      _Fields(short thriftId, String fieldName) {
19132
        _thriftId = thriftId;
19133
        _fieldName = fieldName;
19134
      }
19135
 
19136
      public short getThriftFieldId() {
19137
        return _thriftId;
19138
      }
19139
 
19140
      public String getFieldName() {
19141
        return _fieldName;
19142
      }
19143
    }
19144
 
19145
    // isset id assignments
19146
 
19147
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19148
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19149
          new StructMetaData(TType.STRUCT, Order.class)));
19150
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19151
          new FieldValueMetaData(TType.STRUCT)));
19152
    }});
19153
 
19154
    static {
19155
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
19156
    }
19157
 
19158
    public getOrderForCustomer_result() {
19159
    }
19160
 
19161
    public getOrderForCustomer_result(
19162
      Order success,
19163
      TransactionServiceException ex)
19164
    {
19165
      this();
19166
      this.success = success;
19167
      this.ex = ex;
19168
    }
19169
 
19170
    /**
19171
     * Performs a deep copy on <i>other</i>.
19172
     */
19173
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
19174
      if (other.isSetSuccess()) {
19175
        this.success = new Order(other.success);
19176
      }
19177
      if (other.isSetEx()) {
19178
        this.ex = new TransactionServiceException(other.ex);
19179
      }
19180
    }
19181
 
19182
    public getOrderForCustomer_result deepCopy() {
19183
      return new getOrderForCustomer_result(this);
19184
    }
19185
 
19186
    @Deprecated
19187
    public getOrderForCustomer_result clone() {
19188
      return new getOrderForCustomer_result(this);
19189
    }
19190
 
19191
    public Order getSuccess() {
19192
      return this.success;
19193
    }
19194
 
19195
    public getOrderForCustomer_result setSuccess(Order success) {
19196
      this.success = success;
19197
      return this;
19198
    }
19199
 
19200
    public void unsetSuccess() {
19201
      this.success = null;
19202
    }
19203
 
19204
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19205
    public boolean isSetSuccess() {
19206
      return this.success != null;
19207
    }
19208
 
19209
    public void setSuccessIsSet(boolean value) {
19210
      if (!value) {
19211
        this.success = null;
19212
      }
19213
    }
19214
 
19215
    public TransactionServiceException getEx() {
19216
      return this.ex;
19217
    }
19218
 
19219
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
19220
      this.ex = ex;
19221
      return this;
19222
    }
19223
 
19224
    public void unsetEx() {
19225
      this.ex = null;
19226
    }
19227
 
19228
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19229
    public boolean isSetEx() {
19230
      return this.ex != null;
19231
    }
19232
 
19233
    public void setExIsSet(boolean value) {
19234
      if (!value) {
19235
        this.ex = null;
19236
      }
19237
    }
19238
 
19239
    public void setFieldValue(_Fields field, Object value) {
19240
      switch (field) {
19241
      case SUCCESS:
19242
        if (value == null) {
19243
          unsetSuccess();
19244
        } else {
19245
          setSuccess((Order)value);
19246
        }
19247
        break;
19248
 
19249
      case EX:
19250
        if (value == null) {
19251
          unsetEx();
19252
        } else {
19253
          setEx((TransactionServiceException)value);
19254
        }
19255
        break;
19256
 
19257
      }
19258
    }
19259
 
19260
    public void setFieldValue(int fieldID, Object value) {
19261
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19262
    }
19263
 
19264
    public Object getFieldValue(_Fields field) {
19265
      switch (field) {
19266
      case SUCCESS:
19267
        return getSuccess();
19268
 
19269
      case EX:
19270
        return getEx();
19271
 
19272
      }
19273
      throw new IllegalStateException();
19274
    }
19275
 
19276
    public Object getFieldValue(int fieldId) {
19277
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19278
    }
19279
 
19280
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19281
    public boolean isSet(_Fields field) {
19282
      switch (field) {
19283
      case SUCCESS:
19284
        return isSetSuccess();
19285
      case EX:
19286
        return isSetEx();
19287
      }
19288
      throw new IllegalStateException();
19289
    }
19290
 
19291
    public boolean isSet(int fieldID) {
19292
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19293
    }
19294
 
19295
    @Override
19296
    public boolean equals(Object that) {
19297
      if (that == null)
19298
        return false;
19299
      if (that instanceof getOrderForCustomer_result)
19300
        return this.equals((getOrderForCustomer_result)that);
19301
      return false;
19302
    }
19303
 
19304
    public boolean equals(getOrderForCustomer_result that) {
19305
      if (that == null)
19306
        return false;
19307
 
19308
      boolean this_present_success = true && this.isSetSuccess();
19309
      boolean that_present_success = true && that.isSetSuccess();
19310
      if (this_present_success || that_present_success) {
19311
        if (!(this_present_success && that_present_success))
19312
          return false;
19313
        if (!this.success.equals(that.success))
19314
          return false;
19315
      }
19316
 
19317
      boolean this_present_ex = true && this.isSetEx();
19318
      boolean that_present_ex = true && that.isSetEx();
19319
      if (this_present_ex || that_present_ex) {
19320
        if (!(this_present_ex && that_present_ex))
19321
          return false;
19322
        if (!this.ex.equals(that.ex))
19323
          return false;
19324
      }
19325
 
19326
      return true;
19327
    }
19328
 
19329
    @Override
19330
    public int hashCode() {
19331
      return 0;
19332
    }
19333
 
19334
    public int compareTo(getOrderForCustomer_result other) {
19335
      if (!getClass().equals(other.getClass())) {
19336
        return getClass().getName().compareTo(other.getClass().getName());
19337
      }
19338
 
19339
      int lastComparison = 0;
19340
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
19341
 
19342
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19343
      if (lastComparison != 0) {
19344
        return lastComparison;
19345
      }
19346
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19347
      if (lastComparison != 0) {
19348
        return lastComparison;
19349
      }
19350
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19351
      if (lastComparison != 0) {
19352
        return lastComparison;
19353
      }
19354
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19355
      if (lastComparison != 0) {
19356
        return lastComparison;
19357
      }
19358
      return 0;
19359
    }
19360
 
19361
    public void read(TProtocol iprot) throws TException {
19362
      TField field;
19363
      iprot.readStructBegin();
19364
      while (true)
19365
      {
19366
        field = iprot.readFieldBegin();
19367
        if (field.type == TType.STOP) { 
19368
          break;
19369
        }
19370
        _Fields fieldId = _Fields.findByThriftId(field.id);
19371
        if (fieldId == null) {
19372
          TProtocolUtil.skip(iprot, field.type);
19373
        } else {
19374
          switch (fieldId) {
19375
            case SUCCESS:
19376
              if (field.type == TType.STRUCT) {
19377
                this.success = new Order();
19378
                this.success.read(iprot);
19379
              } else { 
19380
                TProtocolUtil.skip(iprot, field.type);
19381
              }
19382
              break;
19383
            case EX:
19384
              if (field.type == TType.STRUCT) {
19385
                this.ex = new TransactionServiceException();
19386
                this.ex.read(iprot);
19387
              } else { 
19388
                TProtocolUtil.skip(iprot, field.type);
19389
              }
19390
              break;
19391
          }
19392
          iprot.readFieldEnd();
19393
        }
19394
      }
19395
      iprot.readStructEnd();
19396
      validate();
19397
    }
19398
 
19399
    public void write(TProtocol oprot) throws TException {
19400
      oprot.writeStructBegin(STRUCT_DESC);
19401
 
19402
      if (this.isSetSuccess()) {
19403
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19404
        this.success.write(oprot);
19405
        oprot.writeFieldEnd();
19406
      } else if (this.isSetEx()) {
19407
        oprot.writeFieldBegin(EX_FIELD_DESC);
19408
        this.ex.write(oprot);
19409
        oprot.writeFieldEnd();
19410
      }
19411
      oprot.writeFieldStop();
19412
      oprot.writeStructEnd();
19413
    }
19414
 
19415
    @Override
19416
    public String toString() {
19417
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
19418
      boolean first = true;
19419
 
19420
      sb.append("success:");
19421
      if (this.success == null) {
19422
        sb.append("null");
19423
      } else {
19424
        sb.append(this.success);
19425
      }
19426
      first = false;
19427
      if (!first) sb.append(", ");
19428
      sb.append("ex:");
19429
      if (this.ex == null) {
19430
        sb.append("null");
19431
      } else {
19432
        sb.append(this.ex);
19433
      }
19434
      first = false;
19435
      sb.append(")");
19436
      return sb.toString();
19437
    }
19438
 
19439
    public void validate() throws TException {
19440
      // check for required fields
19441
    }
19442
 
19443
  }
19444
 
1221 chandransh 19445
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
19446
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
19447
 
19448
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19449
 
19450
    private long warehouseId;
19451
 
19452
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19453
    public enum _Fields implements TFieldIdEnum {
19454
      WAREHOUSE_ID((short)1, "warehouseId");
19455
 
19456
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19457
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19458
 
19459
      static {
19460
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19461
          byId.put((int)field._thriftId, field);
19462
          byName.put(field.getFieldName(), field);
19463
        }
19464
      }
19465
 
19466
      /**
19467
       * Find the _Fields constant that matches fieldId, or null if its not found.
19468
       */
19469
      public static _Fields findByThriftId(int fieldId) {
19470
        return byId.get(fieldId);
19471
      }
19472
 
19473
      /**
19474
       * Find the _Fields constant that matches fieldId, throwing an exception
19475
       * if it is not found.
19476
       */
19477
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19478
        _Fields fields = findByThriftId(fieldId);
19479
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19480
        return fields;
19481
      }
19482
 
19483
      /**
19484
       * Find the _Fields constant that matches name, or null if its not found.
19485
       */
19486
      public static _Fields findByName(String name) {
19487
        return byName.get(name);
19488
      }
19489
 
19490
      private final short _thriftId;
19491
      private final String _fieldName;
19492
 
19493
      _Fields(short thriftId, String fieldName) {
19494
        _thriftId = thriftId;
19495
        _fieldName = fieldName;
19496
      }
19497
 
19498
      public short getThriftFieldId() {
19499
        return _thriftId;
19500
      }
19501
 
19502
      public String getFieldName() {
19503
        return _fieldName;
19504
      }
19505
    }
19506
 
19507
    // isset id assignments
19508
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19509
    private BitSet __isset_bit_vector = new BitSet(1);
19510
 
19511
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19512
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19513
          new FieldValueMetaData(TType.I64)));
19514
    }});
19515
 
19516
    static {
19517
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
19518
    }
19519
 
19520
    public batchOrders_args() {
19521
    }
19522
 
19523
    public batchOrders_args(
19524
      long warehouseId)
19525
    {
19526
      this();
19527
      this.warehouseId = warehouseId;
19528
      setWarehouseIdIsSet(true);
19529
    }
19530
 
19531
    /**
19532
     * Performs a deep copy on <i>other</i>.
19533
     */
19534
    public batchOrders_args(batchOrders_args other) {
19535
      __isset_bit_vector.clear();
19536
      __isset_bit_vector.or(other.__isset_bit_vector);
19537
      this.warehouseId = other.warehouseId;
19538
    }
19539
 
19540
    public batchOrders_args deepCopy() {
19541
      return new batchOrders_args(this);
19542
    }
19543
 
19544
    @Deprecated
19545
    public batchOrders_args clone() {
19546
      return new batchOrders_args(this);
19547
    }
19548
 
19549
    public long getWarehouseId() {
19550
      return this.warehouseId;
19551
    }
19552
 
19553
    public batchOrders_args setWarehouseId(long warehouseId) {
19554
      this.warehouseId = warehouseId;
19555
      setWarehouseIdIsSet(true);
19556
      return this;
19557
    }
19558
 
19559
    public void unsetWarehouseId() {
19560
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19561
    }
19562
 
19563
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19564
    public boolean isSetWarehouseId() {
19565
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19566
    }
19567
 
19568
    public void setWarehouseIdIsSet(boolean value) {
19569
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19570
    }
19571
 
19572
    public void setFieldValue(_Fields field, Object value) {
19573
      switch (field) {
19574
      case WAREHOUSE_ID:
19575
        if (value == null) {
19576
          unsetWarehouseId();
19577
        } else {
19578
          setWarehouseId((Long)value);
19579
        }
19580
        break;
19581
 
19582
      }
19583
    }
19584
 
19585
    public void setFieldValue(int fieldID, Object value) {
19586
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19587
    }
19588
 
19589
    public Object getFieldValue(_Fields field) {
19590
      switch (field) {
19591
      case WAREHOUSE_ID:
19592
        return new Long(getWarehouseId());
19593
 
19594
      }
19595
      throw new IllegalStateException();
19596
    }
19597
 
19598
    public Object getFieldValue(int fieldId) {
19599
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19600
    }
19601
 
19602
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19603
    public boolean isSet(_Fields field) {
19604
      switch (field) {
19605
      case WAREHOUSE_ID:
19606
        return isSetWarehouseId();
19607
      }
19608
      throw new IllegalStateException();
19609
    }
19610
 
19611
    public boolean isSet(int fieldID) {
19612
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19613
    }
19614
 
19615
    @Override
19616
    public boolean equals(Object that) {
19617
      if (that == null)
19618
        return false;
19619
      if (that instanceof batchOrders_args)
19620
        return this.equals((batchOrders_args)that);
19621
      return false;
19622
    }
19623
 
19624
    public boolean equals(batchOrders_args that) {
19625
      if (that == null)
19626
        return false;
19627
 
19628
      boolean this_present_warehouseId = true;
19629
      boolean that_present_warehouseId = true;
19630
      if (this_present_warehouseId || that_present_warehouseId) {
19631
        if (!(this_present_warehouseId && that_present_warehouseId))
19632
          return false;
19633
        if (this.warehouseId != that.warehouseId)
19634
          return false;
19635
      }
19636
 
19637
      return true;
19638
    }
19639
 
19640
    @Override
19641
    public int hashCode() {
19642
      return 0;
19643
    }
19644
 
19645
    public int compareTo(batchOrders_args other) {
19646
      if (!getClass().equals(other.getClass())) {
19647
        return getClass().getName().compareTo(other.getClass().getName());
19648
      }
19649
 
19650
      int lastComparison = 0;
19651
      batchOrders_args typedOther = (batchOrders_args)other;
19652
 
19653
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
19654
      if (lastComparison != 0) {
19655
        return lastComparison;
19656
      }
19657
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
19658
      if (lastComparison != 0) {
19659
        return lastComparison;
19660
      }
19661
      return 0;
19662
    }
19663
 
19664
    public void read(TProtocol iprot) throws TException {
19665
      TField field;
19666
      iprot.readStructBegin();
19667
      while (true)
19668
      {
19669
        field = iprot.readFieldBegin();
19670
        if (field.type == TType.STOP) { 
19671
          break;
19672
        }
19673
        _Fields fieldId = _Fields.findByThriftId(field.id);
19674
        if (fieldId == null) {
19675
          TProtocolUtil.skip(iprot, field.type);
19676
        } else {
19677
          switch (fieldId) {
19678
            case WAREHOUSE_ID:
19679
              if (field.type == TType.I64) {
19680
                this.warehouseId = iprot.readI64();
19681
                setWarehouseIdIsSet(true);
19682
              } else { 
19683
                TProtocolUtil.skip(iprot, field.type);
19684
              }
19685
              break;
19686
          }
19687
          iprot.readFieldEnd();
19688
        }
19689
      }
19690
      iprot.readStructEnd();
19691
      validate();
19692
    }
19693
 
19694
    public void write(TProtocol oprot) throws TException {
19695
      validate();
19696
 
19697
      oprot.writeStructBegin(STRUCT_DESC);
19698
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19699
      oprot.writeI64(this.warehouseId);
19700
      oprot.writeFieldEnd();
19701
      oprot.writeFieldStop();
19702
      oprot.writeStructEnd();
19703
    }
19704
 
19705
    @Override
19706
    public String toString() {
19707
      StringBuilder sb = new StringBuilder("batchOrders_args(");
19708
      boolean first = true;
19709
 
19710
      sb.append("warehouseId:");
19711
      sb.append(this.warehouseId);
19712
      first = false;
19713
      sb.append(")");
19714
      return sb.toString();
19715
    }
19716
 
19717
    public void validate() throws TException {
19718
      // check for required fields
19719
    }
19720
 
19721
  }
19722
 
19723
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
19724
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
19725
 
19726
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19727
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19728
 
19729
    private List<Order> success;
19730
    private TransactionServiceException ex;
19731
 
19732
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19733
    public enum _Fields implements TFieldIdEnum {
19734
      SUCCESS((short)0, "success"),
19735
      EX((short)1, "ex");
19736
 
19737
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19738
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19739
 
19740
      static {
19741
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19742
          byId.put((int)field._thriftId, field);
19743
          byName.put(field.getFieldName(), field);
19744
        }
19745
      }
19746
 
19747
      /**
19748
       * Find the _Fields constant that matches fieldId, or null if its not found.
19749
       */
19750
      public static _Fields findByThriftId(int fieldId) {
19751
        return byId.get(fieldId);
19752
      }
19753
 
19754
      /**
19755
       * Find the _Fields constant that matches fieldId, throwing an exception
19756
       * if it is not found.
19757
       */
19758
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19759
        _Fields fields = findByThriftId(fieldId);
19760
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19761
        return fields;
19762
      }
19763
 
19764
      /**
19765
       * Find the _Fields constant that matches name, or null if its not found.
19766
       */
19767
      public static _Fields findByName(String name) {
19768
        return byName.get(name);
19769
      }
19770
 
19771
      private final short _thriftId;
19772
      private final String _fieldName;
19773
 
19774
      _Fields(short thriftId, String fieldName) {
19775
        _thriftId = thriftId;
19776
        _fieldName = fieldName;
19777
      }
19778
 
19779
      public short getThriftFieldId() {
19780
        return _thriftId;
19781
      }
19782
 
19783
      public String getFieldName() {
19784
        return _fieldName;
19785
      }
19786
    }
19787
 
19788
    // isset id assignments
19789
 
19790
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19791
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19792
          new ListMetaData(TType.LIST, 
19793
              new StructMetaData(TType.STRUCT, Order.class))));
19794
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19795
          new FieldValueMetaData(TType.STRUCT)));
19796
    }});
19797
 
19798
    static {
19799
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
19800
    }
19801
 
19802
    public batchOrders_result() {
19803
    }
19804
 
19805
    public batchOrders_result(
19806
      List<Order> success,
19807
      TransactionServiceException ex)
19808
    {
19809
      this();
19810
      this.success = success;
19811
      this.ex = ex;
19812
    }
19813
 
19814
    /**
19815
     * Performs a deep copy on <i>other</i>.
19816
     */
19817
    public batchOrders_result(batchOrders_result other) {
19818
      if (other.isSetSuccess()) {
19819
        List<Order> __this__success = new ArrayList<Order>();
19820
        for (Order other_element : other.success) {
19821
          __this__success.add(new Order(other_element));
19822
        }
19823
        this.success = __this__success;
19824
      }
19825
      if (other.isSetEx()) {
19826
        this.ex = new TransactionServiceException(other.ex);
19827
      }
19828
    }
19829
 
19830
    public batchOrders_result deepCopy() {
19831
      return new batchOrders_result(this);
19832
    }
19833
 
19834
    @Deprecated
19835
    public batchOrders_result clone() {
19836
      return new batchOrders_result(this);
19837
    }
19838
 
19839
    public int getSuccessSize() {
19840
      return (this.success == null) ? 0 : this.success.size();
19841
    }
19842
 
19843
    public java.util.Iterator<Order> getSuccessIterator() {
19844
      return (this.success == null) ? null : this.success.iterator();
19845
    }
19846
 
19847
    public void addToSuccess(Order elem) {
19848
      if (this.success == null) {
19849
        this.success = new ArrayList<Order>();
19850
      }
19851
      this.success.add(elem);
19852
    }
19853
 
19854
    public List<Order> getSuccess() {
19855
      return this.success;
19856
    }
19857
 
19858
    public batchOrders_result setSuccess(List<Order> success) {
19859
      this.success = success;
19860
      return this;
19861
    }
19862
 
19863
    public void unsetSuccess() {
19864
      this.success = null;
19865
    }
19866
 
19867
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19868
    public boolean isSetSuccess() {
19869
      return this.success != null;
19870
    }
19871
 
19872
    public void setSuccessIsSet(boolean value) {
19873
      if (!value) {
19874
        this.success = null;
19875
      }
19876
    }
19877
 
19878
    public TransactionServiceException getEx() {
19879
      return this.ex;
19880
    }
19881
 
19882
    public batchOrders_result setEx(TransactionServiceException ex) {
19883
      this.ex = ex;
19884
      return this;
19885
    }
19886
 
19887
    public void unsetEx() {
19888
      this.ex = null;
19889
    }
19890
 
19891
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19892
    public boolean isSetEx() {
19893
      return this.ex != null;
19894
    }
19895
 
19896
    public void setExIsSet(boolean value) {
19897
      if (!value) {
19898
        this.ex = null;
19899
      }
19900
    }
19901
 
19902
    public void setFieldValue(_Fields field, Object value) {
19903
      switch (field) {
19904
      case SUCCESS:
19905
        if (value == null) {
19906
          unsetSuccess();
19907
        } else {
19908
          setSuccess((List<Order>)value);
19909
        }
19910
        break;
19911
 
19912
      case EX:
19913
        if (value == null) {
19914
          unsetEx();
19915
        } else {
19916
          setEx((TransactionServiceException)value);
19917
        }
19918
        break;
19919
 
19920
      }
19921
    }
19922
 
19923
    public void setFieldValue(int fieldID, Object value) {
19924
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19925
    }
19926
 
19927
    public Object getFieldValue(_Fields field) {
19928
      switch (field) {
19929
      case SUCCESS:
19930
        return getSuccess();
19931
 
19932
      case EX:
19933
        return getEx();
19934
 
19935
      }
19936
      throw new IllegalStateException();
19937
    }
19938
 
19939
    public Object getFieldValue(int fieldId) {
19940
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19941
    }
19942
 
19943
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19944
    public boolean isSet(_Fields field) {
19945
      switch (field) {
19946
      case SUCCESS:
19947
        return isSetSuccess();
19948
      case EX:
19949
        return isSetEx();
19950
      }
19951
      throw new IllegalStateException();
19952
    }
19953
 
19954
    public boolean isSet(int fieldID) {
19955
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19956
    }
19957
 
19958
    @Override
19959
    public boolean equals(Object that) {
19960
      if (that == null)
19961
        return false;
19962
      if (that instanceof batchOrders_result)
19963
        return this.equals((batchOrders_result)that);
19964
      return false;
19965
    }
19966
 
19967
    public boolean equals(batchOrders_result that) {
19968
      if (that == null)
19969
        return false;
19970
 
19971
      boolean this_present_success = true && this.isSetSuccess();
19972
      boolean that_present_success = true && that.isSetSuccess();
19973
      if (this_present_success || that_present_success) {
19974
        if (!(this_present_success && that_present_success))
19975
          return false;
19976
        if (!this.success.equals(that.success))
19977
          return false;
19978
      }
19979
 
19980
      boolean this_present_ex = true && this.isSetEx();
19981
      boolean that_present_ex = true && that.isSetEx();
19982
      if (this_present_ex || that_present_ex) {
19983
        if (!(this_present_ex && that_present_ex))
19984
          return false;
19985
        if (!this.ex.equals(that.ex))
19986
          return false;
19987
      }
19988
 
19989
      return true;
19990
    }
19991
 
19992
    @Override
19993
    public int hashCode() {
19994
      return 0;
19995
    }
19996
 
19997
    public int compareTo(batchOrders_result other) {
19998
      if (!getClass().equals(other.getClass())) {
19999
        return getClass().getName().compareTo(other.getClass().getName());
20000
      }
20001
 
20002
      int lastComparison = 0;
20003
      batchOrders_result typedOther = (batchOrders_result)other;
20004
 
20005
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20006
      if (lastComparison != 0) {
20007
        return lastComparison;
20008
      }
20009
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20010
      if (lastComparison != 0) {
20011
        return lastComparison;
20012
      }
20013
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20014
      if (lastComparison != 0) {
20015
        return lastComparison;
20016
      }
20017
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20018
      if (lastComparison != 0) {
20019
        return lastComparison;
20020
      }
20021
      return 0;
20022
    }
20023
 
20024
    public void read(TProtocol iprot) throws TException {
20025
      TField field;
20026
      iprot.readStructBegin();
20027
      while (true)
20028
      {
20029
        field = iprot.readFieldBegin();
20030
        if (field.type == TType.STOP) { 
20031
          break;
20032
        }
20033
        _Fields fieldId = _Fields.findByThriftId(field.id);
20034
        if (fieldId == null) {
20035
          TProtocolUtil.skip(iprot, field.type);
20036
        } else {
20037
          switch (fieldId) {
20038
            case SUCCESS:
20039
              if (field.type == TType.LIST) {
20040
                {
1382 varun.gupt 20041
                  TList _list44 = iprot.readListBegin();
20042
                  this.success = new ArrayList<Order>(_list44.size);
20043
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 20044
                  {
1382 varun.gupt 20045
                    Order _elem46;
20046
                    _elem46 = new Order();
20047
                    _elem46.read(iprot);
20048
                    this.success.add(_elem46);
1221 chandransh 20049
                  }
20050
                  iprot.readListEnd();
20051
                }
20052
              } else { 
20053
                TProtocolUtil.skip(iprot, field.type);
20054
              }
20055
              break;
20056
            case EX:
20057
              if (field.type == TType.STRUCT) {
20058
                this.ex = new TransactionServiceException();
20059
                this.ex.read(iprot);
20060
              } else { 
20061
                TProtocolUtil.skip(iprot, field.type);
20062
              }
20063
              break;
20064
          }
20065
          iprot.readFieldEnd();
20066
        }
20067
      }
20068
      iprot.readStructEnd();
20069
      validate();
20070
    }
20071
 
20072
    public void write(TProtocol oprot) throws TException {
20073
      oprot.writeStructBegin(STRUCT_DESC);
20074
 
20075
      if (this.isSetSuccess()) {
20076
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20077
        {
20078
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 20079
          for (Order _iter47 : this.success)
1221 chandransh 20080
          {
1382 varun.gupt 20081
            _iter47.write(oprot);
1221 chandransh 20082
          }
20083
          oprot.writeListEnd();
20084
        }
20085
        oprot.writeFieldEnd();
20086
      } else if (this.isSetEx()) {
20087
        oprot.writeFieldBegin(EX_FIELD_DESC);
20088
        this.ex.write(oprot);
20089
        oprot.writeFieldEnd();
20090
      }
20091
      oprot.writeFieldStop();
20092
      oprot.writeStructEnd();
20093
    }
20094
 
20095
    @Override
20096
    public String toString() {
20097
      StringBuilder sb = new StringBuilder("batchOrders_result(");
20098
      boolean first = true;
20099
 
20100
      sb.append("success:");
20101
      if (this.success == null) {
20102
        sb.append("null");
20103
      } else {
20104
        sb.append(this.success);
20105
      }
20106
      first = false;
20107
      if (!first) sb.append(", ");
20108
      sb.append("ex:");
20109
      if (this.ex == null) {
20110
        sb.append("null");
20111
      } else {
20112
        sb.append(this.ex);
20113
      }
20114
      first = false;
20115
      sb.append(")");
20116
      return sb.toString();
20117
    }
20118
 
20119
    public void validate() throws TException {
20120
      // check for required fields
20121
    }
20122
 
20123
  }
20124
 
1209 chandransh 20125
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
20126
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
20127
 
20128
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
20129
 
20130
    private long orderId;
20131
 
20132
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20133
    public enum _Fields implements TFieldIdEnum {
20134
      ORDER_ID((short)1, "orderId");
20135
 
20136
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20138
 
20139
      static {
20140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20141
          byId.put((int)field._thriftId, field);
20142
          byName.put(field.getFieldName(), field);
20143
        }
20144
      }
20145
 
20146
      /**
20147
       * Find the _Fields constant that matches fieldId, or null if its not found.
20148
       */
20149
      public static _Fields findByThriftId(int fieldId) {
20150
        return byId.get(fieldId);
20151
      }
20152
 
20153
      /**
20154
       * Find the _Fields constant that matches fieldId, throwing an exception
20155
       * if it is not found.
20156
       */
20157
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20158
        _Fields fields = findByThriftId(fieldId);
20159
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20160
        return fields;
20161
      }
20162
 
20163
      /**
20164
       * Find the _Fields constant that matches name, or null if its not found.
20165
       */
20166
      public static _Fields findByName(String name) {
20167
        return byName.get(name);
20168
      }
20169
 
20170
      private final short _thriftId;
20171
      private final String _fieldName;
20172
 
20173
      _Fields(short thriftId, String fieldName) {
20174
        _thriftId = thriftId;
20175
        _fieldName = fieldName;
20176
      }
20177
 
20178
      public short getThriftFieldId() {
20179
        return _thriftId;
20180
      }
20181
 
20182
      public String getFieldName() {
20183
        return _fieldName;
20184
      }
20185
    }
20186
 
20187
    // isset id assignments
20188
    private static final int __ORDERID_ISSET_ID = 0;
20189
    private BitSet __isset_bit_vector = new BitSet(1);
20190
 
20191
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20192
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
20193
          new FieldValueMetaData(TType.I64)));
20194
    }});
20195
 
20196
    static {
20197
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
20198
    }
20199
 
20200
    public markOrderAsOutOfStock_args() {
20201
    }
20202
 
20203
    public markOrderAsOutOfStock_args(
20204
      long orderId)
20205
    {
20206
      this();
20207
      this.orderId = orderId;
20208
      setOrderIdIsSet(true);
20209
    }
20210
 
20211
    /**
20212
     * Performs a deep copy on <i>other</i>.
20213
     */
20214
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
20215
      __isset_bit_vector.clear();
20216
      __isset_bit_vector.or(other.__isset_bit_vector);
20217
      this.orderId = other.orderId;
20218
    }
20219
 
20220
    public markOrderAsOutOfStock_args deepCopy() {
20221
      return new markOrderAsOutOfStock_args(this);
20222
    }
20223
 
20224
    @Deprecated
20225
    public markOrderAsOutOfStock_args clone() {
20226
      return new markOrderAsOutOfStock_args(this);
20227
    }
20228
 
20229
    public long getOrderId() {
20230
      return this.orderId;
20231
    }
20232
 
20233
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
20234
      this.orderId = orderId;
20235
      setOrderIdIsSet(true);
20236
      return this;
20237
    }
20238
 
20239
    public void unsetOrderId() {
20240
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20241
    }
20242
 
20243
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20244
    public boolean isSetOrderId() {
20245
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20246
    }
20247
 
20248
    public void setOrderIdIsSet(boolean value) {
20249
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20250
    }
20251
 
20252
    public void setFieldValue(_Fields field, Object value) {
20253
      switch (field) {
20254
      case ORDER_ID:
20255
        if (value == null) {
20256
          unsetOrderId();
20257
        } else {
20258
          setOrderId((Long)value);
20259
        }
20260
        break;
20261
 
20262
      }
20263
    }
20264
 
20265
    public void setFieldValue(int fieldID, Object value) {
20266
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20267
    }
20268
 
20269
    public Object getFieldValue(_Fields field) {
20270
      switch (field) {
20271
      case ORDER_ID:
20272
        return new Long(getOrderId());
20273
 
20274
      }
20275
      throw new IllegalStateException();
20276
    }
20277
 
20278
    public Object getFieldValue(int fieldId) {
20279
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20280
    }
20281
 
20282
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20283
    public boolean isSet(_Fields field) {
20284
      switch (field) {
20285
      case ORDER_ID:
20286
        return isSetOrderId();
20287
      }
20288
      throw new IllegalStateException();
20289
    }
20290
 
20291
    public boolean isSet(int fieldID) {
20292
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20293
    }
20294
 
20295
    @Override
20296
    public boolean equals(Object that) {
20297
      if (that == null)
20298
        return false;
20299
      if (that instanceof markOrderAsOutOfStock_args)
20300
        return this.equals((markOrderAsOutOfStock_args)that);
20301
      return false;
20302
    }
20303
 
20304
    public boolean equals(markOrderAsOutOfStock_args that) {
20305
      if (that == null)
20306
        return false;
20307
 
20308
      boolean this_present_orderId = true;
20309
      boolean that_present_orderId = true;
20310
      if (this_present_orderId || that_present_orderId) {
20311
        if (!(this_present_orderId && that_present_orderId))
20312
          return false;
20313
        if (this.orderId != that.orderId)
20314
          return false;
20315
      }
20316
 
20317
      return true;
20318
    }
20319
 
20320
    @Override
20321
    public int hashCode() {
20322
      return 0;
20323
    }
20324
 
20325
    public int compareTo(markOrderAsOutOfStock_args other) {
20326
      if (!getClass().equals(other.getClass())) {
20327
        return getClass().getName().compareTo(other.getClass().getName());
20328
      }
20329
 
20330
      int lastComparison = 0;
20331
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
20332
 
20333
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20334
      if (lastComparison != 0) {
20335
        return lastComparison;
20336
      }
20337
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20338
      if (lastComparison != 0) {
20339
        return lastComparison;
20340
      }
20341
      return 0;
20342
    }
20343
 
20344
    public void read(TProtocol iprot) throws TException {
20345
      TField field;
20346
      iprot.readStructBegin();
20347
      while (true)
20348
      {
20349
        field = iprot.readFieldBegin();
20350
        if (field.type == TType.STOP) { 
20351
          break;
20352
        }
20353
        _Fields fieldId = _Fields.findByThriftId(field.id);
20354
        if (fieldId == null) {
20355
          TProtocolUtil.skip(iprot, field.type);
20356
        } else {
20357
          switch (fieldId) {
20358
            case ORDER_ID:
20359
              if (field.type == TType.I64) {
20360
                this.orderId = iprot.readI64();
20361
                setOrderIdIsSet(true);
20362
              } else { 
20363
                TProtocolUtil.skip(iprot, field.type);
20364
              }
20365
              break;
20366
          }
20367
          iprot.readFieldEnd();
20368
        }
20369
      }
20370
      iprot.readStructEnd();
20371
      validate();
20372
    }
20373
 
20374
    public void write(TProtocol oprot) throws TException {
20375
      validate();
20376
 
20377
      oprot.writeStructBegin(STRUCT_DESC);
20378
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20379
      oprot.writeI64(this.orderId);
20380
      oprot.writeFieldEnd();
20381
      oprot.writeFieldStop();
20382
      oprot.writeStructEnd();
20383
    }
20384
 
20385
    @Override
20386
    public String toString() {
20387
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
20388
      boolean first = true;
20389
 
20390
      sb.append("orderId:");
20391
      sb.append(this.orderId);
20392
      first = false;
20393
      sb.append(")");
20394
      return sb.toString();
20395
    }
20396
 
20397
    public void validate() throws TException {
20398
      // check for required fields
20399
    }
20400
 
20401
  }
20402
 
20403
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
20404
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
20405
 
20406
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20407
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20408
 
20409
    private boolean success;
20410
    private TransactionServiceException ex;
20411
 
20412
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20413
    public enum _Fields implements TFieldIdEnum {
20414
      SUCCESS((short)0, "success"),
20415
      EX((short)1, "ex");
20416
 
20417
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20418
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20419
 
20420
      static {
20421
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20422
          byId.put((int)field._thriftId, field);
20423
          byName.put(field.getFieldName(), field);
20424
        }
20425
      }
20426
 
20427
      /**
20428
       * Find the _Fields constant that matches fieldId, or null if its not found.
20429
       */
20430
      public static _Fields findByThriftId(int fieldId) {
20431
        return byId.get(fieldId);
20432
      }
20433
 
20434
      /**
20435
       * Find the _Fields constant that matches fieldId, throwing an exception
20436
       * if it is not found.
20437
       */
20438
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20439
        _Fields fields = findByThriftId(fieldId);
20440
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20441
        return fields;
20442
      }
20443
 
20444
      /**
20445
       * Find the _Fields constant that matches name, or null if its not found.
20446
       */
20447
      public static _Fields findByName(String name) {
20448
        return byName.get(name);
20449
      }
20450
 
20451
      private final short _thriftId;
20452
      private final String _fieldName;
20453
 
20454
      _Fields(short thriftId, String fieldName) {
20455
        _thriftId = thriftId;
20456
        _fieldName = fieldName;
20457
      }
20458
 
20459
      public short getThriftFieldId() {
20460
        return _thriftId;
20461
      }
20462
 
20463
      public String getFieldName() {
20464
        return _fieldName;
20465
      }
20466
    }
20467
 
20468
    // isset id assignments
20469
    private static final int __SUCCESS_ISSET_ID = 0;
20470
    private BitSet __isset_bit_vector = new BitSet(1);
20471
 
20472
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20473
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20474
          new FieldValueMetaData(TType.BOOL)));
20475
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20476
          new FieldValueMetaData(TType.STRUCT)));
20477
    }});
20478
 
20479
    static {
20480
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
20481
    }
20482
 
20483
    public markOrderAsOutOfStock_result() {
20484
    }
20485
 
20486
    public markOrderAsOutOfStock_result(
20487
      boolean success,
20488
      TransactionServiceException ex)
20489
    {
20490
      this();
20491
      this.success = success;
20492
      setSuccessIsSet(true);
20493
      this.ex = ex;
20494
    }
20495
 
20496
    /**
20497
     * Performs a deep copy on <i>other</i>.
20498
     */
20499
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
20500
      __isset_bit_vector.clear();
20501
      __isset_bit_vector.or(other.__isset_bit_vector);
20502
      this.success = other.success;
20503
      if (other.isSetEx()) {
20504
        this.ex = new TransactionServiceException(other.ex);
20505
      }
20506
    }
20507
 
20508
    public markOrderAsOutOfStock_result deepCopy() {
20509
      return new markOrderAsOutOfStock_result(this);
20510
    }
20511
 
20512
    @Deprecated
20513
    public markOrderAsOutOfStock_result clone() {
20514
      return new markOrderAsOutOfStock_result(this);
20515
    }
20516
 
20517
    public boolean isSuccess() {
20518
      return this.success;
20519
    }
20520
 
20521
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
20522
      this.success = success;
20523
      setSuccessIsSet(true);
20524
      return this;
20525
    }
20526
 
20527
    public void unsetSuccess() {
20528
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20529
    }
20530
 
20531
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20532
    public boolean isSetSuccess() {
20533
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20534
    }
20535
 
20536
    public void setSuccessIsSet(boolean value) {
20537
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20538
    }
20539
 
20540
    public TransactionServiceException getEx() {
20541
      return this.ex;
20542
    }
20543
 
20544
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
20545
      this.ex = ex;
20546
      return this;
20547
    }
20548
 
20549
    public void unsetEx() {
20550
      this.ex = null;
20551
    }
20552
 
20553
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20554
    public boolean isSetEx() {
20555
      return this.ex != null;
20556
    }
20557
 
20558
    public void setExIsSet(boolean value) {
20559
      if (!value) {
20560
        this.ex = null;
20561
      }
20562
    }
20563
 
20564
    public void setFieldValue(_Fields field, Object value) {
20565
      switch (field) {
20566
      case SUCCESS:
20567
        if (value == null) {
20568
          unsetSuccess();
20569
        } else {
20570
          setSuccess((Boolean)value);
20571
        }
20572
        break;
20573
 
20574
      case EX:
20575
        if (value == null) {
20576
          unsetEx();
20577
        } else {
20578
          setEx((TransactionServiceException)value);
20579
        }
20580
        break;
20581
 
20582
      }
20583
    }
20584
 
20585
    public void setFieldValue(int fieldID, Object value) {
20586
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20587
    }
20588
 
20589
    public Object getFieldValue(_Fields field) {
20590
      switch (field) {
20591
      case SUCCESS:
20592
        return new Boolean(isSuccess());
20593
 
20594
      case EX:
20595
        return getEx();
20596
 
20597
      }
20598
      throw new IllegalStateException();
20599
    }
20600
 
20601
    public Object getFieldValue(int fieldId) {
20602
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20603
    }
20604
 
20605
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20606
    public boolean isSet(_Fields field) {
20607
      switch (field) {
20608
      case SUCCESS:
20609
        return isSetSuccess();
20610
      case EX:
20611
        return isSetEx();
20612
      }
20613
      throw new IllegalStateException();
20614
    }
20615
 
20616
    public boolean isSet(int fieldID) {
20617
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20618
    }
20619
 
20620
    @Override
20621
    public boolean equals(Object that) {
20622
      if (that == null)
20623
        return false;
20624
      if (that instanceof markOrderAsOutOfStock_result)
20625
        return this.equals((markOrderAsOutOfStock_result)that);
20626
      return false;
20627
    }
20628
 
20629
    public boolean equals(markOrderAsOutOfStock_result that) {
20630
      if (that == null)
20631
        return false;
20632
 
20633
      boolean this_present_success = true;
20634
      boolean that_present_success = true;
20635
      if (this_present_success || that_present_success) {
20636
        if (!(this_present_success && that_present_success))
20637
          return false;
20638
        if (this.success != that.success)
20639
          return false;
20640
      }
20641
 
20642
      boolean this_present_ex = true && this.isSetEx();
20643
      boolean that_present_ex = true && that.isSetEx();
20644
      if (this_present_ex || that_present_ex) {
20645
        if (!(this_present_ex && that_present_ex))
20646
          return false;
20647
        if (!this.ex.equals(that.ex))
20648
          return false;
20649
      }
20650
 
20651
      return true;
20652
    }
20653
 
20654
    @Override
20655
    public int hashCode() {
20656
      return 0;
20657
    }
20658
 
20659
    public int compareTo(markOrderAsOutOfStock_result other) {
20660
      if (!getClass().equals(other.getClass())) {
20661
        return getClass().getName().compareTo(other.getClass().getName());
20662
      }
20663
 
20664
      int lastComparison = 0;
20665
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
20666
 
20667
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20668
      if (lastComparison != 0) {
20669
        return lastComparison;
20670
      }
20671
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20672
      if (lastComparison != 0) {
20673
        return lastComparison;
20674
      }
20675
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20676
      if (lastComparison != 0) {
20677
        return lastComparison;
20678
      }
20679
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20680
      if (lastComparison != 0) {
20681
        return lastComparison;
20682
      }
20683
      return 0;
20684
    }
20685
 
20686
    public void read(TProtocol iprot) throws TException {
20687
      TField field;
20688
      iprot.readStructBegin();
20689
      while (true)
20690
      {
20691
        field = iprot.readFieldBegin();
20692
        if (field.type == TType.STOP) { 
20693
          break;
20694
        }
20695
        _Fields fieldId = _Fields.findByThriftId(field.id);
20696
        if (fieldId == null) {
20697
          TProtocolUtil.skip(iprot, field.type);
20698
        } else {
20699
          switch (fieldId) {
20700
            case SUCCESS:
20701
              if (field.type == TType.BOOL) {
20702
                this.success = iprot.readBool();
20703
                setSuccessIsSet(true);
20704
              } else { 
20705
                TProtocolUtil.skip(iprot, field.type);
20706
              }
20707
              break;
20708
            case EX:
20709
              if (field.type == TType.STRUCT) {
20710
                this.ex = new TransactionServiceException();
20711
                this.ex.read(iprot);
20712
              } else { 
20713
                TProtocolUtil.skip(iprot, field.type);
20714
              }
20715
              break;
20716
          }
20717
          iprot.readFieldEnd();
20718
        }
20719
      }
20720
      iprot.readStructEnd();
20721
      validate();
20722
    }
20723
 
20724
    public void write(TProtocol oprot) throws TException {
20725
      oprot.writeStructBegin(STRUCT_DESC);
20726
 
20727
      if (this.isSetSuccess()) {
20728
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20729
        oprot.writeBool(this.success);
20730
        oprot.writeFieldEnd();
20731
      } else if (this.isSetEx()) {
20732
        oprot.writeFieldBegin(EX_FIELD_DESC);
20733
        this.ex.write(oprot);
20734
        oprot.writeFieldEnd();
20735
      }
20736
      oprot.writeFieldStop();
20737
      oprot.writeStructEnd();
20738
    }
20739
 
20740
    @Override
20741
    public String toString() {
20742
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
20743
      boolean first = true;
20744
 
20745
      sb.append("success:");
20746
      sb.append(this.success);
20747
      first = false;
20748
      if (!first) sb.append(", ");
20749
      sb.append("ex:");
20750
      if (this.ex == null) {
20751
        sb.append("null");
20752
      } else {
20753
        sb.append(this.ex);
20754
      }
20755
      first = false;
20756
      sb.append(")");
20757
      return sb.toString();
20758
    }
20759
 
20760
    public void validate() throws TException {
20761
      // check for required fields
20762
    }
20763
 
20764
  }
20765
 
758 chandransh 20766
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
20767
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
20768
 
20769
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
20770
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
20771
 
20772
    private long warehouseId;
20773
    private long providerId;
20774
 
20775
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20776
    public enum _Fields implements TFieldIdEnum {
20777
      WAREHOUSE_ID((short)1, "warehouseId"),
20778
      PROVIDER_ID((short)2, "providerId");
20779
 
20780
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20781
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20782
 
20783
      static {
20784
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20785
          byId.put((int)field._thriftId, field);
20786
          byName.put(field.getFieldName(), field);
20787
        }
20788
      }
20789
 
20790
      /**
20791
       * Find the _Fields constant that matches fieldId, or null if its not found.
20792
       */
20793
      public static _Fields findByThriftId(int fieldId) {
20794
        return byId.get(fieldId);
20795
      }
20796
 
20797
      /**
20798
       * Find the _Fields constant that matches fieldId, throwing an exception
20799
       * if it is not found.
20800
       */
20801
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20802
        _Fields fields = findByThriftId(fieldId);
20803
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20804
        return fields;
20805
      }
20806
 
20807
      /**
20808
       * Find the _Fields constant that matches name, or null if its not found.
20809
       */
20810
      public static _Fields findByName(String name) {
20811
        return byName.get(name);
20812
      }
20813
 
20814
      private final short _thriftId;
20815
      private final String _fieldName;
20816
 
20817
      _Fields(short thriftId, String fieldName) {
20818
        _thriftId = thriftId;
20819
        _fieldName = fieldName;
20820
      }
20821
 
20822
      public short getThriftFieldId() {
20823
        return _thriftId;
20824
      }
20825
 
20826
      public String getFieldName() {
20827
        return _fieldName;
20828
      }
20829
    }
20830
 
20831
    // isset id assignments
20832
    private static final int __WAREHOUSEID_ISSET_ID = 0;
20833
    private static final int __PROVIDERID_ISSET_ID = 1;
20834
    private BitSet __isset_bit_vector = new BitSet(2);
20835
 
20836
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20837
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
20838
          new FieldValueMetaData(TType.I64)));
20839
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
20840
          new FieldValueMetaData(TType.I64)));
20841
    }});
20842
 
20843
    static {
20844
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
20845
    }
20846
 
20847
    public markOrdersAsManifested_args() {
20848
    }
20849
 
20850
    public markOrdersAsManifested_args(
20851
      long warehouseId,
20852
      long providerId)
20853
    {
20854
      this();
20855
      this.warehouseId = warehouseId;
20856
      setWarehouseIdIsSet(true);
20857
      this.providerId = providerId;
20858
      setProviderIdIsSet(true);
20859
    }
20860
 
20861
    /**
20862
     * Performs a deep copy on <i>other</i>.
20863
     */
20864
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
20865
      __isset_bit_vector.clear();
20866
      __isset_bit_vector.or(other.__isset_bit_vector);
20867
      this.warehouseId = other.warehouseId;
20868
      this.providerId = other.providerId;
20869
    }
20870
 
20871
    public markOrdersAsManifested_args deepCopy() {
20872
      return new markOrdersAsManifested_args(this);
20873
    }
20874
 
20875
    @Deprecated
20876
    public markOrdersAsManifested_args clone() {
20877
      return new markOrdersAsManifested_args(this);
20878
    }
20879
 
20880
    public long getWarehouseId() {
20881
      return this.warehouseId;
20882
    }
20883
 
20884
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
20885
      this.warehouseId = warehouseId;
20886
      setWarehouseIdIsSet(true);
20887
      return this;
20888
    }
20889
 
20890
    public void unsetWarehouseId() {
20891
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20892
    }
20893
 
20894
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
20895
    public boolean isSetWarehouseId() {
20896
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20897
    }
20898
 
20899
    public void setWarehouseIdIsSet(boolean value) {
20900
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20901
    }
20902
 
20903
    public long getProviderId() {
20904
      return this.providerId;
20905
    }
20906
 
20907
    public markOrdersAsManifested_args setProviderId(long providerId) {
20908
      this.providerId = providerId;
20909
      setProviderIdIsSet(true);
20910
      return this;
20911
    }
20912
 
20913
    public void unsetProviderId() {
20914
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
20915
    }
20916
 
20917
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
20918
    public boolean isSetProviderId() {
20919
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
20920
    }
20921
 
20922
    public void setProviderIdIsSet(boolean value) {
20923
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
20924
    }
20925
 
20926
    public void setFieldValue(_Fields field, Object value) {
20927
      switch (field) {
20928
      case WAREHOUSE_ID:
20929
        if (value == null) {
20930
          unsetWarehouseId();
20931
        } else {
20932
          setWarehouseId((Long)value);
20933
        }
20934
        break;
20935
 
20936
      case PROVIDER_ID:
20937
        if (value == null) {
20938
          unsetProviderId();
20939
        } else {
20940
          setProviderId((Long)value);
20941
        }
20942
        break;
20943
 
20944
      }
20945
    }
20946
 
20947
    public void setFieldValue(int fieldID, Object value) {
20948
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20949
    }
20950
 
20951
    public Object getFieldValue(_Fields field) {
20952
      switch (field) {
20953
      case WAREHOUSE_ID:
20954
        return new Long(getWarehouseId());
20955
 
20956
      case PROVIDER_ID:
20957
        return new Long(getProviderId());
20958
 
20959
      }
20960
      throw new IllegalStateException();
20961
    }
20962
 
20963
    public Object getFieldValue(int fieldId) {
20964
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20965
    }
20966
 
20967
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20968
    public boolean isSet(_Fields field) {
20969
      switch (field) {
20970
      case WAREHOUSE_ID:
20971
        return isSetWarehouseId();
20972
      case PROVIDER_ID:
20973
        return isSetProviderId();
20974
      }
20975
      throw new IllegalStateException();
20976
    }
20977
 
20978
    public boolean isSet(int fieldID) {
20979
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20980
    }
20981
 
20982
    @Override
20983
    public boolean equals(Object that) {
20984
      if (that == null)
20985
        return false;
20986
      if (that instanceof markOrdersAsManifested_args)
20987
        return this.equals((markOrdersAsManifested_args)that);
20988
      return false;
20989
    }
20990
 
20991
    public boolean equals(markOrdersAsManifested_args that) {
20992
      if (that == null)
20993
        return false;
20994
 
20995
      boolean this_present_warehouseId = true;
20996
      boolean that_present_warehouseId = true;
20997
      if (this_present_warehouseId || that_present_warehouseId) {
20998
        if (!(this_present_warehouseId && that_present_warehouseId))
20999
          return false;
21000
        if (this.warehouseId != that.warehouseId)
21001
          return false;
21002
      }
21003
 
21004
      boolean this_present_providerId = true;
21005
      boolean that_present_providerId = true;
21006
      if (this_present_providerId || that_present_providerId) {
21007
        if (!(this_present_providerId && that_present_providerId))
21008
          return false;
21009
        if (this.providerId != that.providerId)
21010
          return false;
21011
      }
21012
 
21013
      return true;
21014
    }
21015
 
21016
    @Override
21017
    public int hashCode() {
21018
      return 0;
21019
    }
21020
 
21021
    public int compareTo(markOrdersAsManifested_args other) {
21022
      if (!getClass().equals(other.getClass())) {
21023
        return getClass().getName().compareTo(other.getClass().getName());
21024
      }
21025
 
21026
      int lastComparison = 0;
21027
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
21028
 
21029
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
21030
      if (lastComparison != 0) {
21031
        return lastComparison;
21032
      }
21033
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
21034
      if (lastComparison != 0) {
21035
        return lastComparison;
21036
      }
21037
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
21038
      if (lastComparison != 0) {
21039
        return lastComparison;
21040
      }
21041
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
21042
      if (lastComparison != 0) {
21043
        return lastComparison;
21044
      }
21045
      return 0;
21046
    }
21047
 
21048
    public void read(TProtocol iprot) throws TException {
21049
      TField field;
21050
      iprot.readStructBegin();
21051
      while (true)
21052
      {
21053
        field = iprot.readFieldBegin();
21054
        if (field.type == TType.STOP) { 
21055
          break;
21056
        }
21057
        _Fields fieldId = _Fields.findByThriftId(field.id);
21058
        if (fieldId == null) {
21059
          TProtocolUtil.skip(iprot, field.type);
21060
        } else {
21061
          switch (fieldId) {
21062
            case WAREHOUSE_ID:
21063
              if (field.type == TType.I64) {
21064
                this.warehouseId = iprot.readI64();
21065
                setWarehouseIdIsSet(true);
21066
              } else { 
21067
                TProtocolUtil.skip(iprot, field.type);
21068
              }
21069
              break;
21070
            case PROVIDER_ID:
21071
              if (field.type == TType.I64) {
21072
                this.providerId = iprot.readI64();
21073
                setProviderIdIsSet(true);
21074
              } else { 
21075
                TProtocolUtil.skip(iprot, field.type);
21076
              }
21077
              break;
21078
          }
21079
          iprot.readFieldEnd();
21080
        }
21081
      }
21082
      iprot.readStructEnd();
21083
      validate();
21084
    }
21085
 
21086
    public void write(TProtocol oprot) throws TException {
21087
      validate();
21088
 
21089
      oprot.writeStructBegin(STRUCT_DESC);
21090
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21091
      oprot.writeI64(this.warehouseId);
21092
      oprot.writeFieldEnd();
21093
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21094
      oprot.writeI64(this.providerId);
21095
      oprot.writeFieldEnd();
21096
      oprot.writeFieldStop();
21097
      oprot.writeStructEnd();
21098
    }
21099
 
21100
    @Override
21101
    public String toString() {
21102
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
21103
      boolean first = true;
21104
 
21105
      sb.append("warehouseId:");
21106
      sb.append(this.warehouseId);
21107
      first = false;
21108
      if (!first) sb.append(", ");
21109
      sb.append("providerId:");
21110
      sb.append(this.providerId);
21111
      first = false;
21112
      sb.append(")");
21113
      return sb.toString();
21114
    }
21115
 
21116
    public void validate() throws TException {
21117
      // check for required fields
21118
    }
21119
 
21120
  }
21121
 
21122
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
21123
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
21124
 
21125
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21126
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21127
 
21128
    private boolean success;
21129
    private TransactionServiceException ex;
21130
 
21131
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21132
    public enum _Fields implements TFieldIdEnum {
21133
      SUCCESS((short)0, "success"),
21134
      EX((short)1, "ex");
21135
 
21136
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21137
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21138
 
21139
      static {
21140
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21141
          byId.put((int)field._thriftId, field);
21142
          byName.put(field.getFieldName(), field);
21143
        }
21144
      }
21145
 
21146
      /**
21147
       * Find the _Fields constant that matches fieldId, or null if its not found.
21148
       */
21149
      public static _Fields findByThriftId(int fieldId) {
21150
        return byId.get(fieldId);
21151
      }
21152
 
21153
      /**
21154
       * Find the _Fields constant that matches fieldId, throwing an exception
21155
       * if it is not found.
21156
       */
21157
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21158
        _Fields fields = findByThriftId(fieldId);
21159
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21160
        return fields;
21161
      }
21162
 
21163
      /**
21164
       * Find the _Fields constant that matches name, or null if its not found.
21165
       */
21166
      public static _Fields findByName(String name) {
21167
        return byName.get(name);
21168
      }
21169
 
21170
      private final short _thriftId;
21171
      private final String _fieldName;
21172
 
21173
      _Fields(short thriftId, String fieldName) {
21174
        _thriftId = thriftId;
21175
        _fieldName = fieldName;
21176
      }
21177
 
21178
      public short getThriftFieldId() {
21179
        return _thriftId;
21180
      }
21181
 
21182
      public String getFieldName() {
21183
        return _fieldName;
21184
      }
21185
    }
21186
 
21187
    // isset id assignments
21188
    private static final int __SUCCESS_ISSET_ID = 0;
21189
    private BitSet __isset_bit_vector = new BitSet(1);
21190
 
21191
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21192
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21193
          new FieldValueMetaData(TType.BOOL)));
21194
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21195
          new FieldValueMetaData(TType.STRUCT)));
21196
    }});
21197
 
21198
    static {
21199
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
21200
    }
21201
 
21202
    public markOrdersAsManifested_result() {
21203
    }
21204
 
21205
    public markOrdersAsManifested_result(
21206
      boolean success,
21207
      TransactionServiceException ex)
21208
    {
21209
      this();
21210
      this.success = success;
21211
      setSuccessIsSet(true);
21212
      this.ex = ex;
21213
    }
21214
 
21215
    /**
21216
     * Performs a deep copy on <i>other</i>.
21217
     */
21218
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
21219
      __isset_bit_vector.clear();
21220
      __isset_bit_vector.or(other.__isset_bit_vector);
21221
      this.success = other.success;
21222
      if (other.isSetEx()) {
21223
        this.ex = new TransactionServiceException(other.ex);
21224
      }
21225
    }
21226
 
21227
    public markOrdersAsManifested_result deepCopy() {
21228
      return new markOrdersAsManifested_result(this);
21229
    }
21230
 
21231
    @Deprecated
21232
    public markOrdersAsManifested_result clone() {
21233
      return new markOrdersAsManifested_result(this);
21234
    }
21235
 
21236
    public boolean isSuccess() {
21237
      return this.success;
21238
    }
21239
 
21240
    public markOrdersAsManifested_result setSuccess(boolean success) {
21241
      this.success = success;
21242
      setSuccessIsSet(true);
21243
      return this;
21244
    }
21245
 
21246
    public void unsetSuccess() {
21247
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21248
    }
21249
 
21250
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21251
    public boolean isSetSuccess() {
21252
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21253
    }
21254
 
21255
    public void setSuccessIsSet(boolean value) {
21256
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21257
    }
21258
 
21259
    public TransactionServiceException getEx() {
21260
      return this.ex;
21261
    }
21262
 
21263
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
21264
      this.ex = ex;
21265
      return this;
21266
    }
21267
 
21268
    public void unsetEx() {
21269
      this.ex = null;
21270
    }
21271
 
21272
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21273
    public boolean isSetEx() {
21274
      return this.ex != null;
21275
    }
21276
 
21277
    public void setExIsSet(boolean value) {
21278
      if (!value) {
21279
        this.ex = null;
21280
      }
21281
    }
21282
 
21283
    public void setFieldValue(_Fields field, Object value) {
21284
      switch (field) {
21285
      case SUCCESS:
21286
        if (value == null) {
21287
          unsetSuccess();
21288
        } else {
21289
          setSuccess((Boolean)value);
21290
        }
21291
        break;
21292
 
21293
      case EX:
21294
        if (value == null) {
21295
          unsetEx();
21296
        } else {
21297
          setEx((TransactionServiceException)value);
21298
        }
21299
        break;
21300
 
21301
      }
21302
    }
21303
 
21304
    public void setFieldValue(int fieldID, Object value) {
21305
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21306
    }
21307
 
21308
    public Object getFieldValue(_Fields field) {
21309
      switch (field) {
21310
      case SUCCESS:
21311
        return new Boolean(isSuccess());
21312
 
21313
      case EX:
21314
        return getEx();
21315
 
21316
      }
21317
      throw new IllegalStateException();
21318
    }
21319
 
21320
    public Object getFieldValue(int fieldId) {
21321
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21322
    }
21323
 
21324
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21325
    public boolean isSet(_Fields field) {
21326
      switch (field) {
21327
      case SUCCESS:
21328
        return isSetSuccess();
21329
      case EX:
21330
        return isSetEx();
21331
      }
21332
      throw new IllegalStateException();
21333
    }
21334
 
21335
    public boolean isSet(int fieldID) {
21336
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21337
    }
21338
 
21339
    @Override
21340
    public boolean equals(Object that) {
21341
      if (that == null)
21342
        return false;
21343
      if (that instanceof markOrdersAsManifested_result)
21344
        return this.equals((markOrdersAsManifested_result)that);
21345
      return false;
21346
    }
21347
 
21348
    public boolean equals(markOrdersAsManifested_result that) {
21349
      if (that == null)
21350
        return false;
21351
 
21352
      boolean this_present_success = true;
21353
      boolean that_present_success = true;
21354
      if (this_present_success || that_present_success) {
21355
        if (!(this_present_success && that_present_success))
21356
          return false;
21357
        if (this.success != that.success)
21358
          return false;
21359
      }
21360
 
21361
      boolean this_present_ex = true && this.isSetEx();
21362
      boolean that_present_ex = true && that.isSetEx();
21363
      if (this_present_ex || that_present_ex) {
21364
        if (!(this_present_ex && that_present_ex))
21365
          return false;
21366
        if (!this.ex.equals(that.ex))
21367
          return false;
21368
      }
21369
 
21370
      return true;
21371
    }
21372
 
21373
    @Override
21374
    public int hashCode() {
21375
      return 0;
21376
    }
21377
 
21378
    public int compareTo(markOrdersAsManifested_result other) {
21379
      if (!getClass().equals(other.getClass())) {
21380
        return getClass().getName().compareTo(other.getClass().getName());
21381
      }
21382
 
21383
      int lastComparison = 0;
21384
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
21385
 
21386
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21387
      if (lastComparison != 0) {
21388
        return lastComparison;
21389
      }
21390
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21391
      if (lastComparison != 0) {
21392
        return lastComparison;
21393
      }
21394
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21395
      if (lastComparison != 0) {
21396
        return lastComparison;
21397
      }
21398
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21399
      if (lastComparison != 0) {
21400
        return lastComparison;
21401
      }
21402
      return 0;
21403
    }
21404
 
21405
    public void read(TProtocol iprot) throws TException {
21406
      TField field;
21407
      iprot.readStructBegin();
21408
      while (true)
21409
      {
21410
        field = iprot.readFieldBegin();
21411
        if (field.type == TType.STOP) { 
21412
          break;
21413
        }
21414
        _Fields fieldId = _Fields.findByThriftId(field.id);
21415
        if (fieldId == null) {
21416
          TProtocolUtil.skip(iprot, field.type);
21417
        } else {
21418
          switch (fieldId) {
21419
            case SUCCESS:
21420
              if (field.type == TType.BOOL) {
21421
                this.success = iprot.readBool();
21422
                setSuccessIsSet(true);
21423
              } else { 
21424
                TProtocolUtil.skip(iprot, field.type);
21425
              }
21426
              break;
21427
            case EX:
21428
              if (field.type == TType.STRUCT) {
21429
                this.ex = new TransactionServiceException();
21430
                this.ex.read(iprot);
21431
              } else { 
21432
                TProtocolUtil.skip(iprot, field.type);
21433
              }
21434
              break;
21435
          }
21436
          iprot.readFieldEnd();
21437
        }
21438
      }
21439
      iprot.readStructEnd();
21440
      validate();
21441
    }
21442
 
21443
    public void write(TProtocol oprot) throws TException {
21444
      oprot.writeStructBegin(STRUCT_DESC);
21445
 
21446
      if (this.isSetSuccess()) {
21447
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21448
        oprot.writeBool(this.success);
21449
        oprot.writeFieldEnd();
21450
      } else if (this.isSetEx()) {
21451
        oprot.writeFieldBegin(EX_FIELD_DESC);
21452
        this.ex.write(oprot);
21453
        oprot.writeFieldEnd();
21454
      }
21455
      oprot.writeFieldStop();
21456
      oprot.writeStructEnd();
21457
    }
21458
 
21459
    @Override
21460
    public String toString() {
21461
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
21462
      boolean first = true;
21463
 
21464
      sb.append("success:");
21465
      sb.append(this.success);
21466
      first = false;
21467
      if (!first) sb.append(", ");
21468
      sb.append("ex:");
21469
      if (this.ex == null) {
21470
        sb.append("null");
21471
      } else {
21472
        sb.append(this.ex);
21473
      }
21474
      first = false;
21475
      sb.append(")");
21476
      return sb.toString();
21477
    }
21478
 
21479
    public void validate() throws TException {
21480
      // check for required fields
21481
    }
21482
 
21483
  }
21484
 
1114 chandransh 21485
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
21486
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
21487
 
21488
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21489
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
21490
 
21491
    private long providerId;
1245 chandransh 21492
    private Map<String,String> pickupDetails;
1114 chandransh 21493
 
21494
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21495
    public enum _Fields implements TFieldIdEnum {
21496
      PROVIDER_ID((short)1, "providerId"),
21497
      PICKUP_DETAILS((short)2, "pickupDetails");
21498
 
21499
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21500
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21501
 
21502
      static {
21503
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21504
          byId.put((int)field._thriftId, field);
21505
          byName.put(field.getFieldName(), field);
21506
        }
21507
      }
21508
 
21509
      /**
21510
       * Find the _Fields constant that matches fieldId, or null if its not found.
21511
       */
21512
      public static _Fields findByThriftId(int fieldId) {
21513
        return byId.get(fieldId);
21514
      }
21515
 
21516
      /**
21517
       * Find the _Fields constant that matches fieldId, throwing an exception
21518
       * if it is not found.
21519
       */
21520
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21521
        _Fields fields = findByThriftId(fieldId);
21522
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21523
        return fields;
21524
      }
21525
 
21526
      /**
21527
       * Find the _Fields constant that matches name, or null if its not found.
21528
       */
21529
      public static _Fields findByName(String name) {
21530
        return byName.get(name);
21531
      }
21532
 
21533
      private final short _thriftId;
21534
      private final String _fieldName;
21535
 
21536
      _Fields(short thriftId, String fieldName) {
21537
        _thriftId = thriftId;
21538
        _fieldName = fieldName;
21539
      }
21540
 
21541
      public short getThriftFieldId() {
21542
        return _thriftId;
21543
      }
21544
 
21545
      public String getFieldName() {
21546
        return _fieldName;
21547
      }
21548
    }
21549
 
21550
    // isset id assignments
21551
    private static final int __PROVIDERID_ISSET_ID = 0;
21552
    private BitSet __isset_bit_vector = new BitSet(1);
21553
 
21554
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21555
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21556
          new FieldValueMetaData(TType.I64)));
21557
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
21558
          new MapMetaData(TType.MAP, 
21559
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 21560
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 21561
    }});
21562
 
21563
    static {
21564
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
21565
    }
21566
 
21567
    public markOrdersAsPickedUp_args() {
21568
    }
21569
 
21570
    public markOrdersAsPickedUp_args(
21571
      long providerId,
1245 chandransh 21572
      Map<String,String> pickupDetails)
1114 chandransh 21573
    {
21574
      this();
21575
      this.providerId = providerId;
21576
      setProviderIdIsSet(true);
21577
      this.pickupDetails = pickupDetails;
21578
    }
21579
 
21580
    /**
21581
     * Performs a deep copy on <i>other</i>.
21582
     */
21583
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
21584
      __isset_bit_vector.clear();
21585
      __isset_bit_vector.or(other.__isset_bit_vector);
21586
      this.providerId = other.providerId;
21587
      if (other.isSetPickupDetails()) {
1245 chandransh 21588
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
21589
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 21590
 
21591
          String other_element_key = other_element.getKey();
1245 chandransh 21592
          String other_element_value = other_element.getValue();
1114 chandransh 21593
 
21594
          String __this__pickupDetails_copy_key = other_element_key;
21595
 
1245 chandransh 21596
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 21597
 
21598
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
21599
        }
21600
        this.pickupDetails = __this__pickupDetails;
21601
      }
21602
    }
21603
 
21604
    public markOrdersAsPickedUp_args deepCopy() {
21605
      return new markOrdersAsPickedUp_args(this);
21606
    }
21607
 
21608
    @Deprecated
21609
    public markOrdersAsPickedUp_args clone() {
21610
      return new markOrdersAsPickedUp_args(this);
21611
    }
21612
 
21613
    public long getProviderId() {
21614
      return this.providerId;
21615
    }
21616
 
21617
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
21618
      this.providerId = providerId;
21619
      setProviderIdIsSet(true);
21620
      return this;
21621
    }
21622
 
21623
    public void unsetProviderId() {
21624
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21625
    }
21626
 
21627
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21628
    public boolean isSetProviderId() {
21629
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21630
    }
21631
 
21632
    public void setProviderIdIsSet(boolean value) {
21633
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21634
    }
21635
 
21636
    public int getPickupDetailsSize() {
21637
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
21638
    }
21639
 
1245 chandransh 21640
    public void putToPickupDetails(String key, String val) {
1114 chandransh 21641
      if (this.pickupDetails == null) {
1245 chandransh 21642
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 21643
      }
21644
      this.pickupDetails.put(key, val);
21645
    }
21646
 
1245 chandransh 21647
    public Map<String,String> getPickupDetails() {
1114 chandransh 21648
      return this.pickupDetails;
21649
    }
21650
 
1245 chandransh 21651
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 21652
      this.pickupDetails = pickupDetails;
21653
      return this;
21654
    }
21655
 
21656
    public void unsetPickupDetails() {
21657
      this.pickupDetails = null;
21658
    }
21659
 
21660
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
21661
    public boolean isSetPickupDetails() {
21662
      return this.pickupDetails != null;
21663
    }
21664
 
21665
    public void setPickupDetailsIsSet(boolean value) {
21666
      if (!value) {
21667
        this.pickupDetails = null;
21668
      }
21669
    }
21670
 
21671
    public void setFieldValue(_Fields field, Object value) {
21672
      switch (field) {
21673
      case PROVIDER_ID:
21674
        if (value == null) {
21675
          unsetProviderId();
21676
        } else {
21677
          setProviderId((Long)value);
21678
        }
21679
        break;
21680
 
21681
      case PICKUP_DETAILS:
21682
        if (value == null) {
21683
          unsetPickupDetails();
21684
        } else {
1245 chandransh 21685
          setPickupDetails((Map<String,String>)value);
1114 chandransh 21686
        }
21687
        break;
21688
 
21689
      }
21690
    }
21691
 
21692
    public void setFieldValue(int fieldID, Object value) {
21693
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21694
    }
21695
 
21696
    public Object getFieldValue(_Fields field) {
21697
      switch (field) {
21698
      case PROVIDER_ID:
21699
        return new Long(getProviderId());
21700
 
21701
      case PICKUP_DETAILS:
21702
        return getPickupDetails();
21703
 
21704
      }
21705
      throw new IllegalStateException();
21706
    }
21707
 
21708
    public Object getFieldValue(int fieldId) {
21709
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21710
    }
21711
 
21712
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21713
    public boolean isSet(_Fields field) {
21714
      switch (field) {
21715
      case PROVIDER_ID:
21716
        return isSetProviderId();
21717
      case PICKUP_DETAILS:
21718
        return isSetPickupDetails();
21719
      }
21720
      throw new IllegalStateException();
21721
    }
21722
 
21723
    public boolean isSet(int fieldID) {
21724
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21725
    }
21726
 
21727
    @Override
21728
    public boolean equals(Object that) {
21729
      if (that == null)
21730
        return false;
21731
      if (that instanceof markOrdersAsPickedUp_args)
21732
        return this.equals((markOrdersAsPickedUp_args)that);
21733
      return false;
21734
    }
21735
 
21736
    public boolean equals(markOrdersAsPickedUp_args that) {
21737
      if (that == null)
21738
        return false;
21739
 
21740
      boolean this_present_providerId = true;
21741
      boolean that_present_providerId = true;
21742
      if (this_present_providerId || that_present_providerId) {
21743
        if (!(this_present_providerId && that_present_providerId))
21744
          return false;
21745
        if (this.providerId != that.providerId)
21746
          return false;
21747
      }
21748
 
21749
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
21750
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
21751
      if (this_present_pickupDetails || that_present_pickupDetails) {
21752
        if (!(this_present_pickupDetails && that_present_pickupDetails))
21753
          return false;
21754
        if (!this.pickupDetails.equals(that.pickupDetails))
21755
          return false;
21756
      }
21757
 
21758
      return true;
21759
    }
21760
 
21761
    @Override
21762
    public int hashCode() {
21763
      return 0;
21764
    }
21765
 
21766
    public void read(TProtocol iprot) throws TException {
21767
      TField field;
21768
      iprot.readStructBegin();
21769
      while (true)
21770
      {
21771
        field = iprot.readFieldBegin();
21772
        if (field.type == TType.STOP) { 
21773
          break;
21774
        }
21775
        _Fields fieldId = _Fields.findByThriftId(field.id);
21776
        if (fieldId == null) {
21777
          TProtocolUtil.skip(iprot, field.type);
21778
        } else {
21779
          switch (fieldId) {
21780
            case PROVIDER_ID:
21781
              if (field.type == TType.I64) {
21782
                this.providerId = iprot.readI64();
21783
                setProviderIdIsSet(true);
21784
              } else { 
21785
                TProtocolUtil.skip(iprot, field.type);
21786
              }
21787
              break;
21788
            case PICKUP_DETAILS:
21789
              if (field.type == TType.MAP) {
21790
                {
1382 varun.gupt 21791
                  TMap _map48 = iprot.readMapBegin();
21792
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
21793
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 21794
                  {
1382 varun.gupt 21795
                    String _key50;
21796
                    String _val51;
21797
                    _key50 = iprot.readString();
21798
                    _val51 = iprot.readString();
21799
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 21800
                  }
21801
                  iprot.readMapEnd();
21802
                }
21803
              } else { 
21804
                TProtocolUtil.skip(iprot, field.type);
21805
              }
21806
              break;
21807
          }
21808
          iprot.readFieldEnd();
21809
        }
21810
      }
21811
      iprot.readStructEnd();
21812
      validate();
21813
    }
21814
 
21815
    public void write(TProtocol oprot) throws TException {
21816
      validate();
21817
 
21818
      oprot.writeStructBegin(STRUCT_DESC);
21819
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21820
      oprot.writeI64(this.providerId);
21821
      oprot.writeFieldEnd();
21822
      if (this.pickupDetails != null) {
21823
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
21824
        {
1245 chandransh 21825
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 21826
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 21827
          {
1382 varun.gupt 21828
            oprot.writeString(_iter52.getKey());
21829
            oprot.writeString(_iter52.getValue());
1114 chandransh 21830
          }
21831
          oprot.writeMapEnd();
21832
        }
21833
        oprot.writeFieldEnd();
21834
      }
21835
      oprot.writeFieldStop();
21836
      oprot.writeStructEnd();
21837
    }
21838
 
21839
    @Override
21840
    public String toString() {
21841
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
21842
      boolean first = true;
21843
 
21844
      sb.append("providerId:");
21845
      sb.append(this.providerId);
21846
      first = false;
21847
      if (!first) sb.append(", ");
21848
      sb.append("pickupDetails:");
21849
      if (this.pickupDetails == null) {
21850
        sb.append("null");
21851
      } else {
21852
        sb.append(this.pickupDetails);
21853
      }
21854
      first = false;
21855
      sb.append(")");
21856
      return sb.toString();
21857
    }
21858
 
21859
    public void validate() throws TException {
21860
      // check for required fields
21861
    }
21862
 
21863
  }
21864
 
21865
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
21866
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
21867
 
21868
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
21869
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21870
 
21871
    private List<Order> success;
21872
    private TransactionServiceException ex;
21873
 
21874
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21875
    public enum _Fields implements TFieldIdEnum {
21876
      SUCCESS((short)0, "success"),
21877
      EX((short)1, "ex");
21878
 
21879
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21880
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21881
 
21882
      static {
21883
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21884
          byId.put((int)field._thriftId, field);
21885
          byName.put(field.getFieldName(), field);
21886
        }
21887
      }
21888
 
21889
      /**
21890
       * Find the _Fields constant that matches fieldId, or null if its not found.
21891
       */
21892
      public static _Fields findByThriftId(int fieldId) {
21893
        return byId.get(fieldId);
21894
      }
21895
 
21896
      /**
21897
       * Find the _Fields constant that matches fieldId, throwing an exception
21898
       * if it is not found.
21899
       */
21900
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21901
        _Fields fields = findByThriftId(fieldId);
21902
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21903
        return fields;
21904
      }
21905
 
21906
      /**
21907
       * Find the _Fields constant that matches name, or null if its not found.
21908
       */
21909
      public static _Fields findByName(String name) {
21910
        return byName.get(name);
21911
      }
21912
 
21913
      private final short _thriftId;
21914
      private final String _fieldName;
21915
 
21916
      _Fields(short thriftId, String fieldName) {
21917
        _thriftId = thriftId;
21918
        _fieldName = fieldName;
21919
      }
21920
 
21921
      public short getThriftFieldId() {
21922
        return _thriftId;
21923
      }
21924
 
21925
      public String getFieldName() {
21926
        return _fieldName;
21927
      }
21928
    }
21929
 
21930
    // isset id assignments
21931
 
21932
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21933
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21934
          new ListMetaData(TType.LIST, 
21935
              new StructMetaData(TType.STRUCT, Order.class))));
21936
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21937
          new FieldValueMetaData(TType.STRUCT)));
21938
    }});
21939
 
21940
    static {
21941
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
21942
    }
21943
 
21944
    public markOrdersAsPickedUp_result() {
21945
    }
21946
 
21947
    public markOrdersAsPickedUp_result(
21948
      List<Order> success,
21949
      TransactionServiceException ex)
21950
    {
21951
      this();
21952
      this.success = success;
21953
      this.ex = ex;
21954
    }
21955
 
21956
    /**
21957
     * Performs a deep copy on <i>other</i>.
21958
     */
21959
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
21960
      if (other.isSetSuccess()) {
21961
        List<Order> __this__success = new ArrayList<Order>();
21962
        for (Order other_element : other.success) {
21963
          __this__success.add(new Order(other_element));
21964
        }
21965
        this.success = __this__success;
21966
      }
21967
      if (other.isSetEx()) {
21968
        this.ex = new TransactionServiceException(other.ex);
21969
      }
21970
    }
21971
 
21972
    public markOrdersAsPickedUp_result deepCopy() {
21973
      return new markOrdersAsPickedUp_result(this);
21974
    }
21975
 
21976
    @Deprecated
21977
    public markOrdersAsPickedUp_result clone() {
21978
      return new markOrdersAsPickedUp_result(this);
21979
    }
21980
 
21981
    public int getSuccessSize() {
21982
      return (this.success == null) ? 0 : this.success.size();
21983
    }
21984
 
21985
    public java.util.Iterator<Order> getSuccessIterator() {
21986
      return (this.success == null) ? null : this.success.iterator();
21987
    }
21988
 
21989
    public void addToSuccess(Order elem) {
21990
      if (this.success == null) {
21991
        this.success = new ArrayList<Order>();
21992
      }
21993
      this.success.add(elem);
21994
    }
21995
 
21996
    public List<Order> getSuccess() {
21997
      return this.success;
21998
    }
21999
 
22000
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
22001
      this.success = success;
22002
      return this;
22003
    }
22004
 
22005
    public void unsetSuccess() {
22006
      this.success = null;
22007
    }
22008
 
22009
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22010
    public boolean isSetSuccess() {
22011
      return this.success != null;
22012
    }
22013
 
22014
    public void setSuccessIsSet(boolean value) {
22015
      if (!value) {
22016
        this.success = null;
22017
      }
22018
    }
22019
 
22020
    public TransactionServiceException getEx() {
22021
      return this.ex;
22022
    }
22023
 
22024
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
22025
      this.ex = ex;
22026
      return this;
22027
    }
22028
 
22029
    public void unsetEx() {
22030
      this.ex = null;
22031
    }
22032
 
22033
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22034
    public boolean isSetEx() {
22035
      return this.ex != null;
22036
    }
22037
 
22038
    public void setExIsSet(boolean value) {
22039
      if (!value) {
22040
        this.ex = null;
22041
      }
22042
    }
22043
 
22044
    public void setFieldValue(_Fields field, Object value) {
22045
      switch (field) {
22046
      case SUCCESS:
22047
        if (value == null) {
22048
          unsetSuccess();
22049
        } else {
22050
          setSuccess((List<Order>)value);
22051
        }
22052
        break;
22053
 
22054
      case EX:
22055
        if (value == null) {
22056
          unsetEx();
22057
        } else {
22058
          setEx((TransactionServiceException)value);
22059
        }
22060
        break;
22061
 
22062
      }
22063
    }
22064
 
22065
    public void setFieldValue(int fieldID, Object value) {
22066
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22067
    }
22068
 
22069
    public Object getFieldValue(_Fields field) {
22070
      switch (field) {
22071
      case SUCCESS:
22072
        return getSuccess();
22073
 
22074
      case EX:
22075
        return getEx();
22076
 
22077
      }
22078
      throw new IllegalStateException();
22079
    }
22080
 
22081
    public Object getFieldValue(int fieldId) {
22082
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22083
    }
22084
 
22085
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22086
    public boolean isSet(_Fields field) {
22087
      switch (field) {
22088
      case SUCCESS:
22089
        return isSetSuccess();
22090
      case EX:
22091
        return isSetEx();
22092
      }
22093
      throw new IllegalStateException();
22094
    }
22095
 
22096
    public boolean isSet(int fieldID) {
22097
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22098
    }
22099
 
22100
    @Override
22101
    public boolean equals(Object that) {
22102
      if (that == null)
22103
        return false;
22104
      if (that instanceof markOrdersAsPickedUp_result)
22105
        return this.equals((markOrdersAsPickedUp_result)that);
22106
      return false;
22107
    }
22108
 
22109
    public boolean equals(markOrdersAsPickedUp_result that) {
22110
      if (that == null)
22111
        return false;
22112
 
22113
      boolean this_present_success = true && this.isSetSuccess();
22114
      boolean that_present_success = true && that.isSetSuccess();
22115
      if (this_present_success || that_present_success) {
22116
        if (!(this_present_success && that_present_success))
22117
          return false;
22118
        if (!this.success.equals(that.success))
22119
          return false;
22120
      }
22121
 
22122
      boolean this_present_ex = true && this.isSetEx();
22123
      boolean that_present_ex = true && that.isSetEx();
22124
      if (this_present_ex || that_present_ex) {
22125
        if (!(this_present_ex && that_present_ex))
22126
          return false;
22127
        if (!this.ex.equals(that.ex))
22128
          return false;
22129
      }
22130
 
22131
      return true;
22132
    }
22133
 
22134
    @Override
22135
    public int hashCode() {
22136
      return 0;
22137
    }
22138
 
22139
    public int compareTo(markOrdersAsPickedUp_result other) {
22140
      if (!getClass().equals(other.getClass())) {
22141
        return getClass().getName().compareTo(other.getClass().getName());
22142
      }
22143
 
22144
      int lastComparison = 0;
22145
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
22146
 
22147
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22148
      if (lastComparison != 0) {
22149
        return lastComparison;
22150
      }
22151
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22152
      if (lastComparison != 0) {
22153
        return lastComparison;
22154
      }
22155
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22156
      if (lastComparison != 0) {
22157
        return lastComparison;
22158
      }
22159
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22160
      if (lastComparison != 0) {
22161
        return lastComparison;
22162
      }
22163
      return 0;
22164
    }
22165
 
22166
    public void read(TProtocol iprot) throws TException {
22167
      TField field;
22168
      iprot.readStructBegin();
22169
      while (true)
22170
      {
22171
        field = iprot.readFieldBegin();
22172
        if (field.type == TType.STOP) { 
22173
          break;
22174
        }
22175
        _Fields fieldId = _Fields.findByThriftId(field.id);
22176
        if (fieldId == null) {
22177
          TProtocolUtil.skip(iprot, field.type);
22178
        } else {
22179
          switch (fieldId) {
22180
            case SUCCESS:
22181
              if (field.type == TType.LIST) {
22182
                {
1382 varun.gupt 22183
                  TList _list53 = iprot.readListBegin();
22184
                  this.success = new ArrayList<Order>(_list53.size);
22185
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 22186
                  {
1382 varun.gupt 22187
                    Order _elem55;
22188
                    _elem55 = new Order();
22189
                    _elem55.read(iprot);
22190
                    this.success.add(_elem55);
1114 chandransh 22191
                  }
22192
                  iprot.readListEnd();
22193
                }
22194
              } else { 
22195
                TProtocolUtil.skip(iprot, field.type);
22196
              }
22197
              break;
22198
            case EX:
22199
              if (field.type == TType.STRUCT) {
22200
                this.ex = new TransactionServiceException();
22201
                this.ex.read(iprot);
22202
              } else { 
22203
                TProtocolUtil.skip(iprot, field.type);
22204
              }
22205
              break;
22206
          }
22207
          iprot.readFieldEnd();
22208
        }
22209
      }
22210
      iprot.readStructEnd();
22211
      validate();
22212
    }
22213
 
22214
    public void write(TProtocol oprot) throws TException {
22215
      oprot.writeStructBegin(STRUCT_DESC);
22216
 
22217
      if (this.isSetSuccess()) {
22218
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22219
        {
22220
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 22221
          for (Order _iter56 : this.success)
1114 chandransh 22222
          {
1382 varun.gupt 22223
            _iter56.write(oprot);
1114 chandransh 22224
          }
22225
          oprot.writeListEnd();
22226
        }
22227
        oprot.writeFieldEnd();
22228
      } else if (this.isSetEx()) {
22229
        oprot.writeFieldBegin(EX_FIELD_DESC);
22230
        this.ex.write(oprot);
22231
        oprot.writeFieldEnd();
22232
      }
22233
      oprot.writeFieldStop();
22234
      oprot.writeStructEnd();
22235
    }
22236
 
22237
    @Override
22238
    public String toString() {
22239
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
22240
      boolean first = true;
22241
 
22242
      sb.append("success:");
22243
      if (this.success == null) {
22244
        sb.append("null");
22245
      } else {
22246
        sb.append(this.success);
22247
      }
22248
      first = false;
22249
      if (!first) sb.append(", ");
22250
      sb.append("ex:");
22251
      if (this.ex == null) {
22252
        sb.append("null");
22253
      } else {
22254
        sb.append(this.ex);
22255
      }
22256
      first = false;
22257
      sb.append(")");
22258
      return sb.toString();
22259
    }
22260
 
22261
    public void validate() throws TException {
22262
      // check for required fields
22263
    }
22264
 
22265
  }
22266
 
1133 chandransh 22267
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
22268
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
22269
 
22270
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22271
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
22272
 
22273
    private long providerId;
22274
    private Map<String,String> deliveredOrders;
22275
 
22276
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22277
    public enum _Fields implements TFieldIdEnum {
22278
      PROVIDER_ID((short)1, "providerId"),
22279
      DELIVERED_ORDERS((short)2, "deliveredOrders");
22280
 
22281
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22282
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22283
 
22284
      static {
22285
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22286
          byId.put((int)field._thriftId, field);
22287
          byName.put(field.getFieldName(), field);
22288
        }
22289
      }
22290
 
22291
      /**
22292
       * Find the _Fields constant that matches fieldId, or null if its not found.
22293
       */
22294
      public static _Fields findByThriftId(int fieldId) {
22295
        return byId.get(fieldId);
22296
      }
22297
 
22298
      /**
22299
       * Find the _Fields constant that matches fieldId, throwing an exception
22300
       * if it is not found.
22301
       */
22302
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22303
        _Fields fields = findByThriftId(fieldId);
22304
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22305
        return fields;
22306
      }
22307
 
22308
      /**
22309
       * Find the _Fields constant that matches name, or null if its not found.
22310
       */
22311
      public static _Fields findByName(String name) {
22312
        return byName.get(name);
22313
      }
22314
 
22315
      private final short _thriftId;
22316
      private final String _fieldName;
22317
 
22318
      _Fields(short thriftId, String fieldName) {
22319
        _thriftId = thriftId;
22320
        _fieldName = fieldName;
22321
      }
22322
 
22323
      public short getThriftFieldId() {
22324
        return _thriftId;
22325
      }
22326
 
22327
      public String getFieldName() {
22328
        return _fieldName;
22329
      }
22330
    }
22331
 
22332
    // isset id assignments
22333
    private static final int __PROVIDERID_ISSET_ID = 0;
22334
    private BitSet __isset_bit_vector = new BitSet(1);
22335
 
22336
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22337
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22338
          new FieldValueMetaData(TType.I64)));
22339
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
22340
          new MapMetaData(TType.MAP, 
22341
              new FieldValueMetaData(TType.STRING), 
22342
              new FieldValueMetaData(TType.STRING))));
22343
    }});
22344
 
22345
    static {
22346
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
22347
    }
22348
 
22349
    public markOrdersAsDelivered_args() {
22350
    }
22351
 
22352
    public markOrdersAsDelivered_args(
22353
      long providerId,
22354
      Map<String,String> deliveredOrders)
22355
    {
22356
      this();
22357
      this.providerId = providerId;
22358
      setProviderIdIsSet(true);
22359
      this.deliveredOrders = deliveredOrders;
22360
    }
22361
 
22362
    /**
22363
     * Performs a deep copy on <i>other</i>.
22364
     */
22365
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
22366
      __isset_bit_vector.clear();
22367
      __isset_bit_vector.or(other.__isset_bit_vector);
22368
      this.providerId = other.providerId;
22369
      if (other.isSetDeliveredOrders()) {
22370
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
22371
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
22372
 
22373
          String other_element_key = other_element.getKey();
22374
          String other_element_value = other_element.getValue();
22375
 
22376
          String __this__deliveredOrders_copy_key = other_element_key;
22377
 
22378
          String __this__deliveredOrders_copy_value = other_element_value;
22379
 
22380
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
22381
        }
22382
        this.deliveredOrders = __this__deliveredOrders;
22383
      }
22384
    }
22385
 
22386
    public markOrdersAsDelivered_args deepCopy() {
22387
      return new markOrdersAsDelivered_args(this);
22388
    }
22389
 
22390
    @Deprecated
22391
    public markOrdersAsDelivered_args clone() {
22392
      return new markOrdersAsDelivered_args(this);
22393
    }
22394
 
22395
    public long getProviderId() {
22396
      return this.providerId;
22397
    }
22398
 
22399
    public markOrdersAsDelivered_args setProviderId(long providerId) {
22400
      this.providerId = providerId;
22401
      setProviderIdIsSet(true);
22402
      return this;
22403
    }
22404
 
22405
    public void unsetProviderId() {
22406
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22407
    }
22408
 
22409
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22410
    public boolean isSetProviderId() {
22411
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22412
    }
22413
 
22414
    public void setProviderIdIsSet(boolean value) {
22415
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22416
    }
22417
 
22418
    public int getDeliveredOrdersSize() {
22419
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
22420
    }
22421
 
22422
    public void putToDeliveredOrders(String key, String val) {
22423
      if (this.deliveredOrders == null) {
22424
        this.deliveredOrders = new HashMap<String,String>();
22425
      }
22426
      this.deliveredOrders.put(key, val);
22427
    }
22428
 
22429
    public Map<String,String> getDeliveredOrders() {
22430
      return this.deliveredOrders;
22431
    }
22432
 
22433
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
22434
      this.deliveredOrders = deliveredOrders;
22435
      return this;
22436
    }
22437
 
22438
    public void unsetDeliveredOrders() {
22439
      this.deliveredOrders = null;
22440
    }
22441
 
22442
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
22443
    public boolean isSetDeliveredOrders() {
22444
      return this.deliveredOrders != null;
22445
    }
22446
 
22447
    public void setDeliveredOrdersIsSet(boolean value) {
22448
      if (!value) {
22449
        this.deliveredOrders = null;
22450
      }
22451
    }
22452
 
22453
    public void setFieldValue(_Fields field, Object value) {
22454
      switch (field) {
22455
      case PROVIDER_ID:
22456
        if (value == null) {
22457
          unsetProviderId();
22458
        } else {
22459
          setProviderId((Long)value);
22460
        }
22461
        break;
22462
 
22463
      case DELIVERED_ORDERS:
22464
        if (value == null) {
22465
          unsetDeliveredOrders();
22466
        } else {
22467
          setDeliveredOrders((Map<String,String>)value);
22468
        }
22469
        break;
22470
 
22471
      }
22472
    }
22473
 
22474
    public void setFieldValue(int fieldID, Object value) {
22475
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22476
    }
22477
 
22478
    public Object getFieldValue(_Fields field) {
22479
      switch (field) {
22480
      case PROVIDER_ID:
22481
        return new Long(getProviderId());
22482
 
22483
      case DELIVERED_ORDERS:
22484
        return getDeliveredOrders();
22485
 
22486
      }
22487
      throw new IllegalStateException();
22488
    }
22489
 
22490
    public Object getFieldValue(int fieldId) {
22491
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22492
    }
22493
 
22494
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22495
    public boolean isSet(_Fields field) {
22496
      switch (field) {
22497
      case PROVIDER_ID:
22498
        return isSetProviderId();
22499
      case DELIVERED_ORDERS:
22500
        return isSetDeliveredOrders();
22501
      }
22502
      throw new IllegalStateException();
22503
    }
22504
 
22505
    public boolean isSet(int fieldID) {
22506
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22507
    }
22508
 
22509
    @Override
22510
    public boolean equals(Object that) {
22511
      if (that == null)
22512
        return false;
22513
      if (that instanceof markOrdersAsDelivered_args)
22514
        return this.equals((markOrdersAsDelivered_args)that);
22515
      return false;
22516
    }
22517
 
22518
    public boolean equals(markOrdersAsDelivered_args that) {
22519
      if (that == null)
22520
        return false;
22521
 
22522
      boolean this_present_providerId = true;
22523
      boolean that_present_providerId = true;
22524
      if (this_present_providerId || that_present_providerId) {
22525
        if (!(this_present_providerId && that_present_providerId))
22526
          return false;
22527
        if (this.providerId != that.providerId)
22528
          return false;
22529
      }
22530
 
22531
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
22532
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
22533
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
22534
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
22535
          return false;
22536
        if (!this.deliveredOrders.equals(that.deliveredOrders))
22537
          return false;
22538
      }
22539
 
22540
      return true;
22541
    }
22542
 
22543
    @Override
22544
    public int hashCode() {
22545
      return 0;
22546
    }
22547
 
22548
    public void read(TProtocol iprot) throws TException {
22549
      TField field;
22550
      iprot.readStructBegin();
22551
      while (true)
22552
      {
22553
        field = iprot.readFieldBegin();
22554
        if (field.type == TType.STOP) { 
22555
          break;
22556
        }
22557
        _Fields fieldId = _Fields.findByThriftId(field.id);
22558
        if (fieldId == null) {
22559
          TProtocolUtil.skip(iprot, field.type);
22560
        } else {
22561
          switch (fieldId) {
22562
            case PROVIDER_ID:
22563
              if (field.type == TType.I64) {
22564
                this.providerId = iprot.readI64();
22565
                setProviderIdIsSet(true);
22566
              } else { 
22567
                TProtocolUtil.skip(iprot, field.type);
22568
              }
22569
              break;
22570
            case DELIVERED_ORDERS:
22571
              if (field.type == TType.MAP) {
22572
                {
1382 varun.gupt 22573
                  TMap _map57 = iprot.readMapBegin();
22574
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
22575
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 22576
                  {
1382 varun.gupt 22577
                    String _key59;
22578
                    String _val60;
22579
                    _key59 = iprot.readString();
22580
                    _val60 = iprot.readString();
22581
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 22582
                  }
22583
                  iprot.readMapEnd();
22584
                }
22585
              } else { 
22586
                TProtocolUtil.skip(iprot, field.type);
22587
              }
22588
              break;
22589
          }
22590
          iprot.readFieldEnd();
22591
        }
22592
      }
22593
      iprot.readStructEnd();
22594
      validate();
22595
    }
22596
 
22597
    public void write(TProtocol oprot) throws TException {
22598
      validate();
22599
 
22600
      oprot.writeStructBegin(STRUCT_DESC);
22601
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22602
      oprot.writeI64(this.providerId);
22603
      oprot.writeFieldEnd();
22604
      if (this.deliveredOrders != null) {
22605
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
22606
        {
22607
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 22608
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 22609
          {
1382 varun.gupt 22610
            oprot.writeString(_iter61.getKey());
22611
            oprot.writeString(_iter61.getValue());
1133 chandransh 22612
          }
22613
          oprot.writeMapEnd();
22614
        }
22615
        oprot.writeFieldEnd();
22616
      }
22617
      oprot.writeFieldStop();
22618
      oprot.writeStructEnd();
22619
    }
22620
 
22621
    @Override
22622
    public String toString() {
22623
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
22624
      boolean first = true;
22625
 
22626
      sb.append("providerId:");
22627
      sb.append(this.providerId);
22628
      first = false;
22629
      if (!first) sb.append(", ");
22630
      sb.append("deliveredOrders:");
22631
      if (this.deliveredOrders == null) {
22632
        sb.append("null");
22633
      } else {
22634
        sb.append(this.deliveredOrders);
22635
      }
22636
      first = false;
22637
      sb.append(")");
22638
      return sb.toString();
22639
    }
22640
 
22641
    public void validate() throws TException {
22642
      // check for required fields
22643
    }
22644
 
22645
  }
22646
 
22647
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
22648
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
22649
 
22650
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22651
 
22652
    private TransactionServiceException ex;
22653
 
22654
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22655
    public enum _Fields implements TFieldIdEnum {
22656
      EX((short)1, "ex");
22657
 
22658
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22659
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22660
 
22661
      static {
22662
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22663
          byId.put((int)field._thriftId, field);
22664
          byName.put(field.getFieldName(), field);
22665
        }
22666
      }
22667
 
22668
      /**
22669
       * Find the _Fields constant that matches fieldId, or null if its not found.
22670
       */
22671
      public static _Fields findByThriftId(int fieldId) {
22672
        return byId.get(fieldId);
22673
      }
22674
 
22675
      /**
22676
       * Find the _Fields constant that matches fieldId, throwing an exception
22677
       * if it is not found.
22678
       */
22679
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22680
        _Fields fields = findByThriftId(fieldId);
22681
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22682
        return fields;
22683
      }
22684
 
22685
      /**
22686
       * Find the _Fields constant that matches name, or null if its not found.
22687
       */
22688
      public static _Fields findByName(String name) {
22689
        return byName.get(name);
22690
      }
22691
 
22692
      private final short _thriftId;
22693
      private final String _fieldName;
22694
 
22695
      _Fields(short thriftId, String fieldName) {
22696
        _thriftId = thriftId;
22697
        _fieldName = fieldName;
22698
      }
22699
 
22700
      public short getThriftFieldId() {
22701
        return _thriftId;
22702
      }
22703
 
22704
      public String getFieldName() {
22705
        return _fieldName;
22706
      }
22707
    }
22708
 
22709
    // isset id assignments
22710
 
22711
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22712
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22713
          new FieldValueMetaData(TType.STRUCT)));
22714
    }});
22715
 
22716
    static {
22717
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
22718
    }
22719
 
22720
    public markOrdersAsDelivered_result() {
22721
    }
22722
 
22723
    public markOrdersAsDelivered_result(
22724
      TransactionServiceException ex)
22725
    {
22726
      this();
22727
      this.ex = ex;
22728
    }
22729
 
22730
    /**
22731
     * Performs a deep copy on <i>other</i>.
22732
     */
22733
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
22734
      if (other.isSetEx()) {
22735
        this.ex = new TransactionServiceException(other.ex);
22736
      }
22737
    }
22738
 
22739
    public markOrdersAsDelivered_result deepCopy() {
22740
      return new markOrdersAsDelivered_result(this);
22741
    }
22742
 
22743
    @Deprecated
22744
    public markOrdersAsDelivered_result clone() {
22745
      return new markOrdersAsDelivered_result(this);
22746
    }
22747
 
22748
    public TransactionServiceException getEx() {
22749
      return this.ex;
22750
    }
22751
 
22752
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
22753
      this.ex = ex;
22754
      return this;
22755
    }
22756
 
22757
    public void unsetEx() {
22758
      this.ex = null;
22759
    }
22760
 
22761
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22762
    public boolean isSetEx() {
22763
      return this.ex != null;
22764
    }
22765
 
22766
    public void setExIsSet(boolean value) {
22767
      if (!value) {
22768
        this.ex = null;
22769
      }
22770
    }
22771
 
22772
    public void setFieldValue(_Fields field, Object value) {
22773
      switch (field) {
22774
      case EX:
22775
        if (value == null) {
22776
          unsetEx();
22777
        } else {
22778
          setEx((TransactionServiceException)value);
22779
        }
22780
        break;
22781
 
22782
      }
22783
    }
22784
 
22785
    public void setFieldValue(int fieldID, Object value) {
22786
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22787
    }
22788
 
22789
    public Object getFieldValue(_Fields field) {
22790
      switch (field) {
22791
      case EX:
22792
        return getEx();
22793
 
22794
      }
22795
      throw new IllegalStateException();
22796
    }
22797
 
22798
    public Object getFieldValue(int fieldId) {
22799
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22800
    }
22801
 
22802
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22803
    public boolean isSet(_Fields field) {
22804
      switch (field) {
22805
      case EX:
22806
        return isSetEx();
22807
      }
22808
      throw new IllegalStateException();
22809
    }
22810
 
22811
    public boolean isSet(int fieldID) {
22812
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22813
    }
22814
 
22815
    @Override
22816
    public boolean equals(Object that) {
22817
      if (that == null)
22818
        return false;
22819
      if (that instanceof markOrdersAsDelivered_result)
22820
        return this.equals((markOrdersAsDelivered_result)that);
22821
      return false;
22822
    }
22823
 
22824
    public boolean equals(markOrdersAsDelivered_result that) {
22825
      if (that == null)
22826
        return false;
22827
 
22828
      boolean this_present_ex = true && this.isSetEx();
22829
      boolean that_present_ex = true && that.isSetEx();
22830
      if (this_present_ex || that_present_ex) {
22831
        if (!(this_present_ex && that_present_ex))
22832
          return false;
22833
        if (!this.ex.equals(that.ex))
22834
          return false;
22835
      }
22836
 
22837
      return true;
22838
    }
22839
 
22840
    @Override
22841
    public int hashCode() {
22842
      return 0;
22843
    }
22844
 
22845
    public int compareTo(markOrdersAsDelivered_result other) {
22846
      if (!getClass().equals(other.getClass())) {
22847
        return getClass().getName().compareTo(other.getClass().getName());
22848
      }
22849
 
22850
      int lastComparison = 0;
22851
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
22852
 
22853
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22854
      if (lastComparison != 0) {
22855
        return lastComparison;
22856
      }
22857
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22858
      if (lastComparison != 0) {
22859
        return lastComparison;
22860
      }
22861
      return 0;
22862
    }
22863
 
22864
    public void read(TProtocol iprot) throws TException {
22865
      TField field;
22866
      iprot.readStructBegin();
22867
      while (true)
22868
      {
22869
        field = iprot.readFieldBegin();
22870
        if (field.type == TType.STOP) { 
22871
          break;
22872
        }
22873
        _Fields fieldId = _Fields.findByThriftId(field.id);
22874
        if (fieldId == null) {
22875
          TProtocolUtil.skip(iprot, field.type);
22876
        } else {
22877
          switch (fieldId) {
22878
            case EX:
22879
              if (field.type == TType.STRUCT) {
22880
                this.ex = new TransactionServiceException();
22881
                this.ex.read(iprot);
22882
              } else { 
22883
                TProtocolUtil.skip(iprot, field.type);
22884
              }
22885
              break;
22886
          }
22887
          iprot.readFieldEnd();
22888
        }
22889
      }
22890
      iprot.readStructEnd();
22891
      validate();
22892
    }
22893
 
22894
    public void write(TProtocol oprot) throws TException {
22895
      oprot.writeStructBegin(STRUCT_DESC);
22896
 
22897
      if (this.isSetEx()) {
22898
        oprot.writeFieldBegin(EX_FIELD_DESC);
22899
        this.ex.write(oprot);
22900
        oprot.writeFieldEnd();
22901
      }
22902
      oprot.writeFieldStop();
22903
      oprot.writeStructEnd();
22904
    }
22905
 
22906
    @Override
22907
    public String toString() {
22908
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
22909
      boolean first = true;
22910
 
22911
      sb.append("ex:");
22912
      if (this.ex == null) {
22913
        sb.append("null");
22914
      } else {
22915
        sb.append(this.ex);
22916
      }
22917
      first = false;
22918
      sb.append(")");
22919
      return sb.toString();
22920
    }
22921
 
22922
    public void validate() throws TException {
22923
      // check for required fields
22924
    }
22925
 
22926
  }
22927
 
22928
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
22929
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
22930
 
22931
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22932
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
22933
 
22934
    private long providerId;
22935
    private Map<String,String> returnedOrders;
22936
 
22937
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22938
    public enum _Fields implements TFieldIdEnum {
22939
      PROVIDER_ID((short)1, "providerId"),
22940
      RETURNED_ORDERS((short)2, "returnedOrders");
22941
 
22942
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22943
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22944
 
22945
      static {
22946
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22947
          byId.put((int)field._thriftId, field);
22948
          byName.put(field.getFieldName(), field);
22949
        }
22950
      }
22951
 
22952
      /**
22953
       * Find the _Fields constant that matches fieldId, or null if its not found.
22954
       */
22955
      public static _Fields findByThriftId(int fieldId) {
22956
        return byId.get(fieldId);
22957
      }
22958
 
22959
      /**
22960
       * Find the _Fields constant that matches fieldId, throwing an exception
22961
       * if it is not found.
22962
       */
22963
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22964
        _Fields fields = findByThriftId(fieldId);
22965
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22966
        return fields;
22967
      }
22968
 
22969
      /**
22970
       * Find the _Fields constant that matches name, or null if its not found.
22971
       */
22972
      public static _Fields findByName(String name) {
22973
        return byName.get(name);
22974
      }
22975
 
22976
      private final short _thriftId;
22977
      private final String _fieldName;
22978
 
22979
      _Fields(short thriftId, String fieldName) {
22980
        _thriftId = thriftId;
22981
        _fieldName = fieldName;
22982
      }
22983
 
22984
      public short getThriftFieldId() {
22985
        return _thriftId;
22986
      }
22987
 
22988
      public String getFieldName() {
22989
        return _fieldName;
22990
      }
22991
    }
22992
 
22993
    // isset id assignments
22994
    private static final int __PROVIDERID_ISSET_ID = 0;
22995
    private BitSet __isset_bit_vector = new BitSet(1);
22996
 
22997
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22998
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22999
          new FieldValueMetaData(TType.I64)));
23000
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
23001
          new MapMetaData(TType.MAP, 
23002
              new FieldValueMetaData(TType.STRING), 
23003
              new FieldValueMetaData(TType.STRING))));
23004
    }});
23005
 
23006
    static {
23007
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
23008
    }
23009
 
23010
    public markOrdersAsFailed_args() {
23011
    }
23012
 
23013
    public markOrdersAsFailed_args(
23014
      long providerId,
23015
      Map<String,String> returnedOrders)
23016
    {
23017
      this();
23018
      this.providerId = providerId;
23019
      setProviderIdIsSet(true);
23020
      this.returnedOrders = returnedOrders;
23021
    }
23022
 
23023
    /**
23024
     * Performs a deep copy on <i>other</i>.
23025
     */
23026
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
23027
      __isset_bit_vector.clear();
23028
      __isset_bit_vector.or(other.__isset_bit_vector);
23029
      this.providerId = other.providerId;
23030
      if (other.isSetReturnedOrders()) {
23031
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
23032
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
23033
 
23034
          String other_element_key = other_element.getKey();
23035
          String other_element_value = other_element.getValue();
23036
 
23037
          String __this__returnedOrders_copy_key = other_element_key;
23038
 
23039
          String __this__returnedOrders_copy_value = other_element_value;
23040
 
23041
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
23042
        }
23043
        this.returnedOrders = __this__returnedOrders;
23044
      }
23045
    }
23046
 
23047
    public markOrdersAsFailed_args deepCopy() {
23048
      return new markOrdersAsFailed_args(this);
23049
    }
23050
 
23051
    @Deprecated
23052
    public markOrdersAsFailed_args clone() {
23053
      return new markOrdersAsFailed_args(this);
23054
    }
23055
 
23056
    public long getProviderId() {
23057
      return this.providerId;
23058
    }
23059
 
23060
    public markOrdersAsFailed_args setProviderId(long providerId) {
23061
      this.providerId = providerId;
23062
      setProviderIdIsSet(true);
23063
      return this;
23064
    }
23065
 
23066
    public void unsetProviderId() {
23067
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23068
    }
23069
 
23070
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23071
    public boolean isSetProviderId() {
23072
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23073
    }
23074
 
23075
    public void setProviderIdIsSet(boolean value) {
23076
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23077
    }
23078
 
23079
    public int getReturnedOrdersSize() {
23080
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
23081
    }
23082
 
23083
    public void putToReturnedOrders(String key, String val) {
23084
      if (this.returnedOrders == null) {
23085
        this.returnedOrders = new HashMap<String,String>();
23086
      }
23087
      this.returnedOrders.put(key, val);
23088
    }
23089
 
23090
    public Map<String,String> getReturnedOrders() {
23091
      return this.returnedOrders;
23092
    }
23093
 
23094
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
23095
      this.returnedOrders = returnedOrders;
23096
      return this;
23097
    }
23098
 
23099
    public void unsetReturnedOrders() {
23100
      this.returnedOrders = null;
23101
    }
23102
 
23103
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
23104
    public boolean isSetReturnedOrders() {
23105
      return this.returnedOrders != null;
23106
    }
23107
 
23108
    public void setReturnedOrdersIsSet(boolean value) {
23109
      if (!value) {
23110
        this.returnedOrders = null;
23111
      }
23112
    }
23113
 
23114
    public void setFieldValue(_Fields field, Object value) {
23115
      switch (field) {
23116
      case PROVIDER_ID:
23117
        if (value == null) {
23118
          unsetProviderId();
23119
        } else {
23120
          setProviderId((Long)value);
23121
        }
23122
        break;
23123
 
23124
      case RETURNED_ORDERS:
23125
        if (value == null) {
23126
          unsetReturnedOrders();
23127
        } else {
23128
          setReturnedOrders((Map<String,String>)value);
23129
        }
23130
        break;
23131
 
23132
      }
23133
    }
23134
 
23135
    public void setFieldValue(int fieldID, Object value) {
23136
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23137
    }
23138
 
23139
    public Object getFieldValue(_Fields field) {
23140
      switch (field) {
23141
      case PROVIDER_ID:
23142
        return new Long(getProviderId());
23143
 
23144
      case RETURNED_ORDERS:
23145
        return getReturnedOrders();
23146
 
23147
      }
23148
      throw new IllegalStateException();
23149
    }
23150
 
23151
    public Object getFieldValue(int fieldId) {
23152
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23153
    }
23154
 
23155
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23156
    public boolean isSet(_Fields field) {
23157
      switch (field) {
23158
      case PROVIDER_ID:
23159
        return isSetProviderId();
23160
      case RETURNED_ORDERS:
23161
        return isSetReturnedOrders();
23162
      }
23163
      throw new IllegalStateException();
23164
    }
23165
 
23166
    public boolean isSet(int fieldID) {
23167
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23168
    }
23169
 
23170
    @Override
23171
    public boolean equals(Object that) {
23172
      if (that == null)
23173
        return false;
23174
      if (that instanceof markOrdersAsFailed_args)
23175
        return this.equals((markOrdersAsFailed_args)that);
23176
      return false;
23177
    }
23178
 
23179
    public boolean equals(markOrdersAsFailed_args that) {
23180
      if (that == null)
23181
        return false;
23182
 
23183
      boolean this_present_providerId = true;
23184
      boolean that_present_providerId = true;
23185
      if (this_present_providerId || that_present_providerId) {
23186
        if (!(this_present_providerId && that_present_providerId))
23187
          return false;
23188
        if (this.providerId != that.providerId)
23189
          return false;
23190
      }
23191
 
23192
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
23193
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
23194
      if (this_present_returnedOrders || that_present_returnedOrders) {
23195
        if (!(this_present_returnedOrders && that_present_returnedOrders))
23196
          return false;
23197
        if (!this.returnedOrders.equals(that.returnedOrders))
23198
          return false;
23199
      }
23200
 
23201
      return true;
23202
    }
23203
 
23204
    @Override
23205
    public int hashCode() {
23206
      return 0;
23207
    }
23208
 
23209
    public void read(TProtocol iprot) throws TException {
23210
      TField field;
23211
      iprot.readStructBegin();
23212
      while (true)
23213
      {
23214
        field = iprot.readFieldBegin();
23215
        if (field.type == TType.STOP) { 
23216
          break;
23217
        }
23218
        _Fields fieldId = _Fields.findByThriftId(field.id);
23219
        if (fieldId == null) {
23220
          TProtocolUtil.skip(iprot, field.type);
23221
        } else {
23222
          switch (fieldId) {
23223
            case PROVIDER_ID:
23224
              if (field.type == TType.I64) {
23225
                this.providerId = iprot.readI64();
23226
                setProviderIdIsSet(true);
23227
              } else { 
23228
                TProtocolUtil.skip(iprot, field.type);
23229
              }
23230
              break;
23231
            case RETURNED_ORDERS:
23232
              if (field.type == TType.MAP) {
23233
                {
1382 varun.gupt 23234
                  TMap _map62 = iprot.readMapBegin();
23235
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
23236
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 23237
                  {
1382 varun.gupt 23238
                    String _key64;
23239
                    String _val65;
23240
                    _key64 = iprot.readString();
23241
                    _val65 = iprot.readString();
23242
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 23243
                  }
23244
                  iprot.readMapEnd();
23245
                }
23246
              } else { 
23247
                TProtocolUtil.skip(iprot, field.type);
23248
              }
23249
              break;
23250
          }
23251
          iprot.readFieldEnd();
23252
        }
23253
      }
23254
      iprot.readStructEnd();
23255
      validate();
23256
    }
23257
 
23258
    public void write(TProtocol oprot) throws TException {
23259
      validate();
23260
 
23261
      oprot.writeStructBegin(STRUCT_DESC);
23262
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23263
      oprot.writeI64(this.providerId);
23264
      oprot.writeFieldEnd();
23265
      if (this.returnedOrders != null) {
23266
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
23267
        {
23268
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 23269
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 23270
          {
1382 varun.gupt 23271
            oprot.writeString(_iter66.getKey());
23272
            oprot.writeString(_iter66.getValue());
1133 chandransh 23273
          }
23274
          oprot.writeMapEnd();
23275
        }
23276
        oprot.writeFieldEnd();
23277
      }
23278
      oprot.writeFieldStop();
23279
      oprot.writeStructEnd();
23280
    }
23281
 
23282
    @Override
23283
    public String toString() {
23284
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
23285
      boolean first = true;
23286
 
23287
      sb.append("providerId:");
23288
      sb.append(this.providerId);
23289
      first = false;
23290
      if (!first) sb.append(", ");
23291
      sb.append("returnedOrders:");
23292
      if (this.returnedOrders == null) {
23293
        sb.append("null");
23294
      } else {
23295
        sb.append(this.returnedOrders);
23296
      }
23297
      first = false;
23298
      sb.append(")");
23299
      return sb.toString();
23300
    }
23301
 
23302
    public void validate() throws TException {
23303
      // check for required fields
23304
    }
23305
 
23306
  }
23307
 
23308
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
23309
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
23310
 
23311
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23312
 
23313
    private TransactionServiceException ex;
23314
 
23315
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23316
    public enum _Fields implements TFieldIdEnum {
23317
      EX((short)1, "ex");
23318
 
23319
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23320
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23321
 
23322
      static {
23323
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23324
          byId.put((int)field._thriftId, field);
23325
          byName.put(field.getFieldName(), field);
23326
        }
23327
      }
23328
 
23329
      /**
23330
       * Find the _Fields constant that matches fieldId, or null if its not found.
23331
       */
23332
      public static _Fields findByThriftId(int fieldId) {
23333
        return byId.get(fieldId);
23334
      }
23335
 
23336
      /**
23337
       * Find the _Fields constant that matches fieldId, throwing an exception
23338
       * if it is not found.
23339
       */
23340
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23341
        _Fields fields = findByThriftId(fieldId);
23342
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23343
        return fields;
23344
      }
23345
 
23346
      /**
23347
       * Find the _Fields constant that matches name, or null if its not found.
23348
       */
23349
      public static _Fields findByName(String name) {
23350
        return byName.get(name);
23351
      }
23352
 
23353
      private final short _thriftId;
23354
      private final String _fieldName;
23355
 
23356
      _Fields(short thriftId, String fieldName) {
23357
        _thriftId = thriftId;
23358
        _fieldName = fieldName;
23359
      }
23360
 
23361
      public short getThriftFieldId() {
23362
        return _thriftId;
23363
      }
23364
 
23365
      public String getFieldName() {
23366
        return _fieldName;
23367
      }
23368
    }
23369
 
23370
    // isset id assignments
23371
 
23372
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23373
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23374
          new FieldValueMetaData(TType.STRUCT)));
23375
    }});
23376
 
23377
    static {
23378
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
23379
    }
23380
 
23381
    public markOrdersAsFailed_result() {
23382
    }
23383
 
23384
    public markOrdersAsFailed_result(
23385
      TransactionServiceException ex)
23386
    {
23387
      this();
23388
      this.ex = ex;
23389
    }
23390
 
23391
    /**
23392
     * Performs a deep copy on <i>other</i>.
23393
     */
23394
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
23395
      if (other.isSetEx()) {
23396
        this.ex = new TransactionServiceException(other.ex);
23397
      }
23398
    }
23399
 
23400
    public markOrdersAsFailed_result deepCopy() {
23401
      return new markOrdersAsFailed_result(this);
23402
    }
23403
 
23404
    @Deprecated
23405
    public markOrdersAsFailed_result clone() {
23406
      return new markOrdersAsFailed_result(this);
23407
    }
23408
 
23409
    public TransactionServiceException getEx() {
23410
      return this.ex;
23411
    }
23412
 
23413
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
23414
      this.ex = ex;
23415
      return this;
23416
    }
23417
 
23418
    public void unsetEx() {
23419
      this.ex = null;
23420
    }
23421
 
23422
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23423
    public boolean isSetEx() {
23424
      return this.ex != null;
23425
    }
23426
 
23427
    public void setExIsSet(boolean value) {
23428
      if (!value) {
23429
        this.ex = null;
23430
      }
23431
    }
23432
 
23433
    public void setFieldValue(_Fields field, Object value) {
23434
      switch (field) {
23435
      case EX:
23436
        if (value == null) {
23437
          unsetEx();
23438
        } else {
23439
          setEx((TransactionServiceException)value);
23440
        }
23441
        break;
23442
 
23443
      }
23444
    }
23445
 
23446
    public void setFieldValue(int fieldID, Object value) {
23447
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23448
    }
23449
 
23450
    public Object getFieldValue(_Fields field) {
23451
      switch (field) {
23452
      case EX:
23453
        return getEx();
23454
 
23455
      }
23456
      throw new IllegalStateException();
23457
    }
23458
 
23459
    public Object getFieldValue(int fieldId) {
23460
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23461
    }
23462
 
23463
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23464
    public boolean isSet(_Fields field) {
23465
      switch (field) {
23466
      case EX:
23467
        return isSetEx();
23468
      }
23469
      throw new IllegalStateException();
23470
    }
23471
 
23472
    public boolean isSet(int fieldID) {
23473
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23474
    }
23475
 
23476
    @Override
23477
    public boolean equals(Object that) {
23478
      if (that == null)
23479
        return false;
23480
      if (that instanceof markOrdersAsFailed_result)
23481
        return this.equals((markOrdersAsFailed_result)that);
23482
      return false;
23483
    }
23484
 
23485
    public boolean equals(markOrdersAsFailed_result that) {
23486
      if (that == null)
23487
        return false;
23488
 
23489
      boolean this_present_ex = true && this.isSetEx();
23490
      boolean that_present_ex = true && that.isSetEx();
23491
      if (this_present_ex || that_present_ex) {
23492
        if (!(this_present_ex && that_present_ex))
23493
          return false;
23494
        if (!this.ex.equals(that.ex))
23495
          return false;
23496
      }
23497
 
23498
      return true;
23499
    }
23500
 
23501
    @Override
23502
    public int hashCode() {
23503
      return 0;
23504
    }
23505
 
23506
    public int compareTo(markOrdersAsFailed_result other) {
23507
      if (!getClass().equals(other.getClass())) {
23508
        return getClass().getName().compareTo(other.getClass().getName());
23509
      }
23510
 
23511
      int lastComparison = 0;
23512
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
23513
 
23514
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23515
      if (lastComparison != 0) {
23516
        return lastComparison;
23517
      }
23518
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23519
      if (lastComparison != 0) {
23520
        return lastComparison;
23521
      }
23522
      return 0;
23523
    }
23524
 
23525
    public void read(TProtocol iprot) throws TException {
23526
      TField field;
23527
      iprot.readStructBegin();
23528
      while (true)
23529
      {
23530
        field = iprot.readFieldBegin();
23531
        if (field.type == TType.STOP) { 
23532
          break;
23533
        }
23534
        _Fields fieldId = _Fields.findByThriftId(field.id);
23535
        if (fieldId == null) {
23536
          TProtocolUtil.skip(iprot, field.type);
23537
        } else {
23538
          switch (fieldId) {
23539
            case EX:
23540
              if (field.type == TType.STRUCT) {
23541
                this.ex = new TransactionServiceException();
23542
                this.ex.read(iprot);
23543
              } else { 
23544
                TProtocolUtil.skip(iprot, field.type);
23545
              }
23546
              break;
23547
          }
23548
          iprot.readFieldEnd();
23549
        }
23550
      }
23551
      iprot.readStructEnd();
23552
      validate();
23553
    }
23554
 
23555
    public void write(TProtocol oprot) throws TException {
23556
      oprot.writeStructBegin(STRUCT_DESC);
23557
 
23558
      if (this.isSetEx()) {
23559
        oprot.writeFieldBegin(EX_FIELD_DESC);
23560
        this.ex.write(oprot);
23561
        oprot.writeFieldEnd();
23562
      }
23563
      oprot.writeFieldStop();
23564
      oprot.writeStructEnd();
23565
    }
23566
 
23567
    @Override
23568
    public String toString() {
23569
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
23570
      boolean first = true;
23571
 
23572
      sb.append("ex:");
23573
      if (this.ex == null) {
23574
        sb.append("null");
23575
      } else {
23576
        sb.append(this.ex);
23577
      }
23578
      first = false;
23579
      sb.append(")");
23580
      return sb.toString();
23581
    }
23582
 
23583
    public void validate() throws TException {
23584
      // check for required fields
23585
    }
23586
 
23587
  }
23588
 
1245 chandransh 23589
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
23590
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
23591
 
23592
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23593
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
23594
 
23595
    private long providerId;
23596
    private Map<String,String> undeliveredOrders;
23597
 
23598
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23599
    public enum _Fields implements TFieldIdEnum {
23600
      PROVIDER_ID((short)1, "providerId"),
23601
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
23602
 
23603
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23604
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23605
 
23606
      static {
23607
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23608
          byId.put((int)field._thriftId, field);
23609
          byName.put(field.getFieldName(), field);
23610
        }
23611
      }
23612
 
23613
      /**
23614
       * Find the _Fields constant that matches fieldId, or null if its not found.
23615
       */
23616
      public static _Fields findByThriftId(int fieldId) {
23617
        return byId.get(fieldId);
23618
      }
23619
 
23620
      /**
23621
       * Find the _Fields constant that matches fieldId, throwing an exception
23622
       * if it is not found.
23623
       */
23624
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23625
        _Fields fields = findByThriftId(fieldId);
23626
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23627
        return fields;
23628
      }
23629
 
23630
      /**
23631
       * Find the _Fields constant that matches name, or null if its not found.
23632
       */
23633
      public static _Fields findByName(String name) {
23634
        return byName.get(name);
23635
      }
23636
 
23637
      private final short _thriftId;
23638
      private final String _fieldName;
23639
 
23640
      _Fields(short thriftId, String fieldName) {
23641
        _thriftId = thriftId;
23642
        _fieldName = fieldName;
23643
      }
23644
 
23645
      public short getThriftFieldId() {
23646
        return _thriftId;
23647
      }
23648
 
23649
      public String getFieldName() {
23650
        return _fieldName;
23651
      }
23652
    }
23653
 
23654
    // isset id assignments
23655
    private static final int __PROVIDERID_ISSET_ID = 0;
23656
    private BitSet __isset_bit_vector = new BitSet(1);
23657
 
23658
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23659
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23660
          new FieldValueMetaData(TType.I64)));
23661
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
23662
          new MapMetaData(TType.MAP, 
23663
              new FieldValueMetaData(TType.STRING), 
23664
              new FieldValueMetaData(TType.STRING))));
23665
    }});
23666
 
23667
    static {
23668
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
23669
    }
23670
 
23671
    public updateNonDeliveryReason_args() {
23672
    }
23673
 
23674
    public updateNonDeliveryReason_args(
23675
      long providerId,
23676
      Map<String,String> undeliveredOrders)
23677
    {
23678
      this();
23679
      this.providerId = providerId;
23680
      setProviderIdIsSet(true);
23681
      this.undeliveredOrders = undeliveredOrders;
23682
    }
23683
 
23684
    /**
23685
     * Performs a deep copy on <i>other</i>.
23686
     */
23687
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
23688
      __isset_bit_vector.clear();
23689
      __isset_bit_vector.or(other.__isset_bit_vector);
23690
      this.providerId = other.providerId;
23691
      if (other.isSetUndeliveredOrders()) {
23692
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
23693
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
23694
 
23695
          String other_element_key = other_element.getKey();
23696
          String other_element_value = other_element.getValue();
23697
 
23698
          String __this__undeliveredOrders_copy_key = other_element_key;
23699
 
23700
          String __this__undeliveredOrders_copy_value = other_element_value;
23701
 
23702
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
23703
        }
23704
        this.undeliveredOrders = __this__undeliveredOrders;
23705
      }
23706
    }
23707
 
23708
    public updateNonDeliveryReason_args deepCopy() {
23709
      return new updateNonDeliveryReason_args(this);
23710
    }
23711
 
23712
    @Deprecated
23713
    public updateNonDeliveryReason_args clone() {
23714
      return new updateNonDeliveryReason_args(this);
23715
    }
23716
 
23717
    public long getProviderId() {
23718
      return this.providerId;
23719
    }
23720
 
23721
    public updateNonDeliveryReason_args setProviderId(long providerId) {
23722
      this.providerId = providerId;
23723
      setProviderIdIsSet(true);
23724
      return this;
23725
    }
23726
 
23727
    public void unsetProviderId() {
23728
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23729
    }
23730
 
23731
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23732
    public boolean isSetProviderId() {
23733
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23734
    }
23735
 
23736
    public void setProviderIdIsSet(boolean value) {
23737
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23738
    }
23739
 
23740
    public int getUndeliveredOrdersSize() {
23741
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
23742
    }
23743
 
23744
    public void putToUndeliveredOrders(String key, String val) {
23745
      if (this.undeliveredOrders == null) {
23746
        this.undeliveredOrders = new HashMap<String,String>();
23747
      }
23748
      this.undeliveredOrders.put(key, val);
23749
    }
23750
 
23751
    public Map<String,String> getUndeliveredOrders() {
23752
      return this.undeliveredOrders;
23753
    }
23754
 
23755
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
23756
      this.undeliveredOrders = undeliveredOrders;
23757
      return this;
23758
    }
23759
 
23760
    public void unsetUndeliveredOrders() {
23761
      this.undeliveredOrders = null;
23762
    }
23763
 
23764
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
23765
    public boolean isSetUndeliveredOrders() {
23766
      return this.undeliveredOrders != null;
23767
    }
23768
 
23769
    public void setUndeliveredOrdersIsSet(boolean value) {
23770
      if (!value) {
23771
        this.undeliveredOrders = null;
23772
      }
23773
    }
23774
 
23775
    public void setFieldValue(_Fields field, Object value) {
23776
      switch (field) {
23777
      case PROVIDER_ID:
23778
        if (value == null) {
23779
          unsetProviderId();
23780
        } else {
23781
          setProviderId((Long)value);
23782
        }
23783
        break;
23784
 
23785
      case UNDELIVERED_ORDERS:
23786
        if (value == null) {
23787
          unsetUndeliveredOrders();
23788
        } else {
23789
          setUndeliveredOrders((Map<String,String>)value);
23790
        }
23791
        break;
23792
 
23793
      }
23794
    }
23795
 
23796
    public void setFieldValue(int fieldID, Object value) {
23797
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23798
    }
23799
 
23800
    public Object getFieldValue(_Fields field) {
23801
      switch (field) {
23802
      case PROVIDER_ID:
23803
        return new Long(getProviderId());
23804
 
23805
      case UNDELIVERED_ORDERS:
23806
        return getUndeliveredOrders();
23807
 
23808
      }
23809
      throw new IllegalStateException();
23810
    }
23811
 
23812
    public Object getFieldValue(int fieldId) {
23813
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23814
    }
23815
 
23816
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23817
    public boolean isSet(_Fields field) {
23818
      switch (field) {
23819
      case PROVIDER_ID:
23820
        return isSetProviderId();
23821
      case UNDELIVERED_ORDERS:
23822
        return isSetUndeliveredOrders();
23823
      }
23824
      throw new IllegalStateException();
23825
    }
23826
 
23827
    public boolean isSet(int fieldID) {
23828
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23829
    }
23830
 
23831
    @Override
23832
    public boolean equals(Object that) {
23833
      if (that == null)
23834
        return false;
23835
      if (that instanceof updateNonDeliveryReason_args)
23836
        return this.equals((updateNonDeliveryReason_args)that);
23837
      return false;
23838
    }
23839
 
23840
    public boolean equals(updateNonDeliveryReason_args that) {
23841
      if (that == null)
23842
        return false;
23843
 
23844
      boolean this_present_providerId = true;
23845
      boolean that_present_providerId = true;
23846
      if (this_present_providerId || that_present_providerId) {
23847
        if (!(this_present_providerId && that_present_providerId))
23848
          return false;
23849
        if (this.providerId != that.providerId)
23850
          return false;
23851
      }
23852
 
23853
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
23854
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
23855
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
23856
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
23857
          return false;
23858
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
23859
          return false;
23860
      }
23861
 
23862
      return true;
23863
    }
23864
 
23865
    @Override
23866
    public int hashCode() {
23867
      return 0;
23868
    }
23869
 
23870
    public void read(TProtocol iprot) throws TException {
23871
      TField field;
23872
      iprot.readStructBegin();
23873
      while (true)
23874
      {
23875
        field = iprot.readFieldBegin();
23876
        if (field.type == TType.STOP) { 
23877
          break;
23878
        }
23879
        _Fields fieldId = _Fields.findByThriftId(field.id);
23880
        if (fieldId == null) {
23881
          TProtocolUtil.skip(iprot, field.type);
23882
        } else {
23883
          switch (fieldId) {
23884
            case PROVIDER_ID:
23885
              if (field.type == TType.I64) {
23886
                this.providerId = iprot.readI64();
23887
                setProviderIdIsSet(true);
23888
              } else { 
23889
                TProtocolUtil.skip(iprot, field.type);
23890
              }
23891
              break;
23892
            case UNDELIVERED_ORDERS:
23893
              if (field.type == TType.MAP) {
23894
                {
1382 varun.gupt 23895
                  TMap _map67 = iprot.readMapBegin();
23896
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
23897
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 23898
                  {
1382 varun.gupt 23899
                    String _key69;
23900
                    String _val70;
23901
                    _key69 = iprot.readString();
23902
                    _val70 = iprot.readString();
23903
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 23904
                  }
23905
                  iprot.readMapEnd();
23906
                }
23907
              } else { 
23908
                TProtocolUtil.skip(iprot, field.type);
23909
              }
23910
              break;
23911
          }
23912
          iprot.readFieldEnd();
23913
        }
23914
      }
23915
      iprot.readStructEnd();
23916
      validate();
23917
    }
23918
 
23919
    public void write(TProtocol oprot) throws TException {
23920
      validate();
23921
 
23922
      oprot.writeStructBegin(STRUCT_DESC);
23923
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23924
      oprot.writeI64(this.providerId);
23925
      oprot.writeFieldEnd();
23926
      if (this.undeliveredOrders != null) {
23927
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
23928
        {
23929
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 23930
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 23931
          {
1382 varun.gupt 23932
            oprot.writeString(_iter71.getKey());
23933
            oprot.writeString(_iter71.getValue());
1245 chandransh 23934
          }
23935
          oprot.writeMapEnd();
23936
        }
23937
        oprot.writeFieldEnd();
23938
      }
23939
      oprot.writeFieldStop();
23940
      oprot.writeStructEnd();
23941
    }
23942
 
23943
    @Override
23944
    public String toString() {
23945
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
23946
      boolean first = true;
23947
 
23948
      sb.append("providerId:");
23949
      sb.append(this.providerId);
23950
      first = false;
23951
      if (!first) sb.append(", ");
23952
      sb.append("undeliveredOrders:");
23953
      if (this.undeliveredOrders == null) {
23954
        sb.append("null");
23955
      } else {
23956
        sb.append(this.undeliveredOrders);
23957
      }
23958
      first = false;
23959
      sb.append(")");
23960
      return sb.toString();
23961
    }
23962
 
23963
    public void validate() throws TException {
23964
      // check for required fields
23965
    }
23966
 
23967
  }
23968
 
23969
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
23970
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
23971
 
23972
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23973
 
23974
    private TransactionServiceException ex;
23975
 
23976
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23977
    public enum _Fields implements TFieldIdEnum {
23978
      EX((short)1, "ex");
23979
 
23980
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23981
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23982
 
23983
      static {
23984
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23985
          byId.put((int)field._thriftId, field);
23986
          byName.put(field.getFieldName(), field);
23987
        }
23988
      }
23989
 
23990
      /**
23991
       * Find the _Fields constant that matches fieldId, or null if its not found.
23992
       */
23993
      public static _Fields findByThriftId(int fieldId) {
23994
        return byId.get(fieldId);
23995
      }
23996
 
23997
      /**
23998
       * Find the _Fields constant that matches fieldId, throwing an exception
23999
       * if it is not found.
24000
       */
24001
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24002
        _Fields fields = findByThriftId(fieldId);
24003
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24004
        return fields;
24005
      }
24006
 
24007
      /**
24008
       * Find the _Fields constant that matches name, or null if its not found.
24009
       */
24010
      public static _Fields findByName(String name) {
24011
        return byName.get(name);
24012
      }
24013
 
24014
      private final short _thriftId;
24015
      private final String _fieldName;
24016
 
24017
      _Fields(short thriftId, String fieldName) {
24018
        _thriftId = thriftId;
24019
        _fieldName = fieldName;
24020
      }
24021
 
24022
      public short getThriftFieldId() {
24023
        return _thriftId;
24024
      }
24025
 
24026
      public String getFieldName() {
24027
        return _fieldName;
24028
      }
24029
    }
24030
 
24031
    // isset id assignments
24032
 
24033
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24034
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
24035
          new FieldValueMetaData(TType.STRUCT)));
24036
    }});
24037
 
24038
    static {
24039
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
24040
    }
24041
 
24042
    public updateNonDeliveryReason_result() {
24043
    }
24044
 
24045
    public updateNonDeliveryReason_result(
24046
      TransactionServiceException ex)
24047
    {
24048
      this();
24049
      this.ex = ex;
24050
    }
24051
 
24052
    /**
24053
     * Performs a deep copy on <i>other</i>.
24054
     */
24055
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
24056
      if (other.isSetEx()) {
24057
        this.ex = new TransactionServiceException(other.ex);
24058
      }
24059
    }
24060
 
24061
    public updateNonDeliveryReason_result deepCopy() {
24062
      return new updateNonDeliveryReason_result(this);
24063
    }
24064
 
24065
    @Deprecated
24066
    public updateNonDeliveryReason_result clone() {
24067
      return new updateNonDeliveryReason_result(this);
24068
    }
24069
 
24070
    public TransactionServiceException getEx() {
24071
      return this.ex;
24072
    }
24073
 
24074
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
24075
      this.ex = ex;
24076
      return this;
24077
    }
24078
 
24079
    public void unsetEx() {
24080
      this.ex = null;
24081
    }
24082
 
24083
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
24084
    public boolean isSetEx() {
24085
      return this.ex != null;
24086
    }
24087
 
24088
    public void setExIsSet(boolean value) {
24089
      if (!value) {
24090
        this.ex = null;
24091
      }
24092
    }
24093
 
24094
    public void setFieldValue(_Fields field, Object value) {
24095
      switch (field) {
24096
      case EX:
24097
        if (value == null) {
24098
          unsetEx();
24099
        } else {
24100
          setEx((TransactionServiceException)value);
24101
        }
24102
        break;
24103
 
24104
      }
24105
    }
24106
 
24107
    public void setFieldValue(int fieldID, Object value) {
24108
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24109
    }
24110
 
24111
    public Object getFieldValue(_Fields field) {
24112
      switch (field) {
24113
      case EX:
24114
        return getEx();
24115
 
24116
      }
24117
      throw new IllegalStateException();
24118
    }
24119
 
24120
    public Object getFieldValue(int fieldId) {
24121
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24122
    }
24123
 
24124
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24125
    public boolean isSet(_Fields field) {
24126
      switch (field) {
24127
      case EX:
24128
        return isSetEx();
24129
      }
24130
      throw new IllegalStateException();
24131
    }
24132
 
24133
    public boolean isSet(int fieldID) {
24134
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24135
    }
24136
 
24137
    @Override
24138
    public boolean equals(Object that) {
24139
      if (that == null)
24140
        return false;
24141
      if (that instanceof updateNonDeliveryReason_result)
24142
        return this.equals((updateNonDeliveryReason_result)that);
24143
      return false;
24144
    }
24145
 
24146
    public boolean equals(updateNonDeliveryReason_result that) {
24147
      if (that == null)
24148
        return false;
24149
 
24150
      boolean this_present_ex = true && this.isSetEx();
24151
      boolean that_present_ex = true && that.isSetEx();
24152
      if (this_present_ex || that_present_ex) {
24153
        if (!(this_present_ex && that_present_ex))
24154
          return false;
24155
        if (!this.ex.equals(that.ex))
24156
          return false;
24157
      }
24158
 
24159
      return true;
24160
    }
24161
 
24162
    @Override
24163
    public int hashCode() {
24164
      return 0;
24165
    }
24166
 
24167
    public int compareTo(updateNonDeliveryReason_result other) {
24168
      if (!getClass().equals(other.getClass())) {
24169
        return getClass().getName().compareTo(other.getClass().getName());
24170
      }
24171
 
24172
      int lastComparison = 0;
24173
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
24174
 
24175
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24176
      if (lastComparison != 0) {
24177
        return lastComparison;
24178
      }
24179
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24180
      if (lastComparison != 0) {
24181
        return lastComparison;
24182
      }
24183
      return 0;
24184
    }
24185
 
24186
    public void read(TProtocol iprot) throws TException {
24187
      TField field;
24188
      iprot.readStructBegin();
24189
      while (true)
24190
      {
24191
        field = iprot.readFieldBegin();
24192
        if (field.type == TType.STOP) { 
24193
          break;
24194
        }
24195
        _Fields fieldId = _Fields.findByThriftId(field.id);
24196
        if (fieldId == null) {
24197
          TProtocolUtil.skip(iprot, field.type);
24198
        } else {
24199
          switch (fieldId) {
24200
            case EX:
24201
              if (field.type == TType.STRUCT) {
24202
                this.ex = new TransactionServiceException();
24203
                this.ex.read(iprot);
24204
              } else { 
24205
                TProtocolUtil.skip(iprot, field.type);
24206
              }
24207
              break;
24208
          }
24209
          iprot.readFieldEnd();
24210
        }
24211
      }
24212
      iprot.readStructEnd();
24213
      validate();
24214
    }
24215
 
24216
    public void write(TProtocol oprot) throws TException {
24217
      oprot.writeStructBegin(STRUCT_DESC);
24218
 
24219
      if (this.isSetEx()) {
24220
        oprot.writeFieldBegin(EX_FIELD_DESC);
24221
        this.ex.write(oprot);
24222
        oprot.writeFieldEnd();
24223
      }
24224
      oprot.writeFieldStop();
24225
      oprot.writeStructEnd();
24226
    }
24227
 
24228
    @Override
24229
    public String toString() {
24230
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
24231
      boolean first = true;
24232
 
24233
      sb.append("ex:");
24234
      if (this.ex == null) {
24235
        sb.append("null");
24236
      } else {
24237
        sb.append(this.ex);
24238
      }
24239
      first = false;
24240
      sb.append(")");
24241
      return sb.toString();
24242
    }
24243
 
24244
    public void validate() throws TException {
24245
      // check for required fields
24246
    }
24247
 
24248
  }
24249
 
1406 ankur.sing 24250
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
24251
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
24252
 
24253
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24254
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
24255
 
24256
    private long providerId;
24257
    private long warehouseId;
24258
 
24259
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24260
    public enum _Fields implements TFieldIdEnum {
24261
      PROVIDER_ID((short)1, "providerId"),
24262
      WAREHOUSE_ID((short)2, "warehouseId");
24263
 
24264
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24265
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24266
 
24267
      static {
24268
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24269
          byId.put((int)field._thriftId, field);
24270
          byName.put(field.getFieldName(), field);
24271
        }
24272
      }
24273
 
24274
      /**
24275
       * Find the _Fields constant that matches fieldId, or null if its not found.
24276
       */
24277
      public static _Fields findByThriftId(int fieldId) {
24278
        return byId.get(fieldId);
24279
      }
24280
 
24281
      /**
24282
       * Find the _Fields constant that matches fieldId, throwing an exception
24283
       * if it is not found.
24284
       */
24285
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24286
        _Fields fields = findByThriftId(fieldId);
24287
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24288
        return fields;
24289
      }
24290
 
24291
      /**
24292
       * Find the _Fields constant that matches name, or null if its not found.
24293
       */
24294
      public static _Fields findByName(String name) {
24295
        return byName.get(name);
24296
      }
24297
 
24298
      private final short _thriftId;
24299
      private final String _fieldName;
24300
 
24301
      _Fields(short thriftId, String fieldName) {
24302
        _thriftId = thriftId;
24303
        _fieldName = fieldName;
24304
      }
24305
 
24306
      public short getThriftFieldId() {
24307
        return _thriftId;
24308
      }
24309
 
24310
      public String getFieldName() {
24311
        return _fieldName;
24312
      }
24313
    }
24314
 
24315
    // isset id assignments
24316
    private static final int __PROVIDERID_ISSET_ID = 0;
24317
    private static final int __WAREHOUSEID_ISSET_ID = 1;
24318
    private BitSet __isset_bit_vector = new BitSet(2);
24319
 
24320
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24321
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24322
          new FieldValueMetaData(TType.I64)));
24323
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
24324
          new FieldValueMetaData(TType.I64)));
24325
    }});
24326
 
24327
    static {
24328
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
24329
    }
24330
 
24331
    public getUndeliveredOrders_args() {
24332
    }
24333
 
24334
    public getUndeliveredOrders_args(
24335
      long providerId,
24336
      long warehouseId)
24337
    {
24338
      this();
24339
      this.providerId = providerId;
24340
      setProviderIdIsSet(true);
24341
      this.warehouseId = warehouseId;
24342
      setWarehouseIdIsSet(true);
24343
    }
24344
 
24345
    /**
24346
     * Performs a deep copy on <i>other</i>.
24347
     */
24348
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
24349
      __isset_bit_vector.clear();
24350
      __isset_bit_vector.or(other.__isset_bit_vector);
24351
      this.providerId = other.providerId;
24352
      this.warehouseId = other.warehouseId;
24353
    }
24354
 
24355
    public getUndeliveredOrders_args deepCopy() {
24356
      return new getUndeliveredOrders_args(this);
24357
    }
24358
 
24359
    @Deprecated
24360
    public getUndeliveredOrders_args clone() {
24361
      return new getUndeliveredOrders_args(this);
24362
    }
24363
 
24364
    public long getProviderId() {
24365
      return this.providerId;
24366
    }
24367
 
24368
    public getUndeliveredOrders_args setProviderId(long providerId) {
24369
      this.providerId = providerId;
24370
      setProviderIdIsSet(true);
24371
      return this;
24372
    }
24373
 
24374
    public void unsetProviderId() {
24375
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24376
    }
24377
 
24378
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24379
    public boolean isSetProviderId() {
24380
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24381
    }
24382
 
24383
    public void setProviderIdIsSet(boolean value) {
24384
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24385
    }
24386
 
24387
    public long getWarehouseId() {
24388
      return this.warehouseId;
24389
    }
24390
 
24391
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
24392
      this.warehouseId = warehouseId;
24393
      setWarehouseIdIsSet(true);
24394
      return this;
24395
    }
24396
 
24397
    public void unsetWarehouseId() {
24398
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
24399
    }
24400
 
24401
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
24402
    public boolean isSetWarehouseId() {
24403
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
24404
    }
24405
 
24406
    public void setWarehouseIdIsSet(boolean value) {
24407
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
24408
    }
24409
 
24410
    public void setFieldValue(_Fields field, Object value) {
24411
      switch (field) {
24412
      case PROVIDER_ID:
24413
        if (value == null) {
24414
          unsetProviderId();
24415
        } else {
24416
          setProviderId((Long)value);
24417
        }
24418
        break;
24419
 
24420
      case WAREHOUSE_ID:
24421
        if (value == null) {
24422
          unsetWarehouseId();
24423
        } else {
24424
          setWarehouseId((Long)value);
24425
        }
24426
        break;
24427
 
24428
      }
24429
    }
24430
 
24431
    public void setFieldValue(int fieldID, Object value) {
24432
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24433
    }
24434
 
24435
    public Object getFieldValue(_Fields field) {
24436
      switch (field) {
24437
      case PROVIDER_ID:
24438
        return new Long(getProviderId());
24439
 
24440
      case WAREHOUSE_ID:
24441
        return new Long(getWarehouseId());
24442
 
24443
      }
24444
      throw new IllegalStateException();
24445
    }
24446
 
24447
    public Object getFieldValue(int fieldId) {
24448
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24449
    }
24450
 
24451
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24452
    public boolean isSet(_Fields field) {
24453
      switch (field) {
24454
      case PROVIDER_ID:
24455
        return isSetProviderId();
24456
      case WAREHOUSE_ID:
24457
        return isSetWarehouseId();
24458
      }
24459
      throw new IllegalStateException();
24460
    }
24461
 
24462
    public boolean isSet(int fieldID) {
24463
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24464
    }
24465
 
24466
    @Override
24467
    public boolean equals(Object that) {
24468
      if (that == null)
24469
        return false;
24470
      if (that instanceof getUndeliveredOrders_args)
24471
        return this.equals((getUndeliveredOrders_args)that);
24472
      return false;
24473
    }
24474
 
24475
    public boolean equals(getUndeliveredOrders_args that) {
24476
      if (that == null)
24477
        return false;
24478
 
24479
      boolean this_present_providerId = true;
24480
      boolean that_present_providerId = true;
24481
      if (this_present_providerId || that_present_providerId) {
24482
        if (!(this_present_providerId && that_present_providerId))
24483
          return false;
24484
        if (this.providerId != that.providerId)
24485
          return false;
24486
      }
24487
 
24488
      boolean this_present_warehouseId = true;
24489
      boolean that_present_warehouseId = true;
24490
      if (this_present_warehouseId || that_present_warehouseId) {
24491
        if (!(this_present_warehouseId && that_present_warehouseId))
24492
          return false;
24493
        if (this.warehouseId != that.warehouseId)
24494
          return false;
24495
      }
24496
 
24497
      return true;
24498
    }
24499
 
24500
    @Override
24501
    public int hashCode() {
24502
      return 0;
24503
    }
24504
 
24505
    public int compareTo(getUndeliveredOrders_args other) {
24506
      if (!getClass().equals(other.getClass())) {
24507
        return getClass().getName().compareTo(other.getClass().getName());
24508
      }
24509
 
24510
      int lastComparison = 0;
24511
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
24512
 
24513
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
24514
      if (lastComparison != 0) {
24515
        return lastComparison;
24516
      }
24517
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
24518
      if (lastComparison != 0) {
24519
        return lastComparison;
24520
      }
24521
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
24522
      if (lastComparison != 0) {
24523
        return lastComparison;
24524
      }
24525
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
24526
      if (lastComparison != 0) {
24527
        return lastComparison;
24528
      }
24529
      return 0;
24530
    }
24531
 
24532
    public void read(TProtocol iprot) throws TException {
24533
      TField field;
24534
      iprot.readStructBegin();
24535
      while (true)
24536
      {
24537
        field = iprot.readFieldBegin();
24538
        if (field.type == TType.STOP) { 
24539
          break;
24540
        }
24541
        _Fields fieldId = _Fields.findByThriftId(field.id);
24542
        if (fieldId == null) {
24543
          TProtocolUtil.skip(iprot, field.type);
24544
        } else {
24545
          switch (fieldId) {
24546
            case PROVIDER_ID:
24547
              if (field.type == TType.I64) {
24548
                this.providerId = iprot.readI64();
24549
                setProviderIdIsSet(true);
24550
              } else { 
24551
                TProtocolUtil.skip(iprot, field.type);
24552
              }
24553
              break;
24554
            case WAREHOUSE_ID:
24555
              if (field.type == TType.I64) {
24556
                this.warehouseId = iprot.readI64();
24557
                setWarehouseIdIsSet(true);
24558
              } else { 
24559
                TProtocolUtil.skip(iprot, field.type);
24560
              }
24561
              break;
24562
          }
24563
          iprot.readFieldEnd();
24564
        }
24565
      }
24566
      iprot.readStructEnd();
24567
      validate();
24568
    }
24569
 
24570
    public void write(TProtocol oprot) throws TException {
24571
      validate();
24572
 
24573
      oprot.writeStructBegin(STRUCT_DESC);
24574
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24575
      oprot.writeI64(this.providerId);
24576
      oprot.writeFieldEnd();
24577
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
24578
      oprot.writeI64(this.warehouseId);
24579
      oprot.writeFieldEnd();
24580
      oprot.writeFieldStop();
24581
      oprot.writeStructEnd();
24582
    }
24583
 
24584
    @Override
24585
    public String toString() {
24586
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
24587
      boolean first = true;
24588
 
24589
      sb.append("providerId:");
24590
      sb.append(this.providerId);
24591
      first = false;
24592
      if (!first) sb.append(", ");
24593
      sb.append("warehouseId:");
24594
      sb.append(this.warehouseId);
24595
      first = false;
24596
      sb.append(")");
24597
      return sb.toString();
24598
    }
24599
 
24600
    public void validate() throws TException {
24601
      // check for required fields
24602
    }
24603
 
24604
  }
24605
 
24606
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
24607
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
24608
 
24609
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
24610
 
24611
    private List<Order> success;
24612
 
24613
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24614
    public enum _Fields implements TFieldIdEnum {
24615
      SUCCESS((short)0, "success");
24616
 
24617
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24618
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24619
 
24620
      static {
24621
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24622
          byId.put((int)field._thriftId, field);
24623
          byName.put(field.getFieldName(), field);
24624
        }
24625
      }
24626
 
24627
      /**
24628
       * Find the _Fields constant that matches fieldId, or null if its not found.
24629
       */
24630
      public static _Fields findByThriftId(int fieldId) {
24631
        return byId.get(fieldId);
24632
      }
24633
 
24634
      /**
24635
       * Find the _Fields constant that matches fieldId, throwing an exception
24636
       * if it is not found.
24637
       */
24638
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24639
        _Fields fields = findByThriftId(fieldId);
24640
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24641
        return fields;
24642
      }
24643
 
24644
      /**
24645
       * Find the _Fields constant that matches name, or null if its not found.
24646
       */
24647
      public static _Fields findByName(String name) {
24648
        return byName.get(name);
24649
      }
24650
 
24651
      private final short _thriftId;
24652
      private final String _fieldName;
24653
 
24654
      _Fields(short thriftId, String fieldName) {
24655
        _thriftId = thriftId;
24656
        _fieldName = fieldName;
24657
      }
24658
 
24659
      public short getThriftFieldId() {
24660
        return _thriftId;
24661
      }
24662
 
24663
      public String getFieldName() {
24664
        return _fieldName;
24665
      }
24666
    }
24667
 
24668
    // isset id assignments
24669
 
24670
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24671
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24672
          new ListMetaData(TType.LIST, 
24673
              new StructMetaData(TType.STRUCT, Order.class))));
24674
    }});
24675
 
24676
    static {
24677
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
24678
    }
24679
 
24680
    public getUndeliveredOrders_result() {
24681
    }
24682
 
24683
    public getUndeliveredOrders_result(
24684
      List<Order> success)
24685
    {
24686
      this();
24687
      this.success = success;
24688
    }
24689
 
24690
    /**
24691
     * Performs a deep copy on <i>other</i>.
24692
     */
24693
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
24694
      if (other.isSetSuccess()) {
24695
        List<Order> __this__success = new ArrayList<Order>();
24696
        for (Order other_element : other.success) {
24697
          __this__success.add(new Order(other_element));
24698
        }
24699
        this.success = __this__success;
24700
      }
24701
    }
24702
 
24703
    public getUndeliveredOrders_result deepCopy() {
24704
      return new getUndeliveredOrders_result(this);
24705
    }
24706
 
24707
    @Deprecated
24708
    public getUndeliveredOrders_result clone() {
24709
      return new getUndeliveredOrders_result(this);
24710
    }
24711
 
24712
    public int getSuccessSize() {
24713
      return (this.success == null) ? 0 : this.success.size();
24714
    }
24715
 
24716
    public java.util.Iterator<Order> getSuccessIterator() {
24717
      return (this.success == null) ? null : this.success.iterator();
24718
    }
24719
 
24720
    public void addToSuccess(Order elem) {
24721
      if (this.success == null) {
24722
        this.success = new ArrayList<Order>();
24723
      }
24724
      this.success.add(elem);
24725
    }
24726
 
24727
    public List<Order> getSuccess() {
24728
      return this.success;
24729
    }
24730
 
24731
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
24732
      this.success = success;
24733
      return this;
24734
    }
24735
 
24736
    public void unsetSuccess() {
24737
      this.success = null;
24738
    }
24739
 
24740
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24741
    public boolean isSetSuccess() {
24742
      return this.success != null;
24743
    }
24744
 
24745
    public void setSuccessIsSet(boolean value) {
24746
      if (!value) {
24747
        this.success = null;
24748
      }
24749
    }
24750
 
24751
    public void setFieldValue(_Fields field, Object value) {
24752
      switch (field) {
24753
      case SUCCESS:
24754
        if (value == null) {
24755
          unsetSuccess();
24756
        } else {
24757
          setSuccess((List<Order>)value);
24758
        }
24759
        break;
24760
 
24761
      }
24762
    }
24763
 
24764
    public void setFieldValue(int fieldID, Object value) {
24765
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24766
    }
24767
 
24768
    public Object getFieldValue(_Fields field) {
24769
      switch (field) {
24770
      case SUCCESS:
24771
        return getSuccess();
24772
 
24773
      }
24774
      throw new IllegalStateException();
24775
    }
24776
 
24777
    public Object getFieldValue(int fieldId) {
24778
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24779
    }
24780
 
24781
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24782
    public boolean isSet(_Fields field) {
24783
      switch (field) {
24784
      case SUCCESS:
24785
        return isSetSuccess();
24786
      }
24787
      throw new IllegalStateException();
24788
    }
24789
 
24790
    public boolean isSet(int fieldID) {
24791
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24792
    }
24793
 
24794
    @Override
24795
    public boolean equals(Object that) {
24796
      if (that == null)
24797
        return false;
24798
      if (that instanceof getUndeliveredOrders_result)
24799
        return this.equals((getUndeliveredOrders_result)that);
24800
      return false;
24801
    }
24802
 
24803
    public boolean equals(getUndeliveredOrders_result that) {
24804
      if (that == null)
24805
        return false;
24806
 
24807
      boolean this_present_success = true && this.isSetSuccess();
24808
      boolean that_present_success = true && that.isSetSuccess();
24809
      if (this_present_success || that_present_success) {
24810
        if (!(this_present_success && that_present_success))
24811
          return false;
24812
        if (!this.success.equals(that.success))
24813
          return false;
24814
      }
24815
 
24816
      return true;
24817
    }
24818
 
24819
    @Override
24820
    public int hashCode() {
24821
      return 0;
24822
    }
24823
 
24824
    public int compareTo(getUndeliveredOrders_result other) {
24825
      if (!getClass().equals(other.getClass())) {
24826
        return getClass().getName().compareTo(other.getClass().getName());
24827
      }
24828
 
24829
      int lastComparison = 0;
24830
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
24831
 
24832
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24833
      if (lastComparison != 0) {
24834
        return lastComparison;
24835
      }
24836
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24837
      if (lastComparison != 0) {
24838
        return lastComparison;
24839
      }
24840
      return 0;
24841
    }
24842
 
24843
    public void read(TProtocol iprot) throws TException {
24844
      TField field;
24845
      iprot.readStructBegin();
24846
      while (true)
24847
      {
24848
        field = iprot.readFieldBegin();
24849
        if (field.type == TType.STOP) { 
24850
          break;
24851
        }
24852
        _Fields fieldId = _Fields.findByThriftId(field.id);
24853
        if (fieldId == null) {
24854
          TProtocolUtil.skip(iprot, field.type);
24855
        } else {
24856
          switch (fieldId) {
24857
            case SUCCESS:
24858
              if (field.type == TType.LIST) {
24859
                {
24860
                  TList _list72 = iprot.readListBegin();
24861
                  this.success = new ArrayList<Order>(_list72.size);
24862
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
24863
                  {
24864
                    Order _elem74;
24865
                    _elem74 = new Order();
24866
                    _elem74.read(iprot);
24867
                    this.success.add(_elem74);
24868
                  }
24869
                  iprot.readListEnd();
24870
                }
24871
              } else { 
24872
                TProtocolUtil.skip(iprot, field.type);
24873
              }
24874
              break;
24875
          }
24876
          iprot.readFieldEnd();
24877
        }
24878
      }
24879
      iprot.readStructEnd();
24880
      validate();
24881
    }
24882
 
24883
    public void write(TProtocol oprot) throws TException {
24884
      oprot.writeStructBegin(STRUCT_DESC);
24885
 
24886
      if (this.isSetSuccess()) {
24887
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24888
        {
24889
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
24890
          for (Order _iter75 : this.success)
24891
          {
24892
            _iter75.write(oprot);
24893
          }
24894
          oprot.writeListEnd();
24895
        }
24896
        oprot.writeFieldEnd();
24897
      }
24898
      oprot.writeFieldStop();
24899
      oprot.writeStructEnd();
24900
    }
24901
 
24902
    @Override
24903
    public String toString() {
24904
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
24905
      boolean first = true;
24906
 
24907
      sb.append("success:");
24908
      if (this.success == null) {
24909
        sb.append("null");
24910
      } else {
24911
        sb.append(this.success);
24912
      }
24913
      first = false;
24914
      sb.append(")");
24915
      return sb.toString();
24916
    }
24917
 
24918
    public void validate() throws TException {
24919
      // check for required fields
24920
    }
24921
 
24922
  }
24923
 
305 ashish 24924
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
24925
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
24926
 
483 rajveer 24927
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 24928
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
24929
 
483 rajveer 24930
    private long orderId;
305 ashish 24931
    private boolean valid;
24932
 
24933
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24934
    public enum _Fields implements TFieldIdEnum {
483 rajveer 24935
      ORDER_ID((short)1, "orderId"),
305 ashish 24936
      VALID((short)2, "valid");
24937
 
24938
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24939
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24940
 
24941
      static {
24942
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24943
          byId.put((int)field._thriftId, field);
24944
          byName.put(field.getFieldName(), field);
24945
        }
24946
      }
24947
 
24948
      /**
24949
       * Find the _Fields constant that matches fieldId, or null if its not found.
24950
       */
24951
      public static _Fields findByThriftId(int fieldId) {
24952
        return byId.get(fieldId);
24953
      }
24954
 
24955
      /**
24956
       * Find the _Fields constant that matches fieldId, throwing an exception
24957
       * if it is not found.
24958
       */
24959
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24960
        _Fields fields = findByThriftId(fieldId);
24961
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24962
        return fields;
24963
      }
24964
 
24965
      /**
24966
       * Find the _Fields constant that matches name, or null if its not found.
24967
       */
24968
      public static _Fields findByName(String name) {
24969
        return byName.get(name);
24970
      }
24971
 
24972
      private final short _thriftId;
24973
      private final String _fieldName;
24974
 
24975
      _Fields(short thriftId, String fieldName) {
24976
        _thriftId = thriftId;
24977
        _fieldName = fieldName;
24978
      }
24979
 
24980
      public short getThriftFieldId() {
24981
        return _thriftId;
24982
      }
24983
 
24984
      public String getFieldName() {
24985
        return _fieldName;
24986
      }
24987
    }
24988
 
24989
    // isset id assignments
483 rajveer 24990
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 24991
    private static final int __VALID_ISSET_ID = 1;
24992
    private BitSet __isset_bit_vector = new BitSet(2);
24993
 
24994
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 24995
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 24996
          new FieldValueMetaData(TType.I64)));
24997
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
24998
          new FieldValueMetaData(TType.BOOL)));
24999
    }});
25000
 
25001
    static {
25002
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
25003
    }
25004
 
25005
    public getAlerts_args() {
25006
    }
25007
 
25008
    public getAlerts_args(
483 rajveer 25009
      long orderId,
305 ashish 25010
      boolean valid)
25011
    {
25012
      this();
483 rajveer 25013
      this.orderId = orderId;
25014
      setOrderIdIsSet(true);
305 ashish 25015
      this.valid = valid;
25016
      setValidIsSet(true);
25017
    }
25018
 
25019
    /**
25020
     * Performs a deep copy on <i>other</i>.
25021
     */
25022
    public getAlerts_args(getAlerts_args other) {
25023
      __isset_bit_vector.clear();
25024
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25025
      this.orderId = other.orderId;
305 ashish 25026
      this.valid = other.valid;
25027
    }
25028
 
25029
    public getAlerts_args deepCopy() {
25030
      return new getAlerts_args(this);
25031
    }
25032
 
25033
    @Deprecated
25034
    public getAlerts_args clone() {
25035
      return new getAlerts_args(this);
25036
    }
25037
 
483 rajveer 25038
    public long getOrderId() {
25039
      return this.orderId;
305 ashish 25040
    }
25041
 
483 rajveer 25042
    public getAlerts_args setOrderId(long orderId) {
25043
      this.orderId = orderId;
25044
      setOrderIdIsSet(true);
305 ashish 25045
      return this;
25046
    }
25047
 
483 rajveer 25048
    public void unsetOrderId() {
25049
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25050
    }
25051
 
483 rajveer 25052
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25053
    public boolean isSetOrderId() {
25054
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25055
    }
25056
 
483 rajveer 25057
    public void setOrderIdIsSet(boolean value) {
25058
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25059
    }
25060
 
25061
    public boolean isValid() {
25062
      return this.valid;
25063
    }
25064
 
25065
    public getAlerts_args setValid(boolean valid) {
25066
      this.valid = valid;
25067
      setValidIsSet(true);
25068
      return this;
25069
    }
25070
 
25071
    public void unsetValid() {
25072
      __isset_bit_vector.clear(__VALID_ISSET_ID);
25073
    }
25074
 
25075
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
25076
    public boolean isSetValid() {
25077
      return __isset_bit_vector.get(__VALID_ISSET_ID);
25078
    }
25079
 
25080
    public void setValidIsSet(boolean value) {
25081
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
25082
    }
25083
 
25084
    public void setFieldValue(_Fields field, Object value) {
25085
      switch (field) {
483 rajveer 25086
      case ORDER_ID:
305 ashish 25087
        if (value == null) {
483 rajveer 25088
          unsetOrderId();
305 ashish 25089
        } else {
483 rajveer 25090
          setOrderId((Long)value);
305 ashish 25091
        }
25092
        break;
25093
 
25094
      case VALID:
25095
        if (value == null) {
25096
          unsetValid();
25097
        } else {
25098
          setValid((Boolean)value);
25099
        }
25100
        break;
25101
 
25102
      }
25103
    }
25104
 
25105
    public void setFieldValue(int fieldID, Object value) {
25106
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25107
    }
25108
 
25109
    public Object getFieldValue(_Fields field) {
25110
      switch (field) {
483 rajveer 25111
      case ORDER_ID:
25112
        return new Long(getOrderId());
305 ashish 25113
 
25114
      case VALID:
25115
        return new Boolean(isValid());
25116
 
25117
      }
25118
      throw new IllegalStateException();
25119
    }
25120
 
25121
    public Object getFieldValue(int fieldId) {
25122
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25123
    }
25124
 
25125
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25126
    public boolean isSet(_Fields field) {
25127
      switch (field) {
483 rajveer 25128
      case ORDER_ID:
25129
        return isSetOrderId();
305 ashish 25130
      case VALID:
25131
        return isSetValid();
25132
      }
25133
      throw new IllegalStateException();
25134
    }
25135
 
25136
    public boolean isSet(int fieldID) {
25137
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25138
    }
25139
 
25140
    @Override
25141
    public boolean equals(Object that) {
25142
      if (that == null)
25143
        return false;
25144
      if (that instanceof getAlerts_args)
25145
        return this.equals((getAlerts_args)that);
25146
      return false;
25147
    }
25148
 
25149
    public boolean equals(getAlerts_args that) {
25150
      if (that == null)
25151
        return false;
25152
 
483 rajveer 25153
      boolean this_present_orderId = true;
25154
      boolean that_present_orderId = true;
25155
      if (this_present_orderId || that_present_orderId) {
25156
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25157
          return false;
483 rajveer 25158
        if (this.orderId != that.orderId)
305 ashish 25159
          return false;
25160
      }
25161
 
25162
      boolean this_present_valid = true;
25163
      boolean that_present_valid = true;
25164
      if (this_present_valid || that_present_valid) {
25165
        if (!(this_present_valid && that_present_valid))
25166
          return false;
25167
        if (this.valid != that.valid)
25168
          return false;
25169
      }
25170
 
25171
      return true;
25172
    }
25173
 
25174
    @Override
25175
    public int hashCode() {
25176
      return 0;
25177
    }
25178
 
25179
    public int compareTo(getAlerts_args other) {
25180
      if (!getClass().equals(other.getClass())) {
25181
        return getClass().getName().compareTo(other.getClass().getName());
25182
      }
25183
 
25184
      int lastComparison = 0;
25185
      getAlerts_args typedOther = (getAlerts_args)other;
25186
 
483 rajveer 25187
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25188
      if (lastComparison != 0) {
25189
        return lastComparison;
25190
      }
483 rajveer 25191
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25192
      if (lastComparison != 0) {
25193
        return lastComparison;
25194
      }
25195
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
25196
      if (lastComparison != 0) {
25197
        return lastComparison;
25198
      }
25199
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
25200
      if (lastComparison != 0) {
25201
        return lastComparison;
25202
      }
25203
      return 0;
25204
    }
25205
 
25206
    public void read(TProtocol iprot) throws TException {
25207
      TField field;
25208
      iprot.readStructBegin();
25209
      while (true)
25210
      {
25211
        field = iprot.readFieldBegin();
25212
        if (field.type == TType.STOP) { 
25213
          break;
25214
        }
25215
        _Fields fieldId = _Fields.findByThriftId(field.id);
25216
        if (fieldId == null) {
25217
          TProtocolUtil.skip(iprot, field.type);
25218
        } else {
25219
          switch (fieldId) {
483 rajveer 25220
            case ORDER_ID:
305 ashish 25221
              if (field.type == TType.I64) {
483 rajveer 25222
                this.orderId = iprot.readI64();
25223
                setOrderIdIsSet(true);
305 ashish 25224
              } else { 
25225
                TProtocolUtil.skip(iprot, field.type);
25226
              }
25227
              break;
25228
            case VALID:
25229
              if (field.type == TType.BOOL) {
25230
                this.valid = iprot.readBool();
25231
                setValidIsSet(true);
25232
              } else { 
25233
                TProtocolUtil.skip(iprot, field.type);
25234
              }
25235
              break;
25236
          }
25237
          iprot.readFieldEnd();
25238
        }
25239
      }
25240
      iprot.readStructEnd();
25241
      validate();
25242
    }
25243
 
25244
    public void write(TProtocol oprot) throws TException {
25245
      validate();
25246
 
25247
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25248
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25249
      oprot.writeI64(this.orderId);
305 ashish 25250
      oprot.writeFieldEnd();
25251
      oprot.writeFieldBegin(VALID_FIELD_DESC);
25252
      oprot.writeBool(this.valid);
25253
      oprot.writeFieldEnd();
25254
      oprot.writeFieldStop();
25255
      oprot.writeStructEnd();
25256
    }
25257
 
25258
    @Override
25259
    public String toString() {
25260
      StringBuilder sb = new StringBuilder("getAlerts_args(");
25261
      boolean first = true;
25262
 
483 rajveer 25263
      sb.append("orderId:");
25264
      sb.append(this.orderId);
305 ashish 25265
      first = false;
25266
      if (!first) sb.append(", ");
25267
      sb.append("valid:");
25268
      sb.append(this.valid);
25269
      first = false;
25270
      sb.append(")");
25271
      return sb.toString();
25272
    }
25273
 
25274
    public void validate() throws TException {
25275
      // check for required fields
25276
    }
25277
 
25278
  }
25279
 
25280
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
25281
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
25282
 
25283
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25284
 
25285
    private List<Alert> success;
25286
 
25287
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25288
    public enum _Fields implements TFieldIdEnum {
25289
      SUCCESS((short)0, "success");
25290
 
25291
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25292
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25293
 
25294
      static {
25295
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25296
          byId.put((int)field._thriftId, field);
25297
          byName.put(field.getFieldName(), field);
25298
        }
25299
      }
25300
 
25301
      /**
25302
       * Find the _Fields constant that matches fieldId, or null if its not found.
25303
       */
25304
      public static _Fields findByThriftId(int fieldId) {
25305
        return byId.get(fieldId);
25306
      }
25307
 
25308
      /**
25309
       * Find the _Fields constant that matches fieldId, throwing an exception
25310
       * if it is not found.
25311
       */
25312
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25313
        _Fields fields = findByThriftId(fieldId);
25314
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25315
        return fields;
25316
      }
25317
 
25318
      /**
25319
       * Find the _Fields constant that matches name, or null if its not found.
25320
       */
25321
      public static _Fields findByName(String name) {
25322
        return byName.get(name);
25323
      }
25324
 
25325
      private final short _thriftId;
25326
      private final String _fieldName;
25327
 
25328
      _Fields(short thriftId, String fieldName) {
25329
        _thriftId = thriftId;
25330
        _fieldName = fieldName;
25331
      }
25332
 
25333
      public short getThriftFieldId() {
25334
        return _thriftId;
25335
      }
25336
 
25337
      public String getFieldName() {
25338
        return _fieldName;
25339
      }
25340
    }
25341
 
25342
    // isset id assignments
25343
 
25344
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25345
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25346
          new ListMetaData(TType.LIST, 
25347
              new StructMetaData(TType.STRUCT, Alert.class))));
25348
    }});
25349
 
25350
    static {
25351
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
25352
    }
25353
 
25354
    public getAlerts_result() {
25355
    }
25356
 
25357
    public getAlerts_result(
25358
      List<Alert> success)
25359
    {
25360
      this();
25361
      this.success = success;
25362
    }
25363
 
25364
    /**
25365
     * Performs a deep copy on <i>other</i>.
25366
     */
25367
    public getAlerts_result(getAlerts_result other) {
25368
      if (other.isSetSuccess()) {
25369
        List<Alert> __this__success = new ArrayList<Alert>();
25370
        for (Alert other_element : other.success) {
25371
          __this__success.add(new Alert(other_element));
25372
        }
25373
        this.success = __this__success;
25374
      }
25375
    }
25376
 
25377
    public getAlerts_result deepCopy() {
25378
      return new getAlerts_result(this);
25379
    }
25380
 
25381
    @Deprecated
25382
    public getAlerts_result clone() {
25383
      return new getAlerts_result(this);
25384
    }
25385
 
25386
    public int getSuccessSize() {
25387
      return (this.success == null) ? 0 : this.success.size();
25388
    }
25389
 
25390
    public java.util.Iterator<Alert> getSuccessIterator() {
25391
      return (this.success == null) ? null : this.success.iterator();
25392
    }
25393
 
25394
    public void addToSuccess(Alert elem) {
25395
      if (this.success == null) {
25396
        this.success = new ArrayList<Alert>();
25397
      }
25398
      this.success.add(elem);
25399
    }
25400
 
25401
    public List<Alert> getSuccess() {
25402
      return this.success;
25403
    }
25404
 
25405
    public getAlerts_result setSuccess(List<Alert> success) {
25406
      this.success = success;
25407
      return this;
25408
    }
25409
 
25410
    public void unsetSuccess() {
25411
      this.success = null;
25412
    }
25413
 
25414
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25415
    public boolean isSetSuccess() {
25416
      return this.success != null;
25417
    }
25418
 
25419
    public void setSuccessIsSet(boolean value) {
25420
      if (!value) {
25421
        this.success = null;
25422
      }
25423
    }
25424
 
25425
    public void setFieldValue(_Fields field, Object value) {
25426
      switch (field) {
25427
      case SUCCESS:
25428
        if (value == null) {
25429
          unsetSuccess();
25430
        } else {
25431
          setSuccess((List<Alert>)value);
25432
        }
25433
        break;
25434
 
25435
      }
25436
    }
25437
 
25438
    public void setFieldValue(int fieldID, Object value) {
25439
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25440
    }
25441
 
25442
    public Object getFieldValue(_Fields field) {
25443
      switch (field) {
25444
      case SUCCESS:
25445
        return getSuccess();
25446
 
25447
      }
25448
      throw new IllegalStateException();
25449
    }
25450
 
25451
    public Object getFieldValue(int fieldId) {
25452
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25453
    }
25454
 
25455
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25456
    public boolean isSet(_Fields field) {
25457
      switch (field) {
25458
      case SUCCESS:
25459
        return isSetSuccess();
25460
      }
25461
      throw new IllegalStateException();
25462
    }
25463
 
25464
    public boolean isSet(int fieldID) {
25465
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25466
    }
25467
 
25468
    @Override
25469
    public boolean equals(Object that) {
25470
      if (that == null)
25471
        return false;
25472
      if (that instanceof getAlerts_result)
25473
        return this.equals((getAlerts_result)that);
25474
      return false;
25475
    }
25476
 
25477
    public boolean equals(getAlerts_result that) {
25478
      if (that == null)
25479
        return false;
25480
 
25481
      boolean this_present_success = true && this.isSetSuccess();
25482
      boolean that_present_success = true && that.isSetSuccess();
25483
      if (this_present_success || that_present_success) {
25484
        if (!(this_present_success && that_present_success))
25485
          return false;
25486
        if (!this.success.equals(that.success))
25487
          return false;
25488
      }
25489
 
25490
      return true;
25491
    }
25492
 
25493
    @Override
25494
    public int hashCode() {
25495
      return 0;
25496
    }
25497
 
25498
    public int compareTo(getAlerts_result other) {
25499
      if (!getClass().equals(other.getClass())) {
25500
        return getClass().getName().compareTo(other.getClass().getName());
25501
      }
25502
 
25503
      int lastComparison = 0;
25504
      getAlerts_result typedOther = (getAlerts_result)other;
25505
 
25506
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25507
      if (lastComparison != 0) {
25508
        return lastComparison;
25509
      }
25510
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25511
      if (lastComparison != 0) {
25512
        return lastComparison;
25513
      }
25514
      return 0;
25515
    }
25516
 
25517
    public void read(TProtocol iprot) throws TException {
25518
      TField field;
25519
      iprot.readStructBegin();
25520
      while (true)
25521
      {
25522
        field = iprot.readFieldBegin();
25523
        if (field.type == TType.STOP) { 
25524
          break;
25525
        }
25526
        _Fields fieldId = _Fields.findByThriftId(field.id);
25527
        if (fieldId == null) {
25528
          TProtocolUtil.skip(iprot, field.type);
25529
        } else {
25530
          switch (fieldId) {
25531
            case SUCCESS:
25532
              if (field.type == TType.LIST) {
25533
                {
1406 ankur.sing 25534
                  TList _list76 = iprot.readListBegin();
25535
                  this.success = new ArrayList<Alert>(_list76.size);
25536
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 25537
                  {
1406 ankur.sing 25538
                    Alert _elem78;
25539
                    _elem78 = new Alert();
25540
                    _elem78.read(iprot);
25541
                    this.success.add(_elem78);
305 ashish 25542
                  }
25543
                  iprot.readListEnd();
25544
                }
25545
              } else { 
25546
                TProtocolUtil.skip(iprot, field.type);
25547
              }
25548
              break;
25549
          }
25550
          iprot.readFieldEnd();
25551
        }
25552
      }
25553
      iprot.readStructEnd();
25554
      validate();
25555
    }
25556
 
25557
    public void write(TProtocol oprot) throws TException {
25558
      oprot.writeStructBegin(STRUCT_DESC);
25559
 
25560
      if (this.isSetSuccess()) {
25561
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25562
        {
25563
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 25564
          for (Alert _iter79 : this.success)
305 ashish 25565
          {
1406 ankur.sing 25566
            _iter79.write(oprot);
305 ashish 25567
          }
25568
          oprot.writeListEnd();
25569
        }
25570
        oprot.writeFieldEnd();
25571
      }
25572
      oprot.writeFieldStop();
25573
      oprot.writeStructEnd();
25574
    }
25575
 
25576
    @Override
25577
    public String toString() {
25578
      StringBuilder sb = new StringBuilder("getAlerts_result(");
25579
      boolean first = true;
25580
 
25581
      sb.append("success:");
25582
      if (this.success == null) {
25583
        sb.append("null");
25584
      } else {
25585
        sb.append(this.success);
25586
      }
25587
      first = false;
25588
      sb.append(")");
25589
      return sb.toString();
25590
    }
25591
 
25592
    public void validate() throws TException {
25593
      // check for required fields
25594
    }
25595
 
25596
  }
25597
 
25598
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
25599
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
25600
 
483 rajveer 25601
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25602
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
25603
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
25604
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
25605
 
483 rajveer 25606
    private long orderId;
305 ashish 25607
    private boolean unset;
25608
    private long type;
25609
    private String comment;
25610
 
25611
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25612
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25613
      ORDER_ID((short)1, "orderId"),
305 ashish 25614
      UNSET((short)2, "unset"),
25615
      TYPE((short)3, "type"),
25616
      COMMENT((short)4, "comment");
25617
 
25618
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25619
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25620
 
25621
      static {
25622
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25623
          byId.put((int)field._thriftId, field);
25624
          byName.put(field.getFieldName(), field);
25625
        }
25626
      }
25627
 
25628
      /**
25629
       * Find the _Fields constant that matches fieldId, or null if its not found.
25630
       */
25631
      public static _Fields findByThriftId(int fieldId) {
25632
        return byId.get(fieldId);
25633
      }
25634
 
25635
      /**
25636
       * Find the _Fields constant that matches fieldId, throwing an exception
25637
       * if it is not found.
25638
       */
25639
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25640
        _Fields fields = findByThriftId(fieldId);
25641
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25642
        return fields;
25643
      }
25644
 
25645
      /**
25646
       * Find the _Fields constant that matches name, or null if its not found.
25647
       */
25648
      public static _Fields findByName(String name) {
25649
        return byName.get(name);
25650
      }
25651
 
25652
      private final short _thriftId;
25653
      private final String _fieldName;
25654
 
25655
      _Fields(short thriftId, String fieldName) {
25656
        _thriftId = thriftId;
25657
        _fieldName = fieldName;
25658
      }
25659
 
25660
      public short getThriftFieldId() {
25661
        return _thriftId;
25662
      }
25663
 
25664
      public String getFieldName() {
25665
        return _fieldName;
25666
      }
25667
    }
25668
 
25669
    // isset id assignments
483 rajveer 25670
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25671
    private static final int __UNSET_ISSET_ID = 1;
25672
    private static final int __TYPE_ISSET_ID = 2;
25673
    private BitSet __isset_bit_vector = new BitSet(3);
25674
 
25675
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25676
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25677
          new FieldValueMetaData(TType.I64)));
25678
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
25679
          new FieldValueMetaData(TType.BOOL)));
25680
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
25681
          new FieldValueMetaData(TType.I64)));
25682
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
25683
          new FieldValueMetaData(TType.STRING)));
25684
    }});
25685
 
25686
    static {
25687
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
25688
    }
25689
 
25690
    public setAlert_args() {
25691
    }
25692
 
25693
    public setAlert_args(
483 rajveer 25694
      long orderId,
305 ashish 25695
      boolean unset,
25696
      long type,
25697
      String comment)
25698
    {
25699
      this();
483 rajveer 25700
      this.orderId = orderId;
25701
      setOrderIdIsSet(true);
305 ashish 25702
      this.unset = unset;
25703
      setUnsetIsSet(true);
25704
      this.type = type;
25705
      setTypeIsSet(true);
25706
      this.comment = comment;
25707
    }
25708
 
25709
    /**
25710
     * Performs a deep copy on <i>other</i>.
25711
     */
25712
    public setAlert_args(setAlert_args other) {
25713
      __isset_bit_vector.clear();
25714
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25715
      this.orderId = other.orderId;
305 ashish 25716
      this.unset = other.unset;
25717
      this.type = other.type;
25718
      if (other.isSetComment()) {
25719
        this.comment = other.comment;
25720
      }
25721
    }
25722
 
25723
    public setAlert_args deepCopy() {
25724
      return new setAlert_args(this);
25725
    }
25726
 
25727
    @Deprecated
25728
    public setAlert_args clone() {
25729
      return new setAlert_args(this);
25730
    }
25731
 
483 rajveer 25732
    public long getOrderId() {
25733
      return this.orderId;
305 ashish 25734
    }
25735
 
483 rajveer 25736
    public setAlert_args setOrderId(long orderId) {
25737
      this.orderId = orderId;
25738
      setOrderIdIsSet(true);
305 ashish 25739
      return this;
25740
    }
25741
 
483 rajveer 25742
    public void unsetOrderId() {
25743
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25744
    }
25745
 
483 rajveer 25746
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25747
    public boolean isSetOrderId() {
25748
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25749
    }
25750
 
483 rajveer 25751
    public void setOrderIdIsSet(boolean value) {
25752
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25753
    }
25754
 
25755
    public boolean isUnset() {
25756
      return this.unset;
25757
    }
25758
 
25759
    public setAlert_args setUnset(boolean unset) {
25760
      this.unset = unset;
25761
      setUnsetIsSet(true);
25762
      return this;
25763
    }
25764
 
25765
    public void unsetUnset() {
25766
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
25767
    }
25768
 
25769
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
25770
    public boolean isSetUnset() {
25771
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
25772
    }
25773
 
25774
    public void setUnsetIsSet(boolean value) {
25775
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
25776
    }
25777
 
25778
    public long getType() {
25779
      return this.type;
25780
    }
25781
 
25782
    public setAlert_args setType(long type) {
25783
      this.type = type;
25784
      setTypeIsSet(true);
25785
      return this;
25786
    }
25787
 
25788
    public void unsetType() {
25789
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
25790
    }
25791
 
25792
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
25793
    public boolean isSetType() {
25794
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
25795
    }
25796
 
25797
    public void setTypeIsSet(boolean value) {
25798
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
25799
    }
25800
 
25801
    public String getComment() {
25802
      return this.comment;
25803
    }
25804
 
25805
    public setAlert_args setComment(String comment) {
25806
      this.comment = comment;
25807
      return this;
25808
    }
25809
 
25810
    public void unsetComment() {
25811
      this.comment = null;
25812
    }
25813
 
25814
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
25815
    public boolean isSetComment() {
25816
      return this.comment != null;
25817
    }
25818
 
25819
    public void setCommentIsSet(boolean value) {
25820
      if (!value) {
25821
        this.comment = null;
25822
      }
25823
    }
25824
 
25825
    public void setFieldValue(_Fields field, Object value) {
25826
      switch (field) {
483 rajveer 25827
      case ORDER_ID:
305 ashish 25828
        if (value == null) {
483 rajveer 25829
          unsetOrderId();
305 ashish 25830
        } else {
483 rajveer 25831
          setOrderId((Long)value);
305 ashish 25832
        }
25833
        break;
25834
 
25835
      case UNSET:
25836
        if (value == null) {
25837
          unsetUnset();
25838
        } else {
25839
          setUnset((Boolean)value);
25840
        }
25841
        break;
25842
 
25843
      case TYPE:
25844
        if (value == null) {
25845
          unsetType();
25846
        } else {
25847
          setType((Long)value);
25848
        }
25849
        break;
25850
 
25851
      case COMMENT:
25852
        if (value == null) {
25853
          unsetComment();
25854
        } else {
25855
          setComment((String)value);
25856
        }
25857
        break;
25858
 
25859
      }
25860
    }
25861
 
25862
    public void setFieldValue(int fieldID, Object value) {
25863
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25864
    }
25865
 
25866
    public Object getFieldValue(_Fields field) {
25867
      switch (field) {
483 rajveer 25868
      case ORDER_ID:
25869
        return new Long(getOrderId());
305 ashish 25870
 
25871
      case UNSET:
25872
        return new Boolean(isUnset());
25873
 
25874
      case TYPE:
25875
        return new Long(getType());
25876
 
25877
      case COMMENT:
25878
        return getComment();
25879
 
25880
      }
25881
      throw new IllegalStateException();
25882
    }
25883
 
25884
    public Object getFieldValue(int fieldId) {
25885
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25886
    }
25887
 
25888
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25889
    public boolean isSet(_Fields field) {
25890
      switch (field) {
483 rajveer 25891
      case ORDER_ID:
25892
        return isSetOrderId();
305 ashish 25893
      case UNSET:
25894
        return isSetUnset();
25895
      case TYPE:
25896
        return isSetType();
25897
      case COMMENT:
25898
        return isSetComment();
25899
      }
25900
      throw new IllegalStateException();
25901
    }
25902
 
25903
    public boolean isSet(int fieldID) {
25904
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25905
    }
25906
 
25907
    @Override
25908
    public boolean equals(Object that) {
25909
      if (that == null)
25910
        return false;
25911
      if (that instanceof setAlert_args)
25912
        return this.equals((setAlert_args)that);
25913
      return false;
25914
    }
25915
 
25916
    public boolean equals(setAlert_args that) {
25917
      if (that == null)
25918
        return false;
25919
 
483 rajveer 25920
      boolean this_present_orderId = true;
25921
      boolean that_present_orderId = true;
25922
      if (this_present_orderId || that_present_orderId) {
25923
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25924
          return false;
483 rajveer 25925
        if (this.orderId != that.orderId)
305 ashish 25926
          return false;
25927
      }
25928
 
25929
      boolean this_present_unset = true;
25930
      boolean that_present_unset = true;
25931
      if (this_present_unset || that_present_unset) {
25932
        if (!(this_present_unset && that_present_unset))
25933
          return false;
25934
        if (this.unset != that.unset)
25935
          return false;
25936
      }
25937
 
25938
      boolean this_present_type = true;
25939
      boolean that_present_type = true;
25940
      if (this_present_type || that_present_type) {
25941
        if (!(this_present_type && that_present_type))
25942
          return false;
25943
        if (this.type != that.type)
25944
          return false;
25945
      }
25946
 
25947
      boolean this_present_comment = true && this.isSetComment();
25948
      boolean that_present_comment = true && that.isSetComment();
25949
      if (this_present_comment || that_present_comment) {
25950
        if (!(this_present_comment && that_present_comment))
25951
          return false;
25952
        if (!this.comment.equals(that.comment))
25953
          return false;
25954
      }
25955
 
25956
      return true;
25957
    }
25958
 
25959
    @Override
25960
    public int hashCode() {
25961
      return 0;
25962
    }
25963
 
25964
    public int compareTo(setAlert_args other) {
25965
      if (!getClass().equals(other.getClass())) {
25966
        return getClass().getName().compareTo(other.getClass().getName());
25967
      }
25968
 
25969
      int lastComparison = 0;
25970
      setAlert_args typedOther = (setAlert_args)other;
25971
 
483 rajveer 25972
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25973
      if (lastComparison != 0) {
25974
        return lastComparison;
25975
      }
483 rajveer 25976
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25977
      if (lastComparison != 0) {
25978
        return lastComparison;
25979
      }
25980
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
25981
      if (lastComparison != 0) {
25982
        return lastComparison;
25983
      }
25984
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
25985
      if (lastComparison != 0) {
25986
        return lastComparison;
25987
      }
25988
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
25989
      if (lastComparison != 0) {
25990
        return lastComparison;
25991
      }
25992
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
25993
      if (lastComparison != 0) {
25994
        return lastComparison;
25995
      }
25996
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
25997
      if (lastComparison != 0) {
25998
        return lastComparison;
25999
      }
26000
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
26001
      if (lastComparison != 0) {
26002
        return lastComparison;
26003
      }
26004
      return 0;
26005
    }
26006
 
26007
    public void read(TProtocol iprot) throws TException {
26008
      TField field;
26009
      iprot.readStructBegin();
26010
      while (true)
26011
      {
26012
        field = iprot.readFieldBegin();
26013
        if (field.type == TType.STOP) { 
26014
          break;
26015
        }
26016
        _Fields fieldId = _Fields.findByThriftId(field.id);
26017
        if (fieldId == null) {
26018
          TProtocolUtil.skip(iprot, field.type);
26019
        } else {
26020
          switch (fieldId) {
483 rajveer 26021
            case ORDER_ID:
305 ashish 26022
              if (field.type == TType.I64) {
483 rajveer 26023
                this.orderId = iprot.readI64();
26024
                setOrderIdIsSet(true);
305 ashish 26025
              } else { 
26026
                TProtocolUtil.skip(iprot, field.type);
26027
              }
26028
              break;
26029
            case UNSET:
26030
              if (field.type == TType.BOOL) {
26031
                this.unset = iprot.readBool();
26032
                setUnsetIsSet(true);
26033
              } else { 
26034
                TProtocolUtil.skip(iprot, field.type);
26035
              }
26036
              break;
26037
            case TYPE:
26038
              if (field.type == TType.I64) {
26039
                this.type = iprot.readI64();
26040
                setTypeIsSet(true);
26041
              } else { 
26042
                TProtocolUtil.skip(iprot, field.type);
26043
              }
26044
              break;
26045
            case COMMENT:
26046
              if (field.type == TType.STRING) {
26047
                this.comment = iprot.readString();
26048
              } else { 
26049
                TProtocolUtil.skip(iprot, field.type);
26050
              }
26051
              break;
26052
          }
26053
          iprot.readFieldEnd();
26054
        }
26055
      }
26056
      iprot.readStructEnd();
26057
      validate();
26058
    }
26059
 
26060
    public void write(TProtocol oprot) throws TException {
26061
      validate();
26062
 
26063
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 26064
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
26065
      oprot.writeI64(this.orderId);
305 ashish 26066
      oprot.writeFieldEnd();
26067
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
26068
      oprot.writeBool(this.unset);
26069
      oprot.writeFieldEnd();
26070
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
26071
      oprot.writeI64(this.type);
26072
      oprot.writeFieldEnd();
26073
      if (this.comment != null) {
26074
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
26075
        oprot.writeString(this.comment);
26076
        oprot.writeFieldEnd();
26077
      }
26078
      oprot.writeFieldStop();
26079
      oprot.writeStructEnd();
26080
    }
26081
 
26082
    @Override
26083
    public String toString() {
26084
      StringBuilder sb = new StringBuilder("setAlert_args(");
26085
      boolean first = true;
26086
 
483 rajveer 26087
      sb.append("orderId:");
26088
      sb.append(this.orderId);
305 ashish 26089
      first = false;
26090
      if (!first) sb.append(", ");
26091
      sb.append("unset:");
26092
      sb.append(this.unset);
26093
      first = false;
26094
      if (!first) sb.append(", ");
26095
      sb.append("type:");
26096
      sb.append(this.type);
26097
      first = false;
26098
      if (!first) sb.append(", ");
26099
      sb.append("comment:");
26100
      if (this.comment == null) {
26101
        sb.append("null");
26102
      } else {
26103
        sb.append(this.comment);
26104
      }
26105
      first = false;
26106
      sb.append(")");
26107
      return sb.toString();
26108
    }
26109
 
26110
    public void validate() throws TException {
26111
      // check for required fields
26112
    }
26113
 
26114
  }
26115
 
26116
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
26117
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
26118
 
26119
 
26120
 
26121
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26122
    public enum _Fields implements TFieldIdEnum {
26123
;
26124
 
26125
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26126
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26127
 
26128
      static {
26129
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26130
          byId.put((int)field._thriftId, field);
26131
          byName.put(field.getFieldName(), field);
26132
        }
26133
      }
26134
 
26135
      /**
26136
       * Find the _Fields constant that matches fieldId, or null if its not found.
26137
       */
26138
      public static _Fields findByThriftId(int fieldId) {
26139
        return byId.get(fieldId);
26140
      }
26141
 
26142
      /**
26143
       * Find the _Fields constant that matches fieldId, throwing an exception
26144
       * if it is not found.
26145
       */
26146
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26147
        _Fields fields = findByThriftId(fieldId);
26148
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26149
        return fields;
26150
      }
26151
 
26152
      /**
26153
       * Find the _Fields constant that matches name, or null if its not found.
26154
       */
26155
      public static _Fields findByName(String name) {
26156
        return byName.get(name);
26157
      }
26158
 
26159
      private final short _thriftId;
26160
      private final String _fieldName;
26161
 
26162
      _Fields(short thriftId, String fieldName) {
26163
        _thriftId = thriftId;
26164
        _fieldName = fieldName;
26165
      }
26166
 
26167
      public short getThriftFieldId() {
26168
        return _thriftId;
26169
      }
26170
 
26171
      public String getFieldName() {
26172
        return _fieldName;
26173
      }
26174
    }
26175
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26176
    }});
26177
 
26178
    static {
26179
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
26180
    }
26181
 
26182
    public setAlert_result() {
26183
    }
26184
 
26185
    /**
26186
     * Performs a deep copy on <i>other</i>.
26187
     */
26188
    public setAlert_result(setAlert_result other) {
26189
    }
26190
 
26191
    public setAlert_result deepCopy() {
26192
      return new setAlert_result(this);
26193
    }
26194
 
26195
    @Deprecated
26196
    public setAlert_result clone() {
26197
      return new setAlert_result(this);
26198
    }
26199
 
26200
    public void setFieldValue(_Fields field, Object value) {
26201
      switch (field) {
26202
      }
26203
    }
26204
 
26205
    public void setFieldValue(int fieldID, Object value) {
26206
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26207
    }
26208
 
26209
    public Object getFieldValue(_Fields field) {
26210
      switch (field) {
26211
      }
26212
      throw new IllegalStateException();
26213
    }
26214
 
26215
    public Object getFieldValue(int fieldId) {
26216
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26217
    }
26218
 
26219
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26220
    public boolean isSet(_Fields field) {
26221
      switch (field) {
26222
      }
26223
      throw new IllegalStateException();
26224
    }
26225
 
26226
    public boolean isSet(int fieldID) {
26227
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26228
    }
26229
 
26230
    @Override
26231
    public boolean equals(Object that) {
26232
      if (that == null)
26233
        return false;
26234
      if (that instanceof setAlert_result)
26235
        return this.equals((setAlert_result)that);
26236
      return false;
26237
    }
26238
 
26239
    public boolean equals(setAlert_result that) {
26240
      if (that == null)
26241
        return false;
26242
 
26243
      return true;
26244
    }
26245
 
26246
    @Override
26247
    public int hashCode() {
26248
      return 0;
26249
    }
26250
 
26251
    public int compareTo(setAlert_result other) {
26252
      if (!getClass().equals(other.getClass())) {
26253
        return getClass().getName().compareTo(other.getClass().getName());
26254
      }
26255
 
26256
      int lastComparison = 0;
26257
      setAlert_result typedOther = (setAlert_result)other;
26258
 
26259
      return 0;
26260
    }
26261
 
26262
    public void read(TProtocol iprot) throws TException {
26263
      TField field;
26264
      iprot.readStructBegin();
26265
      while (true)
26266
      {
26267
        field = iprot.readFieldBegin();
26268
        if (field.type == TType.STOP) { 
26269
          break;
26270
        }
26271
        _Fields fieldId = _Fields.findByThriftId(field.id);
26272
        if (fieldId == null) {
26273
          TProtocolUtil.skip(iprot, field.type);
26274
        } else {
26275
          switch (fieldId) {
26276
          }
26277
          iprot.readFieldEnd();
26278
        }
26279
      }
26280
      iprot.readStructEnd();
26281
      validate();
26282
    }
26283
 
26284
    public void write(TProtocol oprot) throws TException {
26285
      oprot.writeStructBegin(STRUCT_DESC);
26286
 
26287
      oprot.writeFieldStop();
26288
      oprot.writeStructEnd();
26289
    }
26290
 
26291
    @Override
26292
    public String toString() {
26293
      StringBuilder sb = new StringBuilder("setAlert_result(");
26294
      boolean first = true;
26295
 
26296
      sb.append(")");
26297
      return sb.toString();
26298
    }
26299
 
26300
    public void validate() throws TException {
26301
      // check for required fields
26302
    }
26303
 
26304
  }
26305
 
1598 ankur.sing 26306
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
26307
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
26308
 
26309
 
26310
 
26311
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26312
    public enum _Fields implements TFieldIdEnum {
26313
;
26314
 
26315
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26316
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26317
 
26318
      static {
26319
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26320
          byId.put((int)field._thriftId, field);
26321
          byName.put(field.getFieldName(), field);
26322
        }
26323
      }
26324
 
26325
      /**
26326
       * Find the _Fields constant that matches fieldId, or null if its not found.
26327
       */
26328
      public static _Fields findByThriftId(int fieldId) {
26329
        return byId.get(fieldId);
26330
      }
26331
 
26332
      /**
26333
       * Find the _Fields constant that matches fieldId, throwing an exception
26334
       * if it is not found.
26335
       */
26336
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26337
        _Fields fields = findByThriftId(fieldId);
26338
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26339
        return fields;
26340
      }
26341
 
26342
      /**
26343
       * Find the _Fields constant that matches name, or null if its not found.
26344
       */
26345
      public static _Fields findByName(String name) {
26346
        return byName.get(name);
26347
      }
26348
 
26349
      private final short _thriftId;
26350
      private final String _fieldName;
26351
 
26352
      _Fields(short thriftId, String fieldName) {
26353
        _thriftId = thriftId;
26354
        _fieldName = fieldName;
26355
      }
26356
 
26357
      public short getThriftFieldId() {
26358
        return _thriftId;
26359
      }
26360
 
26361
      public String getFieldName() {
26362
        return _fieldName;
26363
      }
26364
    }
26365
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26366
    }});
26367
 
26368
    static {
26369
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
26370
    }
26371
 
26372
    public getValidOrderCount_args() {
26373
    }
26374
 
26375
    /**
26376
     * Performs a deep copy on <i>other</i>.
26377
     */
26378
    public getValidOrderCount_args(getValidOrderCount_args other) {
26379
    }
26380
 
26381
    public getValidOrderCount_args deepCopy() {
26382
      return new getValidOrderCount_args(this);
26383
    }
26384
 
26385
    @Deprecated
26386
    public getValidOrderCount_args clone() {
26387
      return new getValidOrderCount_args(this);
26388
    }
26389
 
26390
    public void setFieldValue(_Fields field, Object value) {
26391
      switch (field) {
26392
      }
26393
    }
26394
 
26395
    public void setFieldValue(int fieldID, Object value) {
26396
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26397
    }
26398
 
26399
    public Object getFieldValue(_Fields field) {
26400
      switch (field) {
26401
      }
26402
      throw new IllegalStateException();
26403
    }
26404
 
26405
    public Object getFieldValue(int fieldId) {
26406
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26407
    }
26408
 
26409
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26410
    public boolean isSet(_Fields field) {
26411
      switch (field) {
26412
      }
26413
      throw new IllegalStateException();
26414
    }
26415
 
26416
    public boolean isSet(int fieldID) {
26417
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26418
    }
26419
 
26420
    @Override
26421
    public boolean equals(Object that) {
26422
      if (that == null)
26423
        return false;
26424
      if (that instanceof getValidOrderCount_args)
26425
        return this.equals((getValidOrderCount_args)that);
26426
      return false;
26427
    }
26428
 
26429
    public boolean equals(getValidOrderCount_args that) {
26430
      if (that == null)
26431
        return false;
26432
 
26433
      return true;
26434
    }
26435
 
26436
    @Override
26437
    public int hashCode() {
26438
      return 0;
26439
    }
26440
 
26441
    public int compareTo(getValidOrderCount_args other) {
26442
      if (!getClass().equals(other.getClass())) {
26443
        return getClass().getName().compareTo(other.getClass().getName());
26444
      }
26445
 
26446
      int lastComparison = 0;
26447
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
26448
 
26449
      return 0;
26450
    }
26451
 
26452
    public void read(TProtocol iprot) throws TException {
26453
      TField field;
26454
      iprot.readStructBegin();
26455
      while (true)
26456
      {
26457
        field = iprot.readFieldBegin();
26458
        if (field.type == TType.STOP) { 
26459
          break;
26460
        }
26461
        _Fields fieldId = _Fields.findByThriftId(field.id);
26462
        if (fieldId == null) {
26463
          TProtocolUtil.skip(iprot, field.type);
26464
        } else {
26465
          switch (fieldId) {
26466
          }
26467
          iprot.readFieldEnd();
26468
        }
26469
      }
26470
      iprot.readStructEnd();
26471
      validate();
26472
    }
26473
 
26474
    public void write(TProtocol oprot) throws TException {
26475
      validate();
26476
 
26477
      oprot.writeStructBegin(STRUCT_DESC);
26478
      oprot.writeFieldStop();
26479
      oprot.writeStructEnd();
26480
    }
26481
 
26482
    @Override
26483
    public String toString() {
26484
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
26485
      boolean first = true;
26486
 
26487
      sb.append(")");
26488
      return sb.toString();
26489
    }
26490
 
26491
    public void validate() throws TException {
26492
      // check for required fields
26493
    }
26494
 
26495
  }
26496
 
26497
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
26498
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
26499
 
26500
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26501
 
26502
    private long success;
26503
 
26504
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26505
    public enum _Fields implements TFieldIdEnum {
26506
      SUCCESS((short)0, "success");
26507
 
26508
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26509
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26510
 
26511
      static {
26512
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26513
          byId.put((int)field._thriftId, field);
26514
          byName.put(field.getFieldName(), field);
26515
        }
26516
      }
26517
 
26518
      /**
26519
       * Find the _Fields constant that matches fieldId, or null if its not found.
26520
       */
26521
      public static _Fields findByThriftId(int fieldId) {
26522
        return byId.get(fieldId);
26523
      }
26524
 
26525
      /**
26526
       * Find the _Fields constant that matches fieldId, throwing an exception
26527
       * if it is not found.
26528
       */
26529
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26530
        _Fields fields = findByThriftId(fieldId);
26531
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26532
        return fields;
26533
      }
26534
 
26535
      /**
26536
       * Find the _Fields constant that matches name, or null if its not found.
26537
       */
26538
      public static _Fields findByName(String name) {
26539
        return byName.get(name);
26540
      }
26541
 
26542
      private final short _thriftId;
26543
      private final String _fieldName;
26544
 
26545
      _Fields(short thriftId, String fieldName) {
26546
        _thriftId = thriftId;
26547
        _fieldName = fieldName;
26548
      }
26549
 
26550
      public short getThriftFieldId() {
26551
        return _thriftId;
26552
      }
26553
 
26554
      public String getFieldName() {
26555
        return _fieldName;
26556
      }
26557
    }
26558
 
26559
    // isset id assignments
26560
    private static final int __SUCCESS_ISSET_ID = 0;
26561
    private BitSet __isset_bit_vector = new BitSet(1);
26562
 
26563
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26564
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26565
          new FieldValueMetaData(TType.I64)));
26566
    }});
26567
 
26568
    static {
26569
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
26570
    }
26571
 
26572
    public getValidOrderCount_result() {
26573
    }
26574
 
26575
    public getValidOrderCount_result(
26576
      long success)
26577
    {
26578
      this();
26579
      this.success = success;
26580
      setSuccessIsSet(true);
26581
    }
26582
 
26583
    /**
26584
     * Performs a deep copy on <i>other</i>.
26585
     */
26586
    public getValidOrderCount_result(getValidOrderCount_result other) {
26587
      __isset_bit_vector.clear();
26588
      __isset_bit_vector.or(other.__isset_bit_vector);
26589
      this.success = other.success;
26590
    }
26591
 
26592
    public getValidOrderCount_result deepCopy() {
26593
      return new getValidOrderCount_result(this);
26594
    }
26595
 
26596
    @Deprecated
26597
    public getValidOrderCount_result clone() {
26598
      return new getValidOrderCount_result(this);
26599
    }
26600
 
26601
    public long getSuccess() {
26602
      return this.success;
26603
    }
26604
 
26605
    public getValidOrderCount_result setSuccess(long success) {
26606
      this.success = success;
26607
      setSuccessIsSet(true);
26608
      return this;
26609
    }
26610
 
26611
    public void unsetSuccess() {
26612
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26613
    }
26614
 
26615
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26616
    public boolean isSetSuccess() {
26617
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26618
    }
26619
 
26620
    public void setSuccessIsSet(boolean value) {
26621
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26622
    }
26623
 
26624
    public void setFieldValue(_Fields field, Object value) {
26625
      switch (field) {
26626
      case SUCCESS:
26627
        if (value == null) {
26628
          unsetSuccess();
26629
        } else {
26630
          setSuccess((Long)value);
26631
        }
26632
        break;
26633
 
26634
      }
26635
    }
26636
 
26637
    public void setFieldValue(int fieldID, Object value) {
26638
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26639
    }
26640
 
26641
    public Object getFieldValue(_Fields field) {
26642
      switch (field) {
26643
      case SUCCESS:
26644
        return new Long(getSuccess());
26645
 
26646
      }
26647
      throw new IllegalStateException();
26648
    }
26649
 
26650
    public Object getFieldValue(int fieldId) {
26651
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26652
    }
26653
 
26654
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26655
    public boolean isSet(_Fields field) {
26656
      switch (field) {
26657
      case SUCCESS:
26658
        return isSetSuccess();
26659
      }
26660
      throw new IllegalStateException();
26661
    }
26662
 
26663
    public boolean isSet(int fieldID) {
26664
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26665
    }
26666
 
26667
    @Override
26668
    public boolean equals(Object that) {
26669
      if (that == null)
26670
        return false;
26671
      if (that instanceof getValidOrderCount_result)
26672
        return this.equals((getValidOrderCount_result)that);
26673
      return false;
26674
    }
26675
 
26676
    public boolean equals(getValidOrderCount_result that) {
26677
      if (that == null)
26678
        return false;
26679
 
26680
      boolean this_present_success = true;
26681
      boolean that_present_success = true;
26682
      if (this_present_success || that_present_success) {
26683
        if (!(this_present_success && that_present_success))
26684
          return false;
26685
        if (this.success != that.success)
26686
          return false;
26687
      }
26688
 
26689
      return true;
26690
    }
26691
 
26692
    @Override
26693
    public int hashCode() {
26694
      return 0;
26695
    }
26696
 
26697
    public int compareTo(getValidOrderCount_result other) {
26698
      if (!getClass().equals(other.getClass())) {
26699
        return getClass().getName().compareTo(other.getClass().getName());
26700
      }
26701
 
26702
      int lastComparison = 0;
26703
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
26704
 
26705
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26706
      if (lastComparison != 0) {
26707
        return lastComparison;
26708
      }
26709
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26710
      if (lastComparison != 0) {
26711
        return lastComparison;
26712
      }
26713
      return 0;
26714
    }
26715
 
26716
    public void read(TProtocol iprot) throws TException {
26717
      TField field;
26718
      iprot.readStructBegin();
26719
      while (true)
26720
      {
26721
        field = iprot.readFieldBegin();
26722
        if (field.type == TType.STOP) { 
26723
          break;
26724
        }
26725
        _Fields fieldId = _Fields.findByThriftId(field.id);
26726
        if (fieldId == null) {
26727
          TProtocolUtil.skip(iprot, field.type);
26728
        } else {
26729
          switch (fieldId) {
26730
            case SUCCESS:
26731
              if (field.type == TType.I64) {
26732
                this.success = iprot.readI64();
26733
                setSuccessIsSet(true);
26734
              } else { 
26735
                TProtocolUtil.skip(iprot, field.type);
26736
              }
26737
              break;
26738
          }
26739
          iprot.readFieldEnd();
26740
        }
26741
      }
26742
      iprot.readStructEnd();
26743
      validate();
26744
    }
26745
 
26746
    public void write(TProtocol oprot) throws TException {
26747
      oprot.writeStructBegin(STRUCT_DESC);
26748
 
26749
      if (this.isSetSuccess()) {
26750
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26751
        oprot.writeI64(this.success);
26752
        oprot.writeFieldEnd();
26753
      }
26754
      oprot.writeFieldStop();
26755
      oprot.writeStructEnd();
26756
    }
26757
 
26758
    @Override
26759
    public String toString() {
26760
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
26761
      boolean first = true;
26762
 
26763
      sb.append("success:");
26764
      sb.append(this.success);
26765
      first = false;
26766
      sb.append(")");
26767
      return sb.toString();
26768
    }
26769
 
26770
    public void validate() throws TException {
26771
      // check for required fields
26772
    }
26773
 
26774
  }
26775
 
1629 ankur.sing 26776
  public static class getNoOfCustomersWithSuccessfulTransaction_args implements TBase<getNoOfCustomersWithSuccessfulTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_args>   {
26777
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_args");
26778
 
26779
 
26780
 
26781
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26782
    public enum _Fields implements TFieldIdEnum {
26783
;
26784
 
26785
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26786
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26787
 
26788
      static {
26789
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26790
          byId.put((int)field._thriftId, field);
26791
          byName.put(field.getFieldName(), field);
26792
        }
26793
      }
26794
 
26795
      /**
26796
       * Find the _Fields constant that matches fieldId, or null if its not found.
26797
       */
26798
      public static _Fields findByThriftId(int fieldId) {
26799
        return byId.get(fieldId);
26800
      }
26801
 
26802
      /**
26803
       * Find the _Fields constant that matches fieldId, throwing an exception
26804
       * if it is not found.
26805
       */
26806
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26807
        _Fields fields = findByThriftId(fieldId);
26808
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26809
        return fields;
26810
      }
26811
 
26812
      /**
26813
       * Find the _Fields constant that matches name, or null if its not found.
26814
       */
26815
      public static _Fields findByName(String name) {
26816
        return byName.get(name);
26817
      }
26818
 
26819
      private final short _thriftId;
26820
      private final String _fieldName;
26821
 
26822
      _Fields(short thriftId, String fieldName) {
26823
        _thriftId = thriftId;
26824
        _fieldName = fieldName;
26825
      }
26826
 
26827
      public short getThriftFieldId() {
26828
        return _thriftId;
26829
      }
26830
 
26831
      public String getFieldName() {
26832
        return _fieldName;
26833
      }
26834
    }
26835
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26836
    }});
26837
 
26838
    static {
26839
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_args.class, metaDataMap);
26840
    }
26841
 
26842
    public getNoOfCustomersWithSuccessfulTransaction_args() {
26843
    }
26844
 
26845
    /**
26846
     * Performs a deep copy on <i>other</i>.
26847
     */
26848
    public getNoOfCustomersWithSuccessfulTransaction_args(getNoOfCustomersWithSuccessfulTransaction_args other) {
26849
    }
26850
 
26851
    public getNoOfCustomersWithSuccessfulTransaction_args deepCopy() {
26852
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
26853
    }
26854
 
26855
    @Deprecated
26856
    public getNoOfCustomersWithSuccessfulTransaction_args clone() {
26857
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
26858
    }
26859
 
26860
    public void setFieldValue(_Fields field, Object value) {
26861
      switch (field) {
26862
      }
26863
    }
26864
 
26865
    public void setFieldValue(int fieldID, Object value) {
26866
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26867
    }
26868
 
26869
    public Object getFieldValue(_Fields field) {
26870
      switch (field) {
26871
      }
26872
      throw new IllegalStateException();
26873
    }
26874
 
26875
    public Object getFieldValue(int fieldId) {
26876
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26877
    }
26878
 
26879
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26880
    public boolean isSet(_Fields field) {
26881
      switch (field) {
26882
      }
26883
      throw new IllegalStateException();
26884
    }
26885
 
26886
    public boolean isSet(int fieldID) {
26887
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26888
    }
26889
 
26890
    @Override
26891
    public boolean equals(Object that) {
26892
      if (that == null)
26893
        return false;
26894
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_args)
26895
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_args)that);
26896
      return false;
26897
    }
26898
 
26899
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_args that) {
26900
      if (that == null)
26901
        return false;
26902
 
26903
      return true;
26904
    }
26905
 
26906
    @Override
26907
    public int hashCode() {
26908
      return 0;
26909
    }
26910
 
26911
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_args other) {
26912
      if (!getClass().equals(other.getClass())) {
26913
        return getClass().getName().compareTo(other.getClass().getName());
26914
      }
26915
 
26916
      int lastComparison = 0;
26917
      getNoOfCustomersWithSuccessfulTransaction_args typedOther = (getNoOfCustomersWithSuccessfulTransaction_args)other;
26918
 
26919
      return 0;
26920
    }
26921
 
26922
    public void read(TProtocol iprot) throws TException {
26923
      TField field;
26924
      iprot.readStructBegin();
26925
      while (true)
26926
      {
26927
        field = iprot.readFieldBegin();
26928
        if (field.type == TType.STOP) { 
26929
          break;
26930
        }
26931
        _Fields fieldId = _Fields.findByThriftId(field.id);
26932
        if (fieldId == null) {
26933
          TProtocolUtil.skip(iprot, field.type);
26934
        } else {
26935
          switch (fieldId) {
26936
          }
26937
          iprot.readFieldEnd();
26938
        }
26939
      }
26940
      iprot.readStructEnd();
26941
      validate();
26942
    }
26943
 
26944
    public void write(TProtocol oprot) throws TException {
26945
      validate();
26946
 
26947
      oprot.writeStructBegin(STRUCT_DESC);
26948
      oprot.writeFieldStop();
26949
      oprot.writeStructEnd();
26950
    }
26951
 
26952
    @Override
26953
    public String toString() {
26954
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_args(");
26955
      boolean first = true;
26956
 
26957
      sb.append(")");
26958
      return sb.toString();
26959
    }
26960
 
26961
    public void validate() throws TException {
26962
      // check for required fields
26963
    }
26964
 
26965
  }
26966
 
26967
  public static class getNoOfCustomersWithSuccessfulTransaction_result implements TBase<getNoOfCustomersWithSuccessfulTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_result>   {
26968
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_result");
26969
 
26970
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26971
 
26972
    private long success;
26973
 
26974
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26975
    public enum _Fields implements TFieldIdEnum {
26976
      SUCCESS((short)0, "success");
26977
 
26978
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26979
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26980
 
26981
      static {
26982
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26983
          byId.put((int)field._thriftId, field);
26984
          byName.put(field.getFieldName(), field);
26985
        }
26986
      }
26987
 
26988
      /**
26989
       * Find the _Fields constant that matches fieldId, or null if its not found.
26990
       */
26991
      public static _Fields findByThriftId(int fieldId) {
26992
        return byId.get(fieldId);
26993
      }
26994
 
26995
      /**
26996
       * Find the _Fields constant that matches fieldId, throwing an exception
26997
       * if it is not found.
26998
       */
26999
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27000
        _Fields fields = findByThriftId(fieldId);
27001
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27002
        return fields;
27003
      }
27004
 
27005
      /**
27006
       * Find the _Fields constant that matches name, or null if its not found.
27007
       */
27008
      public static _Fields findByName(String name) {
27009
        return byName.get(name);
27010
      }
27011
 
27012
      private final short _thriftId;
27013
      private final String _fieldName;
27014
 
27015
      _Fields(short thriftId, String fieldName) {
27016
        _thriftId = thriftId;
27017
        _fieldName = fieldName;
27018
      }
27019
 
27020
      public short getThriftFieldId() {
27021
        return _thriftId;
27022
      }
27023
 
27024
      public String getFieldName() {
27025
        return _fieldName;
27026
      }
27027
    }
27028
 
27029
    // isset id assignments
27030
    private static final int __SUCCESS_ISSET_ID = 0;
27031
    private BitSet __isset_bit_vector = new BitSet(1);
27032
 
27033
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27034
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27035
          new FieldValueMetaData(TType.I64)));
27036
    }});
27037
 
27038
    static {
27039
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_result.class, metaDataMap);
27040
    }
27041
 
27042
    public getNoOfCustomersWithSuccessfulTransaction_result() {
27043
    }
27044
 
27045
    public getNoOfCustomersWithSuccessfulTransaction_result(
27046
      long success)
27047
    {
27048
      this();
27049
      this.success = success;
27050
      setSuccessIsSet(true);
27051
    }
27052
 
27053
    /**
27054
     * Performs a deep copy on <i>other</i>.
27055
     */
27056
    public getNoOfCustomersWithSuccessfulTransaction_result(getNoOfCustomersWithSuccessfulTransaction_result other) {
27057
      __isset_bit_vector.clear();
27058
      __isset_bit_vector.or(other.__isset_bit_vector);
27059
      this.success = other.success;
27060
    }
27061
 
27062
    public getNoOfCustomersWithSuccessfulTransaction_result deepCopy() {
27063
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27064
    }
27065
 
27066
    @Deprecated
27067
    public getNoOfCustomersWithSuccessfulTransaction_result clone() {
27068
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27069
    }
27070
 
27071
    public long getSuccess() {
27072
      return this.success;
27073
    }
27074
 
27075
    public getNoOfCustomersWithSuccessfulTransaction_result setSuccess(long success) {
27076
      this.success = success;
27077
      setSuccessIsSet(true);
27078
      return this;
27079
    }
27080
 
27081
    public void unsetSuccess() {
27082
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27083
    }
27084
 
27085
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27086
    public boolean isSetSuccess() {
27087
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27088
    }
27089
 
27090
    public void setSuccessIsSet(boolean value) {
27091
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27092
    }
27093
 
27094
    public void setFieldValue(_Fields field, Object value) {
27095
      switch (field) {
27096
      case SUCCESS:
27097
        if (value == null) {
27098
          unsetSuccess();
27099
        } else {
27100
          setSuccess((Long)value);
27101
        }
27102
        break;
27103
 
27104
      }
27105
    }
27106
 
27107
    public void setFieldValue(int fieldID, Object value) {
27108
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27109
    }
27110
 
27111
    public Object getFieldValue(_Fields field) {
27112
      switch (field) {
27113
      case SUCCESS:
27114
        return new Long(getSuccess());
27115
 
27116
      }
27117
      throw new IllegalStateException();
27118
    }
27119
 
27120
    public Object getFieldValue(int fieldId) {
27121
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27122
    }
27123
 
27124
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27125
    public boolean isSet(_Fields field) {
27126
      switch (field) {
27127
      case SUCCESS:
27128
        return isSetSuccess();
27129
      }
27130
      throw new IllegalStateException();
27131
    }
27132
 
27133
    public boolean isSet(int fieldID) {
27134
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27135
    }
27136
 
27137
    @Override
27138
    public boolean equals(Object that) {
27139
      if (that == null)
27140
        return false;
27141
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_result)
27142
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_result)that);
27143
      return false;
27144
    }
27145
 
27146
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_result that) {
27147
      if (that == null)
27148
        return false;
27149
 
27150
      boolean this_present_success = true;
27151
      boolean that_present_success = true;
27152
      if (this_present_success || that_present_success) {
27153
        if (!(this_present_success && that_present_success))
27154
          return false;
27155
        if (this.success != that.success)
27156
          return false;
27157
      }
27158
 
27159
      return true;
27160
    }
27161
 
27162
    @Override
27163
    public int hashCode() {
27164
      return 0;
27165
    }
27166
 
27167
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_result other) {
27168
      if (!getClass().equals(other.getClass())) {
27169
        return getClass().getName().compareTo(other.getClass().getName());
27170
      }
27171
 
27172
      int lastComparison = 0;
27173
      getNoOfCustomersWithSuccessfulTransaction_result typedOther = (getNoOfCustomersWithSuccessfulTransaction_result)other;
27174
 
27175
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27176
      if (lastComparison != 0) {
27177
        return lastComparison;
27178
      }
27179
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27180
      if (lastComparison != 0) {
27181
        return lastComparison;
27182
      }
27183
      return 0;
27184
    }
27185
 
27186
    public void read(TProtocol iprot) throws TException {
27187
      TField field;
27188
      iprot.readStructBegin();
27189
      while (true)
27190
      {
27191
        field = iprot.readFieldBegin();
27192
        if (field.type == TType.STOP) { 
27193
          break;
27194
        }
27195
        _Fields fieldId = _Fields.findByThriftId(field.id);
27196
        if (fieldId == null) {
27197
          TProtocolUtil.skip(iprot, field.type);
27198
        } else {
27199
          switch (fieldId) {
27200
            case SUCCESS:
27201
              if (field.type == TType.I64) {
27202
                this.success = iprot.readI64();
27203
                setSuccessIsSet(true);
27204
              } else { 
27205
                TProtocolUtil.skip(iprot, field.type);
27206
              }
27207
              break;
27208
          }
27209
          iprot.readFieldEnd();
27210
        }
27211
      }
27212
      iprot.readStructEnd();
27213
      validate();
27214
    }
27215
 
27216
    public void write(TProtocol oprot) throws TException {
27217
      oprot.writeStructBegin(STRUCT_DESC);
27218
 
27219
      if (this.isSetSuccess()) {
27220
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27221
        oprot.writeI64(this.success);
27222
        oprot.writeFieldEnd();
27223
      }
27224
      oprot.writeFieldStop();
27225
      oprot.writeStructEnd();
27226
    }
27227
 
27228
    @Override
27229
    public String toString() {
27230
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_result(");
27231
      boolean first = true;
27232
 
27233
      sb.append("success:");
27234
      sb.append(this.success);
27235
      first = false;
27236
      sb.append(")");
27237
      return sb.toString();
27238
    }
27239
 
27240
    public void validate() throws TException {
27241
      // check for required fields
27242
    }
27243
 
27244
  }
27245
 
1731 ankur.sing 27246
  public static class getValidOrdersAmountRange_args implements TBase<getValidOrdersAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_args>   {
27247
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_args");
1629 ankur.sing 27248
 
27249
 
27250
 
27251
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27252
    public enum _Fields implements TFieldIdEnum {
27253
;
27254
 
27255
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27256
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27257
 
27258
      static {
27259
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27260
          byId.put((int)field._thriftId, field);
27261
          byName.put(field.getFieldName(), field);
27262
        }
27263
      }
27264
 
27265
      /**
27266
       * Find the _Fields constant that matches fieldId, or null if its not found.
27267
       */
27268
      public static _Fields findByThriftId(int fieldId) {
27269
        return byId.get(fieldId);
27270
      }
27271
 
27272
      /**
27273
       * Find the _Fields constant that matches fieldId, throwing an exception
27274
       * if it is not found.
27275
       */
27276
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27277
        _Fields fields = findByThriftId(fieldId);
27278
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27279
        return fields;
27280
      }
27281
 
27282
      /**
27283
       * Find the _Fields constant that matches name, or null if its not found.
27284
       */
27285
      public static _Fields findByName(String name) {
27286
        return byName.get(name);
27287
      }
27288
 
27289
      private final short _thriftId;
27290
      private final String _fieldName;
27291
 
27292
      _Fields(short thriftId, String fieldName) {
27293
        _thriftId = thriftId;
27294
        _fieldName = fieldName;
27295
      }
27296
 
27297
      public short getThriftFieldId() {
27298
        return _thriftId;
27299
      }
27300
 
27301
      public String getFieldName() {
27302
        return _fieldName;
27303
      }
27304
    }
27305
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27306
    }});
27307
 
27308
    static {
1731 ankur.sing 27309
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_args.class, metaDataMap);
1629 ankur.sing 27310
    }
27311
 
1731 ankur.sing 27312
    public getValidOrdersAmountRange_args() {
1629 ankur.sing 27313
    }
27314
 
27315
    /**
27316
     * Performs a deep copy on <i>other</i>.
27317
     */
1731 ankur.sing 27318
    public getValidOrdersAmountRange_args(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27319
    }
27320
 
1731 ankur.sing 27321
    public getValidOrdersAmountRange_args deepCopy() {
27322
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27323
    }
27324
 
27325
    @Deprecated
1731 ankur.sing 27326
    public getValidOrdersAmountRange_args clone() {
27327
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27328
    }
27329
 
27330
    public void setFieldValue(_Fields field, Object value) {
27331
      switch (field) {
27332
      }
27333
    }
27334
 
27335
    public void setFieldValue(int fieldID, Object value) {
27336
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27337
    }
27338
 
27339
    public Object getFieldValue(_Fields field) {
27340
      switch (field) {
27341
      }
27342
      throw new IllegalStateException();
27343
    }
27344
 
27345
    public Object getFieldValue(int fieldId) {
27346
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27347
    }
27348
 
27349
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27350
    public boolean isSet(_Fields field) {
27351
      switch (field) {
27352
      }
27353
      throw new IllegalStateException();
27354
    }
27355
 
27356
    public boolean isSet(int fieldID) {
27357
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27358
    }
27359
 
27360
    @Override
27361
    public boolean equals(Object that) {
27362
      if (that == null)
27363
        return false;
1731 ankur.sing 27364
      if (that instanceof getValidOrdersAmountRange_args)
27365
        return this.equals((getValidOrdersAmountRange_args)that);
1629 ankur.sing 27366
      return false;
27367
    }
27368
 
1731 ankur.sing 27369
    public boolean equals(getValidOrdersAmountRange_args that) {
1629 ankur.sing 27370
      if (that == null)
27371
        return false;
27372
 
27373
      return true;
27374
    }
27375
 
27376
    @Override
27377
    public int hashCode() {
27378
      return 0;
27379
    }
27380
 
1731 ankur.sing 27381
    public int compareTo(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27382
      if (!getClass().equals(other.getClass())) {
27383
        return getClass().getName().compareTo(other.getClass().getName());
27384
      }
27385
 
27386
      int lastComparison = 0;
1731 ankur.sing 27387
      getValidOrdersAmountRange_args typedOther = (getValidOrdersAmountRange_args)other;
1629 ankur.sing 27388
 
27389
      return 0;
27390
    }
27391
 
27392
    public void read(TProtocol iprot) throws TException {
27393
      TField field;
27394
      iprot.readStructBegin();
27395
      while (true)
27396
      {
27397
        field = iprot.readFieldBegin();
27398
        if (field.type == TType.STOP) { 
27399
          break;
27400
        }
27401
        _Fields fieldId = _Fields.findByThriftId(field.id);
27402
        if (fieldId == null) {
27403
          TProtocolUtil.skip(iprot, field.type);
27404
        } else {
27405
          switch (fieldId) {
27406
          }
27407
          iprot.readFieldEnd();
27408
        }
27409
      }
27410
      iprot.readStructEnd();
27411
      validate();
27412
    }
27413
 
27414
    public void write(TProtocol oprot) throws TException {
27415
      validate();
27416
 
27417
      oprot.writeStructBegin(STRUCT_DESC);
27418
      oprot.writeFieldStop();
27419
      oprot.writeStructEnd();
27420
    }
27421
 
27422
    @Override
27423
    public String toString() {
1731 ankur.sing 27424
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_args(");
1629 ankur.sing 27425
      boolean first = true;
27426
 
27427
      sb.append(")");
27428
      return sb.toString();
27429
    }
27430
 
27431
    public void validate() throws TException {
27432
      // check for required fields
27433
    }
27434
 
27435
  }
27436
 
1731 ankur.sing 27437
  public static class getValidOrdersAmountRange_result implements TBase<getValidOrdersAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_result>   {
27438
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_result");
1629 ankur.sing 27439
 
1731 ankur.sing 27440
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 27441
 
1731 ankur.sing 27442
    private List<Double> success;
1629 ankur.sing 27443
 
27444
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27445
    public enum _Fields implements TFieldIdEnum {
27446
      SUCCESS((short)0, "success");
27447
 
27448
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27450
 
27451
      static {
27452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27453
          byId.put((int)field._thriftId, field);
27454
          byName.put(field.getFieldName(), field);
27455
        }
27456
      }
27457
 
27458
      /**
27459
       * Find the _Fields constant that matches fieldId, or null if its not found.
27460
       */
27461
      public static _Fields findByThriftId(int fieldId) {
27462
        return byId.get(fieldId);
27463
      }
27464
 
27465
      /**
27466
       * Find the _Fields constant that matches fieldId, throwing an exception
27467
       * if it is not found.
27468
       */
27469
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27470
        _Fields fields = findByThriftId(fieldId);
27471
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27472
        return fields;
27473
      }
27474
 
27475
      /**
27476
       * Find the _Fields constant that matches name, or null if its not found.
27477
       */
27478
      public static _Fields findByName(String name) {
27479
        return byName.get(name);
27480
      }
27481
 
27482
      private final short _thriftId;
27483
      private final String _fieldName;
27484
 
27485
      _Fields(short thriftId, String fieldName) {
27486
        _thriftId = thriftId;
27487
        _fieldName = fieldName;
27488
      }
27489
 
27490
      public short getThriftFieldId() {
27491
        return _thriftId;
27492
      }
27493
 
27494
      public String getFieldName() {
27495
        return _fieldName;
27496
      }
27497
    }
27498
 
27499
    // isset id assignments
27500
 
27501
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27502
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 27503
          new ListMetaData(TType.LIST, 
27504
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 27505
    }});
27506
 
27507
    static {
1731 ankur.sing 27508
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_result.class, metaDataMap);
1629 ankur.sing 27509
    }
27510
 
1731 ankur.sing 27511
    public getValidOrdersAmountRange_result() {
1629 ankur.sing 27512
    }
27513
 
1731 ankur.sing 27514
    public getValidOrdersAmountRange_result(
27515
      List<Double> success)
1629 ankur.sing 27516
    {
27517
      this();
27518
      this.success = success;
27519
    }
27520
 
27521
    /**
27522
     * Performs a deep copy on <i>other</i>.
27523
     */
1731 ankur.sing 27524
    public getValidOrdersAmountRange_result(getValidOrdersAmountRange_result other) {
27525
      if (other.isSetSuccess()) {
27526
        List<Double> __this__success = new ArrayList<Double>();
27527
        for (Double other_element : other.success) {
27528
          __this__success.add(other_element);
1629 ankur.sing 27529
        }
1731 ankur.sing 27530
        this.success = __this__success;
1629 ankur.sing 27531
      }
27532
    }
27533
 
1731 ankur.sing 27534
    public getValidOrdersAmountRange_result deepCopy() {
27535
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27536
    }
27537
 
27538
    @Deprecated
1731 ankur.sing 27539
    public getValidOrdersAmountRange_result clone() {
27540
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27541
    }
27542
 
1731 ankur.sing 27543
    public int getSuccessSize() {
27544
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 27545
    }
27546
 
1731 ankur.sing 27547
    public java.util.Iterator<Double> getSuccessIterator() {
27548
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 27549
    }
27550
 
1731 ankur.sing 27551
    public void addToSuccess(double elem) {
27552
      if (this.success == null) {
27553
        this.success = new ArrayList<Double>();
1629 ankur.sing 27554
      }
1731 ankur.sing 27555
      this.success.add(elem);
1629 ankur.sing 27556
    }
27557
 
1731 ankur.sing 27558
    public List<Double> getSuccess() {
1629 ankur.sing 27559
      return this.success;
27560
    }
27561
 
1731 ankur.sing 27562
    public getValidOrdersAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 27563
      this.success = success;
27564
      return this;
27565
    }
27566
 
27567
    public void unsetSuccess() {
1731 ankur.sing 27568
      this.success = null;
1629 ankur.sing 27569
    }
27570
 
27571
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27572
    public boolean isSetSuccess() {
1731 ankur.sing 27573
      return this.success != null;
1629 ankur.sing 27574
    }
27575
 
27576
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 27577
      if (!value) {
27578
        this.success = null;
27579
      }
1629 ankur.sing 27580
    }
27581
 
27582
    public void setFieldValue(_Fields field, Object value) {
27583
      switch (field) {
27584
      case SUCCESS:
27585
        if (value == null) {
27586
          unsetSuccess();
27587
        } else {
1731 ankur.sing 27588
          setSuccess((List<Double>)value);
1629 ankur.sing 27589
        }
27590
        break;
27591
 
27592
      }
27593
    }
27594
 
27595
    public void setFieldValue(int fieldID, Object value) {
27596
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27597
    }
27598
 
27599
    public Object getFieldValue(_Fields field) {
27600
      switch (field) {
27601
      case SUCCESS:
1731 ankur.sing 27602
        return getSuccess();
1629 ankur.sing 27603
 
27604
      }
27605
      throw new IllegalStateException();
27606
    }
27607
 
27608
    public Object getFieldValue(int fieldId) {
27609
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27610
    }
27611
 
27612
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27613
    public boolean isSet(_Fields field) {
27614
      switch (field) {
27615
      case SUCCESS:
27616
        return isSetSuccess();
27617
      }
27618
      throw new IllegalStateException();
27619
    }
27620
 
27621
    public boolean isSet(int fieldID) {
27622
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27623
    }
27624
 
27625
    @Override
27626
    public boolean equals(Object that) {
27627
      if (that == null)
27628
        return false;
1731 ankur.sing 27629
      if (that instanceof getValidOrdersAmountRange_result)
27630
        return this.equals((getValidOrdersAmountRange_result)that);
1629 ankur.sing 27631
      return false;
27632
    }
27633
 
1731 ankur.sing 27634
    public boolean equals(getValidOrdersAmountRange_result that) {
1629 ankur.sing 27635
      if (that == null)
27636
        return false;
27637
 
1731 ankur.sing 27638
      boolean this_present_success = true && this.isSetSuccess();
27639
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 27640
      if (this_present_success || that_present_success) {
27641
        if (!(this_present_success && that_present_success))
27642
          return false;
1731 ankur.sing 27643
        if (!this.success.equals(that.success))
1629 ankur.sing 27644
          return false;
27645
      }
27646
 
27647
      return true;
27648
    }
27649
 
27650
    @Override
27651
    public int hashCode() {
27652
      return 0;
27653
    }
27654
 
1731 ankur.sing 27655
    public int compareTo(getValidOrdersAmountRange_result other) {
1629 ankur.sing 27656
      if (!getClass().equals(other.getClass())) {
27657
        return getClass().getName().compareTo(other.getClass().getName());
27658
      }
27659
 
27660
      int lastComparison = 0;
1731 ankur.sing 27661
      getValidOrdersAmountRange_result typedOther = (getValidOrdersAmountRange_result)other;
1629 ankur.sing 27662
 
27663
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27664
      if (lastComparison != 0) {
27665
        return lastComparison;
27666
      }
27667
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27668
      if (lastComparison != 0) {
27669
        return lastComparison;
27670
      }
27671
      return 0;
27672
    }
27673
 
27674
    public void read(TProtocol iprot) throws TException {
27675
      TField field;
27676
      iprot.readStructBegin();
27677
      while (true)
27678
      {
27679
        field = iprot.readFieldBegin();
27680
        if (field.type == TType.STOP) { 
27681
          break;
27682
        }
27683
        _Fields fieldId = _Fields.findByThriftId(field.id);
27684
        if (fieldId == null) {
27685
          TProtocolUtil.skip(iprot, field.type);
27686
        } else {
27687
          switch (fieldId) {
27688
            case SUCCESS:
1731 ankur.sing 27689
              if (field.type == TType.LIST) {
27690
                {
27691
                  TList _list80 = iprot.readListBegin();
27692
                  this.success = new ArrayList<Double>(_list80.size);
27693
                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
27694
                  {
27695
                    double _elem82;
27696
                    _elem82 = iprot.readDouble();
27697
                    this.success.add(_elem82);
27698
                  }
27699
                  iprot.readListEnd();
27700
                }
1629 ankur.sing 27701
              } else { 
27702
                TProtocolUtil.skip(iprot, field.type);
27703
              }
27704
              break;
27705
          }
27706
          iprot.readFieldEnd();
27707
        }
27708
      }
27709
      iprot.readStructEnd();
27710
      validate();
27711
    }
27712
 
27713
    public void write(TProtocol oprot) throws TException {
27714
      oprot.writeStructBegin(STRUCT_DESC);
27715
 
27716
      if (this.isSetSuccess()) {
27717
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 27718
        {
27719
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
27720
          for (double _iter83 : this.success)
27721
          {
27722
            oprot.writeDouble(_iter83);
27723
          }
27724
          oprot.writeListEnd();
27725
        }
1629 ankur.sing 27726
        oprot.writeFieldEnd();
27727
      }
27728
      oprot.writeFieldStop();
27729
      oprot.writeStructEnd();
27730
    }
27731
 
27732
    @Override
27733
    public String toString() {
1731 ankur.sing 27734
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_result(");
1629 ankur.sing 27735
      boolean first = true;
27736
 
27737
      sb.append("success:");
1731 ankur.sing 27738
      if (this.success == null) {
27739
        sb.append("null");
27740
      } else {
27741
        sb.append(this.success);
27742
      }
1629 ankur.sing 27743
      first = false;
27744
      sb.append(")");
27745
      return sb.toString();
27746
    }
27747
 
27748
    public void validate() throws TException {
27749
      // check for required fields
27750
    }
27751
 
27752
  }
27753
 
1886 ankur.sing 27754
  public static class getValidOrders_args implements TBase<getValidOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_args>   {
27755
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_args");
27756
 
27757
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)1);
27758
 
27759
    private long limit;
27760
 
27761
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27762
    public enum _Fields implements TFieldIdEnum {
27763
      LIMIT((short)1, "limit");
27764
 
27765
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27766
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27767
 
27768
      static {
27769
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27770
          byId.put((int)field._thriftId, field);
27771
          byName.put(field.getFieldName(), field);
27772
        }
27773
      }
27774
 
27775
      /**
27776
       * Find the _Fields constant that matches fieldId, or null if its not found.
27777
       */
27778
      public static _Fields findByThriftId(int fieldId) {
27779
        return byId.get(fieldId);
27780
      }
27781
 
27782
      /**
27783
       * Find the _Fields constant that matches fieldId, throwing an exception
27784
       * if it is not found.
27785
       */
27786
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27787
        _Fields fields = findByThriftId(fieldId);
27788
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27789
        return fields;
27790
      }
27791
 
27792
      /**
27793
       * Find the _Fields constant that matches name, or null if its not found.
27794
       */
27795
      public static _Fields findByName(String name) {
27796
        return byName.get(name);
27797
      }
27798
 
27799
      private final short _thriftId;
27800
      private final String _fieldName;
27801
 
27802
      _Fields(short thriftId, String fieldName) {
27803
        _thriftId = thriftId;
27804
        _fieldName = fieldName;
27805
      }
27806
 
27807
      public short getThriftFieldId() {
27808
        return _thriftId;
27809
      }
27810
 
27811
      public String getFieldName() {
27812
        return _fieldName;
27813
      }
27814
    }
27815
 
27816
    // isset id assignments
27817
    private static final int __LIMIT_ISSET_ID = 0;
27818
    private BitSet __isset_bit_vector = new BitSet(1);
27819
 
27820
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27821
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
27822
          new FieldValueMetaData(TType.I64)));
27823
    }});
27824
 
27825
    static {
27826
      FieldMetaData.addStructMetaDataMap(getValidOrders_args.class, metaDataMap);
27827
    }
27828
 
27829
    public getValidOrders_args() {
27830
    }
27831
 
27832
    public getValidOrders_args(
27833
      long limit)
27834
    {
27835
      this();
27836
      this.limit = limit;
27837
      setLimitIsSet(true);
27838
    }
27839
 
27840
    /**
27841
     * Performs a deep copy on <i>other</i>.
27842
     */
27843
    public getValidOrders_args(getValidOrders_args other) {
27844
      __isset_bit_vector.clear();
27845
      __isset_bit_vector.or(other.__isset_bit_vector);
27846
      this.limit = other.limit;
27847
    }
27848
 
27849
    public getValidOrders_args deepCopy() {
27850
      return new getValidOrders_args(this);
27851
    }
27852
 
27853
    @Deprecated
27854
    public getValidOrders_args clone() {
27855
      return new getValidOrders_args(this);
27856
    }
27857
 
27858
    public long getLimit() {
27859
      return this.limit;
27860
    }
27861
 
27862
    public getValidOrders_args setLimit(long limit) {
27863
      this.limit = limit;
27864
      setLimitIsSet(true);
27865
      return this;
27866
    }
27867
 
27868
    public void unsetLimit() {
27869
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
27870
    }
27871
 
27872
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
27873
    public boolean isSetLimit() {
27874
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
27875
    }
27876
 
27877
    public void setLimitIsSet(boolean value) {
27878
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
27879
    }
27880
 
27881
    public void setFieldValue(_Fields field, Object value) {
27882
      switch (field) {
27883
      case LIMIT:
27884
        if (value == null) {
27885
          unsetLimit();
27886
        } else {
27887
          setLimit((Long)value);
27888
        }
27889
        break;
27890
 
27891
      }
27892
    }
27893
 
27894
    public void setFieldValue(int fieldID, Object value) {
27895
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27896
    }
27897
 
27898
    public Object getFieldValue(_Fields field) {
27899
      switch (field) {
27900
      case LIMIT:
27901
        return new Long(getLimit());
27902
 
27903
      }
27904
      throw new IllegalStateException();
27905
    }
27906
 
27907
    public Object getFieldValue(int fieldId) {
27908
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27909
    }
27910
 
27911
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27912
    public boolean isSet(_Fields field) {
27913
      switch (field) {
27914
      case LIMIT:
27915
        return isSetLimit();
27916
      }
27917
      throw new IllegalStateException();
27918
    }
27919
 
27920
    public boolean isSet(int fieldID) {
27921
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27922
    }
27923
 
27924
    @Override
27925
    public boolean equals(Object that) {
27926
      if (that == null)
27927
        return false;
27928
      if (that instanceof getValidOrders_args)
27929
        return this.equals((getValidOrders_args)that);
27930
      return false;
27931
    }
27932
 
27933
    public boolean equals(getValidOrders_args that) {
27934
      if (that == null)
27935
        return false;
27936
 
27937
      boolean this_present_limit = true;
27938
      boolean that_present_limit = true;
27939
      if (this_present_limit || that_present_limit) {
27940
        if (!(this_present_limit && that_present_limit))
27941
          return false;
27942
        if (this.limit != that.limit)
27943
          return false;
27944
      }
27945
 
27946
      return true;
27947
    }
27948
 
27949
    @Override
27950
    public int hashCode() {
27951
      return 0;
27952
    }
27953
 
27954
    public int compareTo(getValidOrders_args other) {
27955
      if (!getClass().equals(other.getClass())) {
27956
        return getClass().getName().compareTo(other.getClass().getName());
27957
      }
27958
 
27959
      int lastComparison = 0;
27960
      getValidOrders_args typedOther = (getValidOrders_args)other;
27961
 
27962
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
27963
      if (lastComparison != 0) {
27964
        return lastComparison;
27965
      }
27966
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
27967
      if (lastComparison != 0) {
27968
        return lastComparison;
27969
      }
27970
      return 0;
27971
    }
27972
 
27973
    public void read(TProtocol iprot) throws TException {
27974
      TField field;
27975
      iprot.readStructBegin();
27976
      while (true)
27977
      {
27978
        field = iprot.readFieldBegin();
27979
        if (field.type == TType.STOP) { 
27980
          break;
27981
        }
27982
        _Fields fieldId = _Fields.findByThriftId(field.id);
27983
        if (fieldId == null) {
27984
          TProtocolUtil.skip(iprot, field.type);
27985
        } else {
27986
          switch (fieldId) {
27987
            case LIMIT:
27988
              if (field.type == TType.I64) {
27989
                this.limit = iprot.readI64();
27990
                setLimitIsSet(true);
27991
              } else { 
27992
                TProtocolUtil.skip(iprot, field.type);
27993
              }
27994
              break;
27995
          }
27996
          iprot.readFieldEnd();
27997
        }
27998
      }
27999
      iprot.readStructEnd();
28000
      validate();
28001
    }
28002
 
28003
    public void write(TProtocol oprot) throws TException {
28004
      validate();
28005
 
28006
      oprot.writeStructBegin(STRUCT_DESC);
28007
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
28008
      oprot.writeI64(this.limit);
28009
      oprot.writeFieldEnd();
28010
      oprot.writeFieldStop();
28011
      oprot.writeStructEnd();
28012
    }
28013
 
28014
    @Override
28015
    public String toString() {
28016
      StringBuilder sb = new StringBuilder("getValidOrders_args(");
28017
      boolean first = true;
28018
 
28019
      sb.append("limit:");
28020
      sb.append(this.limit);
28021
      first = false;
28022
      sb.append(")");
28023
      return sb.toString();
28024
    }
28025
 
28026
    public void validate() throws TException {
28027
      // check for required fields
28028
    }
28029
 
28030
  }
28031
 
28032
  public static class getValidOrders_result implements TBase<getValidOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_result>   {
28033
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_result");
28034
 
28035
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
28036
 
28037
    private List<Order> success;
28038
 
28039
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28040
    public enum _Fields implements TFieldIdEnum {
28041
      SUCCESS((short)0, "success");
28042
 
28043
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28044
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28045
 
28046
      static {
28047
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28048
          byId.put((int)field._thriftId, field);
28049
          byName.put(field.getFieldName(), field);
28050
        }
28051
      }
28052
 
28053
      /**
28054
       * Find the _Fields constant that matches fieldId, or null if its not found.
28055
       */
28056
      public static _Fields findByThriftId(int fieldId) {
28057
        return byId.get(fieldId);
28058
      }
28059
 
28060
      /**
28061
       * Find the _Fields constant that matches fieldId, throwing an exception
28062
       * if it is not found.
28063
       */
28064
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28065
        _Fields fields = findByThriftId(fieldId);
28066
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28067
        return fields;
28068
      }
28069
 
28070
      /**
28071
       * Find the _Fields constant that matches name, or null if its not found.
28072
       */
28073
      public static _Fields findByName(String name) {
28074
        return byName.get(name);
28075
      }
28076
 
28077
      private final short _thriftId;
28078
      private final String _fieldName;
28079
 
28080
      _Fields(short thriftId, String fieldName) {
28081
        _thriftId = thriftId;
28082
        _fieldName = fieldName;
28083
      }
28084
 
28085
      public short getThriftFieldId() {
28086
        return _thriftId;
28087
      }
28088
 
28089
      public String getFieldName() {
28090
        return _fieldName;
28091
      }
28092
    }
28093
 
28094
    // isset id assignments
28095
 
28096
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28097
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28098
          new ListMetaData(TType.LIST, 
28099
              new StructMetaData(TType.STRUCT, Order.class))));
28100
    }});
28101
 
28102
    static {
28103
      FieldMetaData.addStructMetaDataMap(getValidOrders_result.class, metaDataMap);
28104
    }
28105
 
28106
    public getValidOrders_result() {
28107
    }
28108
 
28109
    public getValidOrders_result(
28110
      List<Order> success)
28111
    {
28112
      this();
28113
      this.success = success;
28114
    }
28115
 
28116
    /**
28117
     * Performs a deep copy on <i>other</i>.
28118
     */
28119
    public getValidOrders_result(getValidOrders_result other) {
28120
      if (other.isSetSuccess()) {
28121
        List<Order> __this__success = new ArrayList<Order>();
28122
        for (Order other_element : other.success) {
28123
          __this__success.add(new Order(other_element));
28124
        }
28125
        this.success = __this__success;
28126
      }
28127
    }
28128
 
28129
    public getValidOrders_result deepCopy() {
28130
      return new getValidOrders_result(this);
28131
    }
28132
 
28133
    @Deprecated
28134
    public getValidOrders_result clone() {
28135
      return new getValidOrders_result(this);
28136
    }
28137
 
28138
    public int getSuccessSize() {
28139
      return (this.success == null) ? 0 : this.success.size();
28140
    }
28141
 
28142
    public java.util.Iterator<Order> getSuccessIterator() {
28143
      return (this.success == null) ? null : this.success.iterator();
28144
    }
28145
 
28146
    public void addToSuccess(Order elem) {
28147
      if (this.success == null) {
28148
        this.success = new ArrayList<Order>();
28149
      }
28150
      this.success.add(elem);
28151
    }
28152
 
28153
    public List<Order> getSuccess() {
28154
      return this.success;
28155
    }
28156
 
28157
    public getValidOrders_result setSuccess(List<Order> success) {
28158
      this.success = success;
28159
      return this;
28160
    }
28161
 
28162
    public void unsetSuccess() {
28163
      this.success = null;
28164
    }
28165
 
28166
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28167
    public boolean isSetSuccess() {
28168
      return this.success != null;
28169
    }
28170
 
28171
    public void setSuccessIsSet(boolean value) {
28172
      if (!value) {
28173
        this.success = null;
28174
      }
28175
    }
28176
 
28177
    public void setFieldValue(_Fields field, Object value) {
28178
      switch (field) {
28179
      case SUCCESS:
28180
        if (value == null) {
28181
          unsetSuccess();
28182
        } else {
28183
          setSuccess((List<Order>)value);
28184
        }
28185
        break;
28186
 
28187
      }
28188
    }
28189
 
28190
    public void setFieldValue(int fieldID, Object value) {
28191
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28192
    }
28193
 
28194
    public Object getFieldValue(_Fields field) {
28195
      switch (field) {
28196
      case SUCCESS:
28197
        return getSuccess();
28198
 
28199
      }
28200
      throw new IllegalStateException();
28201
    }
28202
 
28203
    public Object getFieldValue(int fieldId) {
28204
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28205
    }
28206
 
28207
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28208
    public boolean isSet(_Fields field) {
28209
      switch (field) {
28210
      case SUCCESS:
28211
        return isSetSuccess();
28212
      }
28213
      throw new IllegalStateException();
28214
    }
28215
 
28216
    public boolean isSet(int fieldID) {
28217
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28218
    }
28219
 
28220
    @Override
28221
    public boolean equals(Object that) {
28222
      if (that == null)
28223
        return false;
28224
      if (that instanceof getValidOrders_result)
28225
        return this.equals((getValidOrders_result)that);
28226
      return false;
28227
    }
28228
 
28229
    public boolean equals(getValidOrders_result that) {
28230
      if (that == null)
28231
        return false;
28232
 
28233
      boolean this_present_success = true && this.isSetSuccess();
28234
      boolean that_present_success = true && that.isSetSuccess();
28235
      if (this_present_success || that_present_success) {
28236
        if (!(this_present_success && that_present_success))
28237
          return false;
28238
        if (!this.success.equals(that.success))
28239
          return false;
28240
      }
28241
 
28242
      return true;
28243
    }
28244
 
28245
    @Override
28246
    public int hashCode() {
28247
      return 0;
28248
    }
28249
 
28250
    public int compareTo(getValidOrders_result other) {
28251
      if (!getClass().equals(other.getClass())) {
28252
        return getClass().getName().compareTo(other.getClass().getName());
28253
      }
28254
 
28255
      int lastComparison = 0;
28256
      getValidOrders_result typedOther = (getValidOrders_result)other;
28257
 
28258
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28259
      if (lastComparison != 0) {
28260
        return lastComparison;
28261
      }
28262
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28263
      if (lastComparison != 0) {
28264
        return lastComparison;
28265
      }
28266
      return 0;
28267
    }
28268
 
28269
    public void read(TProtocol iprot) throws TException {
28270
      TField field;
28271
      iprot.readStructBegin();
28272
      while (true)
28273
      {
28274
        field = iprot.readFieldBegin();
28275
        if (field.type == TType.STOP) { 
28276
          break;
28277
        }
28278
        _Fields fieldId = _Fields.findByThriftId(field.id);
28279
        if (fieldId == null) {
28280
          TProtocolUtil.skip(iprot, field.type);
28281
        } else {
28282
          switch (fieldId) {
28283
            case SUCCESS:
28284
              if (field.type == TType.LIST) {
28285
                {
28286
                  TList _list84 = iprot.readListBegin();
28287
                  this.success = new ArrayList<Order>(_list84.size);
28288
                  for (int _i85 = 0; _i85 < _list84.size; ++_i85)
28289
                  {
28290
                    Order _elem86;
28291
                    _elem86 = new Order();
28292
                    _elem86.read(iprot);
28293
                    this.success.add(_elem86);
28294
                  }
28295
                  iprot.readListEnd();
28296
                }
28297
              } else { 
28298
                TProtocolUtil.skip(iprot, field.type);
28299
              }
28300
              break;
28301
          }
28302
          iprot.readFieldEnd();
28303
        }
28304
      }
28305
      iprot.readStructEnd();
28306
      validate();
28307
    }
28308
 
28309
    public void write(TProtocol oprot) throws TException {
28310
      oprot.writeStructBegin(STRUCT_DESC);
28311
 
28312
      if (this.isSetSuccess()) {
28313
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28314
        {
28315
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
28316
          for (Order _iter87 : this.success)
28317
          {
28318
            _iter87.write(oprot);
28319
          }
28320
          oprot.writeListEnd();
28321
        }
28322
        oprot.writeFieldEnd();
28323
      }
28324
      oprot.writeFieldStop();
28325
      oprot.writeStructEnd();
28326
    }
28327
 
28328
    @Override
28329
    public String toString() {
28330
      StringBuilder sb = new StringBuilder("getValidOrders_result(");
28331
      boolean first = true;
28332
 
28333
      sb.append("success:");
28334
      if (this.success == null) {
28335
        sb.append("null");
28336
      } else {
28337
        sb.append(this.success);
28338
      }
28339
      first = false;
28340
      sb.append(")");
28341
      return sb.toString();
28342
    }
28343
 
28344
    public void validate() throws TException {
28345
      // check for required fields
28346
    }
28347
 
28348
  }
28349
 
68 ashish 28350
}