Subversion Repositories SmartDukaan

Rev

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

Rev Author Line No. Line
68 ashish 1
/**
2
 * Autogenerated by Thrift
3
 *
4
 * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
5
 */
6
package in.shop2020.model.v1.order;
7
 
8
import java.util.List;
9
import java.util.ArrayList;
10
import java.util.Map;
11
import java.util.HashMap;
12
import java.util.EnumMap;
13
import java.util.Set;
14
import java.util.HashSet;
15
import java.util.EnumSet;
16
import java.util.Collections;
17
import java.util.BitSet;
18
import java.util.Arrays;
19
import org.slf4j.Logger;
20
import org.slf4j.LoggerFactory;
21
 
22
import org.apache.thrift.*;
23
import org.apache.thrift.meta_data.*;
24
import org.apache.thrift.protocol.*;
25
 
26
public class TransactionService {
27
 
28
  public interface Iface {
29
 
764 rajveer 30
    /**
31
     * For closing the open session in sqlalchemy
32
     */
33
    public void closeSession() throws TException;
34
 
132 ashish 35
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException;
68 ashish 36
 
37
    public Transaction getTransaction(long id) throws TransactionServiceException, TException;
38
 
132 ashish 39
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException;
68 ashish 40
 
132 ashish 41
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException;
42
 
68 ashish 43
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException;
44
 
45
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException;
46
 
1398 varun.gupt 47
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException;
1382 varun.gupt 48
 
483 rajveer 49
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException;
68 ashish 50
 
1133 chandransh 51
    /**
52
     * Returns orders within a range of their billing dates
53
     * 
54
     * @param status
55
     * @param start_billing_date
56
     * @param end_billing_date
57
     * @param warehouse_id
58
     */
1022 varun.gupt 59
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException;
60
 
1382 varun.gupt 61
    /**
62
     * Returns order ids for orders which can be returned
63
     * 
64
     * @param customer_id
65
     * @param limit
66
     */
67
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
68
 
69
    /**
70
     * Returns order ids for orders which can be cancelled
71
     * 
72
     * @param customer_id
73
     * @param limit
74
     */
75
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException;
76
 
483 rajveer 77
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException;
68 ashish 78
 
1148 chandransh 79
    /**
80
     * Add billing details such as the bill number and the biller to the Order.
81
     * 
82
     * @param orderId
83
     * @param invoice_number
84
     * @param billed_by
85
     */
86
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException;
495 rajveer 87
 
1148 chandransh 88
    /**
89
     * Adds jacket number to the order. Return false if it doesn't find the order with the given ID.
90
     * 
91
     * @param orderId
92
     * @param jacketNumber
93
     */
94
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException;
95
 
923 rajveer 96
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException;
97
 
98
    public boolean billOrder(long orderId) throws TransactionServiceException, TException;
99
 
1529 ankur.sing 100
    /**
101
     * Returns list of orders for given transaction Id. Also filters based on customer Id so that
102
     * only user who owns the transaction can view its order details.
103
     * 
104
     * @param transactionId
105
     * @param customerId
106
     */
107
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException;
68 ashish 108
 
483 rajveer 109
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException;
68 ashish 110
 
483 rajveer 111
    public long createOrder(Order order) throws TransactionServiceException, TException;
68 ashish 112
 
483 rajveer 113
    public Order getOrder(long id) throws TransactionServiceException, TException;
68 ashish 114
 
483 rajveer 115
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException;
68 ashish 116
 
758 chandransh 117
    /**
1529 ankur.sing 118
     * Returns an order for the order Id. Also checks if the order belongs to the customer whose Id is passed.
119
     * Throws exception if either order Id is invalid or order does not below to the customer whose Id is passed.
120
     * 
121
     * @param orderId
122
     * @param customerId
123
     */
124
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException;
125
 
126
    /**
1221 chandransh 127
     * Create a batch of all the pending orders for the given warehouse.
128
     * The returned list is orderd by created_timestamp.
129
     * If there are no pending orders, an empty list is returned.
130
     * 
131
     * @param warehouseId
132
     */
133
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException;
134
 
135
    /**
1209 chandransh 136
     * Mark the given order as out of stock. Throws an exception if the order with the given Id couldn't be found.
137
     * 
138
     * @param orderId
139
     */
140
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException;
141
 
142
    /**
758 chandransh 143
     * Marks all BILLED orders for a warehouse and a provider as SHIPPED_FROM_WH
144
     * 
145
     * @param warehouseId
146
     * @param providerId
147
     */
148
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException;
149
 
1114 chandransh 150
    /**
151
     * Marks all SHIPPED_FROM_WH orders of the previous day for a provider as SHIPPED_TO_LOGISTICS.
152
     * Returns a list of orders that were shipped from warehouse but did not appear in the pick-up report.
153
     * Raises an exception if we encounter report for an AWB number that we did not ship.
154
     * 
155
     * @param providerId
156
     * @param pickupDetails
157
     */
1245 chandransh 158
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException;
1114 chandransh 159
 
1133 chandransh 160
    /**
161
     * Marks all orders with AWBs in the given map as delivered. Also sets the delivery timestamp and
162
     * the name of the receiver.
163
     * Raises an exception if we encounter report for an AWB number that we did not ship.
164
     * 
165
     * @param providerId
166
     * @param deliveredOrders
167
     */
168
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException;
169
 
170
    /**
171
     * Mark all orders with AWBs in the given map as failed. Also sets the delivery timestamp.
172
     * Raises an exception if we encounter report for an AWB number that we did not ship.
173
     * 
174
     * @param providerId
175
     * @param returnedOrders
176
     */
177
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException;
178
 
1245 chandransh 179
    /**
180
     * Update the status description of orders whose AWB numbers are keys of the Map.
181
     * 
182
     * @param providerId
183
     * @param undeliveredOrders
184
     */
185
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException;
186
 
1406 ankur.sing 187
    /**
188
     * Returns the list of orders whose delivery time has passed but have not been
189
     * delivered yet for the given provider and warehouse. To get a complete list of
190
     * undelivered orders, pass them as -1.
191
     * Returns an empty list if no such orders exist.
192
     * 
193
     * @param providerId
194
     * @param warehouseId
195
     */
196
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException;
197
 
483 rajveer 198
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException;
68 ashish 199
 
483 rajveer 200
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException;
68 ashish 201
 
1598 ankur.sing 202
    /**
203
     * Return the number of valid orders. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
204
     */
205
    public long getValidOrderCount() throws TException;
206
 
1629 ankur.sing 207
    /**
208
     * Returns the number of distinct customers who have done successful transactions
209
     */
210
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException;
211
 
212
    /**
1731 ankur.sing 213
     * Returns the minimum and maximum amounts of a valid order. (OrderStatus >= OrderStatus.SUBMITTED_FOR_PROCESSING)
214
     * List contains two values, first minimum amount and second maximum amount.
1629 ankur.sing 215
     */
1731 ankur.sing 216
    public List<Double> getValidOrdersAmountRange() throws TException;
1629 ankur.sing 217
 
1886 ankur.sing 218
    /**
219
     * Returns list of Orders in descending order by Order creation date. List is restricted to limit Orders.
220
     * If limit is passed as 0, then all valid Orders are returned.
221
     * 
222
     * @param limit
223
     */
224
    public List<Order> getValidOrders(long limit) throws TException;
225
 
68 ashish 226
  }
227
 
228
  public static class Client implements Iface {
229
    public Client(TProtocol prot)
230
    {
231
      this(prot, prot);
232
    }
233
 
234
    public Client(TProtocol iprot, TProtocol oprot)
235
    {
236
      iprot_ = iprot;
237
      oprot_ = oprot;
238
    }
239
 
240
    protected TProtocol iprot_;
241
    protected TProtocol oprot_;
242
 
243
    protected int seqid_;
244
 
245
    public TProtocol getInputProtocol()
246
    {
247
      return this.iprot_;
248
    }
249
 
250
    public TProtocol getOutputProtocol()
251
    {
252
      return this.oprot_;
253
    }
254
 
764 rajveer 255
    public void closeSession() throws TException
256
    {
257
      send_closeSession();
258
      recv_closeSession();
259
    }
260
 
261
    public void send_closeSession() throws TException
262
    {
263
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
264
      closeSession_args args = new closeSession_args();
265
      args.write(oprot_);
266
      oprot_.writeMessageEnd();
267
      oprot_.getTransport().flush();
268
    }
269
 
270
    public void recv_closeSession() throws TException
271
    {
272
      TMessage msg = iprot_.readMessageBegin();
273
      if (msg.type == TMessageType.EXCEPTION) {
274
        TApplicationException x = TApplicationException.read(iprot_);
275
        iprot_.readMessageEnd();
276
        throw x;
277
      }
278
      closeSession_result result = new closeSession_result();
279
      result.read(iprot_);
280
      iprot_.readMessageEnd();
281
      return;
282
    }
283
 
132 ashish 284
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 285
    {
286
      send_createTransaction(transaction);
132 ashish 287
      return recv_createTransaction();
68 ashish 288
    }
289
 
290
    public void send_createTransaction(Transaction transaction) throws TException
291
    {
292
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
293
      createTransaction_args args = new createTransaction_args();
294
      args.transaction = transaction;
295
      args.write(oprot_);
296
      oprot_.writeMessageEnd();
297
      oprot_.getTransport().flush();
298
    }
299
 
132 ashish 300
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 301
    {
302
      TMessage msg = iprot_.readMessageBegin();
303
      if (msg.type == TMessageType.EXCEPTION) {
304
        TApplicationException x = TApplicationException.read(iprot_);
305
        iprot_.readMessageEnd();
306
        throw x;
307
      }
308
      createTransaction_result result = new createTransaction_result();
309
      result.read(iprot_);
310
      iprot_.readMessageEnd();
132 ashish 311
      if (result.isSetSuccess()) {
312
        return result.success;
313
      }
68 ashish 314
      if (result.ex != null) {
315
        throw result.ex;
316
      }
132 ashish 317
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 318
    }
319
 
320
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
321
    {
322
      send_getTransaction(id);
323
      return recv_getTransaction();
324
    }
325
 
326
    public void send_getTransaction(long id) throws TException
327
    {
328
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
329
      getTransaction_args args = new getTransaction_args();
330
      args.id = id;
331
      args.write(oprot_);
332
      oprot_.writeMessageEnd();
333
      oprot_.getTransport().flush();
334
    }
335
 
336
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
337
    {
338
      TMessage msg = iprot_.readMessageBegin();
339
      if (msg.type == TMessageType.EXCEPTION) {
340
        TApplicationException x = TApplicationException.read(iprot_);
341
        iprot_.readMessageEnd();
342
        throw x;
343
      }
344
      getTransaction_result result = new getTransaction_result();
345
      result.read(iprot_);
346
      iprot_.readMessageEnd();
347
      if (result.isSetSuccess()) {
348
        return result.success;
349
      }
350
      if (result.ex != null) {
351
        throw result.ex;
352
      }
353
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
354
    }
355
 
132 ashish 356
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 357
    {
132 ashish 358
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 359
      return recv_getTransactionsForCustomer();
360
    }
361
 
132 ashish 362
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 363
    {
364
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
365
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
366
      args.customerId = customerId;
132 ashish 367
      args.from_date = from_date;
368
      args.to_date = to_date;
68 ashish 369
      args.status = status;
370
      args.write(oprot_);
371
      oprot_.writeMessageEnd();
372
      oprot_.getTransport().flush();
373
    }
374
 
375
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
376
    {
377
      TMessage msg = iprot_.readMessageBegin();
378
      if (msg.type == TMessageType.EXCEPTION) {
379
        TApplicationException x = TApplicationException.read(iprot_);
380
        iprot_.readMessageEnd();
381
        throw x;
382
      }
383
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
384
      result.read(iprot_);
385
      iprot_.readMessageEnd();
386
      if (result.isSetSuccess()) {
387
        return result.success;
388
      }
389
      if (result.ex != null) {
390
        throw result.ex;
391
      }
392
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
393
    }
394
 
132 ashish 395
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
396
    {
397
      send_getTransactionsForShoppingCartId(shoppingCartId);
398
      return recv_getTransactionsForShoppingCartId();
399
    }
400
 
401
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
402
    {
403
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
404
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
405
      args.shoppingCartId = shoppingCartId;
406
      args.write(oprot_);
407
      oprot_.writeMessageEnd();
408
      oprot_.getTransport().flush();
409
    }
410
 
411
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
412
    {
413
      TMessage msg = iprot_.readMessageBegin();
414
      if (msg.type == TMessageType.EXCEPTION) {
415
        TApplicationException x = TApplicationException.read(iprot_);
416
        iprot_.readMessageEnd();
417
        throw x;
418
      }
419
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
420
      result.read(iprot_);
421
      iprot_.readMessageEnd();
422
      if (result.isSetSuccess()) {
423
        return result.success;
424
      }
425
      if (result.ex != null) {
426
        throw result.ex;
427
      }
428
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
429
    }
430
 
68 ashish 431
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
432
    {
433
      send_getTransactionStatus(transactionId);
434
      return recv_getTransactionStatus();
435
    }
436
 
437
    public void send_getTransactionStatus(long transactionId) throws TException
438
    {
439
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
440
      getTransactionStatus_args args = new getTransactionStatus_args();
441
      args.transactionId = transactionId;
442
      args.write(oprot_);
443
      oprot_.writeMessageEnd();
444
      oprot_.getTransport().flush();
445
    }
446
 
447
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
448
    {
449
      TMessage msg = iprot_.readMessageBegin();
450
      if (msg.type == TMessageType.EXCEPTION) {
451
        TApplicationException x = TApplicationException.read(iprot_);
452
        iprot_.readMessageEnd();
453
        throw x;
454
      }
455
      getTransactionStatus_result result = new getTransactionStatus_result();
456
      result.read(iprot_);
457
      iprot_.readMessageEnd();
458
      if (result.isSetSuccess()) {
459
        return result.success;
460
      }
461
      if (result.ex != null) {
462
        throw result.ex;
463
      }
464
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
465
    }
466
 
467
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
468
    {
469
      send_changeTransactionStatus(transactionId, status, description);
470
      return recv_changeTransactionStatus();
471
    }
472
 
473
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
474
    {
475
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
476
      changeTransactionStatus_args args = new changeTransactionStatus_args();
477
      args.transactionId = transactionId;
478
      args.status = status;
479
      args.description = description;
480
      args.write(oprot_);
481
      oprot_.writeMessageEnd();
482
      oprot_.getTransport().flush();
483
    }
484
 
485
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
486
    {
487
      TMessage msg = iprot_.readMessageBegin();
488
      if (msg.type == TMessageType.EXCEPTION) {
489
        TApplicationException x = TApplicationException.read(iprot_);
490
        iprot_.readMessageEnd();
491
        throw x;
492
      }
493
      changeTransactionStatus_result result = new changeTransactionStatus_result();
494
      result.read(iprot_);
495
      iprot_.readMessageEnd();
496
      if (result.isSetSuccess()) {
497
        return result.success;
498
      }
499
      if (result.ex != null) {
500
        throw result.ex;
501
      }
502
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
503
    }
504
 
1398 varun.gupt 505
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 506
    {
1398 varun.gupt 507
      send_enqueueTransactionInfoEmail(transactionId);
508
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 509
    }
510
 
1398 varun.gupt 511
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 512
    {
1398 varun.gupt 513
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
514
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 515
      args.transactionId = transactionId;
516
      args.write(oprot_);
517
      oprot_.writeMessageEnd();
518
      oprot_.getTransport().flush();
519
    }
520
 
1398 varun.gupt 521
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 522
    {
523
      TMessage msg = iprot_.readMessageBegin();
524
      if (msg.type == TMessageType.EXCEPTION) {
525
        TApplicationException x = TApplicationException.read(iprot_);
526
        iprot_.readMessageEnd();
527
        throw x;
528
      }
1398 varun.gupt 529
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 530
      result.read(iprot_);
531
      iprot_.readMessageEnd();
532
      if (result.isSetSuccess()) {
533
        return result.success;
534
      }
535
      if (result.ex != null) {
536
        throw result.ex;
537
      }
1398 varun.gupt 538
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 539
    }
540
 
483 rajveer 541
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 542
    {
483 rajveer 543
      send_getAllOrders(status, from_date, to_date, warehouse_id);
544
      return recv_getAllOrders();
68 ashish 545
    }
546
 
483 rajveer 547
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 548
    {
483 rajveer 549
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
550
      getAllOrders_args args = new getAllOrders_args();
551
      args.status = status;
552
      args.from_date = from_date;
553
      args.to_date = to_date;
554
      args.warehouse_id = warehouse_id;
68 ashish 555
      args.write(oprot_);
556
      oprot_.writeMessageEnd();
557
      oprot_.getTransport().flush();
558
    }
559
 
483 rajveer 560
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 561
    {
562
      TMessage msg = iprot_.readMessageBegin();
563
      if (msg.type == TMessageType.EXCEPTION) {
564
        TApplicationException x = TApplicationException.read(iprot_);
565
        iprot_.readMessageEnd();
566
        throw x;
567
      }
483 rajveer 568
      getAllOrders_result result = new getAllOrders_result();
68 ashish 569
      result.read(iprot_);
570
      iprot_.readMessageEnd();
571
      if (result.isSetSuccess()) {
572
        return result.success;
573
      }
574
      if (result.ex != null) {
575
        throw result.ex;
576
      }
483 rajveer 577
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 578
    }
579
 
1022 varun.gupt 580
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
581
    {
582
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
583
      return recv_getOrdersByBillingDate();
584
    }
585
 
586
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
587
    {
588
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
589
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
590
      args.status = status;
591
      args.start_billing_date = start_billing_date;
592
      args.end_billing_date = end_billing_date;
593
      args.warehouse_id = warehouse_id;
594
      args.write(oprot_);
595
      oprot_.writeMessageEnd();
596
      oprot_.getTransport().flush();
597
    }
598
 
599
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
600
    {
601
      TMessage msg = iprot_.readMessageBegin();
602
      if (msg.type == TMessageType.EXCEPTION) {
603
        TApplicationException x = TApplicationException.read(iprot_);
604
        iprot_.readMessageEnd();
605
        throw x;
606
      }
607
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
608
      result.read(iprot_);
609
      iprot_.readMessageEnd();
610
      if (result.isSetSuccess()) {
611
        return result.success;
612
      }
613
      if (result.ex != null) {
614
        throw result.ex;
615
      }
616
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
617
    }
618
 
1382 varun.gupt 619
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
620
    {
621
      send_getReturnableOrdersForCustomer(customer_id, limit);
622
      return recv_getReturnableOrdersForCustomer();
623
    }
624
 
625
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
626
    {
627
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
628
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
629
      args.customer_id = customer_id;
630
      args.limit = limit;
631
      args.write(oprot_);
632
      oprot_.writeMessageEnd();
633
      oprot_.getTransport().flush();
634
    }
635
 
636
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
637
    {
638
      TMessage msg = iprot_.readMessageBegin();
639
      if (msg.type == TMessageType.EXCEPTION) {
640
        TApplicationException x = TApplicationException.read(iprot_);
641
        iprot_.readMessageEnd();
642
        throw x;
643
      }
644
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
645
      result.read(iprot_);
646
      iprot_.readMessageEnd();
647
      if (result.isSetSuccess()) {
648
        return result.success;
649
      }
650
      if (result.ex != null) {
651
        throw result.ex;
652
      }
653
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
654
    }
655
 
656
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
657
    {
658
      send_getCancellableOrdersForCustomer(customer_id, limit);
659
      return recv_getCancellableOrdersForCustomer();
660
    }
661
 
662
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
663
    {
664
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
665
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
666
      args.customer_id = customer_id;
667
      args.limit = limit;
668
      args.write(oprot_);
669
      oprot_.writeMessageEnd();
670
      oprot_.getTransport().flush();
671
    }
672
 
673
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
674
    {
675
      TMessage msg = iprot_.readMessageBegin();
676
      if (msg.type == TMessageType.EXCEPTION) {
677
        TApplicationException x = TApplicationException.read(iprot_);
678
        iprot_.readMessageEnd();
679
        throw x;
680
      }
681
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
682
      result.read(iprot_);
683
      iprot_.readMessageEnd();
684
      if (result.isSetSuccess()) {
685
        return result.success;
686
      }
687
      if (result.ex != null) {
688
        throw result.ex;
689
      }
690
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
691
    }
692
 
483 rajveer 693
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 694
    {
483 rajveer 695
      send_changeOrderStatus(orderId, status, description);
696
      return recv_changeOrderStatus();
68 ashish 697
    }
698
 
483 rajveer 699
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 700
    {
483 rajveer 701
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
702
      changeOrderStatus_args args = new changeOrderStatus_args();
703
      args.orderId = orderId;
704
      args.status = status;
705
      args.description = description;
68 ashish 706
      args.write(oprot_);
707
      oprot_.writeMessageEnd();
708
      oprot_.getTransport().flush();
709
    }
710
 
483 rajveer 711
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 712
    {
713
      TMessage msg = iprot_.readMessageBegin();
714
      if (msg.type == TMessageType.EXCEPTION) {
715
        TApplicationException x = TApplicationException.read(iprot_);
716
        iprot_.readMessageEnd();
717
        throw x;
718
      }
483 rajveer 719
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 720
      result.read(iprot_);
721
      iprot_.readMessageEnd();
722
      if (result.isSetSuccess()) {
723
        return result.success;
724
      }
725
      if (result.ex != null) {
726
        throw result.ex;
727
      }
483 rajveer 728
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 729
    }
730
 
1148 chandransh 731
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 732
    {
1148 chandransh 733
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 734
      return recv_addBillingDetails();
735
    }
736
 
1148 chandransh 737
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 738
    {
739
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
740
      addBillingDetails_args args = new addBillingDetails_args();
741
      args.orderId = orderId;
742
      args.invoice_number = invoice_number;
743
      args.billed_by = billed_by;
744
      args.write(oprot_);
745
      oprot_.writeMessageEnd();
746
      oprot_.getTransport().flush();
747
    }
748
 
749
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
750
    {
751
      TMessage msg = iprot_.readMessageBegin();
752
      if (msg.type == TMessageType.EXCEPTION) {
753
        TApplicationException x = TApplicationException.read(iprot_);
754
        iprot_.readMessageEnd();
755
        throw x;
756
      }
757
      addBillingDetails_result result = new addBillingDetails_result();
758
      result.read(iprot_);
759
      iprot_.readMessageEnd();
760
      if (result.isSetSuccess()) {
761
        return result.success;
762
      }
763
      if (result.ex != null) {
764
        throw result.ex;
765
      }
766
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
767
    }
768
 
1148 chandransh 769
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
770
    {
771
      send_addJacketNumber(orderId, jacketNumber);
772
      return recv_addJacketNumber();
773
    }
774
 
775
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
776
    {
777
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
778
      addJacketNumber_args args = new addJacketNumber_args();
779
      args.orderId = orderId;
780
      args.jacketNumber = jacketNumber;
781
      args.write(oprot_);
782
      oprot_.writeMessageEnd();
783
      oprot_.getTransport().flush();
784
    }
785
 
786
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
787
    {
788
      TMessage msg = iprot_.readMessageBegin();
789
      if (msg.type == TMessageType.EXCEPTION) {
790
        TApplicationException x = TApplicationException.read(iprot_);
791
        iprot_.readMessageEnd();
792
        throw x;
793
      }
794
      addJacketNumber_result result = new addJacketNumber_result();
795
      result.read(iprot_);
796
      iprot_.readMessageEnd();
797
      if (result.isSetSuccess()) {
798
        return result.success;
799
      }
800
      if (result.ex != null) {
801
        throw result.ex;
802
      }
803
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
804
    }
805
 
923 rajveer 806
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
807
    {
808
      send_acceptOrder(orderId);
809
      return recv_acceptOrder();
810
    }
811
 
812
    public void send_acceptOrder(long orderId) throws TException
813
    {
814
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
815
      acceptOrder_args args = new acceptOrder_args();
816
      args.orderId = orderId;
817
      args.write(oprot_);
818
      oprot_.writeMessageEnd();
819
      oprot_.getTransport().flush();
820
    }
821
 
822
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
823
    {
824
      TMessage msg = iprot_.readMessageBegin();
825
      if (msg.type == TMessageType.EXCEPTION) {
826
        TApplicationException x = TApplicationException.read(iprot_);
827
        iprot_.readMessageEnd();
828
        throw x;
829
      }
830
      acceptOrder_result result = new acceptOrder_result();
831
      result.read(iprot_);
832
      iprot_.readMessageEnd();
833
      if (result.isSetSuccess()) {
834
        return result.success;
835
      }
836
      if (result.ex != null) {
837
        throw result.ex;
838
      }
839
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
840
    }
841
 
842
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
843
    {
844
      send_billOrder(orderId);
845
      return recv_billOrder();
846
    }
847
 
848
    public void send_billOrder(long orderId) throws TException
849
    {
850
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
851
      billOrder_args args = new billOrder_args();
852
      args.orderId = orderId;
853
      args.write(oprot_);
854
      oprot_.writeMessageEnd();
855
      oprot_.getTransport().flush();
856
    }
857
 
858
    public boolean recv_billOrder() throws TransactionServiceException, TException
859
    {
860
      TMessage msg = iprot_.readMessageBegin();
861
      if (msg.type == TMessageType.EXCEPTION) {
862
        TApplicationException x = TApplicationException.read(iprot_);
863
        iprot_.readMessageEnd();
864
        throw x;
865
      }
866
      billOrder_result result = new billOrder_result();
867
      result.read(iprot_);
868
      iprot_.readMessageEnd();
869
      if (result.isSetSuccess()) {
870
        return result.success;
871
      }
872
      if (result.ex != null) {
873
        throw result.ex;
874
      }
875
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
876
    }
877
 
1529 ankur.sing 878
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 879
    {
1529 ankur.sing 880
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 881
      return recv_getOrdersForTransaction();
68 ashish 882
    }
883
 
1529 ankur.sing 884
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 885
    {
483 rajveer 886
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
887
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 888
      args.transactionId = transactionId;
1529 ankur.sing 889
      args.customerId = customerId;
68 ashish 890
      args.write(oprot_);
891
      oprot_.writeMessageEnd();
892
      oprot_.getTransport().flush();
893
    }
894
 
483 rajveer 895
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 896
    {
897
      TMessage msg = iprot_.readMessageBegin();
898
      if (msg.type == TMessageType.EXCEPTION) {
899
        TApplicationException x = TApplicationException.read(iprot_);
900
        iprot_.readMessageEnd();
901
        throw x;
902
      }
483 rajveer 903
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 904
      result.read(iprot_);
905
      iprot_.readMessageEnd();
906
      if (result.isSetSuccess()) {
907
        return result.success;
908
      }
909
      if (result.ex != null) {
910
        throw result.ex;
911
      }
483 rajveer 912
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 913
    }
914
 
483 rajveer 915
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 916
    {
483 rajveer 917
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
918
      return recv_getOrdersForCustomer();
68 ashish 919
    }
920
 
483 rajveer 921
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 922
    {
483 rajveer 923
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
924
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
925
      args.customerId = customerId;
926
      args.from_date = from_date;
927
      args.to_date = to_date;
928
      args.status = status;
68 ashish 929
      args.write(oprot_);
930
      oprot_.writeMessageEnd();
931
      oprot_.getTransport().flush();
932
    }
933
 
483 rajveer 934
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 935
    {
936
      TMessage msg = iprot_.readMessageBegin();
937
      if (msg.type == TMessageType.EXCEPTION) {
938
        TApplicationException x = TApplicationException.read(iprot_);
939
        iprot_.readMessageEnd();
940
        throw x;
941
      }
483 rajveer 942
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 943
      result.read(iprot_);
944
      iprot_.readMessageEnd();
945
      if (result.isSetSuccess()) {
946
        return result.success;
947
      }
948
      if (result.ex != null) {
949
        throw result.ex;
950
      }
483 rajveer 951
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 952
    }
953
 
483 rajveer 954
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 955
    {
483 rajveer 956
      send_createOrder(order);
957
      return recv_createOrder();
68 ashish 958
    }
959
 
483 rajveer 960
    public void send_createOrder(Order order) throws TException
68 ashish 961
    {
483 rajveer 962
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
963
      createOrder_args args = new createOrder_args();
964
      args.order = order;
68 ashish 965
      args.write(oprot_);
966
      oprot_.writeMessageEnd();
967
      oprot_.getTransport().flush();
968
    }
969
 
483 rajveer 970
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 971
    {
972
      TMessage msg = iprot_.readMessageBegin();
973
      if (msg.type == TMessageType.EXCEPTION) {
974
        TApplicationException x = TApplicationException.read(iprot_);
975
        iprot_.readMessageEnd();
976
        throw x;
977
      }
483 rajveer 978
      createOrder_result result = new createOrder_result();
68 ashish 979
      result.read(iprot_);
980
      iprot_.readMessageEnd();
981
      if (result.isSetSuccess()) {
982
        return result.success;
983
      }
984
      if (result.ex != null) {
985
        throw result.ex;
986
      }
483 rajveer 987
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 988
    }
989
 
483 rajveer 990
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 991
    {
483 rajveer 992
      send_getOrder(id);
993
      return recv_getOrder();
68 ashish 994
    }
995
 
483 rajveer 996
    public void send_getOrder(long id) throws TException
68 ashish 997
    {
483 rajveer 998
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
999
      getOrder_args args = new getOrder_args();
1000
      args.id = id;
68 ashish 1001
      args.write(oprot_);
1002
      oprot_.writeMessageEnd();
1003
      oprot_.getTransport().flush();
1004
    }
1005
 
483 rajveer 1006
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 1007
    {
1008
      TMessage msg = iprot_.readMessageBegin();
1009
      if (msg.type == TMessageType.EXCEPTION) {
1010
        TApplicationException x = TApplicationException.read(iprot_);
1011
        iprot_.readMessageEnd();
1012
        throw x;
1013
      }
483 rajveer 1014
      getOrder_result result = new getOrder_result();
68 ashish 1015
      result.read(iprot_);
1016
      iprot_.readMessageEnd();
1017
      if (result.isSetSuccess()) {
1018
        return result.success;
1019
      }
1020
      if (result.ex != null) {
1021
        throw result.ex;
1022
      }
483 rajveer 1023
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1024
    }
1025
 
483 rajveer 1026
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1027
    {
483 rajveer 1028
      send_getLineItemsForOrder(orderId);
1029
      return recv_getLineItemsForOrder();
68 ashish 1030
    }
1031
 
483 rajveer 1032
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1033
    {
483 rajveer 1034
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1035
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1036
      args.orderId = orderId;
68 ashish 1037
      args.write(oprot_);
1038
      oprot_.writeMessageEnd();
1039
      oprot_.getTransport().flush();
1040
    }
1041
 
483 rajveer 1042
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1043
    {
1044
      TMessage msg = iprot_.readMessageBegin();
1045
      if (msg.type == TMessageType.EXCEPTION) {
1046
        TApplicationException x = TApplicationException.read(iprot_);
1047
        iprot_.readMessageEnd();
1048
        throw x;
1049
      }
483 rajveer 1050
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1051
      result.read(iprot_);
1052
      iprot_.readMessageEnd();
1053
      if (result.isSetSuccess()) {
1054
        return result.success;
1055
      }
1056
      if (result.ex != null) {
1057
        throw result.ex;
1058
      }
483 rajveer 1059
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1060
    }
1061
 
1529 ankur.sing 1062
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1063
    {
1064
      send_getOrderForCustomer(orderId, customerId);
1065
      return recv_getOrderForCustomer();
1066
    }
1067
 
1068
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1069
    {
1070
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1071
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1072
      args.orderId = orderId;
1073
      args.customerId = customerId;
1074
      args.write(oprot_);
1075
      oprot_.writeMessageEnd();
1076
      oprot_.getTransport().flush();
1077
    }
1078
 
1079
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1080
    {
1081
      TMessage msg = iprot_.readMessageBegin();
1082
      if (msg.type == TMessageType.EXCEPTION) {
1083
        TApplicationException x = TApplicationException.read(iprot_);
1084
        iprot_.readMessageEnd();
1085
        throw x;
1086
      }
1087
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1088
      result.read(iprot_);
1089
      iprot_.readMessageEnd();
1090
      if (result.isSetSuccess()) {
1091
        return result.success;
1092
      }
1093
      if (result.ex != null) {
1094
        throw result.ex;
1095
      }
1096
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1097
    }
1098
 
1221 chandransh 1099
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1100
    {
1101
      send_batchOrders(warehouseId);
1102
      return recv_batchOrders();
1103
    }
1104
 
1105
    public void send_batchOrders(long warehouseId) throws TException
1106
    {
1107
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1108
      batchOrders_args args = new batchOrders_args();
1109
      args.warehouseId = warehouseId;
1110
      args.write(oprot_);
1111
      oprot_.writeMessageEnd();
1112
      oprot_.getTransport().flush();
1113
    }
1114
 
1115
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1116
    {
1117
      TMessage msg = iprot_.readMessageBegin();
1118
      if (msg.type == TMessageType.EXCEPTION) {
1119
        TApplicationException x = TApplicationException.read(iprot_);
1120
        iprot_.readMessageEnd();
1121
        throw x;
1122
      }
1123
      batchOrders_result result = new batchOrders_result();
1124
      result.read(iprot_);
1125
      iprot_.readMessageEnd();
1126
      if (result.isSetSuccess()) {
1127
        return result.success;
1128
      }
1129
      if (result.ex != null) {
1130
        throw result.ex;
1131
      }
1132
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1133
    }
1134
 
1209 chandransh 1135
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1136
    {
1137
      send_markOrderAsOutOfStock(orderId);
1138
      return recv_markOrderAsOutOfStock();
1139
    }
1140
 
1141
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1142
    {
1143
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1144
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1145
      args.orderId = orderId;
1146
      args.write(oprot_);
1147
      oprot_.writeMessageEnd();
1148
      oprot_.getTransport().flush();
1149
    }
1150
 
1151
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1152
    {
1153
      TMessage msg = iprot_.readMessageBegin();
1154
      if (msg.type == TMessageType.EXCEPTION) {
1155
        TApplicationException x = TApplicationException.read(iprot_);
1156
        iprot_.readMessageEnd();
1157
        throw x;
1158
      }
1159
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1160
      result.read(iprot_);
1161
      iprot_.readMessageEnd();
1162
      if (result.isSetSuccess()) {
1163
        return result.success;
1164
      }
1165
      if (result.ex != null) {
1166
        throw result.ex;
1167
      }
1168
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1169
    }
1170
 
758 chandransh 1171
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1172
    {
1173
      send_markOrdersAsManifested(warehouseId, providerId);
1174
      return recv_markOrdersAsManifested();
1175
    }
1176
 
1177
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1178
    {
1179
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1180
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1181
      args.warehouseId = warehouseId;
1182
      args.providerId = providerId;
1183
      args.write(oprot_);
1184
      oprot_.writeMessageEnd();
1185
      oprot_.getTransport().flush();
1186
    }
1187
 
1188
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1189
    {
1190
      TMessage msg = iprot_.readMessageBegin();
1191
      if (msg.type == TMessageType.EXCEPTION) {
1192
        TApplicationException x = TApplicationException.read(iprot_);
1193
        iprot_.readMessageEnd();
1194
        throw x;
1195
      }
1196
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1197
      result.read(iprot_);
1198
      iprot_.readMessageEnd();
1199
      if (result.isSetSuccess()) {
1200
        return result.success;
1201
      }
1202
      if (result.ex != null) {
1203
        throw result.ex;
1204
      }
1205
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1206
    }
1207
 
1245 chandransh 1208
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1209
    {
1210
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1211
      return recv_markOrdersAsPickedUp();
1212
    }
1213
 
1245 chandransh 1214
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1215
    {
1216
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1217
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1218
      args.providerId = providerId;
1219
      args.pickupDetails = pickupDetails;
1220
      args.write(oprot_);
1221
      oprot_.writeMessageEnd();
1222
      oprot_.getTransport().flush();
1223
    }
1224
 
1225
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1226
    {
1227
      TMessage msg = iprot_.readMessageBegin();
1228
      if (msg.type == TMessageType.EXCEPTION) {
1229
        TApplicationException x = TApplicationException.read(iprot_);
1230
        iprot_.readMessageEnd();
1231
        throw x;
1232
      }
1233
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1234
      result.read(iprot_);
1235
      iprot_.readMessageEnd();
1236
      if (result.isSetSuccess()) {
1237
        return result.success;
1238
      }
1239
      if (result.ex != null) {
1240
        throw result.ex;
1241
      }
1242
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1243
    }
1244
 
1133 chandransh 1245
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1246
    {
1247
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1248
      recv_markOrdersAsDelivered();
1249
    }
1250
 
1251
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1252
    {
1253
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1254
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1255
      args.providerId = providerId;
1256
      args.deliveredOrders = deliveredOrders;
1257
      args.write(oprot_);
1258
      oprot_.writeMessageEnd();
1259
      oprot_.getTransport().flush();
1260
    }
1261
 
1262
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1263
    {
1264
      TMessage msg = iprot_.readMessageBegin();
1265
      if (msg.type == TMessageType.EXCEPTION) {
1266
        TApplicationException x = TApplicationException.read(iprot_);
1267
        iprot_.readMessageEnd();
1268
        throw x;
1269
      }
1270
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1271
      result.read(iprot_);
1272
      iprot_.readMessageEnd();
1273
      if (result.ex != null) {
1274
        throw result.ex;
1275
      }
1276
      return;
1277
    }
1278
 
1279
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1280
    {
1281
      send_markOrdersAsFailed(providerId, returnedOrders);
1282
      recv_markOrdersAsFailed();
1283
    }
1284
 
1285
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1286
    {
1287
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1288
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1289
      args.providerId = providerId;
1290
      args.returnedOrders = returnedOrders;
1291
      args.write(oprot_);
1292
      oprot_.writeMessageEnd();
1293
      oprot_.getTransport().flush();
1294
    }
1295
 
1296
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1297
    {
1298
      TMessage msg = iprot_.readMessageBegin();
1299
      if (msg.type == TMessageType.EXCEPTION) {
1300
        TApplicationException x = TApplicationException.read(iprot_);
1301
        iprot_.readMessageEnd();
1302
        throw x;
1303
      }
1304
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1305
      result.read(iprot_);
1306
      iprot_.readMessageEnd();
1307
      if (result.ex != null) {
1308
        throw result.ex;
1309
      }
1310
      return;
1311
    }
1312
 
1245 chandransh 1313
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1314
    {
1315
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1316
      recv_updateNonDeliveryReason();
1317
    }
1318
 
1319
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1320
    {
1321
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1322
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1323
      args.providerId = providerId;
1324
      args.undeliveredOrders = undeliveredOrders;
1325
      args.write(oprot_);
1326
      oprot_.writeMessageEnd();
1327
      oprot_.getTransport().flush();
1328
    }
1329
 
1330
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1331
    {
1332
      TMessage msg = iprot_.readMessageBegin();
1333
      if (msg.type == TMessageType.EXCEPTION) {
1334
        TApplicationException x = TApplicationException.read(iprot_);
1335
        iprot_.readMessageEnd();
1336
        throw x;
1337
      }
1338
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1339
      result.read(iprot_);
1340
      iprot_.readMessageEnd();
1341
      if (result.ex != null) {
1342
        throw result.ex;
1343
      }
1344
      return;
1345
    }
1346
 
1406 ankur.sing 1347
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1348
    {
1349
      send_getUndeliveredOrders(providerId, warehouseId);
1350
      return recv_getUndeliveredOrders();
1351
    }
1352
 
1353
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1354
    {
1355
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1356
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1357
      args.providerId = providerId;
1358
      args.warehouseId = warehouseId;
1359
      args.write(oprot_);
1360
      oprot_.writeMessageEnd();
1361
      oprot_.getTransport().flush();
1362
    }
1363
 
1364
    public List<Order> recv_getUndeliveredOrders() throws TException
1365
    {
1366
      TMessage msg = iprot_.readMessageBegin();
1367
      if (msg.type == TMessageType.EXCEPTION) {
1368
        TApplicationException x = TApplicationException.read(iprot_);
1369
        iprot_.readMessageEnd();
1370
        throw x;
1371
      }
1372
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1373
      result.read(iprot_);
1374
      iprot_.readMessageEnd();
1375
      if (result.isSetSuccess()) {
1376
        return result.success;
1377
      }
1378
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1379
    }
1380
 
483 rajveer 1381
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1382
    {
483 rajveer 1383
      send_getAlerts(orderId, valid);
305 ashish 1384
      return recv_getAlerts();
1385
    }
1386
 
483 rajveer 1387
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1388
    {
1389
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1390
      getAlerts_args args = new getAlerts_args();
483 rajveer 1391
      args.orderId = orderId;
305 ashish 1392
      args.valid = valid;
1393
      args.write(oprot_);
1394
      oprot_.writeMessageEnd();
1395
      oprot_.getTransport().flush();
1396
    }
1397
 
1398
    public List<Alert> recv_getAlerts() throws TException
1399
    {
1400
      TMessage msg = iprot_.readMessageBegin();
1401
      if (msg.type == TMessageType.EXCEPTION) {
1402
        TApplicationException x = TApplicationException.read(iprot_);
1403
        iprot_.readMessageEnd();
1404
        throw x;
1405
      }
1406
      getAlerts_result result = new getAlerts_result();
1407
      result.read(iprot_);
1408
      iprot_.readMessageEnd();
1409
      if (result.isSetSuccess()) {
1410
        return result.success;
1411
      }
1412
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1413
    }
1414
 
483 rajveer 1415
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1416
    {
483 rajveer 1417
      send_setAlert(orderId, unset, type, comment);
305 ashish 1418
      recv_setAlert();
1419
    }
1420
 
483 rajveer 1421
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1422
    {
1423
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1424
      setAlert_args args = new setAlert_args();
483 rajveer 1425
      args.orderId = orderId;
305 ashish 1426
      args.unset = unset;
1427
      args.type = type;
1428
      args.comment = comment;
1429
      args.write(oprot_);
1430
      oprot_.writeMessageEnd();
1431
      oprot_.getTransport().flush();
1432
    }
1433
 
1434
    public void recv_setAlert() throws TException
1435
    {
1436
      TMessage msg = iprot_.readMessageBegin();
1437
      if (msg.type == TMessageType.EXCEPTION) {
1438
        TApplicationException x = TApplicationException.read(iprot_);
1439
        iprot_.readMessageEnd();
1440
        throw x;
1441
      }
1442
      setAlert_result result = new setAlert_result();
1443
      result.read(iprot_);
1444
      iprot_.readMessageEnd();
1445
      return;
1446
    }
1447
 
1598 ankur.sing 1448
    public long getValidOrderCount() throws TException
1449
    {
1450
      send_getValidOrderCount();
1451
      return recv_getValidOrderCount();
1452
    }
1453
 
1454
    public void send_getValidOrderCount() throws TException
1455
    {
1456
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1457
      getValidOrderCount_args args = new getValidOrderCount_args();
1458
      args.write(oprot_);
1459
      oprot_.writeMessageEnd();
1460
      oprot_.getTransport().flush();
1461
    }
1462
 
1463
    public long recv_getValidOrderCount() throws TException
1464
    {
1465
      TMessage msg = iprot_.readMessageBegin();
1466
      if (msg.type == TMessageType.EXCEPTION) {
1467
        TApplicationException x = TApplicationException.read(iprot_);
1468
        iprot_.readMessageEnd();
1469
        throw x;
1470
      }
1471
      getValidOrderCount_result result = new getValidOrderCount_result();
1472
      result.read(iprot_);
1473
      iprot_.readMessageEnd();
1474
      if (result.isSetSuccess()) {
1475
        return result.success;
1476
      }
1477
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1478
    }
1479
 
1629 ankur.sing 1480
    public long getNoOfCustomersWithSuccessfulTransaction() throws TException
1481
    {
1482
      send_getNoOfCustomersWithSuccessfulTransaction();
1483
      return recv_getNoOfCustomersWithSuccessfulTransaction();
1484
    }
1485
 
1486
    public void send_getNoOfCustomersWithSuccessfulTransaction() throws TException
1487
    {
1488
      oprot_.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.CALL, seqid_));
1489
      getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
1490
      args.write(oprot_);
1491
      oprot_.writeMessageEnd();
1492
      oprot_.getTransport().flush();
1493
    }
1494
 
1495
    public long recv_getNoOfCustomersWithSuccessfulTransaction() throws TException
1496
    {
1497
      TMessage msg = iprot_.readMessageBegin();
1498
      if (msg.type == TMessageType.EXCEPTION) {
1499
        TApplicationException x = TApplicationException.read(iprot_);
1500
        iprot_.readMessageEnd();
1501
        throw x;
1502
      }
1503
      getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
1504
      result.read(iprot_);
1505
      iprot_.readMessageEnd();
1506
      if (result.isSetSuccess()) {
1507
        return result.success;
1508
      }
1509
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getNoOfCustomersWithSuccessfulTransaction failed: unknown result");
1510
    }
1511
 
1731 ankur.sing 1512
    public List<Double> getValidOrdersAmountRange() throws TException
1629 ankur.sing 1513
    {
1731 ankur.sing 1514
      send_getValidOrdersAmountRange();
1515
      return recv_getValidOrdersAmountRange();
1629 ankur.sing 1516
    }
1517
 
1731 ankur.sing 1518
    public void send_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1519
    {
1731 ankur.sing 1520
      oprot_.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.CALL, seqid_));
1521
      getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 1522
      args.write(oprot_);
1523
      oprot_.writeMessageEnd();
1524
      oprot_.getTransport().flush();
1525
    }
1526
 
1731 ankur.sing 1527
    public List<Double> recv_getValidOrdersAmountRange() throws TException
1629 ankur.sing 1528
    {
1529
      TMessage msg = iprot_.readMessageBegin();
1530
      if (msg.type == TMessageType.EXCEPTION) {
1531
        TApplicationException x = TApplicationException.read(iprot_);
1532
        iprot_.readMessageEnd();
1533
        throw x;
1534
      }
1731 ankur.sing 1535
      getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
1629 ankur.sing 1536
      result.read(iprot_);
1537
      iprot_.readMessageEnd();
1538
      if (result.isSetSuccess()) {
1539
        return result.success;
1540
      }
1731 ankur.sing 1541
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrdersAmountRange failed: unknown result");
1629 ankur.sing 1542
    }
1543
 
1886 ankur.sing 1544
    public List<Order> getValidOrders(long limit) throws TException
1545
    {
1546
      send_getValidOrders(limit);
1547
      return recv_getValidOrders();
1548
    }
1549
 
1550
    public void send_getValidOrders(long limit) throws TException
1551
    {
1552
      oprot_.writeMessageBegin(new TMessage("getValidOrders", TMessageType.CALL, seqid_));
1553
      getValidOrders_args args = new getValidOrders_args();
1554
      args.limit = limit;
1555
      args.write(oprot_);
1556
      oprot_.writeMessageEnd();
1557
      oprot_.getTransport().flush();
1558
    }
1559
 
1560
    public List<Order> recv_getValidOrders() throws TException
1561
    {
1562
      TMessage msg = iprot_.readMessageBegin();
1563
      if (msg.type == TMessageType.EXCEPTION) {
1564
        TApplicationException x = TApplicationException.read(iprot_);
1565
        iprot_.readMessageEnd();
1566
        throw x;
1567
      }
1568
      getValidOrders_result result = new getValidOrders_result();
1569
      result.read(iprot_);
1570
      iprot_.readMessageEnd();
1571
      if (result.isSetSuccess()) {
1572
        return result.success;
1573
      }
1574
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrders failed: unknown result");
1575
    }
1576
 
68 ashish 1577
  }
1578
  public static class Processor implements TProcessor {
1579
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1580
    public Processor(Iface iface)
1581
    {
1582
      iface_ = iface;
764 rajveer 1583
      processMap_.put("closeSession", new closeSession());
68 ashish 1584
      processMap_.put("createTransaction", new createTransaction());
1585
      processMap_.put("getTransaction", new getTransaction());
1586
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1587
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1588
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1589
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1590
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1591
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1592
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1593
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1594
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1595
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1596
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1597
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1598
      processMap_.put("acceptOrder", new acceptOrder());
1599
      processMap_.put("billOrder", new billOrder());
483 rajveer 1600
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1601
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1602
      processMap_.put("createOrder", new createOrder());
1603
      processMap_.put("getOrder", new getOrder());
1604
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 1605
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 1606
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1607
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1608
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1609
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1610
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1611
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1612
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1613
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1614
      processMap_.put("getAlerts", new getAlerts());
1615
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 1616
      processMap_.put("getValidOrderCount", new getValidOrderCount());
1629 ankur.sing 1617
      processMap_.put("getNoOfCustomersWithSuccessfulTransaction", new getNoOfCustomersWithSuccessfulTransaction());
1731 ankur.sing 1618
      processMap_.put("getValidOrdersAmountRange", new getValidOrdersAmountRange());
1886 ankur.sing 1619
      processMap_.put("getValidOrders", new getValidOrders());
68 ashish 1620
    }
1621
 
1622
    protected static interface ProcessFunction {
1623
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1624
    }
1625
 
1626
    private Iface iface_;
1627
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1628
 
1629
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1630
    {
1631
      TMessage msg = iprot.readMessageBegin();
1632
      ProcessFunction fn = processMap_.get(msg.name);
1633
      if (fn == null) {
1634
        TProtocolUtil.skip(iprot, TType.STRUCT);
1635
        iprot.readMessageEnd();
1636
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1637
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1638
        x.write(oprot);
1639
        oprot.writeMessageEnd();
1640
        oprot.getTransport().flush();
1641
        return true;
1642
      }
1643
      fn.process(msg.seqid, iprot, oprot);
1644
      return true;
1645
    }
1646
 
764 rajveer 1647
    private class closeSession implements ProcessFunction {
1648
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1649
      {
1650
        closeSession_args args = new closeSession_args();
1651
        args.read(iprot);
1652
        iprot.readMessageEnd();
1653
        closeSession_result result = new closeSession_result();
1654
        iface_.closeSession();
1655
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1656
        result.write(oprot);
1657
        oprot.writeMessageEnd();
1658
        oprot.getTransport().flush();
1659
      }
1660
 
1661
    }
1662
 
68 ashish 1663
    private class createTransaction implements ProcessFunction {
1664
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1665
      {
1666
        createTransaction_args args = new createTransaction_args();
1667
        args.read(iprot);
1668
        iprot.readMessageEnd();
1669
        createTransaction_result result = new createTransaction_result();
1670
        try {
132 ashish 1671
          result.success = iface_.createTransaction(args.transaction);
1672
          result.setSuccessIsSet(true);
68 ashish 1673
        } catch (TransactionServiceException ex) {
1674
          result.ex = ex;
1675
        } catch (Throwable th) {
1676
          LOGGER.error("Internal error processing createTransaction", th);
1677
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1678
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1679
          x.write(oprot);
1680
          oprot.writeMessageEnd();
1681
          oprot.getTransport().flush();
1682
          return;
1683
        }
1684
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1685
        result.write(oprot);
1686
        oprot.writeMessageEnd();
1687
        oprot.getTransport().flush();
1688
      }
1689
 
1690
    }
1691
 
1692
    private class getTransaction implements ProcessFunction {
1693
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1694
      {
1695
        getTransaction_args args = new getTransaction_args();
1696
        args.read(iprot);
1697
        iprot.readMessageEnd();
1698
        getTransaction_result result = new getTransaction_result();
1699
        try {
1700
          result.success = iface_.getTransaction(args.id);
1701
        } catch (TransactionServiceException ex) {
1702
          result.ex = ex;
1703
        } catch (Throwable th) {
1704
          LOGGER.error("Internal error processing getTransaction", th);
1705
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1706
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1707
          x.write(oprot);
1708
          oprot.writeMessageEnd();
1709
          oprot.getTransport().flush();
1710
          return;
1711
        }
1712
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1713
        result.write(oprot);
1714
        oprot.writeMessageEnd();
1715
        oprot.getTransport().flush();
1716
      }
1717
 
1718
    }
1719
 
1720
    private class getTransactionsForCustomer implements ProcessFunction {
1721
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1722
      {
1723
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1724
        args.read(iprot);
1725
        iprot.readMessageEnd();
1726
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1727
        try {
132 ashish 1728
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1729
        } catch (TransactionServiceException ex) {
1730
          result.ex = ex;
1731
        } catch (Throwable th) {
1732
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1733
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1734
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1735
          x.write(oprot);
1736
          oprot.writeMessageEnd();
1737
          oprot.getTransport().flush();
1738
          return;
1739
        }
1740
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1741
        result.write(oprot);
1742
        oprot.writeMessageEnd();
1743
        oprot.getTransport().flush();
1744
      }
1745
 
1746
    }
1747
 
132 ashish 1748
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1749
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1750
      {
1751
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1752
        args.read(iprot);
1753
        iprot.readMessageEnd();
1754
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1755
        try {
1756
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1757
        } catch (TransactionServiceException ex) {
1758
          result.ex = ex;
1759
        } catch (Throwable th) {
1760
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1761
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1762
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1763
          x.write(oprot);
1764
          oprot.writeMessageEnd();
1765
          oprot.getTransport().flush();
1766
          return;
1767
        }
1768
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1769
        result.write(oprot);
1770
        oprot.writeMessageEnd();
1771
        oprot.getTransport().flush();
1772
      }
1773
 
1774
    }
1775
 
68 ashish 1776
    private class getTransactionStatus implements ProcessFunction {
1777
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1778
      {
1779
        getTransactionStatus_args args = new getTransactionStatus_args();
1780
        args.read(iprot);
1781
        iprot.readMessageEnd();
1782
        getTransactionStatus_result result = new getTransactionStatus_result();
1783
        try {
1784
          result.success = iface_.getTransactionStatus(args.transactionId);
1785
        } catch (TransactionServiceException ex) {
1786
          result.ex = ex;
1787
        } catch (Throwable th) {
1788
          LOGGER.error("Internal error processing getTransactionStatus", th);
1789
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1790
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1791
          x.write(oprot);
1792
          oprot.writeMessageEnd();
1793
          oprot.getTransport().flush();
1794
          return;
1795
        }
1796
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1797
        result.write(oprot);
1798
        oprot.writeMessageEnd();
1799
        oprot.getTransport().flush();
1800
      }
1801
 
1802
    }
1803
 
1804
    private class changeTransactionStatus implements ProcessFunction {
1805
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1806
      {
1807
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1808
        args.read(iprot);
1809
        iprot.readMessageEnd();
1810
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1811
        try {
1812
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1813
          result.setSuccessIsSet(true);
1814
        } catch (TransactionServiceException ex) {
1815
          result.ex = ex;
1816
        } catch (Throwable th) {
1817
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1818
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1819
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1820
          x.write(oprot);
1821
          oprot.writeMessageEnd();
1822
          oprot.getTransport().flush();
1823
          return;
1824
        }
1825
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1826
        result.write(oprot);
1827
        oprot.writeMessageEnd();
1828
        oprot.getTransport().flush();
1829
      }
1830
 
1831
    }
1832
 
1398 varun.gupt 1833
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 1834
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1835
      {
1398 varun.gupt 1836
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 1837
        args.read(iprot);
1838
        iprot.readMessageEnd();
1398 varun.gupt 1839
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 1840
        try {
1398 varun.gupt 1841
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 1842
          result.setSuccessIsSet(true);
1843
        } catch (TransactionServiceException ex) {
1844
          result.ex = ex;
1845
        } catch (Throwable th) {
1398 varun.gupt 1846
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
1847
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
1848
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 1849
          x.write(oprot);
1850
          oprot.writeMessageEnd();
1851
          oprot.getTransport().flush();
1852
          return;
1853
        }
1398 varun.gupt 1854
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 1855
        result.write(oprot);
1856
        oprot.writeMessageEnd();
1857
        oprot.getTransport().flush();
1858
      }
1859
 
1860
    }
1861
 
483 rajveer 1862
    private class getAllOrders implements ProcessFunction {
68 ashish 1863
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1864
      {
483 rajveer 1865
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1866
        args.read(iprot);
1867
        iprot.readMessageEnd();
483 rajveer 1868
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1869
        try {
483 rajveer 1870
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1871
        } catch (TransactionServiceException ex) {
1872
          result.ex = ex;
1873
        } catch (Throwable th) {
483 rajveer 1874
          LOGGER.error("Internal error processing getAllOrders", th);
1875
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1876
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1877
          x.write(oprot);
1878
          oprot.writeMessageEnd();
1879
          oprot.getTransport().flush();
1880
          return;
1881
        }
483 rajveer 1882
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1883
        result.write(oprot);
1884
        oprot.writeMessageEnd();
1885
        oprot.getTransport().flush();
1886
      }
1887
 
1888
    }
1889
 
1022 varun.gupt 1890
    private class getOrdersByBillingDate implements ProcessFunction {
1891
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1892
      {
1893
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1894
        args.read(iprot);
1895
        iprot.readMessageEnd();
1896
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1897
        try {
1898
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1899
        } catch (TransactionServiceException ex) {
1900
          result.ex = ex;
1901
        } catch (Throwable th) {
1902
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1903
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1904
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1905
          x.write(oprot);
1906
          oprot.writeMessageEnd();
1907
          oprot.getTransport().flush();
1908
          return;
1909
        }
1910
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1911
        result.write(oprot);
1912
        oprot.writeMessageEnd();
1913
        oprot.getTransport().flush();
1914
      }
1915
 
1916
    }
1917
 
1382 varun.gupt 1918
    private class getReturnableOrdersForCustomer implements ProcessFunction {
1919
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1920
      {
1921
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
1922
        args.read(iprot);
1923
        iprot.readMessageEnd();
1924
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
1925
        try {
1926
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
1927
        } catch (TransactionServiceException ex) {
1928
          result.ex = ex;
1929
        } catch (Throwable th) {
1930
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
1931
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
1932
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1933
          x.write(oprot);
1934
          oprot.writeMessageEnd();
1935
          oprot.getTransport().flush();
1936
          return;
1937
        }
1938
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
1939
        result.write(oprot);
1940
        oprot.writeMessageEnd();
1941
        oprot.getTransport().flush();
1942
      }
1943
 
1944
    }
1945
 
1946
    private class getCancellableOrdersForCustomer implements ProcessFunction {
1947
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1948
      {
1949
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
1950
        args.read(iprot);
1951
        iprot.readMessageEnd();
1952
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
1953
        try {
1954
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
1955
        } catch (TransactionServiceException ex) {
1956
          result.ex = ex;
1957
        } catch (Throwable th) {
1958
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
1959
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
1960
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1961
          x.write(oprot);
1962
          oprot.writeMessageEnd();
1963
          oprot.getTransport().flush();
1964
          return;
1965
        }
1966
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
1967
        result.write(oprot);
1968
        oprot.writeMessageEnd();
1969
        oprot.getTransport().flush();
1970
      }
1971
 
1972
    }
1973
 
483 rajveer 1974
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1975
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1976
      {
483 rajveer 1977
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1978
        args.read(iprot);
1979
        iprot.readMessageEnd();
483 rajveer 1980
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1981
        try {
483 rajveer 1982
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1983
          result.setSuccessIsSet(true);
1984
        } catch (TransactionServiceException ex) {
1985
          result.ex = ex;
1986
        } catch (Throwable th) {
483 rajveer 1987
          LOGGER.error("Internal error processing changeOrderStatus", th);
1988
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1989
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1990
          x.write(oprot);
1991
          oprot.writeMessageEnd();
1992
          oprot.getTransport().flush();
1993
          return;
1994
        }
483 rajveer 1995
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1996
        result.write(oprot);
1997
        oprot.writeMessageEnd();
1998
        oprot.getTransport().flush();
1999
      }
2000
 
2001
    }
2002
 
495 rajveer 2003
    private class addBillingDetails implements ProcessFunction {
2004
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2005
      {
2006
        addBillingDetails_args args = new addBillingDetails_args();
2007
        args.read(iprot);
2008
        iprot.readMessageEnd();
2009
        addBillingDetails_result result = new addBillingDetails_result();
2010
        try {
1148 chandransh 2011
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 2012
          result.setSuccessIsSet(true);
2013
        } catch (TransactionServiceException ex) {
2014
          result.ex = ex;
2015
        } catch (Throwable th) {
2016
          LOGGER.error("Internal error processing addBillingDetails", th);
2017
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
2018
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
2019
          x.write(oprot);
2020
          oprot.writeMessageEnd();
2021
          oprot.getTransport().flush();
2022
          return;
2023
        }
2024
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
2025
        result.write(oprot);
2026
        oprot.writeMessageEnd();
2027
        oprot.getTransport().flush();
2028
      }
2029
 
2030
    }
2031
 
1148 chandransh 2032
    private class addJacketNumber implements ProcessFunction {
2033
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2034
      {
2035
        addJacketNumber_args args = new addJacketNumber_args();
2036
        args.read(iprot);
2037
        iprot.readMessageEnd();
2038
        addJacketNumber_result result = new addJacketNumber_result();
2039
        try {
2040
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
2041
          result.setSuccessIsSet(true);
2042
        } catch (TransactionServiceException ex) {
2043
          result.ex = ex;
2044
        } catch (Throwable th) {
2045
          LOGGER.error("Internal error processing addJacketNumber", th);
2046
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
2047
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
2048
          x.write(oprot);
2049
          oprot.writeMessageEnd();
2050
          oprot.getTransport().flush();
2051
          return;
2052
        }
2053
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
2054
        result.write(oprot);
2055
        oprot.writeMessageEnd();
2056
        oprot.getTransport().flush();
2057
      }
2058
 
2059
    }
2060
 
923 rajveer 2061
    private class acceptOrder implements ProcessFunction {
2062
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2063
      {
2064
        acceptOrder_args args = new acceptOrder_args();
2065
        args.read(iprot);
2066
        iprot.readMessageEnd();
2067
        acceptOrder_result result = new acceptOrder_result();
2068
        try {
2069
          result.success = iface_.acceptOrder(args.orderId);
2070
          result.setSuccessIsSet(true);
2071
        } catch (TransactionServiceException ex) {
2072
          result.ex = ex;
2073
        } catch (Throwable th) {
2074
          LOGGER.error("Internal error processing acceptOrder", th);
2075
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
2076
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
2077
          x.write(oprot);
2078
          oprot.writeMessageEnd();
2079
          oprot.getTransport().flush();
2080
          return;
2081
        }
2082
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
2083
        result.write(oprot);
2084
        oprot.writeMessageEnd();
2085
        oprot.getTransport().flush();
2086
      }
2087
 
2088
    }
2089
 
2090
    private class billOrder implements ProcessFunction {
2091
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2092
      {
2093
        billOrder_args args = new billOrder_args();
2094
        args.read(iprot);
2095
        iprot.readMessageEnd();
2096
        billOrder_result result = new billOrder_result();
2097
        try {
2098
          result.success = iface_.billOrder(args.orderId);
2099
          result.setSuccessIsSet(true);
2100
        } catch (TransactionServiceException ex) {
2101
          result.ex = ex;
2102
        } catch (Throwable th) {
2103
          LOGGER.error("Internal error processing billOrder", th);
2104
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
2105
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
2106
          x.write(oprot);
2107
          oprot.writeMessageEnd();
2108
          oprot.getTransport().flush();
2109
          return;
2110
        }
2111
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
2112
        result.write(oprot);
2113
        oprot.writeMessageEnd();
2114
        oprot.getTransport().flush();
2115
      }
2116
 
2117
    }
2118
 
483 rajveer 2119
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2120
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2121
      {
483 rajveer 2122
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2123
        args.read(iprot);
2124
        iprot.readMessageEnd();
483 rajveer 2125
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2126
        try {
1529 ankur.sing 2127
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2128
        } catch (TransactionServiceException ex) {
2129
          result.ex = ex;
2130
        } catch (Throwable th) {
483 rajveer 2131
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2132
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2133
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2134
          x.write(oprot);
2135
          oprot.writeMessageEnd();
2136
          oprot.getTransport().flush();
2137
          return;
2138
        }
483 rajveer 2139
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2140
        result.write(oprot);
2141
        oprot.writeMessageEnd();
2142
        oprot.getTransport().flush();
2143
      }
2144
 
2145
    }
2146
 
483 rajveer 2147
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2148
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2149
      {
483 rajveer 2150
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2151
        args.read(iprot);
2152
        iprot.readMessageEnd();
483 rajveer 2153
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2154
        try {
483 rajveer 2155
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2156
        } catch (TransactionServiceException ex) {
2157
          result.ex = ex;
2158
        } catch (Throwable th) {
483 rajveer 2159
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2160
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2161
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2162
          x.write(oprot);
2163
          oprot.writeMessageEnd();
2164
          oprot.getTransport().flush();
2165
          return;
2166
        }
483 rajveer 2167
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2168
        result.write(oprot);
2169
        oprot.writeMessageEnd();
2170
        oprot.getTransport().flush();
2171
      }
2172
 
2173
    }
2174
 
483 rajveer 2175
    private class createOrder implements ProcessFunction {
68 ashish 2176
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2177
      {
483 rajveer 2178
        createOrder_args args = new createOrder_args();
68 ashish 2179
        args.read(iprot);
2180
        iprot.readMessageEnd();
483 rajveer 2181
        createOrder_result result = new createOrder_result();
68 ashish 2182
        try {
483 rajveer 2183
          result.success = iface_.createOrder(args.order);
68 ashish 2184
          result.setSuccessIsSet(true);
2185
        } catch (TransactionServiceException ex) {
2186
          result.ex = ex;
2187
        } catch (Throwable th) {
483 rajveer 2188
          LOGGER.error("Internal error processing createOrder", th);
2189
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2190
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2191
          x.write(oprot);
2192
          oprot.writeMessageEnd();
2193
          oprot.getTransport().flush();
2194
          return;
2195
        }
483 rajveer 2196
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2197
        result.write(oprot);
2198
        oprot.writeMessageEnd();
2199
        oprot.getTransport().flush();
2200
      }
2201
 
2202
    }
2203
 
483 rajveer 2204
    private class getOrder implements ProcessFunction {
68 ashish 2205
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2206
      {
483 rajveer 2207
        getOrder_args args = new getOrder_args();
68 ashish 2208
        args.read(iprot);
2209
        iprot.readMessageEnd();
483 rajveer 2210
        getOrder_result result = new getOrder_result();
68 ashish 2211
        try {
483 rajveer 2212
          result.success = iface_.getOrder(args.id);
68 ashish 2213
        } catch (TransactionServiceException ex) {
2214
          result.ex = ex;
2215
        } catch (Throwable th) {
483 rajveer 2216
          LOGGER.error("Internal error processing getOrder", th);
2217
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2218
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2219
          x.write(oprot);
2220
          oprot.writeMessageEnd();
2221
          oprot.getTransport().flush();
2222
          return;
2223
        }
483 rajveer 2224
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2225
        result.write(oprot);
2226
        oprot.writeMessageEnd();
2227
        oprot.getTransport().flush();
2228
      }
2229
 
2230
    }
2231
 
483 rajveer 2232
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2233
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2234
      {
483 rajveer 2235
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2236
        args.read(iprot);
2237
        iprot.readMessageEnd();
483 rajveer 2238
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2239
        try {
483 rajveer 2240
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2241
        } catch (TransactionServiceException ex) {
2242
          result.ex = ex;
2243
        } catch (Throwable th) {
483 rajveer 2244
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2245
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2246
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2247
          x.write(oprot);
2248
          oprot.writeMessageEnd();
2249
          oprot.getTransport().flush();
2250
          return;
2251
        }
483 rajveer 2252
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2253
        result.write(oprot);
2254
        oprot.writeMessageEnd();
2255
        oprot.getTransport().flush();
2256
      }
2257
 
2258
    }
2259
 
1529 ankur.sing 2260
    private class getOrderForCustomer implements ProcessFunction {
2261
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2262
      {
2263
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2264
        args.read(iprot);
2265
        iprot.readMessageEnd();
2266
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2267
        try {
2268
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2269
        } catch (TransactionServiceException ex) {
2270
          result.ex = ex;
2271
        } catch (Throwable th) {
2272
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2273
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2274
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2275
          x.write(oprot);
2276
          oprot.writeMessageEnd();
2277
          oprot.getTransport().flush();
2278
          return;
2279
        }
2280
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2281
        result.write(oprot);
2282
        oprot.writeMessageEnd();
2283
        oprot.getTransport().flush();
2284
      }
2285
 
2286
    }
2287
 
1221 chandransh 2288
    private class batchOrders implements ProcessFunction {
2289
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2290
      {
2291
        batchOrders_args args = new batchOrders_args();
2292
        args.read(iprot);
2293
        iprot.readMessageEnd();
2294
        batchOrders_result result = new batchOrders_result();
2295
        try {
2296
          result.success = iface_.batchOrders(args.warehouseId);
2297
        } catch (TransactionServiceException ex) {
2298
          result.ex = ex;
2299
        } catch (Throwable th) {
2300
          LOGGER.error("Internal error processing batchOrders", th);
2301
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2302
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2303
          x.write(oprot);
2304
          oprot.writeMessageEnd();
2305
          oprot.getTransport().flush();
2306
          return;
2307
        }
2308
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2309
        result.write(oprot);
2310
        oprot.writeMessageEnd();
2311
        oprot.getTransport().flush();
2312
      }
2313
 
2314
    }
2315
 
1209 chandransh 2316
    private class markOrderAsOutOfStock implements ProcessFunction {
2317
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2318
      {
2319
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2320
        args.read(iprot);
2321
        iprot.readMessageEnd();
2322
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2323
        try {
2324
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2325
          result.setSuccessIsSet(true);
2326
        } catch (TransactionServiceException ex) {
2327
          result.ex = ex;
2328
        } catch (Throwable th) {
2329
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2330
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2331
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2332
          x.write(oprot);
2333
          oprot.writeMessageEnd();
2334
          oprot.getTransport().flush();
2335
          return;
2336
        }
2337
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2338
        result.write(oprot);
2339
        oprot.writeMessageEnd();
2340
        oprot.getTransport().flush();
2341
      }
2342
 
2343
    }
2344
 
758 chandransh 2345
    private class markOrdersAsManifested implements ProcessFunction {
2346
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2347
      {
2348
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2349
        args.read(iprot);
2350
        iprot.readMessageEnd();
2351
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2352
        try {
2353
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2354
          result.setSuccessIsSet(true);
2355
        } catch (TransactionServiceException ex) {
2356
          result.ex = ex;
2357
        } catch (Throwable th) {
2358
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2359
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2360
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2361
          x.write(oprot);
2362
          oprot.writeMessageEnd();
2363
          oprot.getTransport().flush();
2364
          return;
2365
        }
2366
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2367
        result.write(oprot);
2368
        oprot.writeMessageEnd();
2369
        oprot.getTransport().flush();
2370
      }
2371
 
2372
    }
2373
 
1114 chandransh 2374
    private class markOrdersAsPickedUp implements ProcessFunction {
2375
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2376
      {
2377
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2378
        args.read(iprot);
2379
        iprot.readMessageEnd();
2380
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2381
        try {
2382
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2383
        } catch (TransactionServiceException ex) {
2384
          result.ex = ex;
2385
        } catch (Throwable th) {
2386
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2387
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2388
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2389
          x.write(oprot);
2390
          oprot.writeMessageEnd();
2391
          oprot.getTransport().flush();
2392
          return;
2393
        }
2394
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2395
        result.write(oprot);
2396
        oprot.writeMessageEnd();
2397
        oprot.getTransport().flush();
2398
      }
2399
 
2400
    }
2401
 
1133 chandransh 2402
    private class markOrdersAsDelivered implements ProcessFunction {
2403
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2404
      {
2405
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2406
        args.read(iprot);
2407
        iprot.readMessageEnd();
2408
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2409
        try {
2410
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2411
        } catch (TransactionServiceException ex) {
2412
          result.ex = ex;
2413
        } catch (Throwable th) {
2414
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2415
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2416
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2417
          x.write(oprot);
2418
          oprot.writeMessageEnd();
2419
          oprot.getTransport().flush();
2420
          return;
2421
        }
2422
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2423
        result.write(oprot);
2424
        oprot.writeMessageEnd();
2425
        oprot.getTransport().flush();
2426
      }
2427
 
2428
    }
2429
 
2430
    private class markOrdersAsFailed implements ProcessFunction {
2431
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2432
      {
2433
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2434
        args.read(iprot);
2435
        iprot.readMessageEnd();
2436
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2437
        try {
2438
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2439
        } catch (TransactionServiceException ex) {
2440
          result.ex = ex;
2441
        } catch (Throwable th) {
2442
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2443
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2444
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2445
          x.write(oprot);
2446
          oprot.writeMessageEnd();
2447
          oprot.getTransport().flush();
2448
          return;
2449
        }
2450
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2451
        result.write(oprot);
2452
        oprot.writeMessageEnd();
2453
        oprot.getTransport().flush();
2454
      }
2455
 
2456
    }
2457
 
1245 chandransh 2458
    private class updateNonDeliveryReason implements ProcessFunction {
2459
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2460
      {
2461
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2462
        args.read(iprot);
2463
        iprot.readMessageEnd();
2464
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2465
        try {
2466
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2467
        } catch (TransactionServiceException ex) {
2468
          result.ex = ex;
2469
        } catch (Throwable th) {
2470
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2471
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2472
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2473
          x.write(oprot);
2474
          oprot.writeMessageEnd();
2475
          oprot.getTransport().flush();
2476
          return;
2477
        }
2478
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2479
        result.write(oprot);
2480
        oprot.writeMessageEnd();
2481
        oprot.getTransport().flush();
2482
      }
2483
 
2484
    }
2485
 
1406 ankur.sing 2486
    private class getUndeliveredOrders implements ProcessFunction {
2487
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2488
      {
2489
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2490
        args.read(iprot);
2491
        iprot.readMessageEnd();
2492
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2493
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2494
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2495
        result.write(oprot);
2496
        oprot.writeMessageEnd();
2497
        oprot.getTransport().flush();
2498
      }
2499
 
2500
    }
2501
 
305 ashish 2502
    private class getAlerts implements ProcessFunction {
2503
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2504
      {
2505
        getAlerts_args args = new getAlerts_args();
2506
        args.read(iprot);
2507
        iprot.readMessageEnd();
2508
        getAlerts_result result = new getAlerts_result();
483 rajveer 2509
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2510
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2511
        result.write(oprot);
2512
        oprot.writeMessageEnd();
2513
        oprot.getTransport().flush();
2514
      }
2515
 
2516
    }
2517
 
2518
    private class setAlert implements ProcessFunction {
2519
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2520
      {
2521
        setAlert_args args = new setAlert_args();
2522
        args.read(iprot);
2523
        iprot.readMessageEnd();
2524
        setAlert_result result = new setAlert_result();
483 rajveer 2525
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2526
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2527
        result.write(oprot);
2528
        oprot.writeMessageEnd();
2529
        oprot.getTransport().flush();
2530
      }
2531
 
2532
    }
2533
 
1598 ankur.sing 2534
    private class getValidOrderCount implements ProcessFunction {
2535
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2536
      {
2537
        getValidOrderCount_args args = new getValidOrderCount_args();
2538
        args.read(iprot);
2539
        iprot.readMessageEnd();
2540
        getValidOrderCount_result result = new getValidOrderCount_result();
2541
        result.success = iface_.getValidOrderCount();
2542
        result.setSuccessIsSet(true);
2543
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
2544
        result.write(oprot);
2545
        oprot.writeMessageEnd();
2546
        oprot.getTransport().flush();
2547
      }
2548
 
2549
    }
2550
 
1629 ankur.sing 2551
    private class getNoOfCustomersWithSuccessfulTransaction implements ProcessFunction {
2552
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2553
      {
2554
        getNoOfCustomersWithSuccessfulTransaction_args args = new getNoOfCustomersWithSuccessfulTransaction_args();
2555
        args.read(iprot);
2556
        iprot.readMessageEnd();
2557
        getNoOfCustomersWithSuccessfulTransaction_result result = new getNoOfCustomersWithSuccessfulTransaction_result();
2558
        result.success = iface_.getNoOfCustomersWithSuccessfulTransaction();
2559
        result.setSuccessIsSet(true);
2560
        oprot.writeMessageBegin(new TMessage("getNoOfCustomersWithSuccessfulTransaction", TMessageType.REPLY, seqid));
2561
        result.write(oprot);
2562
        oprot.writeMessageEnd();
2563
        oprot.getTransport().flush();
2564
      }
2565
 
2566
    }
2567
 
1731 ankur.sing 2568
    private class getValidOrdersAmountRange implements ProcessFunction {
1629 ankur.sing 2569
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2570
      {
1731 ankur.sing 2571
        getValidOrdersAmountRange_args args = new getValidOrdersAmountRange_args();
1629 ankur.sing 2572
        args.read(iprot);
2573
        iprot.readMessageEnd();
1731 ankur.sing 2574
        getValidOrdersAmountRange_result result = new getValidOrdersAmountRange_result();
2575
        result.success = iface_.getValidOrdersAmountRange();
2576
        oprot.writeMessageBegin(new TMessage("getValidOrdersAmountRange", TMessageType.REPLY, seqid));
1629 ankur.sing 2577
        result.write(oprot);
2578
        oprot.writeMessageEnd();
2579
        oprot.getTransport().flush();
2580
      }
2581
 
2582
    }
2583
 
1886 ankur.sing 2584
    private class getValidOrders implements ProcessFunction {
2585
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2586
      {
2587
        getValidOrders_args args = new getValidOrders_args();
2588
        args.read(iprot);
2589
        iprot.readMessageEnd();
2590
        getValidOrders_result result = new getValidOrders_result();
2591
        result.success = iface_.getValidOrders(args.limit);
2592
        oprot.writeMessageBegin(new TMessage("getValidOrders", TMessageType.REPLY, seqid));
2593
        result.write(oprot);
2594
        oprot.writeMessageEnd();
2595
        oprot.getTransport().flush();
2596
      }
2597
 
2598
    }
2599
 
68 ashish 2600
  }
2601
 
764 rajveer 2602
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2603
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2604
 
2605
 
2606
 
2607
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2608
    public enum _Fields implements TFieldIdEnum {
2609
;
2610
 
2611
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2612
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2613
 
2614
      static {
2615
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2616
          byId.put((int)field._thriftId, field);
2617
          byName.put(field.getFieldName(), field);
2618
        }
2619
      }
2620
 
2621
      /**
2622
       * Find the _Fields constant that matches fieldId, or null if its not found.
2623
       */
2624
      public static _Fields findByThriftId(int fieldId) {
2625
        return byId.get(fieldId);
2626
      }
2627
 
2628
      /**
2629
       * Find the _Fields constant that matches fieldId, throwing an exception
2630
       * if it is not found.
2631
       */
2632
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2633
        _Fields fields = findByThriftId(fieldId);
2634
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2635
        return fields;
2636
      }
2637
 
2638
      /**
2639
       * Find the _Fields constant that matches name, or null if its not found.
2640
       */
2641
      public static _Fields findByName(String name) {
2642
        return byName.get(name);
2643
      }
2644
 
2645
      private final short _thriftId;
2646
      private final String _fieldName;
2647
 
2648
      _Fields(short thriftId, String fieldName) {
2649
        _thriftId = thriftId;
2650
        _fieldName = fieldName;
2651
      }
2652
 
2653
      public short getThriftFieldId() {
2654
        return _thriftId;
2655
      }
2656
 
2657
      public String getFieldName() {
2658
        return _fieldName;
2659
      }
2660
    }
2661
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2662
    }});
2663
 
2664
    static {
2665
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2666
    }
2667
 
2668
    public closeSession_args() {
2669
    }
2670
 
2671
    /**
2672
     * Performs a deep copy on <i>other</i>.
2673
     */
2674
    public closeSession_args(closeSession_args other) {
2675
    }
2676
 
2677
    public closeSession_args deepCopy() {
2678
      return new closeSession_args(this);
2679
    }
2680
 
2681
    @Deprecated
2682
    public closeSession_args clone() {
2683
      return new closeSession_args(this);
2684
    }
2685
 
2686
    public void setFieldValue(_Fields field, Object value) {
2687
      switch (field) {
2688
      }
2689
    }
2690
 
2691
    public void setFieldValue(int fieldID, Object value) {
2692
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2693
    }
2694
 
2695
    public Object getFieldValue(_Fields field) {
2696
      switch (field) {
2697
      }
2698
      throw new IllegalStateException();
2699
    }
2700
 
2701
    public Object getFieldValue(int fieldId) {
2702
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2703
    }
2704
 
2705
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2706
    public boolean isSet(_Fields field) {
2707
      switch (field) {
2708
      }
2709
      throw new IllegalStateException();
2710
    }
2711
 
2712
    public boolean isSet(int fieldID) {
2713
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2714
    }
2715
 
2716
    @Override
2717
    public boolean equals(Object that) {
2718
      if (that == null)
2719
        return false;
2720
      if (that instanceof closeSession_args)
2721
        return this.equals((closeSession_args)that);
2722
      return false;
2723
    }
2724
 
2725
    public boolean equals(closeSession_args that) {
2726
      if (that == null)
2727
        return false;
2728
 
2729
      return true;
2730
    }
2731
 
2732
    @Override
2733
    public int hashCode() {
2734
      return 0;
2735
    }
2736
 
2737
    public int compareTo(closeSession_args other) {
2738
      if (!getClass().equals(other.getClass())) {
2739
        return getClass().getName().compareTo(other.getClass().getName());
2740
      }
2741
 
2742
      int lastComparison = 0;
2743
      closeSession_args typedOther = (closeSession_args)other;
2744
 
2745
      return 0;
2746
    }
2747
 
2748
    public void read(TProtocol iprot) throws TException {
2749
      TField field;
2750
      iprot.readStructBegin();
2751
      while (true)
2752
      {
2753
        field = iprot.readFieldBegin();
2754
        if (field.type == TType.STOP) { 
2755
          break;
2756
        }
2757
        _Fields fieldId = _Fields.findByThriftId(field.id);
2758
        if (fieldId == null) {
2759
          TProtocolUtil.skip(iprot, field.type);
2760
        } else {
2761
          switch (fieldId) {
2762
          }
2763
          iprot.readFieldEnd();
2764
        }
2765
      }
2766
      iprot.readStructEnd();
2767
      validate();
2768
    }
2769
 
2770
    public void write(TProtocol oprot) throws TException {
2771
      validate();
2772
 
2773
      oprot.writeStructBegin(STRUCT_DESC);
2774
      oprot.writeFieldStop();
2775
      oprot.writeStructEnd();
2776
    }
2777
 
2778
    @Override
2779
    public String toString() {
2780
      StringBuilder sb = new StringBuilder("closeSession_args(");
2781
      boolean first = true;
2782
 
2783
      sb.append(")");
2784
      return sb.toString();
2785
    }
2786
 
2787
    public void validate() throws TException {
2788
      // check for required fields
2789
    }
2790
 
2791
  }
2792
 
2793
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2794
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2795
 
2796
 
2797
 
2798
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2799
    public enum _Fields implements TFieldIdEnum {
2800
;
2801
 
2802
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2803
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2804
 
2805
      static {
2806
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2807
          byId.put((int)field._thriftId, field);
2808
          byName.put(field.getFieldName(), field);
2809
        }
2810
      }
2811
 
2812
      /**
2813
       * Find the _Fields constant that matches fieldId, or null if its not found.
2814
       */
2815
      public static _Fields findByThriftId(int fieldId) {
2816
        return byId.get(fieldId);
2817
      }
2818
 
2819
      /**
2820
       * Find the _Fields constant that matches fieldId, throwing an exception
2821
       * if it is not found.
2822
       */
2823
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2824
        _Fields fields = findByThriftId(fieldId);
2825
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2826
        return fields;
2827
      }
2828
 
2829
      /**
2830
       * Find the _Fields constant that matches name, or null if its not found.
2831
       */
2832
      public static _Fields findByName(String name) {
2833
        return byName.get(name);
2834
      }
2835
 
2836
      private final short _thriftId;
2837
      private final String _fieldName;
2838
 
2839
      _Fields(short thriftId, String fieldName) {
2840
        _thriftId = thriftId;
2841
        _fieldName = fieldName;
2842
      }
2843
 
2844
      public short getThriftFieldId() {
2845
        return _thriftId;
2846
      }
2847
 
2848
      public String getFieldName() {
2849
        return _fieldName;
2850
      }
2851
    }
2852
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2853
    }});
2854
 
2855
    static {
2856
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2857
    }
2858
 
2859
    public closeSession_result() {
2860
    }
2861
 
2862
    /**
2863
     * Performs a deep copy on <i>other</i>.
2864
     */
2865
    public closeSession_result(closeSession_result other) {
2866
    }
2867
 
2868
    public closeSession_result deepCopy() {
2869
      return new closeSession_result(this);
2870
    }
2871
 
2872
    @Deprecated
2873
    public closeSession_result clone() {
2874
      return new closeSession_result(this);
2875
    }
2876
 
2877
    public void setFieldValue(_Fields field, Object value) {
2878
      switch (field) {
2879
      }
2880
    }
2881
 
2882
    public void setFieldValue(int fieldID, Object value) {
2883
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2884
    }
2885
 
2886
    public Object getFieldValue(_Fields field) {
2887
      switch (field) {
2888
      }
2889
      throw new IllegalStateException();
2890
    }
2891
 
2892
    public Object getFieldValue(int fieldId) {
2893
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2894
    }
2895
 
2896
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2897
    public boolean isSet(_Fields field) {
2898
      switch (field) {
2899
      }
2900
      throw new IllegalStateException();
2901
    }
2902
 
2903
    public boolean isSet(int fieldID) {
2904
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2905
    }
2906
 
2907
    @Override
2908
    public boolean equals(Object that) {
2909
      if (that == null)
2910
        return false;
2911
      if (that instanceof closeSession_result)
2912
        return this.equals((closeSession_result)that);
2913
      return false;
2914
    }
2915
 
2916
    public boolean equals(closeSession_result that) {
2917
      if (that == null)
2918
        return false;
2919
 
2920
      return true;
2921
    }
2922
 
2923
    @Override
2924
    public int hashCode() {
2925
      return 0;
2926
    }
2927
 
2928
    public int compareTo(closeSession_result other) {
2929
      if (!getClass().equals(other.getClass())) {
2930
        return getClass().getName().compareTo(other.getClass().getName());
2931
      }
2932
 
2933
      int lastComparison = 0;
2934
      closeSession_result typedOther = (closeSession_result)other;
2935
 
2936
      return 0;
2937
    }
2938
 
2939
    public void read(TProtocol iprot) throws TException {
2940
      TField field;
2941
      iprot.readStructBegin();
2942
      while (true)
2943
      {
2944
        field = iprot.readFieldBegin();
2945
        if (field.type == TType.STOP) { 
2946
          break;
2947
        }
2948
        _Fields fieldId = _Fields.findByThriftId(field.id);
2949
        if (fieldId == null) {
2950
          TProtocolUtil.skip(iprot, field.type);
2951
        } else {
2952
          switch (fieldId) {
2953
          }
2954
          iprot.readFieldEnd();
2955
        }
2956
      }
2957
      iprot.readStructEnd();
2958
      validate();
2959
    }
2960
 
2961
    public void write(TProtocol oprot) throws TException {
2962
      oprot.writeStructBegin(STRUCT_DESC);
2963
 
2964
      oprot.writeFieldStop();
2965
      oprot.writeStructEnd();
2966
    }
2967
 
2968
    @Override
2969
    public String toString() {
2970
      StringBuilder sb = new StringBuilder("closeSession_result(");
2971
      boolean first = true;
2972
 
2973
      sb.append(")");
2974
      return sb.toString();
2975
    }
2976
 
2977
    public void validate() throws TException {
2978
      // check for required fields
2979
    }
2980
 
2981
  }
2982
 
684 chandransh 2983
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2984
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2985
 
2986
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2987
 
2988
    private Transaction transaction;
2989
 
2990
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2991
    public enum _Fields implements TFieldIdEnum {
2992
      TRANSACTION((short)1, "transaction");
2993
 
2994
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2995
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2996
 
2997
      static {
2998
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2999
          byId.put((int)field._thriftId, field);
3000
          byName.put(field.getFieldName(), field);
3001
        }
3002
      }
3003
 
3004
      /**
3005
       * Find the _Fields constant that matches fieldId, or null if its not found.
3006
       */
3007
      public static _Fields findByThriftId(int fieldId) {
3008
        return byId.get(fieldId);
3009
      }
3010
 
3011
      /**
3012
       * Find the _Fields constant that matches fieldId, throwing an exception
3013
       * if it is not found.
3014
       */
3015
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3016
        _Fields fields = findByThriftId(fieldId);
3017
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3018
        return fields;
3019
      }
3020
 
3021
      /**
3022
       * Find the _Fields constant that matches name, or null if its not found.
3023
       */
3024
      public static _Fields findByName(String name) {
3025
        return byName.get(name);
3026
      }
3027
 
3028
      private final short _thriftId;
3029
      private final String _fieldName;
3030
 
3031
      _Fields(short thriftId, String fieldName) {
3032
        _thriftId = thriftId;
3033
        _fieldName = fieldName;
3034
      }
3035
 
3036
      public short getThriftFieldId() {
3037
        return _thriftId;
3038
      }
3039
 
3040
      public String getFieldName() {
3041
        return _fieldName;
3042
      }
3043
    }
3044
 
3045
    // isset id assignments
3046
 
3047
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3048
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
3049
          new StructMetaData(TType.STRUCT, Transaction.class)));
3050
    }});
3051
 
3052
    static {
3053
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
3054
    }
3055
 
3056
    public createTransaction_args() {
3057
    }
3058
 
3059
    public createTransaction_args(
3060
      Transaction transaction)
3061
    {
3062
      this();
3063
      this.transaction = transaction;
3064
    }
3065
 
3066
    /**
3067
     * Performs a deep copy on <i>other</i>.
3068
     */
3069
    public createTransaction_args(createTransaction_args other) {
3070
      if (other.isSetTransaction()) {
3071
        this.transaction = new Transaction(other.transaction);
3072
      }
3073
    }
3074
 
3075
    public createTransaction_args deepCopy() {
3076
      return new createTransaction_args(this);
3077
    }
3078
 
3079
    @Deprecated
3080
    public createTransaction_args clone() {
3081
      return new createTransaction_args(this);
3082
    }
3083
 
3084
    public Transaction getTransaction() {
3085
      return this.transaction;
3086
    }
3087
 
3088
    public createTransaction_args setTransaction(Transaction transaction) {
3089
      this.transaction = transaction;
3090
      return this;
3091
    }
3092
 
3093
    public void unsetTransaction() {
3094
      this.transaction = null;
3095
    }
3096
 
3097
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
3098
    public boolean isSetTransaction() {
3099
      return this.transaction != null;
3100
    }
3101
 
3102
    public void setTransactionIsSet(boolean value) {
3103
      if (!value) {
3104
        this.transaction = null;
3105
      }
3106
    }
3107
 
3108
    public void setFieldValue(_Fields field, Object value) {
3109
      switch (field) {
3110
      case TRANSACTION:
3111
        if (value == null) {
3112
          unsetTransaction();
3113
        } else {
3114
          setTransaction((Transaction)value);
3115
        }
3116
        break;
3117
 
3118
      }
3119
    }
3120
 
3121
    public void setFieldValue(int fieldID, Object value) {
3122
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3123
    }
3124
 
3125
    public Object getFieldValue(_Fields field) {
3126
      switch (field) {
3127
      case TRANSACTION:
3128
        return getTransaction();
3129
 
3130
      }
3131
      throw new IllegalStateException();
3132
    }
3133
 
3134
    public Object getFieldValue(int fieldId) {
3135
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3136
    }
3137
 
3138
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3139
    public boolean isSet(_Fields field) {
3140
      switch (field) {
3141
      case TRANSACTION:
3142
        return isSetTransaction();
3143
      }
3144
      throw new IllegalStateException();
3145
    }
3146
 
3147
    public boolean isSet(int fieldID) {
3148
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3149
    }
3150
 
3151
    @Override
3152
    public boolean equals(Object that) {
3153
      if (that == null)
3154
        return false;
3155
      if (that instanceof createTransaction_args)
3156
        return this.equals((createTransaction_args)that);
3157
      return false;
3158
    }
3159
 
3160
    public boolean equals(createTransaction_args that) {
3161
      if (that == null)
3162
        return false;
3163
 
3164
      boolean this_present_transaction = true && this.isSetTransaction();
3165
      boolean that_present_transaction = true && that.isSetTransaction();
3166
      if (this_present_transaction || that_present_transaction) {
3167
        if (!(this_present_transaction && that_present_transaction))
3168
          return false;
3169
        if (!this.transaction.equals(that.transaction))
3170
          return false;
3171
      }
3172
 
3173
      return true;
3174
    }
3175
 
3176
    @Override
3177
    public int hashCode() {
3178
      return 0;
3179
    }
3180
 
684 chandransh 3181
    public int compareTo(createTransaction_args other) {
3182
      if (!getClass().equals(other.getClass())) {
3183
        return getClass().getName().compareTo(other.getClass().getName());
3184
      }
3185
 
3186
      int lastComparison = 0;
3187
      createTransaction_args typedOther = (createTransaction_args)other;
3188
 
3189
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
3190
      if (lastComparison != 0) {
3191
        return lastComparison;
3192
      }
3193
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
3194
      if (lastComparison != 0) {
3195
        return lastComparison;
3196
      }
3197
      return 0;
3198
    }
3199
 
68 ashish 3200
    public void read(TProtocol iprot) throws TException {
3201
      TField field;
3202
      iprot.readStructBegin();
3203
      while (true)
3204
      {
3205
        field = iprot.readFieldBegin();
3206
        if (field.type == TType.STOP) { 
3207
          break;
3208
        }
3209
        _Fields fieldId = _Fields.findByThriftId(field.id);
3210
        if (fieldId == null) {
3211
          TProtocolUtil.skip(iprot, field.type);
3212
        } else {
3213
          switch (fieldId) {
3214
            case TRANSACTION:
3215
              if (field.type == TType.STRUCT) {
3216
                this.transaction = new Transaction();
3217
                this.transaction.read(iprot);
3218
              } else { 
3219
                TProtocolUtil.skip(iprot, field.type);
3220
              }
3221
              break;
3222
          }
3223
          iprot.readFieldEnd();
3224
        }
3225
      }
3226
      iprot.readStructEnd();
3227
      validate();
3228
    }
3229
 
3230
    public void write(TProtocol oprot) throws TException {
3231
      validate();
3232
 
3233
      oprot.writeStructBegin(STRUCT_DESC);
3234
      if (this.transaction != null) {
3235
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
3236
        this.transaction.write(oprot);
3237
        oprot.writeFieldEnd();
3238
      }
3239
      oprot.writeFieldStop();
3240
      oprot.writeStructEnd();
3241
    }
3242
 
3243
    @Override
3244
    public String toString() {
3245
      StringBuilder sb = new StringBuilder("createTransaction_args(");
3246
      boolean first = true;
3247
 
3248
      sb.append("transaction:");
3249
      if (this.transaction == null) {
3250
        sb.append("null");
3251
      } else {
3252
        sb.append(this.transaction);
3253
      }
3254
      first = false;
3255
      sb.append(")");
3256
      return sb.toString();
3257
    }
3258
 
3259
    public void validate() throws TException {
3260
      // check for required fields
3261
    }
3262
 
3263
  }
3264
 
3265
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
3266
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
3267
 
132 ashish 3268
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 3269
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3270
 
132 ashish 3271
    private long success;
68 ashish 3272
    private TransactionServiceException ex;
3273
 
3274
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3275
    public enum _Fields implements TFieldIdEnum {
132 ashish 3276
      SUCCESS((short)0, "success"),
68 ashish 3277
      EX((short)1, "ex");
3278
 
3279
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3280
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3281
 
3282
      static {
3283
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3284
          byId.put((int)field._thriftId, field);
3285
          byName.put(field.getFieldName(), field);
3286
        }
3287
      }
3288
 
3289
      /**
3290
       * Find the _Fields constant that matches fieldId, or null if its not found.
3291
       */
3292
      public static _Fields findByThriftId(int fieldId) {
3293
        return byId.get(fieldId);
3294
      }
3295
 
3296
      /**
3297
       * Find the _Fields constant that matches fieldId, throwing an exception
3298
       * if it is not found.
3299
       */
3300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3301
        _Fields fields = findByThriftId(fieldId);
3302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3303
        return fields;
3304
      }
3305
 
3306
      /**
3307
       * Find the _Fields constant that matches name, or null if its not found.
3308
       */
3309
      public static _Fields findByName(String name) {
3310
        return byName.get(name);
3311
      }
3312
 
3313
      private final short _thriftId;
3314
      private final String _fieldName;
3315
 
3316
      _Fields(short thriftId, String fieldName) {
3317
        _thriftId = thriftId;
3318
        _fieldName = fieldName;
3319
      }
3320
 
3321
      public short getThriftFieldId() {
3322
        return _thriftId;
3323
      }
3324
 
3325
      public String getFieldName() {
3326
        return _fieldName;
3327
      }
3328
    }
3329
 
3330
    // isset id assignments
132 ashish 3331
    private static final int __SUCCESS_ISSET_ID = 0;
3332
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3333
 
3334
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3335
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3336
          new FieldValueMetaData(TType.I64)));
68 ashish 3337
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3338
          new FieldValueMetaData(TType.STRUCT)));
3339
    }});
3340
 
3341
    static {
3342
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3343
    }
3344
 
3345
    public createTransaction_result() {
3346
    }
3347
 
3348
    public createTransaction_result(
132 ashish 3349
      long success,
68 ashish 3350
      TransactionServiceException ex)
3351
    {
3352
      this();
132 ashish 3353
      this.success = success;
3354
      setSuccessIsSet(true);
68 ashish 3355
      this.ex = ex;
3356
    }
3357
 
3358
    /**
3359
     * Performs a deep copy on <i>other</i>.
3360
     */
3361
    public createTransaction_result(createTransaction_result other) {
132 ashish 3362
      __isset_bit_vector.clear();
3363
      __isset_bit_vector.or(other.__isset_bit_vector);
3364
      this.success = other.success;
68 ashish 3365
      if (other.isSetEx()) {
3366
        this.ex = new TransactionServiceException(other.ex);
3367
      }
3368
    }
3369
 
3370
    public createTransaction_result deepCopy() {
3371
      return new createTransaction_result(this);
3372
    }
3373
 
3374
    @Deprecated
3375
    public createTransaction_result clone() {
3376
      return new createTransaction_result(this);
3377
    }
3378
 
132 ashish 3379
    public long getSuccess() {
3380
      return this.success;
3381
    }
3382
 
3383
    public createTransaction_result setSuccess(long success) {
3384
      this.success = success;
3385
      setSuccessIsSet(true);
3386
      return this;
3387
    }
3388
 
3389
    public void unsetSuccess() {
3390
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3391
    }
3392
 
3393
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3394
    public boolean isSetSuccess() {
3395
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3396
    }
3397
 
3398
    public void setSuccessIsSet(boolean value) {
3399
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3400
    }
3401
 
68 ashish 3402
    public TransactionServiceException getEx() {
3403
      return this.ex;
3404
    }
3405
 
3406
    public createTransaction_result setEx(TransactionServiceException ex) {
3407
      this.ex = ex;
3408
      return this;
3409
    }
3410
 
3411
    public void unsetEx() {
3412
      this.ex = null;
3413
    }
3414
 
3415
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3416
    public boolean isSetEx() {
3417
      return this.ex != null;
3418
    }
3419
 
3420
    public void setExIsSet(boolean value) {
3421
      if (!value) {
3422
        this.ex = null;
3423
      }
3424
    }
3425
 
3426
    public void setFieldValue(_Fields field, Object value) {
3427
      switch (field) {
132 ashish 3428
      case SUCCESS:
3429
        if (value == null) {
3430
          unsetSuccess();
3431
        } else {
3432
          setSuccess((Long)value);
3433
        }
3434
        break;
3435
 
68 ashish 3436
      case EX:
3437
        if (value == null) {
3438
          unsetEx();
3439
        } else {
3440
          setEx((TransactionServiceException)value);
3441
        }
3442
        break;
3443
 
3444
      }
3445
    }
3446
 
3447
    public void setFieldValue(int fieldID, Object value) {
3448
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3449
    }
3450
 
3451
    public Object getFieldValue(_Fields field) {
3452
      switch (field) {
132 ashish 3453
      case SUCCESS:
3454
        return new Long(getSuccess());
3455
 
68 ashish 3456
      case EX:
3457
        return getEx();
3458
 
3459
      }
3460
      throw new IllegalStateException();
3461
    }
3462
 
3463
    public Object getFieldValue(int fieldId) {
3464
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3465
    }
3466
 
3467
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3468
    public boolean isSet(_Fields field) {
3469
      switch (field) {
132 ashish 3470
      case SUCCESS:
3471
        return isSetSuccess();
68 ashish 3472
      case EX:
3473
        return isSetEx();
3474
      }
3475
      throw new IllegalStateException();
3476
    }
3477
 
3478
    public boolean isSet(int fieldID) {
3479
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3480
    }
3481
 
3482
    @Override
3483
    public boolean equals(Object that) {
3484
      if (that == null)
3485
        return false;
3486
      if (that instanceof createTransaction_result)
3487
        return this.equals((createTransaction_result)that);
3488
      return false;
3489
    }
3490
 
3491
    public boolean equals(createTransaction_result that) {
3492
      if (that == null)
3493
        return false;
3494
 
132 ashish 3495
      boolean this_present_success = true;
3496
      boolean that_present_success = true;
3497
      if (this_present_success || that_present_success) {
3498
        if (!(this_present_success && that_present_success))
3499
          return false;
3500
        if (this.success != that.success)
3501
          return false;
3502
      }
3503
 
68 ashish 3504
      boolean this_present_ex = true && this.isSetEx();
3505
      boolean that_present_ex = true && that.isSetEx();
3506
      if (this_present_ex || that_present_ex) {
3507
        if (!(this_present_ex && that_present_ex))
3508
          return false;
3509
        if (!this.ex.equals(that.ex))
3510
          return false;
3511
      }
3512
 
3513
      return true;
3514
    }
3515
 
3516
    @Override
3517
    public int hashCode() {
3518
      return 0;
3519
    }
3520
 
3521
    public int compareTo(createTransaction_result other) {
3522
      if (!getClass().equals(other.getClass())) {
3523
        return getClass().getName().compareTo(other.getClass().getName());
3524
      }
3525
 
3526
      int lastComparison = 0;
3527
      createTransaction_result typedOther = (createTransaction_result)other;
3528
 
132 ashish 3529
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3530
      if (lastComparison != 0) {
3531
        return lastComparison;
3532
      }
3533
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3534
      if (lastComparison != 0) {
3535
        return lastComparison;
3536
      }
68 ashish 3537
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3538
      if (lastComparison != 0) {
3539
        return lastComparison;
3540
      }
3541
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3542
      if (lastComparison != 0) {
3543
        return lastComparison;
3544
      }
3545
      return 0;
3546
    }
3547
 
3548
    public void read(TProtocol iprot) throws TException {
3549
      TField field;
3550
      iprot.readStructBegin();
3551
      while (true)
3552
      {
3553
        field = iprot.readFieldBegin();
3554
        if (field.type == TType.STOP) { 
3555
          break;
3556
        }
3557
        _Fields fieldId = _Fields.findByThriftId(field.id);
3558
        if (fieldId == null) {
3559
          TProtocolUtil.skip(iprot, field.type);
3560
        } else {
3561
          switch (fieldId) {
132 ashish 3562
            case SUCCESS:
3563
              if (field.type == TType.I64) {
3564
                this.success = iprot.readI64();
3565
                setSuccessIsSet(true);
3566
              } else { 
3567
                TProtocolUtil.skip(iprot, field.type);
3568
              }
3569
              break;
68 ashish 3570
            case EX:
3571
              if (field.type == TType.STRUCT) {
3572
                this.ex = new TransactionServiceException();
3573
                this.ex.read(iprot);
3574
              } else { 
3575
                TProtocolUtil.skip(iprot, field.type);
3576
              }
3577
              break;
3578
          }
3579
          iprot.readFieldEnd();
3580
        }
3581
      }
3582
      iprot.readStructEnd();
3583
      validate();
3584
    }
3585
 
3586
    public void write(TProtocol oprot) throws TException {
3587
      oprot.writeStructBegin(STRUCT_DESC);
3588
 
132 ashish 3589
      if (this.isSetSuccess()) {
3590
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3591
        oprot.writeI64(this.success);
3592
        oprot.writeFieldEnd();
3593
      } else if (this.isSetEx()) {
68 ashish 3594
        oprot.writeFieldBegin(EX_FIELD_DESC);
3595
        this.ex.write(oprot);
3596
        oprot.writeFieldEnd();
3597
      }
3598
      oprot.writeFieldStop();
3599
      oprot.writeStructEnd();
3600
    }
3601
 
3602
    @Override
3603
    public String toString() {
3604
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3605
      boolean first = true;
3606
 
132 ashish 3607
      sb.append("success:");
3608
      sb.append(this.success);
3609
      first = false;
3610
      if (!first) sb.append(", ");
68 ashish 3611
      sb.append("ex:");
3612
      if (this.ex == null) {
3613
        sb.append("null");
3614
      } else {
3615
        sb.append(this.ex);
3616
      }
3617
      first = false;
3618
      sb.append(")");
3619
      return sb.toString();
3620
    }
3621
 
3622
    public void validate() throws TException {
3623
      // check for required fields
3624
    }
3625
 
3626
  }
3627
 
3628
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3629
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3630
 
3631
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3632
 
3633
    private long id;
3634
 
3635
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3636
    public enum _Fields implements TFieldIdEnum {
3637
      ID((short)1, "id");
3638
 
3639
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3640
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3641
 
3642
      static {
3643
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3644
          byId.put((int)field._thriftId, field);
3645
          byName.put(field.getFieldName(), field);
3646
        }
3647
      }
3648
 
3649
      /**
3650
       * Find the _Fields constant that matches fieldId, or null if its not found.
3651
       */
3652
      public static _Fields findByThriftId(int fieldId) {
3653
        return byId.get(fieldId);
3654
      }
3655
 
3656
      /**
3657
       * Find the _Fields constant that matches fieldId, throwing an exception
3658
       * if it is not found.
3659
       */
3660
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3661
        _Fields fields = findByThriftId(fieldId);
3662
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3663
        return fields;
3664
      }
3665
 
3666
      /**
3667
       * Find the _Fields constant that matches name, or null if its not found.
3668
       */
3669
      public static _Fields findByName(String name) {
3670
        return byName.get(name);
3671
      }
3672
 
3673
      private final short _thriftId;
3674
      private final String _fieldName;
3675
 
3676
      _Fields(short thriftId, String fieldName) {
3677
        _thriftId = thriftId;
3678
        _fieldName = fieldName;
3679
      }
3680
 
3681
      public short getThriftFieldId() {
3682
        return _thriftId;
3683
      }
3684
 
3685
      public String getFieldName() {
3686
        return _fieldName;
3687
      }
3688
    }
3689
 
3690
    // isset id assignments
3691
    private static final int __ID_ISSET_ID = 0;
3692
    private BitSet __isset_bit_vector = new BitSet(1);
3693
 
3694
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3695
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3696
          new FieldValueMetaData(TType.I64)));
3697
    }});
3698
 
3699
    static {
3700
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3701
    }
3702
 
3703
    public getTransaction_args() {
3704
    }
3705
 
3706
    public getTransaction_args(
3707
      long id)
3708
    {
3709
      this();
3710
      this.id = id;
3711
      setIdIsSet(true);
3712
    }
3713
 
3714
    /**
3715
     * Performs a deep copy on <i>other</i>.
3716
     */
3717
    public getTransaction_args(getTransaction_args other) {
3718
      __isset_bit_vector.clear();
3719
      __isset_bit_vector.or(other.__isset_bit_vector);
3720
      this.id = other.id;
3721
    }
3722
 
3723
    public getTransaction_args deepCopy() {
3724
      return new getTransaction_args(this);
3725
    }
3726
 
3727
    @Deprecated
3728
    public getTransaction_args clone() {
3729
      return new getTransaction_args(this);
3730
    }
3731
 
3732
    public long getId() {
3733
      return this.id;
3734
    }
3735
 
3736
    public getTransaction_args setId(long id) {
3737
      this.id = id;
3738
      setIdIsSet(true);
3739
      return this;
3740
    }
3741
 
3742
    public void unsetId() {
3743
      __isset_bit_vector.clear(__ID_ISSET_ID);
3744
    }
3745
 
3746
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3747
    public boolean isSetId() {
3748
      return __isset_bit_vector.get(__ID_ISSET_ID);
3749
    }
3750
 
3751
    public void setIdIsSet(boolean value) {
3752
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3753
    }
3754
 
3755
    public void setFieldValue(_Fields field, Object value) {
3756
      switch (field) {
3757
      case ID:
3758
        if (value == null) {
3759
          unsetId();
3760
        } else {
3761
          setId((Long)value);
3762
        }
3763
        break;
3764
 
3765
      }
3766
    }
3767
 
3768
    public void setFieldValue(int fieldID, Object value) {
3769
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3770
    }
3771
 
3772
    public Object getFieldValue(_Fields field) {
3773
      switch (field) {
3774
      case ID:
3775
        return new Long(getId());
3776
 
3777
      }
3778
      throw new IllegalStateException();
3779
    }
3780
 
3781
    public Object getFieldValue(int fieldId) {
3782
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3783
    }
3784
 
3785
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3786
    public boolean isSet(_Fields field) {
3787
      switch (field) {
3788
      case ID:
3789
        return isSetId();
3790
      }
3791
      throw new IllegalStateException();
3792
    }
3793
 
3794
    public boolean isSet(int fieldID) {
3795
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3796
    }
3797
 
3798
    @Override
3799
    public boolean equals(Object that) {
3800
      if (that == null)
3801
        return false;
3802
      if (that instanceof getTransaction_args)
3803
        return this.equals((getTransaction_args)that);
3804
      return false;
3805
    }
3806
 
3807
    public boolean equals(getTransaction_args that) {
3808
      if (that == null)
3809
        return false;
3810
 
3811
      boolean this_present_id = true;
3812
      boolean that_present_id = true;
3813
      if (this_present_id || that_present_id) {
3814
        if (!(this_present_id && that_present_id))
3815
          return false;
3816
        if (this.id != that.id)
3817
          return false;
3818
      }
3819
 
3820
      return true;
3821
    }
3822
 
3823
    @Override
3824
    public int hashCode() {
3825
      return 0;
3826
    }
3827
 
3828
    public int compareTo(getTransaction_args other) {
3829
      if (!getClass().equals(other.getClass())) {
3830
        return getClass().getName().compareTo(other.getClass().getName());
3831
      }
3832
 
3833
      int lastComparison = 0;
3834
      getTransaction_args typedOther = (getTransaction_args)other;
3835
 
3836
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3837
      if (lastComparison != 0) {
3838
        return lastComparison;
3839
      }
3840
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3841
      if (lastComparison != 0) {
3842
        return lastComparison;
3843
      }
3844
      return 0;
3845
    }
3846
 
3847
    public void read(TProtocol iprot) throws TException {
3848
      TField field;
3849
      iprot.readStructBegin();
3850
      while (true)
3851
      {
3852
        field = iprot.readFieldBegin();
3853
        if (field.type == TType.STOP) { 
3854
          break;
3855
        }
3856
        _Fields fieldId = _Fields.findByThriftId(field.id);
3857
        if (fieldId == null) {
3858
          TProtocolUtil.skip(iprot, field.type);
3859
        } else {
3860
          switch (fieldId) {
3861
            case ID:
3862
              if (field.type == TType.I64) {
3863
                this.id = iprot.readI64();
3864
                setIdIsSet(true);
3865
              } else { 
3866
                TProtocolUtil.skip(iprot, field.type);
3867
              }
3868
              break;
3869
          }
3870
          iprot.readFieldEnd();
3871
        }
3872
      }
3873
      iprot.readStructEnd();
3874
      validate();
3875
    }
3876
 
3877
    public void write(TProtocol oprot) throws TException {
3878
      validate();
3879
 
3880
      oprot.writeStructBegin(STRUCT_DESC);
3881
      oprot.writeFieldBegin(ID_FIELD_DESC);
3882
      oprot.writeI64(this.id);
3883
      oprot.writeFieldEnd();
3884
      oprot.writeFieldStop();
3885
      oprot.writeStructEnd();
3886
    }
3887
 
3888
    @Override
3889
    public String toString() {
3890
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3891
      boolean first = true;
3892
 
3893
      sb.append("id:");
3894
      sb.append(this.id);
3895
      first = false;
3896
      sb.append(")");
3897
      return sb.toString();
3898
    }
3899
 
3900
    public void validate() throws TException {
3901
      // check for required fields
3902
    }
3903
 
3904
  }
3905
 
684 chandransh 3906
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3907
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3908
 
3909
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3910
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3911
 
3912
    private Transaction success;
3913
    private TransactionServiceException ex;
3914
 
3915
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3916
    public enum _Fields implements TFieldIdEnum {
3917
      SUCCESS((short)0, "success"),
3918
      EX((short)1, "ex");
3919
 
3920
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3921
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3922
 
3923
      static {
3924
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3925
          byId.put((int)field._thriftId, field);
3926
          byName.put(field.getFieldName(), field);
3927
        }
3928
      }
3929
 
3930
      /**
3931
       * Find the _Fields constant that matches fieldId, or null if its not found.
3932
       */
3933
      public static _Fields findByThriftId(int fieldId) {
3934
        return byId.get(fieldId);
3935
      }
3936
 
3937
      /**
3938
       * Find the _Fields constant that matches fieldId, throwing an exception
3939
       * if it is not found.
3940
       */
3941
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3942
        _Fields fields = findByThriftId(fieldId);
3943
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3944
        return fields;
3945
      }
3946
 
3947
      /**
3948
       * Find the _Fields constant that matches name, or null if its not found.
3949
       */
3950
      public static _Fields findByName(String name) {
3951
        return byName.get(name);
3952
      }
3953
 
3954
      private final short _thriftId;
3955
      private final String _fieldName;
3956
 
3957
      _Fields(short thriftId, String fieldName) {
3958
        _thriftId = thriftId;
3959
        _fieldName = fieldName;
3960
      }
3961
 
3962
      public short getThriftFieldId() {
3963
        return _thriftId;
3964
      }
3965
 
3966
      public String getFieldName() {
3967
        return _fieldName;
3968
      }
3969
    }
3970
 
3971
    // isset id assignments
3972
 
3973
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3974
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3975
          new StructMetaData(TType.STRUCT, Transaction.class)));
3976
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3977
          new FieldValueMetaData(TType.STRUCT)));
3978
    }});
3979
 
3980
    static {
3981
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3982
    }
3983
 
3984
    public getTransaction_result() {
3985
    }
3986
 
3987
    public getTransaction_result(
3988
      Transaction success,
3989
      TransactionServiceException ex)
3990
    {
3991
      this();
3992
      this.success = success;
3993
      this.ex = ex;
3994
    }
3995
 
3996
    /**
3997
     * Performs a deep copy on <i>other</i>.
3998
     */
3999
    public getTransaction_result(getTransaction_result other) {
4000
      if (other.isSetSuccess()) {
4001
        this.success = new Transaction(other.success);
4002
      }
4003
      if (other.isSetEx()) {
4004
        this.ex = new TransactionServiceException(other.ex);
4005
      }
4006
    }
4007
 
4008
    public getTransaction_result deepCopy() {
4009
      return new getTransaction_result(this);
4010
    }
4011
 
4012
    @Deprecated
4013
    public getTransaction_result clone() {
4014
      return new getTransaction_result(this);
4015
    }
4016
 
4017
    public Transaction getSuccess() {
4018
      return this.success;
4019
    }
4020
 
4021
    public getTransaction_result setSuccess(Transaction success) {
4022
      this.success = success;
4023
      return this;
4024
    }
4025
 
4026
    public void unsetSuccess() {
4027
      this.success = null;
4028
    }
4029
 
4030
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4031
    public boolean isSetSuccess() {
4032
      return this.success != null;
4033
    }
4034
 
4035
    public void setSuccessIsSet(boolean value) {
4036
      if (!value) {
4037
        this.success = null;
4038
      }
4039
    }
4040
 
4041
    public TransactionServiceException getEx() {
4042
      return this.ex;
4043
    }
4044
 
4045
    public getTransaction_result setEx(TransactionServiceException ex) {
4046
      this.ex = ex;
4047
      return this;
4048
    }
4049
 
4050
    public void unsetEx() {
4051
      this.ex = null;
4052
    }
4053
 
4054
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4055
    public boolean isSetEx() {
4056
      return this.ex != null;
4057
    }
4058
 
4059
    public void setExIsSet(boolean value) {
4060
      if (!value) {
4061
        this.ex = null;
4062
      }
4063
    }
4064
 
4065
    public void setFieldValue(_Fields field, Object value) {
4066
      switch (field) {
4067
      case SUCCESS:
4068
        if (value == null) {
4069
          unsetSuccess();
4070
        } else {
4071
          setSuccess((Transaction)value);
4072
        }
4073
        break;
4074
 
4075
      case EX:
4076
        if (value == null) {
4077
          unsetEx();
4078
        } else {
4079
          setEx((TransactionServiceException)value);
4080
        }
4081
        break;
4082
 
4083
      }
4084
    }
4085
 
4086
    public void setFieldValue(int fieldID, Object value) {
4087
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4088
    }
4089
 
4090
    public Object getFieldValue(_Fields field) {
4091
      switch (field) {
4092
      case SUCCESS:
4093
        return getSuccess();
4094
 
4095
      case EX:
4096
        return getEx();
4097
 
4098
      }
4099
      throw new IllegalStateException();
4100
    }
4101
 
4102
    public Object getFieldValue(int fieldId) {
4103
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4104
    }
4105
 
4106
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4107
    public boolean isSet(_Fields field) {
4108
      switch (field) {
4109
      case SUCCESS:
4110
        return isSetSuccess();
4111
      case EX:
4112
        return isSetEx();
4113
      }
4114
      throw new IllegalStateException();
4115
    }
4116
 
4117
    public boolean isSet(int fieldID) {
4118
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4119
    }
4120
 
4121
    @Override
4122
    public boolean equals(Object that) {
4123
      if (that == null)
4124
        return false;
4125
      if (that instanceof getTransaction_result)
4126
        return this.equals((getTransaction_result)that);
4127
      return false;
4128
    }
4129
 
4130
    public boolean equals(getTransaction_result that) {
4131
      if (that == null)
4132
        return false;
4133
 
4134
      boolean this_present_success = true && this.isSetSuccess();
4135
      boolean that_present_success = true && that.isSetSuccess();
4136
      if (this_present_success || that_present_success) {
4137
        if (!(this_present_success && that_present_success))
4138
          return false;
4139
        if (!this.success.equals(that.success))
4140
          return false;
4141
      }
4142
 
4143
      boolean this_present_ex = true && this.isSetEx();
4144
      boolean that_present_ex = true && that.isSetEx();
4145
      if (this_present_ex || that_present_ex) {
4146
        if (!(this_present_ex && that_present_ex))
4147
          return false;
4148
        if (!this.ex.equals(that.ex))
4149
          return false;
4150
      }
4151
 
4152
      return true;
4153
    }
4154
 
4155
    @Override
4156
    public int hashCode() {
4157
      return 0;
4158
    }
4159
 
684 chandransh 4160
    public int compareTo(getTransaction_result other) {
4161
      if (!getClass().equals(other.getClass())) {
4162
        return getClass().getName().compareTo(other.getClass().getName());
4163
      }
4164
 
4165
      int lastComparison = 0;
4166
      getTransaction_result typedOther = (getTransaction_result)other;
4167
 
4168
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4169
      if (lastComparison != 0) {
4170
        return lastComparison;
4171
      }
4172
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4173
      if (lastComparison != 0) {
4174
        return lastComparison;
4175
      }
4176
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4177
      if (lastComparison != 0) {
4178
        return lastComparison;
4179
      }
4180
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4181
      if (lastComparison != 0) {
4182
        return lastComparison;
4183
      }
4184
      return 0;
4185
    }
4186
 
68 ashish 4187
    public void read(TProtocol iprot) throws TException {
4188
      TField field;
4189
      iprot.readStructBegin();
4190
      while (true)
4191
      {
4192
        field = iprot.readFieldBegin();
4193
        if (field.type == TType.STOP) { 
4194
          break;
4195
        }
4196
        _Fields fieldId = _Fields.findByThriftId(field.id);
4197
        if (fieldId == null) {
4198
          TProtocolUtil.skip(iprot, field.type);
4199
        } else {
4200
          switch (fieldId) {
4201
            case SUCCESS:
4202
              if (field.type == TType.STRUCT) {
4203
                this.success = new Transaction();
4204
                this.success.read(iprot);
4205
              } else { 
4206
                TProtocolUtil.skip(iprot, field.type);
4207
              }
4208
              break;
4209
            case EX:
4210
              if (field.type == TType.STRUCT) {
4211
                this.ex = new TransactionServiceException();
4212
                this.ex.read(iprot);
4213
              } else { 
4214
                TProtocolUtil.skip(iprot, field.type);
4215
              }
4216
              break;
4217
          }
4218
          iprot.readFieldEnd();
4219
        }
4220
      }
4221
      iprot.readStructEnd();
4222
      validate();
4223
    }
4224
 
4225
    public void write(TProtocol oprot) throws TException {
4226
      oprot.writeStructBegin(STRUCT_DESC);
4227
 
4228
      if (this.isSetSuccess()) {
4229
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4230
        this.success.write(oprot);
4231
        oprot.writeFieldEnd();
4232
      } else if (this.isSetEx()) {
4233
        oprot.writeFieldBegin(EX_FIELD_DESC);
4234
        this.ex.write(oprot);
4235
        oprot.writeFieldEnd();
4236
      }
4237
      oprot.writeFieldStop();
4238
      oprot.writeStructEnd();
4239
    }
4240
 
4241
    @Override
4242
    public String toString() {
4243
      StringBuilder sb = new StringBuilder("getTransaction_result(");
4244
      boolean first = true;
4245
 
4246
      sb.append("success:");
4247
      if (this.success == null) {
4248
        sb.append("null");
4249
      } else {
4250
        sb.append(this.success);
4251
      }
4252
      first = false;
4253
      if (!first) sb.append(", ");
4254
      sb.append("ex:");
4255
      if (this.ex == null) {
4256
        sb.append("null");
4257
      } else {
4258
        sb.append(this.ex);
4259
      }
4260
      first = false;
4261
      sb.append(")");
4262
      return sb.toString();
4263
    }
4264
 
4265
    public void validate() throws TException {
4266
      // check for required fields
4267
    }
4268
 
4269
  }
4270
 
4271
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4272
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4273
 
4274
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4275
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4276
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4277
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4278
 
4279
    private long customerId;
132 ashish 4280
    private long from_date;
4281
    private long to_date;
68 ashish 4282
    private TransactionStatus status;
4283
 
4284
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4285
    public enum _Fields implements TFieldIdEnum {
4286
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4287
      FROM_DATE((short)2, "from_date"),
4288
      TO_DATE((short)3, "to_date"),
68 ashish 4289
      /**
4290
       * 
4291
       * @see TransactionStatus
4292
       */
4293
      STATUS((short)4, "status");
4294
 
4295
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4296
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4297
 
4298
      static {
4299
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4300
          byId.put((int)field._thriftId, field);
4301
          byName.put(field.getFieldName(), field);
4302
        }
4303
      }
4304
 
4305
      /**
4306
       * Find the _Fields constant that matches fieldId, or null if its not found.
4307
       */
4308
      public static _Fields findByThriftId(int fieldId) {
4309
        return byId.get(fieldId);
4310
      }
4311
 
4312
      /**
4313
       * Find the _Fields constant that matches fieldId, throwing an exception
4314
       * if it is not found.
4315
       */
4316
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4317
        _Fields fields = findByThriftId(fieldId);
4318
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4319
        return fields;
4320
      }
4321
 
4322
      /**
4323
       * Find the _Fields constant that matches name, or null if its not found.
4324
       */
4325
      public static _Fields findByName(String name) {
4326
        return byName.get(name);
4327
      }
4328
 
4329
      private final short _thriftId;
4330
      private final String _fieldName;
4331
 
4332
      _Fields(short thriftId, String fieldName) {
4333
        _thriftId = thriftId;
4334
        _fieldName = fieldName;
4335
      }
4336
 
4337
      public short getThriftFieldId() {
4338
        return _thriftId;
4339
      }
4340
 
4341
      public String getFieldName() {
4342
        return _fieldName;
4343
      }
4344
    }
4345
 
4346
    // isset id assignments
4347
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4348
    private static final int __FROM_DATE_ISSET_ID = 1;
4349
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4350
    private BitSet __isset_bit_vector = new BitSet(3);
4351
 
4352
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4353
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4354
          new FieldValueMetaData(TType.I64)));
132 ashish 4355
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4356
          new FieldValueMetaData(TType.I64)));
132 ashish 4357
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4358
          new FieldValueMetaData(TType.I64)));
4359
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4360
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4361
    }});
4362
 
4363
    static {
4364
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4365
    }
4366
 
4367
    public getTransactionsForCustomer_args() {
4368
    }
4369
 
4370
    public getTransactionsForCustomer_args(
4371
      long customerId,
132 ashish 4372
      long from_date,
4373
      long to_date,
68 ashish 4374
      TransactionStatus status)
4375
    {
4376
      this();
4377
      this.customerId = customerId;
4378
      setCustomerIdIsSet(true);
132 ashish 4379
      this.from_date = from_date;
4380
      setFrom_dateIsSet(true);
4381
      this.to_date = to_date;
4382
      setTo_dateIsSet(true);
68 ashish 4383
      this.status = status;
4384
    }
4385
 
4386
    /**
4387
     * Performs a deep copy on <i>other</i>.
4388
     */
4389
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4390
      __isset_bit_vector.clear();
4391
      __isset_bit_vector.or(other.__isset_bit_vector);
4392
      this.customerId = other.customerId;
132 ashish 4393
      this.from_date = other.from_date;
4394
      this.to_date = other.to_date;
68 ashish 4395
      if (other.isSetStatus()) {
4396
        this.status = other.status;
4397
      }
4398
    }
4399
 
4400
    public getTransactionsForCustomer_args deepCopy() {
4401
      return new getTransactionsForCustomer_args(this);
4402
    }
4403
 
4404
    @Deprecated
4405
    public getTransactionsForCustomer_args clone() {
4406
      return new getTransactionsForCustomer_args(this);
4407
    }
4408
 
4409
    public long getCustomerId() {
4410
      return this.customerId;
4411
    }
4412
 
4413
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4414
      this.customerId = customerId;
4415
      setCustomerIdIsSet(true);
4416
      return this;
4417
    }
4418
 
4419
    public void unsetCustomerId() {
4420
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4421
    }
4422
 
4423
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4424
    public boolean isSetCustomerId() {
4425
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4426
    }
4427
 
4428
    public void setCustomerIdIsSet(boolean value) {
4429
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4430
    }
4431
 
132 ashish 4432
    public long getFrom_date() {
4433
      return this.from_date;
68 ashish 4434
    }
4435
 
132 ashish 4436
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4437
      this.from_date = from_date;
4438
      setFrom_dateIsSet(true);
68 ashish 4439
      return this;
4440
    }
4441
 
132 ashish 4442
    public void unsetFrom_date() {
4443
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4444
    }
4445
 
132 ashish 4446
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4447
    public boolean isSetFrom_date() {
4448
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4449
    }
4450
 
132 ashish 4451
    public void setFrom_dateIsSet(boolean value) {
4452
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4453
    }
4454
 
132 ashish 4455
    public long getTo_date() {
4456
      return this.to_date;
68 ashish 4457
    }
4458
 
132 ashish 4459
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4460
      this.to_date = to_date;
4461
      setTo_dateIsSet(true);
68 ashish 4462
      return this;
4463
    }
4464
 
132 ashish 4465
    public void unsetTo_date() {
4466
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4467
    }
4468
 
132 ashish 4469
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4470
    public boolean isSetTo_date() {
4471
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4472
    }
4473
 
132 ashish 4474
    public void setTo_dateIsSet(boolean value) {
4475
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4476
    }
4477
 
4478
    /**
4479
     * 
4480
     * @see TransactionStatus
4481
     */
4482
    public TransactionStatus getStatus() {
4483
      return this.status;
4484
    }
4485
 
4486
    /**
4487
     * 
4488
     * @see TransactionStatus
4489
     */
4490
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4491
      this.status = status;
4492
      return this;
4493
    }
4494
 
4495
    public void unsetStatus() {
4496
      this.status = null;
4497
    }
4498
 
4499
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4500
    public boolean isSetStatus() {
4501
      return this.status != null;
4502
    }
4503
 
4504
    public void setStatusIsSet(boolean value) {
4505
      if (!value) {
4506
        this.status = null;
4507
      }
4508
    }
4509
 
4510
    public void setFieldValue(_Fields field, Object value) {
4511
      switch (field) {
4512
      case CUSTOMER_ID:
4513
        if (value == null) {
4514
          unsetCustomerId();
4515
        } else {
4516
          setCustomerId((Long)value);
4517
        }
4518
        break;
4519
 
132 ashish 4520
      case FROM_DATE:
68 ashish 4521
        if (value == null) {
132 ashish 4522
          unsetFrom_date();
68 ashish 4523
        } else {
132 ashish 4524
          setFrom_date((Long)value);
68 ashish 4525
        }
4526
        break;
4527
 
132 ashish 4528
      case TO_DATE:
68 ashish 4529
        if (value == null) {
132 ashish 4530
          unsetTo_date();
68 ashish 4531
        } else {
132 ashish 4532
          setTo_date((Long)value);
68 ashish 4533
        }
4534
        break;
4535
 
4536
      case STATUS:
4537
        if (value == null) {
4538
          unsetStatus();
4539
        } else {
4540
          setStatus((TransactionStatus)value);
4541
        }
4542
        break;
4543
 
4544
      }
4545
    }
4546
 
4547
    public void setFieldValue(int fieldID, Object value) {
4548
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4549
    }
4550
 
4551
    public Object getFieldValue(_Fields field) {
4552
      switch (field) {
4553
      case CUSTOMER_ID:
4554
        return new Long(getCustomerId());
4555
 
132 ashish 4556
      case FROM_DATE:
4557
        return new Long(getFrom_date());
68 ashish 4558
 
132 ashish 4559
      case TO_DATE:
4560
        return new Long(getTo_date());
68 ashish 4561
 
4562
      case STATUS:
4563
        return getStatus();
4564
 
4565
      }
4566
      throw new IllegalStateException();
4567
    }
4568
 
4569
    public Object getFieldValue(int fieldId) {
4570
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4571
    }
4572
 
4573
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4574
    public boolean isSet(_Fields field) {
4575
      switch (field) {
4576
      case CUSTOMER_ID:
4577
        return isSetCustomerId();
132 ashish 4578
      case FROM_DATE:
4579
        return isSetFrom_date();
4580
      case TO_DATE:
4581
        return isSetTo_date();
68 ashish 4582
      case STATUS:
4583
        return isSetStatus();
4584
      }
4585
      throw new IllegalStateException();
4586
    }
4587
 
4588
    public boolean isSet(int fieldID) {
4589
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4590
    }
4591
 
4592
    @Override
4593
    public boolean equals(Object that) {
4594
      if (that == null)
4595
        return false;
4596
      if (that instanceof getTransactionsForCustomer_args)
4597
        return this.equals((getTransactionsForCustomer_args)that);
4598
      return false;
4599
    }
4600
 
4601
    public boolean equals(getTransactionsForCustomer_args that) {
4602
      if (that == null)
4603
        return false;
4604
 
4605
      boolean this_present_customerId = true;
4606
      boolean that_present_customerId = true;
4607
      if (this_present_customerId || that_present_customerId) {
4608
        if (!(this_present_customerId && that_present_customerId))
4609
          return false;
4610
        if (this.customerId != that.customerId)
4611
          return false;
4612
      }
4613
 
132 ashish 4614
      boolean this_present_from_date = true;
4615
      boolean that_present_from_date = true;
4616
      if (this_present_from_date || that_present_from_date) {
4617
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4618
          return false;
132 ashish 4619
        if (this.from_date != that.from_date)
68 ashish 4620
          return false;
4621
      }
4622
 
132 ashish 4623
      boolean this_present_to_date = true;
4624
      boolean that_present_to_date = true;
4625
      if (this_present_to_date || that_present_to_date) {
4626
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4627
          return false;
132 ashish 4628
        if (this.to_date != that.to_date)
68 ashish 4629
          return false;
4630
      }
4631
 
4632
      boolean this_present_status = true && this.isSetStatus();
4633
      boolean that_present_status = true && that.isSetStatus();
4634
      if (this_present_status || that_present_status) {
4635
        if (!(this_present_status && that_present_status))
4636
          return false;
4637
        if (!this.status.equals(that.status))
4638
          return false;
4639
      }
4640
 
4641
      return true;
4642
    }
4643
 
4644
    @Override
4645
    public int hashCode() {
4646
      return 0;
4647
    }
4648
 
4649
    public int compareTo(getTransactionsForCustomer_args other) {
4650
      if (!getClass().equals(other.getClass())) {
4651
        return getClass().getName().compareTo(other.getClass().getName());
4652
      }
4653
 
4654
      int lastComparison = 0;
4655
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4656
 
4657
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4658
      if (lastComparison != 0) {
4659
        return lastComparison;
4660
      }
4661
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4662
      if (lastComparison != 0) {
4663
        return lastComparison;
4664
      }
132 ashish 4665
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4666
      if (lastComparison != 0) {
4667
        return lastComparison;
4668
      }
132 ashish 4669
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4670
      if (lastComparison != 0) {
4671
        return lastComparison;
4672
      }
132 ashish 4673
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4674
      if (lastComparison != 0) {
4675
        return lastComparison;
4676
      }
132 ashish 4677
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4678
      if (lastComparison != 0) {
4679
        return lastComparison;
4680
      }
4681
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4682
      if (lastComparison != 0) {
4683
        return lastComparison;
4684
      }
4685
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4686
      if (lastComparison != 0) {
4687
        return lastComparison;
4688
      }
4689
      return 0;
4690
    }
4691
 
4692
    public void read(TProtocol iprot) throws TException {
4693
      TField field;
4694
      iprot.readStructBegin();
4695
      while (true)
4696
      {
4697
        field = iprot.readFieldBegin();
4698
        if (field.type == TType.STOP) { 
4699
          break;
4700
        }
4701
        _Fields fieldId = _Fields.findByThriftId(field.id);
4702
        if (fieldId == null) {
4703
          TProtocolUtil.skip(iprot, field.type);
4704
        } else {
4705
          switch (fieldId) {
4706
            case CUSTOMER_ID:
4707
              if (field.type == TType.I64) {
4708
                this.customerId = iprot.readI64();
4709
                setCustomerIdIsSet(true);
4710
              } else { 
4711
                TProtocolUtil.skip(iprot, field.type);
4712
              }
4713
              break;
132 ashish 4714
            case FROM_DATE:
68 ashish 4715
              if (field.type == TType.I64) {
132 ashish 4716
                this.from_date = iprot.readI64();
4717
                setFrom_dateIsSet(true);
68 ashish 4718
              } else { 
4719
                TProtocolUtil.skip(iprot, field.type);
4720
              }
4721
              break;
132 ashish 4722
            case TO_DATE:
68 ashish 4723
              if (field.type == TType.I64) {
132 ashish 4724
                this.to_date = iprot.readI64();
4725
                setTo_dateIsSet(true);
68 ashish 4726
              } else { 
4727
                TProtocolUtil.skip(iprot, field.type);
4728
              }
4729
              break;
4730
            case STATUS:
4731
              if (field.type == TType.I32) {
4732
                this.status = TransactionStatus.findByValue(iprot.readI32());
4733
              } else { 
4734
                TProtocolUtil.skip(iprot, field.type);
4735
              }
4736
              break;
4737
          }
4738
          iprot.readFieldEnd();
4739
        }
4740
      }
4741
      iprot.readStructEnd();
4742
      validate();
4743
    }
4744
 
4745
    public void write(TProtocol oprot) throws TException {
4746
      validate();
4747
 
4748
      oprot.writeStructBegin(STRUCT_DESC);
4749
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4750
      oprot.writeI64(this.customerId);
4751
      oprot.writeFieldEnd();
132 ashish 4752
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4753
      oprot.writeI64(this.from_date);
68 ashish 4754
      oprot.writeFieldEnd();
132 ashish 4755
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4756
      oprot.writeI64(this.to_date);
68 ashish 4757
      oprot.writeFieldEnd();
4758
      if (this.status != null) {
4759
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4760
        oprot.writeI32(this.status.getValue());
4761
        oprot.writeFieldEnd();
4762
      }
4763
      oprot.writeFieldStop();
4764
      oprot.writeStructEnd();
4765
    }
4766
 
4767
    @Override
4768
    public String toString() {
4769
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4770
      boolean first = true;
4771
 
4772
      sb.append("customerId:");
4773
      sb.append(this.customerId);
4774
      first = false;
4775
      if (!first) sb.append(", ");
132 ashish 4776
      sb.append("from_date:");
4777
      sb.append(this.from_date);
68 ashish 4778
      first = false;
4779
      if (!first) sb.append(", ");
132 ashish 4780
      sb.append("to_date:");
4781
      sb.append(this.to_date);
68 ashish 4782
      first = false;
4783
      if (!first) sb.append(", ");
4784
      sb.append("status:");
4785
      if (this.status == null) {
4786
        sb.append("null");
4787
      } else {
4788
        String status_name = status.name();
4789
        if (status_name != null) {
4790
          sb.append(status_name);
4791
          sb.append(" (");
4792
        }
4793
        sb.append(this.status);
4794
        if (status_name != null) {
4795
          sb.append(")");
4796
        }
4797
      }
4798
      first = false;
4799
      sb.append(")");
4800
      return sb.toString();
4801
    }
4802
 
4803
    public void validate() throws TException {
4804
      // check for required fields
4805
    }
4806
 
4807
  }
4808
 
684 chandransh 4809
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4810
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4811
 
4812
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4813
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4814
 
4815
    private List<Transaction> success;
4816
    private TransactionServiceException ex;
4817
 
4818
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4819
    public enum _Fields implements TFieldIdEnum {
4820
      SUCCESS((short)0, "success"),
4821
      EX((short)1, "ex");
4822
 
4823
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4824
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4825
 
4826
      static {
4827
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4828
          byId.put((int)field._thriftId, field);
4829
          byName.put(field.getFieldName(), field);
4830
        }
4831
      }
4832
 
4833
      /**
4834
       * Find the _Fields constant that matches fieldId, or null if its not found.
4835
       */
4836
      public static _Fields findByThriftId(int fieldId) {
4837
        return byId.get(fieldId);
4838
      }
4839
 
4840
      /**
4841
       * Find the _Fields constant that matches fieldId, throwing an exception
4842
       * if it is not found.
4843
       */
4844
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4845
        _Fields fields = findByThriftId(fieldId);
4846
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4847
        return fields;
4848
      }
4849
 
4850
      /**
4851
       * Find the _Fields constant that matches name, or null if its not found.
4852
       */
4853
      public static _Fields findByName(String name) {
4854
        return byName.get(name);
4855
      }
4856
 
4857
      private final short _thriftId;
4858
      private final String _fieldName;
4859
 
4860
      _Fields(short thriftId, String fieldName) {
4861
        _thriftId = thriftId;
4862
        _fieldName = fieldName;
4863
      }
4864
 
4865
      public short getThriftFieldId() {
4866
        return _thriftId;
4867
      }
4868
 
4869
      public String getFieldName() {
4870
        return _fieldName;
4871
      }
4872
    }
4873
 
4874
    // isset id assignments
4875
 
4876
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4877
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4878
          new ListMetaData(TType.LIST, 
4879
              new StructMetaData(TType.STRUCT, Transaction.class))));
4880
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4881
          new FieldValueMetaData(TType.STRUCT)));
4882
    }});
4883
 
4884
    static {
4885
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4886
    }
4887
 
4888
    public getTransactionsForCustomer_result() {
4889
    }
4890
 
4891
    public getTransactionsForCustomer_result(
4892
      List<Transaction> success,
4893
      TransactionServiceException ex)
4894
    {
4895
      this();
4896
      this.success = success;
4897
      this.ex = ex;
4898
    }
4899
 
4900
    /**
4901
     * Performs a deep copy on <i>other</i>.
4902
     */
4903
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4904
      if (other.isSetSuccess()) {
4905
        List<Transaction> __this__success = new ArrayList<Transaction>();
4906
        for (Transaction other_element : other.success) {
4907
          __this__success.add(new Transaction(other_element));
4908
        }
4909
        this.success = __this__success;
4910
      }
4911
      if (other.isSetEx()) {
4912
        this.ex = new TransactionServiceException(other.ex);
4913
      }
4914
    }
4915
 
4916
    public getTransactionsForCustomer_result deepCopy() {
4917
      return new getTransactionsForCustomer_result(this);
4918
    }
4919
 
4920
    @Deprecated
4921
    public getTransactionsForCustomer_result clone() {
4922
      return new getTransactionsForCustomer_result(this);
4923
    }
4924
 
4925
    public int getSuccessSize() {
4926
      return (this.success == null) ? 0 : this.success.size();
4927
    }
4928
 
4929
    public java.util.Iterator<Transaction> getSuccessIterator() {
4930
      return (this.success == null) ? null : this.success.iterator();
4931
    }
4932
 
4933
    public void addToSuccess(Transaction elem) {
4934
      if (this.success == null) {
4935
        this.success = new ArrayList<Transaction>();
4936
      }
4937
      this.success.add(elem);
4938
    }
4939
 
4940
    public List<Transaction> getSuccess() {
4941
      return this.success;
4942
    }
4943
 
4944
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4945
      this.success = success;
4946
      return this;
4947
    }
4948
 
4949
    public void unsetSuccess() {
4950
      this.success = null;
4951
    }
4952
 
4953
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4954
    public boolean isSetSuccess() {
4955
      return this.success != null;
4956
    }
4957
 
4958
    public void setSuccessIsSet(boolean value) {
4959
      if (!value) {
4960
        this.success = null;
4961
      }
4962
    }
4963
 
4964
    public TransactionServiceException getEx() {
4965
      return this.ex;
4966
    }
4967
 
4968
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4969
      this.ex = ex;
4970
      return this;
4971
    }
4972
 
4973
    public void unsetEx() {
4974
      this.ex = null;
4975
    }
4976
 
4977
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4978
    public boolean isSetEx() {
4979
      return this.ex != null;
4980
    }
4981
 
4982
    public void setExIsSet(boolean value) {
4983
      if (!value) {
4984
        this.ex = null;
4985
      }
4986
    }
4987
 
4988
    public void setFieldValue(_Fields field, Object value) {
4989
      switch (field) {
4990
      case SUCCESS:
4991
        if (value == null) {
4992
          unsetSuccess();
4993
        } else {
4994
          setSuccess((List<Transaction>)value);
4995
        }
4996
        break;
4997
 
4998
      case EX:
4999
        if (value == null) {
5000
          unsetEx();
5001
        } else {
5002
          setEx((TransactionServiceException)value);
5003
        }
5004
        break;
5005
 
5006
      }
5007
    }
5008
 
5009
    public void setFieldValue(int fieldID, Object value) {
5010
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5011
    }
5012
 
5013
    public Object getFieldValue(_Fields field) {
5014
      switch (field) {
5015
      case SUCCESS:
5016
        return getSuccess();
5017
 
5018
      case EX:
5019
        return getEx();
5020
 
5021
      }
5022
      throw new IllegalStateException();
5023
    }
5024
 
5025
    public Object getFieldValue(int fieldId) {
5026
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5027
    }
5028
 
5029
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5030
    public boolean isSet(_Fields field) {
5031
      switch (field) {
5032
      case SUCCESS:
5033
        return isSetSuccess();
5034
      case EX:
5035
        return isSetEx();
5036
      }
5037
      throw new IllegalStateException();
5038
    }
5039
 
5040
    public boolean isSet(int fieldID) {
5041
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5042
    }
5043
 
5044
    @Override
5045
    public boolean equals(Object that) {
5046
      if (that == null)
5047
        return false;
5048
      if (that instanceof getTransactionsForCustomer_result)
5049
        return this.equals((getTransactionsForCustomer_result)that);
5050
      return false;
5051
    }
5052
 
5053
    public boolean equals(getTransactionsForCustomer_result that) {
5054
      if (that == null)
5055
        return false;
5056
 
5057
      boolean this_present_success = true && this.isSetSuccess();
5058
      boolean that_present_success = true && that.isSetSuccess();
5059
      if (this_present_success || that_present_success) {
5060
        if (!(this_present_success && that_present_success))
5061
          return false;
5062
        if (!this.success.equals(that.success))
5063
          return false;
5064
      }
5065
 
5066
      boolean this_present_ex = true && this.isSetEx();
5067
      boolean that_present_ex = true && that.isSetEx();
5068
      if (this_present_ex || that_present_ex) {
5069
        if (!(this_present_ex && that_present_ex))
5070
          return false;
5071
        if (!this.ex.equals(that.ex))
5072
          return false;
5073
      }
5074
 
5075
      return true;
5076
    }
5077
 
5078
    @Override
5079
    public int hashCode() {
5080
      return 0;
5081
    }
5082
 
684 chandransh 5083
    public int compareTo(getTransactionsForCustomer_result other) {
5084
      if (!getClass().equals(other.getClass())) {
5085
        return getClass().getName().compareTo(other.getClass().getName());
5086
      }
5087
 
5088
      int lastComparison = 0;
5089
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
5090
 
5091
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5092
      if (lastComparison != 0) {
5093
        return lastComparison;
5094
      }
5095
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5096
      if (lastComparison != 0) {
5097
        return lastComparison;
5098
      }
5099
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5100
      if (lastComparison != 0) {
5101
        return lastComparison;
5102
      }
5103
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5104
      if (lastComparison != 0) {
5105
        return lastComparison;
5106
      }
5107
      return 0;
5108
    }
5109
 
68 ashish 5110
    public void read(TProtocol iprot) throws TException {
5111
      TField field;
5112
      iprot.readStructBegin();
5113
      while (true)
5114
      {
5115
        field = iprot.readFieldBegin();
5116
        if (field.type == TType.STOP) { 
5117
          break;
5118
        }
5119
        _Fields fieldId = _Fields.findByThriftId(field.id);
5120
        if (fieldId == null) {
5121
          TProtocolUtil.skip(iprot, field.type);
5122
        } else {
5123
          switch (fieldId) {
5124
            case SUCCESS:
5125
              if (field.type == TType.LIST) {
5126
                {
684 chandransh 5127
                  TList _list8 = iprot.readListBegin();
5128
                  this.success = new ArrayList<Transaction>(_list8.size);
5129
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 5130
                  {
684 chandransh 5131
                    Transaction _elem10;
5132
                    _elem10 = new Transaction();
5133
                    _elem10.read(iprot);
5134
                    this.success.add(_elem10);
68 ashish 5135
                  }
5136
                  iprot.readListEnd();
5137
                }
5138
              } else { 
5139
                TProtocolUtil.skip(iprot, field.type);
5140
              }
5141
              break;
5142
            case EX:
5143
              if (field.type == TType.STRUCT) {
5144
                this.ex = new TransactionServiceException();
5145
                this.ex.read(iprot);
5146
              } else { 
5147
                TProtocolUtil.skip(iprot, field.type);
5148
              }
5149
              break;
5150
          }
5151
          iprot.readFieldEnd();
5152
        }
5153
      }
5154
      iprot.readStructEnd();
5155
      validate();
5156
    }
5157
 
5158
    public void write(TProtocol oprot) throws TException {
5159
      oprot.writeStructBegin(STRUCT_DESC);
5160
 
5161
      if (this.isSetSuccess()) {
5162
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5163
        {
5164
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5165
          for (Transaction _iter11 : this.success)
68 ashish 5166
          {
684 chandransh 5167
            _iter11.write(oprot);
68 ashish 5168
          }
5169
          oprot.writeListEnd();
5170
        }
5171
        oprot.writeFieldEnd();
5172
      } else if (this.isSetEx()) {
5173
        oprot.writeFieldBegin(EX_FIELD_DESC);
5174
        this.ex.write(oprot);
5175
        oprot.writeFieldEnd();
5176
      }
5177
      oprot.writeFieldStop();
5178
      oprot.writeStructEnd();
5179
    }
5180
 
5181
    @Override
5182
    public String toString() {
5183
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5184
      boolean first = true;
5185
 
5186
      sb.append("success:");
5187
      if (this.success == null) {
5188
        sb.append("null");
5189
      } else {
5190
        sb.append(this.success);
5191
      }
5192
      first = false;
5193
      if (!first) sb.append(", ");
5194
      sb.append("ex:");
5195
      if (this.ex == null) {
5196
        sb.append("null");
5197
      } else {
5198
        sb.append(this.ex);
5199
      }
5200
      first = false;
5201
      sb.append(")");
5202
      return sb.toString();
5203
    }
5204
 
5205
    public void validate() throws TException {
5206
      // check for required fields
5207
    }
5208
 
5209
  }
5210
 
132 ashish 5211
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
5212
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
5213
 
5214
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
5215
 
5216
    private long shoppingCartId;
5217
 
5218
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5219
    public enum _Fields implements TFieldIdEnum {
5220
      SHOPPING_CART_ID((short)1, "shoppingCartId");
5221
 
5222
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5223
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5224
 
5225
      static {
5226
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5227
          byId.put((int)field._thriftId, field);
5228
          byName.put(field.getFieldName(), field);
5229
        }
5230
      }
5231
 
5232
      /**
5233
       * Find the _Fields constant that matches fieldId, or null if its not found.
5234
       */
5235
      public static _Fields findByThriftId(int fieldId) {
5236
        return byId.get(fieldId);
5237
      }
5238
 
5239
      /**
5240
       * Find the _Fields constant that matches fieldId, throwing an exception
5241
       * if it is not found.
5242
       */
5243
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5244
        _Fields fields = findByThriftId(fieldId);
5245
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5246
        return fields;
5247
      }
5248
 
5249
      /**
5250
       * Find the _Fields constant that matches name, or null if its not found.
5251
       */
5252
      public static _Fields findByName(String name) {
5253
        return byName.get(name);
5254
      }
5255
 
5256
      private final short _thriftId;
5257
      private final String _fieldName;
5258
 
5259
      _Fields(short thriftId, String fieldName) {
5260
        _thriftId = thriftId;
5261
        _fieldName = fieldName;
5262
      }
5263
 
5264
      public short getThriftFieldId() {
5265
        return _thriftId;
5266
      }
5267
 
5268
      public String getFieldName() {
5269
        return _fieldName;
5270
      }
5271
    }
5272
 
5273
    // isset id assignments
5274
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
5275
    private BitSet __isset_bit_vector = new BitSet(1);
5276
 
5277
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5278
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
5279
          new FieldValueMetaData(TType.I64)));
5280
    }});
5281
 
5282
    static {
5283
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
5284
    }
5285
 
5286
    public getTransactionsForShoppingCartId_args() {
5287
    }
5288
 
5289
    public getTransactionsForShoppingCartId_args(
5290
      long shoppingCartId)
5291
    {
5292
      this();
5293
      this.shoppingCartId = shoppingCartId;
5294
      setShoppingCartIdIsSet(true);
5295
    }
5296
 
5297
    /**
5298
     * Performs a deep copy on <i>other</i>.
5299
     */
5300
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
5301
      __isset_bit_vector.clear();
5302
      __isset_bit_vector.or(other.__isset_bit_vector);
5303
      this.shoppingCartId = other.shoppingCartId;
5304
    }
5305
 
5306
    public getTransactionsForShoppingCartId_args deepCopy() {
5307
      return new getTransactionsForShoppingCartId_args(this);
5308
    }
5309
 
5310
    @Deprecated
5311
    public getTransactionsForShoppingCartId_args clone() {
5312
      return new getTransactionsForShoppingCartId_args(this);
5313
    }
5314
 
5315
    public long getShoppingCartId() {
5316
      return this.shoppingCartId;
5317
    }
5318
 
5319
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5320
      this.shoppingCartId = shoppingCartId;
5321
      setShoppingCartIdIsSet(true);
5322
      return this;
5323
    }
5324
 
5325
    public void unsetShoppingCartId() {
5326
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5327
    }
5328
 
5329
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5330
    public boolean isSetShoppingCartId() {
5331
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5332
    }
5333
 
5334
    public void setShoppingCartIdIsSet(boolean value) {
5335
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5336
    }
5337
 
5338
    public void setFieldValue(_Fields field, Object value) {
5339
      switch (field) {
5340
      case SHOPPING_CART_ID:
5341
        if (value == null) {
5342
          unsetShoppingCartId();
5343
        } else {
5344
          setShoppingCartId((Long)value);
5345
        }
5346
        break;
5347
 
5348
      }
5349
    }
5350
 
5351
    public void setFieldValue(int fieldID, Object value) {
5352
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5353
    }
5354
 
5355
    public Object getFieldValue(_Fields field) {
5356
      switch (field) {
5357
      case SHOPPING_CART_ID:
5358
        return new Long(getShoppingCartId());
5359
 
5360
      }
5361
      throw new IllegalStateException();
5362
    }
5363
 
5364
    public Object getFieldValue(int fieldId) {
5365
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5366
    }
5367
 
5368
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5369
    public boolean isSet(_Fields field) {
5370
      switch (field) {
5371
      case SHOPPING_CART_ID:
5372
        return isSetShoppingCartId();
5373
      }
5374
      throw new IllegalStateException();
5375
    }
5376
 
5377
    public boolean isSet(int fieldID) {
5378
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5379
    }
5380
 
5381
    @Override
5382
    public boolean equals(Object that) {
5383
      if (that == null)
5384
        return false;
5385
      if (that instanceof getTransactionsForShoppingCartId_args)
5386
        return this.equals((getTransactionsForShoppingCartId_args)that);
5387
      return false;
5388
    }
5389
 
5390
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5391
      if (that == null)
5392
        return false;
5393
 
5394
      boolean this_present_shoppingCartId = true;
5395
      boolean that_present_shoppingCartId = true;
5396
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5397
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5398
          return false;
5399
        if (this.shoppingCartId != that.shoppingCartId)
5400
          return false;
5401
      }
5402
 
5403
      return true;
5404
    }
5405
 
5406
    @Override
5407
    public int hashCode() {
5408
      return 0;
5409
    }
5410
 
5411
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5412
      if (!getClass().equals(other.getClass())) {
5413
        return getClass().getName().compareTo(other.getClass().getName());
5414
      }
5415
 
5416
      int lastComparison = 0;
5417
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5418
 
5419
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5420
      if (lastComparison != 0) {
5421
        return lastComparison;
5422
      }
5423
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5424
      if (lastComparison != 0) {
5425
        return lastComparison;
5426
      }
5427
      return 0;
5428
    }
5429
 
5430
    public void read(TProtocol iprot) throws TException {
5431
      TField field;
5432
      iprot.readStructBegin();
5433
      while (true)
5434
      {
5435
        field = iprot.readFieldBegin();
5436
        if (field.type == TType.STOP) { 
5437
          break;
5438
        }
5439
        _Fields fieldId = _Fields.findByThriftId(field.id);
5440
        if (fieldId == null) {
5441
          TProtocolUtil.skip(iprot, field.type);
5442
        } else {
5443
          switch (fieldId) {
5444
            case SHOPPING_CART_ID:
5445
              if (field.type == TType.I64) {
5446
                this.shoppingCartId = iprot.readI64();
5447
                setShoppingCartIdIsSet(true);
5448
              } else { 
5449
                TProtocolUtil.skip(iprot, field.type);
5450
              }
5451
              break;
5452
          }
5453
          iprot.readFieldEnd();
5454
        }
5455
      }
5456
      iprot.readStructEnd();
5457
      validate();
5458
    }
5459
 
5460
    public void write(TProtocol oprot) throws TException {
5461
      validate();
5462
 
5463
      oprot.writeStructBegin(STRUCT_DESC);
5464
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5465
      oprot.writeI64(this.shoppingCartId);
5466
      oprot.writeFieldEnd();
5467
      oprot.writeFieldStop();
5468
      oprot.writeStructEnd();
5469
    }
5470
 
5471
    @Override
5472
    public String toString() {
5473
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5474
      boolean first = true;
5475
 
5476
      sb.append("shoppingCartId:");
5477
      sb.append(this.shoppingCartId);
5478
      first = false;
5479
      sb.append(")");
5480
      return sb.toString();
5481
    }
5482
 
5483
    public void validate() throws TException {
5484
      // check for required fields
5485
    }
5486
 
5487
  }
5488
 
684 chandransh 5489
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5490
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5491
 
5492
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5493
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5494
 
5495
    private List<Transaction> success;
5496
    private TransactionServiceException ex;
5497
 
5498
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5499
    public enum _Fields implements TFieldIdEnum {
5500
      SUCCESS((short)0, "success"),
5501
      EX((short)1, "ex");
5502
 
5503
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5504
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5505
 
5506
      static {
5507
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5508
          byId.put((int)field._thriftId, field);
5509
          byName.put(field.getFieldName(), field);
5510
        }
5511
      }
5512
 
5513
      /**
5514
       * Find the _Fields constant that matches fieldId, or null if its not found.
5515
       */
5516
      public static _Fields findByThriftId(int fieldId) {
5517
        return byId.get(fieldId);
5518
      }
5519
 
5520
      /**
5521
       * Find the _Fields constant that matches fieldId, throwing an exception
5522
       * if it is not found.
5523
       */
5524
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5525
        _Fields fields = findByThriftId(fieldId);
5526
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5527
        return fields;
5528
      }
5529
 
5530
      /**
5531
       * Find the _Fields constant that matches name, or null if its not found.
5532
       */
5533
      public static _Fields findByName(String name) {
5534
        return byName.get(name);
5535
      }
5536
 
5537
      private final short _thriftId;
5538
      private final String _fieldName;
5539
 
5540
      _Fields(short thriftId, String fieldName) {
5541
        _thriftId = thriftId;
5542
        _fieldName = fieldName;
5543
      }
5544
 
5545
      public short getThriftFieldId() {
5546
        return _thriftId;
5547
      }
5548
 
5549
      public String getFieldName() {
5550
        return _fieldName;
5551
      }
5552
    }
5553
 
5554
    // isset id assignments
5555
 
5556
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5557
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5558
          new ListMetaData(TType.LIST, 
5559
              new StructMetaData(TType.STRUCT, Transaction.class))));
5560
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5561
          new FieldValueMetaData(TType.STRUCT)));
5562
    }});
5563
 
5564
    static {
5565
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5566
    }
5567
 
5568
    public getTransactionsForShoppingCartId_result() {
5569
    }
5570
 
5571
    public getTransactionsForShoppingCartId_result(
5572
      List<Transaction> success,
5573
      TransactionServiceException ex)
5574
    {
5575
      this();
5576
      this.success = success;
5577
      this.ex = ex;
5578
    }
5579
 
5580
    /**
5581
     * Performs a deep copy on <i>other</i>.
5582
     */
5583
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5584
      if (other.isSetSuccess()) {
5585
        List<Transaction> __this__success = new ArrayList<Transaction>();
5586
        for (Transaction other_element : other.success) {
5587
          __this__success.add(new Transaction(other_element));
5588
        }
5589
        this.success = __this__success;
5590
      }
5591
      if (other.isSetEx()) {
5592
        this.ex = new TransactionServiceException(other.ex);
5593
      }
5594
    }
5595
 
5596
    public getTransactionsForShoppingCartId_result deepCopy() {
5597
      return new getTransactionsForShoppingCartId_result(this);
5598
    }
5599
 
5600
    @Deprecated
5601
    public getTransactionsForShoppingCartId_result clone() {
5602
      return new getTransactionsForShoppingCartId_result(this);
5603
    }
5604
 
5605
    public int getSuccessSize() {
5606
      return (this.success == null) ? 0 : this.success.size();
5607
    }
5608
 
5609
    public java.util.Iterator<Transaction> getSuccessIterator() {
5610
      return (this.success == null) ? null : this.success.iterator();
5611
    }
5612
 
5613
    public void addToSuccess(Transaction elem) {
5614
      if (this.success == null) {
5615
        this.success = new ArrayList<Transaction>();
5616
      }
5617
      this.success.add(elem);
5618
    }
5619
 
5620
    public List<Transaction> getSuccess() {
5621
      return this.success;
5622
    }
5623
 
5624
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5625
      this.success = success;
5626
      return this;
5627
    }
5628
 
5629
    public void unsetSuccess() {
5630
      this.success = null;
5631
    }
5632
 
5633
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5634
    public boolean isSetSuccess() {
5635
      return this.success != null;
5636
    }
5637
 
5638
    public void setSuccessIsSet(boolean value) {
5639
      if (!value) {
5640
        this.success = null;
5641
      }
5642
    }
5643
 
5644
    public TransactionServiceException getEx() {
5645
      return this.ex;
5646
    }
5647
 
5648
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5649
      this.ex = ex;
5650
      return this;
5651
    }
5652
 
5653
    public void unsetEx() {
5654
      this.ex = null;
5655
    }
5656
 
5657
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5658
    public boolean isSetEx() {
5659
      return this.ex != null;
5660
    }
5661
 
5662
    public void setExIsSet(boolean value) {
5663
      if (!value) {
5664
        this.ex = null;
5665
      }
5666
    }
5667
 
5668
    public void setFieldValue(_Fields field, Object value) {
5669
      switch (field) {
5670
      case SUCCESS:
5671
        if (value == null) {
5672
          unsetSuccess();
5673
        } else {
5674
          setSuccess((List<Transaction>)value);
5675
        }
5676
        break;
5677
 
5678
      case EX:
5679
        if (value == null) {
5680
          unsetEx();
5681
        } else {
5682
          setEx((TransactionServiceException)value);
5683
        }
5684
        break;
5685
 
5686
      }
5687
    }
5688
 
5689
    public void setFieldValue(int fieldID, Object value) {
5690
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5691
    }
5692
 
5693
    public Object getFieldValue(_Fields field) {
5694
      switch (field) {
5695
      case SUCCESS:
5696
        return getSuccess();
5697
 
5698
      case EX:
5699
        return getEx();
5700
 
5701
      }
5702
      throw new IllegalStateException();
5703
    }
5704
 
5705
    public Object getFieldValue(int fieldId) {
5706
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5707
    }
5708
 
5709
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5710
    public boolean isSet(_Fields field) {
5711
      switch (field) {
5712
      case SUCCESS:
5713
        return isSetSuccess();
5714
      case EX:
5715
        return isSetEx();
5716
      }
5717
      throw new IllegalStateException();
5718
    }
5719
 
5720
    public boolean isSet(int fieldID) {
5721
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5722
    }
5723
 
5724
    @Override
5725
    public boolean equals(Object that) {
5726
      if (that == null)
5727
        return false;
5728
      if (that instanceof getTransactionsForShoppingCartId_result)
5729
        return this.equals((getTransactionsForShoppingCartId_result)that);
5730
      return false;
5731
    }
5732
 
5733
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5734
      if (that == null)
5735
        return false;
5736
 
5737
      boolean this_present_success = true && this.isSetSuccess();
5738
      boolean that_present_success = true && that.isSetSuccess();
5739
      if (this_present_success || that_present_success) {
5740
        if (!(this_present_success && that_present_success))
5741
          return false;
5742
        if (!this.success.equals(that.success))
5743
          return false;
5744
      }
5745
 
5746
      boolean this_present_ex = true && this.isSetEx();
5747
      boolean that_present_ex = true && that.isSetEx();
5748
      if (this_present_ex || that_present_ex) {
5749
        if (!(this_present_ex && that_present_ex))
5750
          return false;
5751
        if (!this.ex.equals(that.ex))
5752
          return false;
5753
      }
5754
 
5755
      return true;
5756
    }
5757
 
5758
    @Override
5759
    public int hashCode() {
5760
      return 0;
5761
    }
5762
 
684 chandransh 5763
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5764
      if (!getClass().equals(other.getClass())) {
5765
        return getClass().getName().compareTo(other.getClass().getName());
5766
      }
5767
 
5768
      int lastComparison = 0;
5769
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5770
 
5771
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5772
      if (lastComparison != 0) {
5773
        return lastComparison;
5774
      }
5775
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5776
      if (lastComparison != 0) {
5777
        return lastComparison;
5778
      }
5779
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5780
      if (lastComparison != 0) {
5781
        return lastComparison;
5782
      }
5783
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5784
      if (lastComparison != 0) {
5785
        return lastComparison;
5786
      }
5787
      return 0;
5788
    }
5789
 
132 ashish 5790
    public void read(TProtocol iprot) throws TException {
5791
      TField field;
5792
      iprot.readStructBegin();
5793
      while (true)
5794
      {
5795
        field = iprot.readFieldBegin();
5796
        if (field.type == TType.STOP) { 
5797
          break;
5798
        }
5799
        _Fields fieldId = _Fields.findByThriftId(field.id);
5800
        if (fieldId == null) {
5801
          TProtocolUtil.skip(iprot, field.type);
5802
        } else {
5803
          switch (fieldId) {
5804
            case SUCCESS:
5805
              if (field.type == TType.LIST) {
5806
                {
684 chandransh 5807
                  TList _list12 = iprot.readListBegin();
5808
                  this.success = new ArrayList<Transaction>(_list12.size);
5809
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5810
                  {
684 chandransh 5811
                    Transaction _elem14;
5812
                    _elem14 = new Transaction();
5813
                    _elem14.read(iprot);
5814
                    this.success.add(_elem14);
132 ashish 5815
                  }
5816
                  iprot.readListEnd();
5817
                }
5818
              } else { 
5819
                TProtocolUtil.skip(iprot, field.type);
5820
              }
5821
              break;
5822
            case EX:
5823
              if (field.type == TType.STRUCT) {
5824
                this.ex = new TransactionServiceException();
5825
                this.ex.read(iprot);
5826
              } else { 
5827
                TProtocolUtil.skip(iprot, field.type);
5828
              }
5829
              break;
5830
          }
5831
          iprot.readFieldEnd();
5832
        }
5833
      }
5834
      iprot.readStructEnd();
5835
      validate();
5836
    }
5837
 
5838
    public void write(TProtocol oprot) throws TException {
5839
      oprot.writeStructBegin(STRUCT_DESC);
5840
 
5841
      if (this.isSetSuccess()) {
5842
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5843
        {
5844
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5845
          for (Transaction _iter15 : this.success)
132 ashish 5846
          {
684 chandransh 5847
            _iter15.write(oprot);
132 ashish 5848
          }
5849
          oprot.writeListEnd();
5850
        }
5851
        oprot.writeFieldEnd();
5852
      } else if (this.isSetEx()) {
5853
        oprot.writeFieldBegin(EX_FIELD_DESC);
5854
        this.ex.write(oprot);
5855
        oprot.writeFieldEnd();
5856
      }
5857
      oprot.writeFieldStop();
5858
      oprot.writeStructEnd();
5859
    }
5860
 
5861
    @Override
5862
    public String toString() {
5863
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5864
      boolean first = true;
5865
 
5866
      sb.append("success:");
5867
      if (this.success == null) {
5868
        sb.append("null");
5869
      } else {
5870
        sb.append(this.success);
5871
      }
5872
      first = false;
5873
      if (!first) sb.append(", ");
5874
      sb.append("ex:");
5875
      if (this.ex == null) {
5876
        sb.append("null");
5877
      } else {
5878
        sb.append(this.ex);
5879
      }
5880
      first = false;
5881
      sb.append(")");
5882
      return sb.toString();
5883
    }
5884
 
5885
    public void validate() throws TException {
5886
      // check for required fields
5887
    }
5888
 
5889
  }
5890
 
68 ashish 5891
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5892
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5893
 
5894
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5895
 
5896
    private long transactionId;
5897
 
5898
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5899
    public enum _Fields implements TFieldIdEnum {
5900
      TRANSACTION_ID((short)1, "transactionId");
5901
 
5902
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5903
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5904
 
5905
      static {
5906
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5907
          byId.put((int)field._thriftId, field);
5908
          byName.put(field.getFieldName(), field);
5909
        }
5910
      }
5911
 
5912
      /**
5913
       * Find the _Fields constant that matches fieldId, or null if its not found.
5914
       */
5915
      public static _Fields findByThriftId(int fieldId) {
5916
        return byId.get(fieldId);
5917
      }
5918
 
5919
      /**
5920
       * Find the _Fields constant that matches fieldId, throwing an exception
5921
       * if it is not found.
5922
       */
5923
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5924
        _Fields fields = findByThriftId(fieldId);
5925
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5926
        return fields;
5927
      }
5928
 
5929
      /**
5930
       * Find the _Fields constant that matches name, or null if its not found.
5931
       */
5932
      public static _Fields findByName(String name) {
5933
        return byName.get(name);
5934
      }
5935
 
5936
      private final short _thriftId;
5937
      private final String _fieldName;
5938
 
5939
      _Fields(short thriftId, String fieldName) {
5940
        _thriftId = thriftId;
5941
        _fieldName = fieldName;
5942
      }
5943
 
5944
      public short getThriftFieldId() {
5945
        return _thriftId;
5946
      }
5947
 
5948
      public String getFieldName() {
5949
        return _fieldName;
5950
      }
5951
    }
5952
 
5953
    // isset id assignments
5954
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5955
    private BitSet __isset_bit_vector = new BitSet(1);
5956
 
5957
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5958
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5959
          new FieldValueMetaData(TType.I64)));
5960
    }});
5961
 
5962
    static {
5963
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5964
    }
5965
 
5966
    public getTransactionStatus_args() {
5967
    }
5968
 
5969
    public getTransactionStatus_args(
5970
      long transactionId)
5971
    {
5972
      this();
5973
      this.transactionId = transactionId;
5974
      setTransactionIdIsSet(true);
5975
    }
5976
 
5977
    /**
5978
     * Performs a deep copy on <i>other</i>.
5979
     */
5980
    public getTransactionStatus_args(getTransactionStatus_args other) {
5981
      __isset_bit_vector.clear();
5982
      __isset_bit_vector.or(other.__isset_bit_vector);
5983
      this.transactionId = other.transactionId;
5984
    }
5985
 
5986
    public getTransactionStatus_args deepCopy() {
5987
      return new getTransactionStatus_args(this);
5988
    }
5989
 
5990
    @Deprecated
5991
    public getTransactionStatus_args clone() {
5992
      return new getTransactionStatus_args(this);
5993
    }
5994
 
5995
    public long getTransactionId() {
5996
      return this.transactionId;
5997
    }
5998
 
5999
    public getTransactionStatus_args setTransactionId(long transactionId) {
6000
      this.transactionId = transactionId;
6001
      setTransactionIdIsSet(true);
6002
      return this;
6003
    }
6004
 
6005
    public void unsetTransactionId() {
6006
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6007
    }
6008
 
6009
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6010
    public boolean isSetTransactionId() {
6011
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6012
    }
6013
 
6014
    public void setTransactionIdIsSet(boolean value) {
6015
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6016
    }
6017
 
6018
    public void setFieldValue(_Fields field, Object value) {
6019
      switch (field) {
6020
      case TRANSACTION_ID:
6021
        if (value == null) {
6022
          unsetTransactionId();
6023
        } else {
6024
          setTransactionId((Long)value);
6025
        }
6026
        break;
6027
 
6028
      }
6029
    }
6030
 
6031
    public void setFieldValue(int fieldID, Object value) {
6032
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6033
    }
6034
 
6035
    public Object getFieldValue(_Fields field) {
6036
      switch (field) {
6037
      case TRANSACTION_ID:
6038
        return new Long(getTransactionId());
6039
 
6040
      }
6041
      throw new IllegalStateException();
6042
    }
6043
 
6044
    public Object getFieldValue(int fieldId) {
6045
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6046
    }
6047
 
6048
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6049
    public boolean isSet(_Fields field) {
6050
      switch (field) {
6051
      case TRANSACTION_ID:
6052
        return isSetTransactionId();
6053
      }
6054
      throw new IllegalStateException();
6055
    }
6056
 
6057
    public boolean isSet(int fieldID) {
6058
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6059
    }
6060
 
6061
    @Override
6062
    public boolean equals(Object that) {
6063
      if (that == null)
6064
        return false;
6065
      if (that instanceof getTransactionStatus_args)
6066
        return this.equals((getTransactionStatus_args)that);
6067
      return false;
6068
    }
6069
 
6070
    public boolean equals(getTransactionStatus_args that) {
6071
      if (that == null)
6072
        return false;
6073
 
6074
      boolean this_present_transactionId = true;
6075
      boolean that_present_transactionId = true;
6076
      if (this_present_transactionId || that_present_transactionId) {
6077
        if (!(this_present_transactionId && that_present_transactionId))
6078
          return false;
6079
        if (this.transactionId != that.transactionId)
6080
          return false;
6081
      }
6082
 
6083
      return true;
6084
    }
6085
 
6086
    @Override
6087
    public int hashCode() {
6088
      return 0;
6089
    }
6090
 
6091
    public int compareTo(getTransactionStatus_args other) {
6092
      if (!getClass().equals(other.getClass())) {
6093
        return getClass().getName().compareTo(other.getClass().getName());
6094
      }
6095
 
6096
      int lastComparison = 0;
6097
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
6098
 
6099
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6100
      if (lastComparison != 0) {
6101
        return lastComparison;
6102
      }
6103
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6104
      if (lastComparison != 0) {
6105
        return lastComparison;
6106
      }
6107
      return 0;
6108
    }
6109
 
6110
    public void read(TProtocol iprot) throws TException {
6111
      TField field;
6112
      iprot.readStructBegin();
6113
      while (true)
6114
      {
6115
        field = iprot.readFieldBegin();
6116
        if (field.type == TType.STOP) { 
6117
          break;
6118
        }
6119
        _Fields fieldId = _Fields.findByThriftId(field.id);
6120
        if (fieldId == null) {
6121
          TProtocolUtil.skip(iprot, field.type);
6122
        } else {
6123
          switch (fieldId) {
6124
            case TRANSACTION_ID:
6125
              if (field.type == TType.I64) {
6126
                this.transactionId = iprot.readI64();
6127
                setTransactionIdIsSet(true);
6128
              } else { 
6129
                TProtocolUtil.skip(iprot, field.type);
6130
              }
6131
              break;
6132
          }
6133
          iprot.readFieldEnd();
6134
        }
6135
      }
6136
      iprot.readStructEnd();
6137
      validate();
6138
    }
6139
 
6140
    public void write(TProtocol oprot) throws TException {
6141
      validate();
6142
 
6143
      oprot.writeStructBegin(STRUCT_DESC);
6144
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6145
      oprot.writeI64(this.transactionId);
6146
      oprot.writeFieldEnd();
6147
      oprot.writeFieldStop();
6148
      oprot.writeStructEnd();
6149
    }
6150
 
6151
    @Override
6152
    public String toString() {
6153
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
6154
      boolean first = true;
6155
 
6156
      sb.append("transactionId:");
6157
      sb.append(this.transactionId);
6158
      first = false;
6159
      sb.append(")");
6160
      return sb.toString();
6161
    }
6162
 
6163
    public void validate() throws TException {
6164
      // check for required fields
6165
    }
6166
 
6167
  }
6168
 
6169
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
6170
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
6171
 
6172
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
6173
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6174
 
6175
    private TransactionStatus success;
6176
    private TransactionServiceException ex;
6177
 
6178
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6179
    public enum _Fields implements TFieldIdEnum {
6180
      /**
6181
       * 
6182
       * @see TransactionStatus
6183
       */
6184
      SUCCESS((short)0, "success"),
6185
      EX((short)1, "ex");
6186
 
6187
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6188
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6189
 
6190
      static {
6191
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6192
          byId.put((int)field._thriftId, field);
6193
          byName.put(field.getFieldName(), field);
6194
        }
6195
      }
6196
 
6197
      /**
6198
       * Find the _Fields constant that matches fieldId, or null if its not found.
6199
       */
6200
      public static _Fields findByThriftId(int fieldId) {
6201
        return byId.get(fieldId);
6202
      }
6203
 
6204
      /**
6205
       * Find the _Fields constant that matches fieldId, throwing an exception
6206
       * if it is not found.
6207
       */
6208
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6209
        _Fields fields = findByThriftId(fieldId);
6210
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6211
        return fields;
6212
      }
6213
 
6214
      /**
6215
       * Find the _Fields constant that matches name, or null if its not found.
6216
       */
6217
      public static _Fields findByName(String name) {
6218
        return byName.get(name);
6219
      }
6220
 
6221
      private final short _thriftId;
6222
      private final String _fieldName;
6223
 
6224
      _Fields(short thriftId, String fieldName) {
6225
        _thriftId = thriftId;
6226
        _fieldName = fieldName;
6227
      }
6228
 
6229
      public short getThriftFieldId() {
6230
        return _thriftId;
6231
      }
6232
 
6233
      public String getFieldName() {
6234
        return _fieldName;
6235
      }
6236
    }
6237
 
6238
    // isset id assignments
6239
 
6240
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6241
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6242
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6243
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6244
          new FieldValueMetaData(TType.STRUCT)));
6245
    }});
6246
 
6247
    static {
6248
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
6249
    }
6250
 
6251
    public getTransactionStatus_result() {
6252
    }
6253
 
6254
    public getTransactionStatus_result(
6255
      TransactionStatus success,
6256
      TransactionServiceException ex)
6257
    {
6258
      this();
6259
      this.success = success;
6260
      this.ex = ex;
6261
    }
6262
 
6263
    /**
6264
     * Performs a deep copy on <i>other</i>.
6265
     */
6266
    public getTransactionStatus_result(getTransactionStatus_result other) {
6267
      if (other.isSetSuccess()) {
6268
        this.success = other.success;
6269
      }
6270
      if (other.isSetEx()) {
6271
        this.ex = new TransactionServiceException(other.ex);
6272
      }
6273
    }
6274
 
6275
    public getTransactionStatus_result deepCopy() {
6276
      return new getTransactionStatus_result(this);
6277
    }
6278
 
6279
    @Deprecated
6280
    public getTransactionStatus_result clone() {
6281
      return new getTransactionStatus_result(this);
6282
    }
6283
 
6284
    /**
6285
     * 
6286
     * @see TransactionStatus
6287
     */
6288
    public TransactionStatus getSuccess() {
6289
      return this.success;
6290
    }
6291
 
6292
    /**
6293
     * 
6294
     * @see TransactionStatus
6295
     */
6296
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
6297
      this.success = success;
6298
      return this;
6299
    }
6300
 
6301
    public void unsetSuccess() {
6302
      this.success = null;
6303
    }
6304
 
6305
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6306
    public boolean isSetSuccess() {
6307
      return this.success != null;
6308
    }
6309
 
6310
    public void setSuccessIsSet(boolean value) {
6311
      if (!value) {
6312
        this.success = null;
6313
      }
6314
    }
6315
 
6316
    public TransactionServiceException getEx() {
6317
      return this.ex;
6318
    }
6319
 
6320
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6321
      this.ex = ex;
6322
      return this;
6323
    }
6324
 
6325
    public void unsetEx() {
6326
      this.ex = null;
6327
    }
6328
 
6329
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6330
    public boolean isSetEx() {
6331
      return this.ex != null;
6332
    }
6333
 
6334
    public void setExIsSet(boolean value) {
6335
      if (!value) {
6336
        this.ex = null;
6337
      }
6338
    }
6339
 
6340
    public void setFieldValue(_Fields field, Object value) {
6341
      switch (field) {
6342
      case SUCCESS:
6343
        if (value == null) {
6344
          unsetSuccess();
6345
        } else {
6346
          setSuccess((TransactionStatus)value);
6347
        }
6348
        break;
6349
 
6350
      case EX:
6351
        if (value == null) {
6352
          unsetEx();
6353
        } else {
6354
          setEx((TransactionServiceException)value);
6355
        }
6356
        break;
6357
 
6358
      }
6359
    }
6360
 
6361
    public void setFieldValue(int fieldID, Object value) {
6362
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6363
    }
6364
 
6365
    public Object getFieldValue(_Fields field) {
6366
      switch (field) {
6367
      case SUCCESS:
6368
        return getSuccess();
6369
 
6370
      case EX:
6371
        return getEx();
6372
 
6373
      }
6374
      throw new IllegalStateException();
6375
    }
6376
 
6377
    public Object getFieldValue(int fieldId) {
6378
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6379
    }
6380
 
6381
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6382
    public boolean isSet(_Fields field) {
6383
      switch (field) {
6384
      case SUCCESS:
6385
        return isSetSuccess();
6386
      case EX:
6387
        return isSetEx();
6388
      }
6389
      throw new IllegalStateException();
6390
    }
6391
 
6392
    public boolean isSet(int fieldID) {
6393
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6394
    }
6395
 
6396
    @Override
6397
    public boolean equals(Object that) {
6398
      if (that == null)
6399
        return false;
6400
      if (that instanceof getTransactionStatus_result)
6401
        return this.equals((getTransactionStatus_result)that);
6402
      return false;
6403
    }
6404
 
6405
    public boolean equals(getTransactionStatus_result that) {
6406
      if (that == null)
6407
        return false;
6408
 
6409
      boolean this_present_success = true && this.isSetSuccess();
6410
      boolean that_present_success = true && that.isSetSuccess();
6411
      if (this_present_success || that_present_success) {
6412
        if (!(this_present_success && that_present_success))
6413
          return false;
6414
        if (!this.success.equals(that.success))
6415
          return false;
6416
      }
6417
 
6418
      boolean this_present_ex = true && this.isSetEx();
6419
      boolean that_present_ex = true && that.isSetEx();
6420
      if (this_present_ex || that_present_ex) {
6421
        if (!(this_present_ex && that_present_ex))
6422
          return false;
6423
        if (!this.ex.equals(that.ex))
6424
          return false;
6425
      }
6426
 
6427
      return true;
6428
    }
6429
 
6430
    @Override
6431
    public int hashCode() {
6432
      return 0;
6433
    }
6434
 
6435
    public int compareTo(getTransactionStatus_result other) {
6436
      if (!getClass().equals(other.getClass())) {
6437
        return getClass().getName().compareTo(other.getClass().getName());
6438
      }
6439
 
6440
      int lastComparison = 0;
6441
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6442
 
6443
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6444
      if (lastComparison != 0) {
6445
        return lastComparison;
6446
      }
6447
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6448
      if (lastComparison != 0) {
6449
        return lastComparison;
6450
      }
6451
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6452
      if (lastComparison != 0) {
6453
        return lastComparison;
6454
      }
6455
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6456
      if (lastComparison != 0) {
6457
        return lastComparison;
6458
      }
6459
      return 0;
6460
    }
6461
 
6462
    public void read(TProtocol iprot) throws TException {
6463
      TField field;
6464
      iprot.readStructBegin();
6465
      while (true)
6466
      {
6467
        field = iprot.readFieldBegin();
6468
        if (field.type == TType.STOP) { 
6469
          break;
6470
        }
6471
        _Fields fieldId = _Fields.findByThriftId(field.id);
6472
        if (fieldId == null) {
6473
          TProtocolUtil.skip(iprot, field.type);
6474
        } else {
6475
          switch (fieldId) {
6476
            case SUCCESS:
6477
              if (field.type == TType.I32) {
6478
                this.success = TransactionStatus.findByValue(iprot.readI32());
6479
              } else { 
6480
                TProtocolUtil.skip(iprot, field.type);
6481
              }
6482
              break;
6483
            case EX:
6484
              if (field.type == TType.STRUCT) {
6485
                this.ex = new TransactionServiceException();
6486
                this.ex.read(iprot);
6487
              } else { 
6488
                TProtocolUtil.skip(iprot, field.type);
6489
              }
6490
              break;
6491
          }
6492
          iprot.readFieldEnd();
6493
        }
6494
      }
6495
      iprot.readStructEnd();
6496
      validate();
6497
    }
6498
 
6499
    public void write(TProtocol oprot) throws TException {
6500
      oprot.writeStructBegin(STRUCT_DESC);
6501
 
6502
      if (this.isSetSuccess()) {
6503
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6504
        oprot.writeI32(this.success.getValue());
6505
        oprot.writeFieldEnd();
6506
      } else if (this.isSetEx()) {
6507
        oprot.writeFieldBegin(EX_FIELD_DESC);
6508
        this.ex.write(oprot);
6509
        oprot.writeFieldEnd();
6510
      }
6511
      oprot.writeFieldStop();
6512
      oprot.writeStructEnd();
6513
    }
6514
 
6515
    @Override
6516
    public String toString() {
6517
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6518
      boolean first = true;
6519
 
6520
      sb.append("success:");
6521
      if (this.success == null) {
6522
        sb.append("null");
6523
      } else {
6524
        String success_name = success.name();
6525
        if (success_name != null) {
6526
          sb.append(success_name);
6527
          sb.append(" (");
6528
        }
6529
        sb.append(this.success);
6530
        if (success_name != null) {
6531
          sb.append(")");
6532
        }
6533
      }
6534
      first = false;
6535
      if (!first) sb.append(", ");
6536
      sb.append("ex:");
6537
      if (this.ex == null) {
6538
        sb.append("null");
6539
      } else {
6540
        sb.append(this.ex);
6541
      }
6542
      first = false;
6543
      sb.append(")");
6544
      return sb.toString();
6545
    }
6546
 
6547
    public void validate() throws TException {
6548
      // check for required fields
6549
    }
6550
 
6551
  }
6552
 
6553
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6554
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6555
 
6556
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6557
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6558
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6559
 
6560
    private long transactionId;
6561
    private TransactionStatus status;
6562
    private String description;
6563
 
6564
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6565
    public enum _Fields implements TFieldIdEnum {
6566
      TRANSACTION_ID((short)1, "transactionId"),
6567
      /**
6568
       * 
6569
       * @see TransactionStatus
6570
       */
6571
      STATUS((short)2, "status"),
6572
      DESCRIPTION((short)3, "description");
6573
 
6574
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6575
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6576
 
6577
      static {
6578
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6579
          byId.put((int)field._thriftId, field);
6580
          byName.put(field.getFieldName(), field);
6581
        }
6582
      }
6583
 
6584
      /**
6585
       * Find the _Fields constant that matches fieldId, or null if its not found.
6586
       */
6587
      public static _Fields findByThriftId(int fieldId) {
6588
        return byId.get(fieldId);
6589
      }
6590
 
6591
      /**
6592
       * Find the _Fields constant that matches fieldId, throwing an exception
6593
       * if it is not found.
6594
       */
6595
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6596
        _Fields fields = findByThriftId(fieldId);
6597
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6598
        return fields;
6599
      }
6600
 
6601
      /**
6602
       * Find the _Fields constant that matches name, or null if its not found.
6603
       */
6604
      public static _Fields findByName(String name) {
6605
        return byName.get(name);
6606
      }
6607
 
6608
      private final short _thriftId;
6609
      private final String _fieldName;
6610
 
6611
      _Fields(short thriftId, String fieldName) {
6612
        _thriftId = thriftId;
6613
        _fieldName = fieldName;
6614
      }
6615
 
6616
      public short getThriftFieldId() {
6617
        return _thriftId;
6618
      }
6619
 
6620
      public String getFieldName() {
6621
        return _fieldName;
6622
      }
6623
    }
6624
 
6625
    // isset id assignments
6626
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6627
    private BitSet __isset_bit_vector = new BitSet(1);
6628
 
6629
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6630
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6631
          new FieldValueMetaData(TType.I64)));
6632
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6633
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6634
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6635
          new FieldValueMetaData(TType.STRING)));
6636
    }});
6637
 
6638
    static {
6639
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6640
    }
6641
 
6642
    public changeTransactionStatus_args() {
6643
    }
6644
 
6645
    public changeTransactionStatus_args(
6646
      long transactionId,
6647
      TransactionStatus status,
6648
      String description)
6649
    {
6650
      this();
6651
      this.transactionId = transactionId;
6652
      setTransactionIdIsSet(true);
6653
      this.status = status;
6654
      this.description = description;
6655
    }
6656
 
6657
    /**
6658
     * Performs a deep copy on <i>other</i>.
6659
     */
6660
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6661
      __isset_bit_vector.clear();
6662
      __isset_bit_vector.or(other.__isset_bit_vector);
6663
      this.transactionId = other.transactionId;
6664
      if (other.isSetStatus()) {
6665
        this.status = other.status;
6666
      }
6667
      if (other.isSetDescription()) {
6668
        this.description = other.description;
6669
      }
6670
    }
6671
 
6672
    public changeTransactionStatus_args deepCopy() {
6673
      return new changeTransactionStatus_args(this);
6674
    }
6675
 
6676
    @Deprecated
6677
    public changeTransactionStatus_args clone() {
6678
      return new changeTransactionStatus_args(this);
6679
    }
6680
 
6681
    public long getTransactionId() {
6682
      return this.transactionId;
6683
    }
6684
 
6685
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6686
      this.transactionId = transactionId;
6687
      setTransactionIdIsSet(true);
6688
      return this;
6689
    }
6690
 
6691
    public void unsetTransactionId() {
6692
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6693
    }
6694
 
6695
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6696
    public boolean isSetTransactionId() {
6697
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6698
    }
6699
 
6700
    public void setTransactionIdIsSet(boolean value) {
6701
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6702
    }
6703
 
6704
    /**
6705
     * 
6706
     * @see TransactionStatus
6707
     */
6708
    public TransactionStatus getStatus() {
6709
      return this.status;
6710
    }
6711
 
6712
    /**
6713
     * 
6714
     * @see TransactionStatus
6715
     */
6716
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6717
      this.status = status;
6718
      return this;
6719
    }
6720
 
6721
    public void unsetStatus() {
6722
      this.status = null;
6723
    }
6724
 
6725
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6726
    public boolean isSetStatus() {
6727
      return this.status != null;
6728
    }
6729
 
6730
    public void setStatusIsSet(boolean value) {
6731
      if (!value) {
6732
        this.status = null;
6733
      }
6734
    }
6735
 
6736
    public String getDescription() {
6737
      return this.description;
6738
    }
6739
 
6740
    public changeTransactionStatus_args setDescription(String description) {
6741
      this.description = description;
6742
      return this;
6743
    }
6744
 
6745
    public void unsetDescription() {
6746
      this.description = null;
6747
    }
6748
 
6749
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6750
    public boolean isSetDescription() {
6751
      return this.description != null;
6752
    }
6753
 
6754
    public void setDescriptionIsSet(boolean value) {
6755
      if (!value) {
6756
        this.description = null;
6757
      }
6758
    }
6759
 
6760
    public void setFieldValue(_Fields field, Object value) {
6761
      switch (field) {
6762
      case TRANSACTION_ID:
6763
        if (value == null) {
6764
          unsetTransactionId();
6765
        } else {
6766
          setTransactionId((Long)value);
6767
        }
6768
        break;
6769
 
6770
      case STATUS:
6771
        if (value == null) {
6772
          unsetStatus();
6773
        } else {
6774
          setStatus((TransactionStatus)value);
6775
        }
6776
        break;
6777
 
6778
      case DESCRIPTION:
6779
        if (value == null) {
6780
          unsetDescription();
6781
        } else {
6782
          setDescription((String)value);
6783
        }
6784
        break;
6785
 
6786
      }
6787
    }
6788
 
6789
    public void setFieldValue(int fieldID, Object value) {
6790
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6791
    }
6792
 
6793
    public Object getFieldValue(_Fields field) {
6794
      switch (field) {
6795
      case TRANSACTION_ID:
6796
        return new Long(getTransactionId());
6797
 
6798
      case STATUS:
6799
        return getStatus();
6800
 
6801
      case DESCRIPTION:
6802
        return getDescription();
6803
 
6804
      }
6805
      throw new IllegalStateException();
6806
    }
6807
 
6808
    public Object getFieldValue(int fieldId) {
6809
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6810
    }
6811
 
6812
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6813
    public boolean isSet(_Fields field) {
6814
      switch (field) {
6815
      case TRANSACTION_ID:
6816
        return isSetTransactionId();
6817
      case STATUS:
6818
        return isSetStatus();
6819
      case DESCRIPTION:
6820
        return isSetDescription();
6821
      }
6822
      throw new IllegalStateException();
6823
    }
6824
 
6825
    public boolean isSet(int fieldID) {
6826
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6827
    }
6828
 
6829
    @Override
6830
    public boolean equals(Object that) {
6831
      if (that == null)
6832
        return false;
6833
      if (that instanceof changeTransactionStatus_args)
6834
        return this.equals((changeTransactionStatus_args)that);
6835
      return false;
6836
    }
6837
 
6838
    public boolean equals(changeTransactionStatus_args that) {
6839
      if (that == null)
6840
        return false;
6841
 
6842
      boolean this_present_transactionId = true;
6843
      boolean that_present_transactionId = true;
6844
      if (this_present_transactionId || that_present_transactionId) {
6845
        if (!(this_present_transactionId && that_present_transactionId))
6846
          return false;
6847
        if (this.transactionId != that.transactionId)
6848
          return false;
6849
      }
6850
 
6851
      boolean this_present_status = true && this.isSetStatus();
6852
      boolean that_present_status = true && that.isSetStatus();
6853
      if (this_present_status || that_present_status) {
6854
        if (!(this_present_status && that_present_status))
6855
          return false;
6856
        if (!this.status.equals(that.status))
6857
          return false;
6858
      }
6859
 
6860
      boolean this_present_description = true && this.isSetDescription();
6861
      boolean that_present_description = true && that.isSetDescription();
6862
      if (this_present_description || that_present_description) {
6863
        if (!(this_present_description && that_present_description))
6864
          return false;
6865
        if (!this.description.equals(that.description))
6866
          return false;
6867
      }
6868
 
6869
      return true;
6870
    }
6871
 
6872
    @Override
6873
    public int hashCode() {
6874
      return 0;
6875
    }
6876
 
6877
    public int compareTo(changeTransactionStatus_args other) {
6878
      if (!getClass().equals(other.getClass())) {
6879
        return getClass().getName().compareTo(other.getClass().getName());
6880
      }
6881
 
6882
      int lastComparison = 0;
6883
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6884
 
6885
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6886
      if (lastComparison != 0) {
6887
        return lastComparison;
6888
      }
6889
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6890
      if (lastComparison != 0) {
6891
        return lastComparison;
6892
      }
6893
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6894
      if (lastComparison != 0) {
6895
        return lastComparison;
6896
      }
6897
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6898
      if (lastComparison != 0) {
6899
        return lastComparison;
6900
      }
6901
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6902
      if (lastComparison != 0) {
6903
        return lastComparison;
6904
      }
6905
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6906
      if (lastComparison != 0) {
6907
        return lastComparison;
6908
      }
6909
      return 0;
6910
    }
6911
 
6912
    public void read(TProtocol iprot) throws TException {
6913
      TField field;
6914
      iprot.readStructBegin();
6915
      while (true)
6916
      {
6917
        field = iprot.readFieldBegin();
6918
        if (field.type == TType.STOP) { 
6919
          break;
6920
        }
6921
        _Fields fieldId = _Fields.findByThriftId(field.id);
6922
        if (fieldId == null) {
6923
          TProtocolUtil.skip(iprot, field.type);
6924
        } else {
6925
          switch (fieldId) {
6926
            case TRANSACTION_ID:
6927
              if (field.type == TType.I64) {
6928
                this.transactionId = iprot.readI64();
6929
                setTransactionIdIsSet(true);
6930
              } else { 
6931
                TProtocolUtil.skip(iprot, field.type);
6932
              }
6933
              break;
6934
            case STATUS:
6935
              if (field.type == TType.I32) {
6936
                this.status = TransactionStatus.findByValue(iprot.readI32());
6937
              } else { 
6938
                TProtocolUtil.skip(iprot, field.type);
6939
              }
6940
              break;
6941
            case DESCRIPTION:
6942
              if (field.type == TType.STRING) {
6943
                this.description = iprot.readString();
6944
              } else { 
6945
                TProtocolUtil.skip(iprot, field.type);
6946
              }
6947
              break;
6948
          }
6949
          iprot.readFieldEnd();
6950
        }
6951
      }
6952
      iprot.readStructEnd();
6953
      validate();
6954
    }
6955
 
6956
    public void write(TProtocol oprot) throws TException {
6957
      validate();
6958
 
6959
      oprot.writeStructBegin(STRUCT_DESC);
6960
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6961
      oprot.writeI64(this.transactionId);
6962
      oprot.writeFieldEnd();
6963
      if (this.status != null) {
6964
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6965
        oprot.writeI32(this.status.getValue());
6966
        oprot.writeFieldEnd();
6967
      }
6968
      if (this.description != null) {
6969
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6970
        oprot.writeString(this.description);
6971
        oprot.writeFieldEnd();
6972
      }
6973
      oprot.writeFieldStop();
6974
      oprot.writeStructEnd();
6975
    }
6976
 
6977
    @Override
6978
    public String toString() {
6979
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6980
      boolean first = true;
6981
 
6982
      sb.append("transactionId:");
6983
      sb.append(this.transactionId);
6984
      first = false;
6985
      if (!first) sb.append(", ");
6986
      sb.append("status:");
6987
      if (this.status == null) {
6988
        sb.append("null");
6989
      } else {
6990
        String status_name = status.name();
6991
        if (status_name != null) {
6992
          sb.append(status_name);
6993
          sb.append(" (");
6994
        }
6995
        sb.append(this.status);
6996
        if (status_name != null) {
6997
          sb.append(")");
6998
        }
6999
      }
7000
      first = false;
7001
      if (!first) sb.append(", ");
7002
      sb.append("description:");
7003
      if (this.description == null) {
7004
        sb.append("null");
7005
      } else {
7006
        sb.append(this.description);
7007
      }
7008
      first = false;
7009
      sb.append(")");
7010
      return sb.toString();
7011
    }
7012
 
7013
    public void validate() throws TException {
7014
      // check for required fields
7015
    }
7016
 
7017
  }
7018
 
7019
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
7020
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
7021
 
7022
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7023
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7024
 
7025
    private boolean success;
7026
    private TransactionServiceException ex;
7027
 
7028
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7029
    public enum _Fields implements TFieldIdEnum {
7030
      SUCCESS((short)0, "success"),
7031
      EX((short)1, "ex");
7032
 
7033
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7034
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7035
 
7036
      static {
7037
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7038
          byId.put((int)field._thriftId, field);
7039
          byName.put(field.getFieldName(), field);
7040
        }
7041
      }
7042
 
7043
      /**
7044
       * Find the _Fields constant that matches fieldId, or null if its not found.
7045
       */
7046
      public static _Fields findByThriftId(int fieldId) {
7047
        return byId.get(fieldId);
7048
      }
7049
 
7050
      /**
7051
       * Find the _Fields constant that matches fieldId, throwing an exception
7052
       * if it is not found.
7053
       */
7054
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7055
        _Fields fields = findByThriftId(fieldId);
7056
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7057
        return fields;
7058
      }
7059
 
7060
      /**
7061
       * Find the _Fields constant that matches name, or null if its not found.
7062
       */
7063
      public static _Fields findByName(String name) {
7064
        return byName.get(name);
7065
      }
7066
 
7067
      private final short _thriftId;
7068
      private final String _fieldName;
7069
 
7070
      _Fields(short thriftId, String fieldName) {
7071
        _thriftId = thriftId;
7072
        _fieldName = fieldName;
7073
      }
7074
 
7075
      public short getThriftFieldId() {
7076
        return _thriftId;
7077
      }
7078
 
7079
      public String getFieldName() {
7080
        return _fieldName;
7081
      }
7082
    }
7083
 
7084
    // isset id assignments
7085
    private static final int __SUCCESS_ISSET_ID = 0;
7086
    private BitSet __isset_bit_vector = new BitSet(1);
7087
 
7088
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7089
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7090
          new FieldValueMetaData(TType.BOOL)));
7091
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7092
          new FieldValueMetaData(TType.STRUCT)));
7093
    }});
7094
 
7095
    static {
7096
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
7097
    }
7098
 
7099
    public changeTransactionStatus_result() {
7100
    }
7101
 
7102
    public changeTransactionStatus_result(
7103
      boolean success,
7104
      TransactionServiceException ex)
7105
    {
7106
      this();
7107
      this.success = success;
7108
      setSuccessIsSet(true);
7109
      this.ex = ex;
7110
    }
7111
 
7112
    /**
7113
     * Performs a deep copy on <i>other</i>.
7114
     */
7115
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
7116
      __isset_bit_vector.clear();
7117
      __isset_bit_vector.or(other.__isset_bit_vector);
7118
      this.success = other.success;
7119
      if (other.isSetEx()) {
7120
        this.ex = new TransactionServiceException(other.ex);
7121
      }
7122
    }
7123
 
7124
    public changeTransactionStatus_result deepCopy() {
7125
      return new changeTransactionStatus_result(this);
7126
    }
7127
 
7128
    @Deprecated
7129
    public changeTransactionStatus_result clone() {
7130
      return new changeTransactionStatus_result(this);
7131
    }
7132
 
7133
    public boolean isSuccess() {
7134
      return this.success;
7135
    }
7136
 
7137
    public changeTransactionStatus_result setSuccess(boolean success) {
7138
      this.success = success;
7139
      setSuccessIsSet(true);
7140
      return this;
7141
    }
7142
 
7143
    public void unsetSuccess() {
7144
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7145
    }
7146
 
7147
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7148
    public boolean isSetSuccess() {
7149
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7150
    }
7151
 
7152
    public void setSuccessIsSet(boolean value) {
7153
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7154
    }
7155
 
7156
    public TransactionServiceException getEx() {
7157
      return this.ex;
7158
    }
7159
 
7160
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
7161
      this.ex = ex;
7162
      return this;
7163
    }
7164
 
7165
    public void unsetEx() {
7166
      this.ex = null;
7167
    }
7168
 
7169
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7170
    public boolean isSetEx() {
7171
      return this.ex != null;
7172
    }
7173
 
7174
    public void setExIsSet(boolean value) {
7175
      if (!value) {
7176
        this.ex = null;
7177
      }
7178
    }
7179
 
7180
    public void setFieldValue(_Fields field, Object value) {
7181
      switch (field) {
7182
      case SUCCESS:
7183
        if (value == null) {
7184
          unsetSuccess();
7185
        } else {
7186
          setSuccess((Boolean)value);
7187
        }
7188
        break;
7189
 
7190
      case EX:
7191
        if (value == null) {
7192
          unsetEx();
7193
        } else {
7194
          setEx((TransactionServiceException)value);
7195
        }
7196
        break;
7197
 
7198
      }
7199
    }
7200
 
7201
    public void setFieldValue(int fieldID, Object value) {
7202
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7203
    }
7204
 
7205
    public Object getFieldValue(_Fields field) {
7206
      switch (field) {
7207
      case SUCCESS:
7208
        return new Boolean(isSuccess());
7209
 
7210
      case EX:
7211
        return getEx();
7212
 
7213
      }
7214
      throw new IllegalStateException();
7215
    }
7216
 
7217
    public Object getFieldValue(int fieldId) {
7218
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7219
    }
7220
 
7221
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7222
    public boolean isSet(_Fields field) {
7223
      switch (field) {
7224
      case SUCCESS:
7225
        return isSetSuccess();
7226
      case EX:
7227
        return isSetEx();
7228
      }
7229
      throw new IllegalStateException();
7230
    }
7231
 
7232
    public boolean isSet(int fieldID) {
7233
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7234
    }
7235
 
7236
    @Override
7237
    public boolean equals(Object that) {
7238
      if (that == null)
7239
        return false;
7240
      if (that instanceof changeTransactionStatus_result)
7241
        return this.equals((changeTransactionStatus_result)that);
7242
      return false;
7243
    }
7244
 
7245
    public boolean equals(changeTransactionStatus_result that) {
7246
      if (that == null)
7247
        return false;
7248
 
7249
      boolean this_present_success = true;
7250
      boolean that_present_success = true;
7251
      if (this_present_success || that_present_success) {
7252
        if (!(this_present_success && that_present_success))
7253
          return false;
7254
        if (this.success != that.success)
7255
          return false;
7256
      }
7257
 
7258
      boolean this_present_ex = true && this.isSetEx();
7259
      boolean that_present_ex = true && that.isSetEx();
7260
      if (this_present_ex || that_present_ex) {
7261
        if (!(this_present_ex && that_present_ex))
7262
          return false;
7263
        if (!this.ex.equals(that.ex))
7264
          return false;
7265
      }
7266
 
7267
      return true;
7268
    }
7269
 
7270
    @Override
7271
    public int hashCode() {
7272
      return 0;
7273
    }
7274
 
7275
    public int compareTo(changeTransactionStatus_result other) {
7276
      if (!getClass().equals(other.getClass())) {
7277
        return getClass().getName().compareTo(other.getClass().getName());
7278
      }
7279
 
7280
      int lastComparison = 0;
7281
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
7282
 
7283
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7284
      if (lastComparison != 0) {
7285
        return lastComparison;
7286
      }
7287
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7288
      if (lastComparison != 0) {
7289
        return lastComparison;
7290
      }
7291
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7292
      if (lastComparison != 0) {
7293
        return lastComparison;
7294
      }
7295
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7296
      if (lastComparison != 0) {
7297
        return lastComparison;
7298
      }
7299
      return 0;
7300
    }
7301
 
7302
    public void read(TProtocol iprot) throws TException {
7303
      TField field;
7304
      iprot.readStructBegin();
7305
      while (true)
7306
      {
7307
        field = iprot.readFieldBegin();
7308
        if (field.type == TType.STOP) { 
7309
          break;
7310
        }
7311
        _Fields fieldId = _Fields.findByThriftId(field.id);
7312
        if (fieldId == null) {
7313
          TProtocolUtil.skip(iprot, field.type);
7314
        } else {
7315
          switch (fieldId) {
7316
            case SUCCESS:
7317
              if (field.type == TType.BOOL) {
7318
                this.success = iprot.readBool();
7319
                setSuccessIsSet(true);
7320
              } else { 
7321
                TProtocolUtil.skip(iprot, field.type);
7322
              }
7323
              break;
7324
            case EX:
7325
              if (field.type == TType.STRUCT) {
7326
                this.ex = new TransactionServiceException();
7327
                this.ex.read(iprot);
7328
              } else { 
7329
                TProtocolUtil.skip(iprot, field.type);
7330
              }
7331
              break;
7332
          }
7333
          iprot.readFieldEnd();
7334
        }
7335
      }
7336
      iprot.readStructEnd();
7337
      validate();
7338
    }
7339
 
7340
    public void write(TProtocol oprot) throws TException {
7341
      oprot.writeStructBegin(STRUCT_DESC);
7342
 
7343
      if (this.isSetSuccess()) {
7344
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7345
        oprot.writeBool(this.success);
7346
        oprot.writeFieldEnd();
7347
      } else if (this.isSetEx()) {
7348
        oprot.writeFieldBegin(EX_FIELD_DESC);
7349
        this.ex.write(oprot);
7350
        oprot.writeFieldEnd();
7351
      }
7352
      oprot.writeFieldStop();
7353
      oprot.writeStructEnd();
7354
    }
7355
 
7356
    @Override
7357
    public String toString() {
7358
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7359
      boolean first = true;
7360
 
7361
      sb.append("success:");
7362
      sb.append(this.success);
7363
      first = false;
7364
      if (!first) sb.append(", ");
7365
      sb.append("ex:");
7366
      if (this.ex == null) {
7367
        sb.append("null");
7368
      } else {
7369
        sb.append(this.ex);
7370
      }
7371
      first = false;
7372
      sb.append(")");
7373
      return sb.toString();
7374
    }
7375
 
7376
    public void validate() throws TException {
7377
      // check for required fields
7378
    }
7379
 
7380
  }
7381
 
1398 varun.gupt 7382
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7383
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7384
 
7385
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7386
 
7387
    private long transactionId;
7388
 
7389
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7390
    public enum _Fields implements TFieldIdEnum {
7391
      TRANSACTION_ID((short)1, "transactionId");
7392
 
7393
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7394
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7395
 
7396
      static {
7397
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7398
          byId.put((int)field._thriftId, field);
7399
          byName.put(field.getFieldName(), field);
7400
        }
7401
      }
7402
 
7403
      /**
7404
       * Find the _Fields constant that matches fieldId, or null if its not found.
7405
       */
7406
      public static _Fields findByThriftId(int fieldId) {
7407
        return byId.get(fieldId);
7408
      }
7409
 
7410
      /**
7411
       * Find the _Fields constant that matches fieldId, throwing an exception
7412
       * if it is not found.
7413
       */
7414
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7415
        _Fields fields = findByThriftId(fieldId);
7416
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7417
        return fields;
7418
      }
7419
 
7420
      /**
7421
       * Find the _Fields constant that matches name, or null if its not found.
7422
       */
7423
      public static _Fields findByName(String name) {
7424
        return byName.get(name);
7425
      }
7426
 
7427
      private final short _thriftId;
7428
      private final String _fieldName;
7429
 
7430
      _Fields(short thriftId, String fieldName) {
7431
        _thriftId = thriftId;
7432
        _fieldName = fieldName;
7433
      }
7434
 
7435
      public short getThriftFieldId() {
7436
        return _thriftId;
7437
      }
7438
 
7439
      public String getFieldName() {
7440
        return _fieldName;
7441
      }
7442
    }
7443
 
7444
    // isset id assignments
7445
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7446
    private BitSet __isset_bit_vector = new BitSet(1);
7447
 
7448
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7449
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7450
          new FieldValueMetaData(TType.I64)));
7451
    }});
7452
 
7453
    static {
1398 varun.gupt 7454
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7455
    }
7456
 
1398 varun.gupt 7457
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7458
    }
7459
 
1398 varun.gupt 7460
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7461
      long transactionId)
7462
    {
7463
      this();
7464
      this.transactionId = transactionId;
7465
      setTransactionIdIsSet(true);
7466
    }
7467
 
7468
    /**
7469
     * Performs a deep copy on <i>other</i>.
7470
     */
1398 varun.gupt 7471
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7472
      __isset_bit_vector.clear();
7473
      __isset_bit_vector.or(other.__isset_bit_vector);
7474
      this.transactionId = other.transactionId;
7475
    }
7476
 
1398 varun.gupt 7477
    public enqueueTransactionInfoEmail_args deepCopy() {
7478
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7479
    }
7480
 
7481
    @Deprecated
1398 varun.gupt 7482
    public enqueueTransactionInfoEmail_args clone() {
7483
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7484
    }
7485
 
7486
    public long getTransactionId() {
7487
      return this.transactionId;
7488
    }
7489
 
1398 varun.gupt 7490
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7491
      this.transactionId = transactionId;
7492
      setTransactionIdIsSet(true);
7493
      return this;
7494
    }
7495
 
7496
    public void unsetTransactionId() {
7497
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7498
    }
7499
 
7500
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7501
    public boolean isSetTransactionId() {
7502
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7503
    }
7504
 
7505
    public void setTransactionIdIsSet(boolean value) {
7506
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7507
    }
7508
 
7509
    public void setFieldValue(_Fields field, Object value) {
7510
      switch (field) {
7511
      case TRANSACTION_ID:
7512
        if (value == null) {
7513
          unsetTransactionId();
7514
        } else {
7515
          setTransactionId((Long)value);
7516
        }
7517
        break;
7518
 
7519
      }
7520
    }
7521
 
7522
    public void setFieldValue(int fieldID, Object value) {
7523
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7524
    }
7525
 
7526
    public Object getFieldValue(_Fields field) {
7527
      switch (field) {
7528
      case TRANSACTION_ID:
7529
        return new Long(getTransactionId());
7530
 
7531
      }
7532
      throw new IllegalStateException();
7533
    }
7534
 
7535
    public Object getFieldValue(int fieldId) {
7536
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7537
    }
7538
 
7539
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7540
    public boolean isSet(_Fields field) {
7541
      switch (field) {
7542
      case TRANSACTION_ID:
7543
        return isSetTransactionId();
7544
      }
7545
      throw new IllegalStateException();
7546
    }
7547
 
7548
    public boolean isSet(int fieldID) {
7549
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7550
    }
7551
 
7552
    @Override
7553
    public boolean equals(Object that) {
7554
      if (that == null)
7555
        return false;
1398 varun.gupt 7556
      if (that instanceof enqueueTransactionInfoEmail_args)
7557
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7558
      return false;
7559
    }
7560
 
1398 varun.gupt 7561
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7562
      if (that == null)
7563
        return false;
7564
 
7565
      boolean this_present_transactionId = true;
7566
      boolean that_present_transactionId = true;
7567
      if (this_present_transactionId || that_present_transactionId) {
7568
        if (!(this_present_transactionId && that_present_transactionId))
7569
          return false;
7570
        if (this.transactionId != that.transactionId)
7571
          return false;
7572
      }
7573
 
7574
      return true;
7575
    }
7576
 
7577
    @Override
7578
    public int hashCode() {
7579
      return 0;
7580
    }
7581
 
1398 varun.gupt 7582
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7583
      if (!getClass().equals(other.getClass())) {
7584
        return getClass().getName().compareTo(other.getClass().getName());
7585
      }
7586
 
7587
      int lastComparison = 0;
1398 varun.gupt 7588
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7589
 
7590
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7591
      if (lastComparison != 0) {
7592
        return lastComparison;
7593
      }
7594
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7595
      if (lastComparison != 0) {
7596
        return lastComparison;
7597
      }
7598
      return 0;
7599
    }
7600
 
7601
    public void read(TProtocol iprot) throws TException {
7602
      TField field;
7603
      iprot.readStructBegin();
7604
      while (true)
7605
      {
7606
        field = iprot.readFieldBegin();
7607
        if (field.type == TType.STOP) { 
7608
          break;
7609
        }
7610
        _Fields fieldId = _Fields.findByThriftId(field.id);
7611
        if (fieldId == null) {
7612
          TProtocolUtil.skip(iprot, field.type);
7613
        } else {
7614
          switch (fieldId) {
7615
            case TRANSACTION_ID:
7616
              if (field.type == TType.I64) {
7617
                this.transactionId = iprot.readI64();
7618
                setTransactionIdIsSet(true);
7619
              } else { 
7620
                TProtocolUtil.skip(iprot, field.type);
7621
              }
7622
              break;
7623
          }
7624
          iprot.readFieldEnd();
7625
        }
7626
      }
7627
      iprot.readStructEnd();
7628
      validate();
7629
    }
7630
 
7631
    public void write(TProtocol oprot) throws TException {
7632
      validate();
7633
 
7634
      oprot.writeStructBegin(STRUCT_DESC);
7635
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7636
      oprot.writeI64(this.transactionId);
7637
      oprot.writeFieldEnd();
7638
      oprot.writeFieldStop();
7639
      oprot.writeStructEnd();
7640
    }
7641
 
7642
    @Override
7643
    public String toString() {
1398 varun.gupt 7644
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 7645
      boolean first = true;
7646
 
7647
      sb.append("transactionId:");
7648
      sb.append(this.transactionId);
7649
      first = false;
7650
      sb.append(")");
7651
      return sb.toString();
7652
    }
7653
 
7654
    public void validate() throws TException {
7655
      // check for required fields
7656
    }
7657
 
7658
  }
7659
 
1398 varun.gupt 7660
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
7661
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 7662
 
7663
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7664
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7665
 
7666
    private boolean success;
7667
    private TransactionServiceException ex;
7668
 
7669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7670
    public enum _Fields implements TFieldIdEnum {
7671
      SUCCESS((short)0, "success"),
7672
      EX((short)1, "ex");
7673
 
7674
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7675
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7676
 
7677
      static {
7678
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7679
          byId.put((int)field._thriftId, field);
7680
          byName.put(field.getFieldName(), field);
7681
        }
7682
      }
7683
 
7684
      /**
7685
       * Find the _Fields constant that matches fieldId, or null if its not found.
7686
       */
7687
      public static _Fields findByThriftId(int fieldId) {
7688
        return byId.get(fieldId);
7689
      }
7690
 
7691
      /**
7692
       * Find the _Fields constant that matches fieldId, throwing an exception
7693
       * if it is not found.
7694
       */
7695
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7696
        _Fields fields = findByThriftId(fieldId);
7697
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7698
        return fields;
7699
      }
7700
 
7701
      /**
7702
       * Find the _Fields constant that matches name, or null if its not found.
7703
       */
7704
      public static _Fields findByName(String name) {
7705
        return byName.get(name);
7706
      }
7707
 
7708
      private final short _thriftId;
7709
      private final String _fieldName;
7710
 
7711
      _Fields(short thriftId, String fieldName) {
7712
        _thriftId = thriftId;
7713
        _fieldName = fieldName;
7714
      }
7715
 
7716
      public short getThriftFieldId() {
7717
        return _thriftId;
7718
      }
7719
 
7720
      public String getFieldName() {
7721
        return _fieldName;
7722
      }
7723
    }
7724
 
7725
    // isset id assignments
7726
    private static final int __SUCCESS_ISSET_ID = 0;
7727
    private BitSet __isset_bit_vector = new BitSet(1);
7728
 
7729
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7730
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7731
          new FieldValueMetaData(TType.BOOL)));
7732
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7733
          new FieldValueMetaData(TType.STRUCT)));
7734
    }});
7735
 
7736
    static {
1398 varun.gupt 7737
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 7738
    }
7739
 
1398 varun.gupt 7740
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 7741
    }
7742
 
1398 varun.gupt 7743
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 7744
      boolean success,
7745
      TransactionServiceException ex)
7746
    {
7747
      this();
7748
      this.success = success;
7749
      setSuccessIsSet(true);
7750
      this.ex = ex;
7751
    }
7752
 
7753
    /**
7754
     * Performs a deep copy on <i>other</i>.
7755
     */
1398 varun.gupt 7756
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7757
      __isset_bit_vector.clear();
7758
      __isset_bit_vector.or(other.__isset_bit_vector);
7759
      this.success = other.success;
7760
      if (other.isSetEx()) {
7761
        this.ex = new TransactionServiceException(other.ex);
7762
      }
7763
    }
7764
 
1398 varun.gupt 7765
    public enqueueTransactionInfoEmail_result deepCopy() {
7766
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7767
    }
7768
 
7769
    @Deprecated
1398 varun.gupt 7770
    public enqueueTransactionInfoEmail_result clone() {
7771
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7772
    }
7773
 
7774
    public boolean isSuccess() {
7775
      return this.success;
7776
    }
7777
 
1398 varun.gupt 7778
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 7779
      this.success = success;
7780
      setSuccessIsSet(true);
7781
      return this;
7782
    }
7783
 
7784
    public void unsetSuccess() {
7785
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7786
    }
7787
 
7788
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7789
    public boolean isSetSuccess() {
7790
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7791
    }
7792
 
7793
    public void setSuccessIsSet(boolean value) {
7794
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7795
    }
7796
 
7797
    public TransactionServiceException getEx() {
7798
      return this.ex;
7799
    }
7800
 
1398 varun.gupt 7801
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 7802
      this.ex = ex;
7803
      return this;
7804
    }
7805
 
7806
    public void unsetEx() {
7807
      this.ex = null;
7808
    }
7809
 
7810
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7811
    public boolean isSetEx() {
7812
      return this.ex != null;
7813
    }
7814
 
7815
    public void setExIsSet(boolean value) {
7816
      if (!value) {
7817
        this.ex = null;
7818
      }
7819
    }
7820
 
7821
    public void setFieldValue(_Fields field, Object value) {
7822
      switch (field) {
7823
      case SUCCESS:
7824
        if (value == null) {
7825
          unsetSuccess();
7826
        } else {
7827
          setSuccess((Boolean)value);
7828
        }
7829
        break;
7830
 
7831
      case EX:
7832
        if (value == null) {
7833
          unsetEx();
7834
        } else {
7835
          setEx((TransactionServiceException)value);
7836
        }
7837
        break;
7838
 
7839
      }
7840
    }
7841
 
7842
    public void setFieldValue(int fieldID, Object value) {
7843
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7844
    }
7845
 
7846
    public Object getFieldValue(_Fields field) {
7847
      switch (field) {
7848
      case SUCCESS:
7849
        return new Boolean(isSuccess());
7850
 
7851
      case EX:
7852
        return getEx();
7853
 
7854
      }
7855
      throw new IllegalStateException();
7856
    }
7857
 
7858
    public Object getFieldValue(int fieldId) {
7859
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7860
    }
7861
 
7862
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7863
    public boolean isSet(_Fields field) {
7864
      switch (field) {
7865
      case SUCCESS:
7866
        return isSetSuccess();
7867
      case EX:
7868
        return isSetEx();
7869
      }
7870
      throw new IllegalStateException();
7871
    }
7872
 
7873
    public boolean isSet(int fieldID) {
7874
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7875
    }
7876
 
7877
    @Override
7878
    public boolean equals(Object that) {
7879
      if (that == null)
7880
        return false;
1398 varun.gupt 7881
      if (that instanceof enqueueTransactionInfoEmail_result)
7882
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 7883
      return false;
7884
    }
7885
 
1398 varun.gupt 7886
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 7887
      if (that == null)
7888
        return false;
7889
 
7890
      boolean this_present_success = true;
7891
      boolean that_present_success = true;
7892
      if (this_present_success || that_present_success) {
7893
        if (!(this_present_success && that_present_success))
7894
          return false;
7895
        if (this.success != that.success)
7896
          return false;
7897
      }
7898
 
7899
      boolean this_present_ex = true && this.isSetEx();
7900
      boolean that_present_ex = true && that.isSetEx();
7901
      if (this_present_ex || that_present_ex) {
7902
        if (!(this_present_ex && that_present_ex))
7903
          return false;
7904
        if (!this.ex.equals(that.ex))
7905
          return false;
7906
      }
7907
 
7908
      return true;
7909
    }
7910
 
7911
    @Override
7912
    public int hashCode() {
7913
      return 0;
7914
    }
7915
 
1398 varun.gupt 7916
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7917
      if (!getClass().equals(other.getClass())) {
7918
        return getClass().getName().compareTo(other.getClass().getName());
7919
      }
7920
 
7921
      int lastComparison = 0;
1398 varun.gupt 7922
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 7923
 
7924
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7925
      if (lastComparison != 0) {
7926
        return lastComparison;
7927
      }
7928
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7929
      if (lastComparison != 0) {
7930
        return lastComparison;
7931
      }
7932
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7933
      if (lastComparison != 0) {
7934
        return lastComparison;
7935
      }
7936
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7937
      if (lastComparison != 0) {
7938
        return lastComparison;
7939
      }
7940
      return 0;
7941
    }
7942
 
7943
    public void read(TProtocol iprot) throws TException {
7944
      TField field;
7945
      iprot.readStructBegin();
7946
      while (true)
7947
      {
7948
        field = iprot.readFieldBegin();
7949
        if (field.type == TType.STOP) { 
7950
          break;
7951
        }
7952
        _Fields fieldId = _Fields.findByThriftId(field.id);
7953
        if (fieldId == null) {
7954
          TProtocolUtil.skip(iprot, field.type);
7955
        } else {
7956
          switch (fieldId) {
7957
            case SUCCESS:
7958
              if (field.type == TType.BOOL) {
7959
                this.success = iprot.readBool();
7960
                setSuccessIsSet(true);
7961
              } else { 
7962
                TProtocolUtil.skip(iprot, field.type);
7963
              }
7964
              break;
7965
            case EX:
7966
              if (field.type == TType.STRUCT) {
7967
                this.ex = new TransactionServiceException();
7968
                this.ex.read(iprot);
7969
              } else { 
7970
                TProtocolUtil.skip(iprot, field.type);
7971
              }
7972
              break;
7973
          }
7974
          iprot.readFieldEnd();
7975
        }
7976
      }
7977
      iprot.readStructEnd();
7978
      validate();
7979
    }
7980
 
7981
    public void write(TProtocol oprot) throws TException {
7982
      oprot.writeStructBegin(STRUCT_DESC);
7983
 
7984
      if (this.isSetSuccess()) {
7985
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7986
        oprot.writeBool(this.success);
7987
        oprot.writeFieldEnd();
7988
      } else if (this.isSetEx()) {
7989
        oprot.writeFieldBegin(EX_FIELD_DESC);
7990
        this.ex.write(oprot);
7991
        oprot.writeFieldEnd();
7992
      }
7993
      oprot.writeFieldStop();
7994
      oprot.writeStructEnd();
7995
    }
7996
 
7997
    @Override
7998
    public String toString() {
1398 varun.gupt 7999
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 8000
      boolean first = true;
8001
 
8002
      sb.append("success:");
8003
      sb.append(this.success);
8004
      first = false;
8005
      if (!first) sb.append(", ");
8006
      sb.append("ex:");
8007
      if (this.ex == null) {
8008
        sb.append("null");
8009
      } else {
8010
        sb.append(this.ex);
8011
      }
8012
      first = false;
8013
      sb.append(")");
8014
      return sb.toString();
8015
    }
8016
 
8017
    public void validate() throws TException {
8018
      // check for required fields
8019
    }
8020
 
8021
  }
8022
 
483 rajveer 8023
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
8024
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 8025
 
483 rajveer 8026
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8027
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
8028
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
8029
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 8030
 
483 rajveer 8031
    private OrderStatus status;
8032
    private long from_date;
8033
    private long to_date;
8034
    private long warehouse_id;
68 ashish 8035
 
8036
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8037
    public enum _Fields implements TFieldIdEnum {
483 rajveer 8038
      /**
8039
       * 
8040
       * @see OrderStatus
8041
       */
8042
      STATUS((short)1, "status"),
8043
      FROM_DATE((short)2, "from_date"),
8044
      TO_DATE((short)3, "to_date"),
8045
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 8046
 
8047
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8048
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8049
 
8050
      static {
8051
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8052
          byId.put((int)field._thriftId, field);
8053
          byName.put(field.getFieldName(), field);
8054
        }
8055
      }
8056
 
8057
      /**
8058
       * Find the _Fields constant that matches fieldId, or null if its not found.
8059
       */
8060
      public static _Fields findByThriftId(int fieldId) {
8061
        return byId.get(fieldId);
8062
      }
8063
 
8064
      /**
8065
       * Find the _Fields constant that matches fieldId, throwing an exception
8066
       * if it is not found.
8067
       */
8068
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8069
        _Fields fields = findByThriftId(fieldId);
8070
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8071
        return fields;
8072
      }
8073
 
8074
      /**
8075
       * Find the _Fields constant that matches name, or null if its not found.
8076
       */
8077
      public static _Fields findByName(String name) {
8078
        return byName.get(name);
8079
      }
8080
 
8081
      private final short _thriftId;
8082
      private final String _fieldName;
8083
 
8084
      _Fields(short thriftId, String fieldName) {
8085
        _thriftId = thriftId;
8086
        _fieldName = fieldName;
8087
      }
8088
 
8089
      public short getThriftFieldId() {
8090
        return _thriftId;
8091
      }
8092
 
8093
      public String getFieldName() {
8094
        return _fieldName;
8095
      }
8096
    }
8097
 
8098
    // isset id assignments
483 rajveer 8099
    private static final int __FROM_DATE_ISSET_ID = 0;
8100
    private static final int __TO_DATE_ISSET_ID = 1;
8101
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8102
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 8103
 
8104
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 8105
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8106
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8107
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 8108
          new FieldValueMetaData(TType.I64)));
483 rajveer 8109
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
8110
          new FieldValueMetaData(TType.I64)));
8111
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8112
          new FieldValueMetaData(TType.I64)));
68 ashish 8113
    }});
8114
 
8115
    static {
483 rajveer 8116
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 8117
    }
8118
 
483 rajveer 8119
    public getAllOrders_args() {
68 ashish 8120
    }
8121
 
483 rajveer 8122
    public getAllOrders_args(
8123
      OrderStatus status,
8124
      long from_date,
8125
      long to_date,
8126
      long warehouse_id)
68 ashish 8127
    {
8128
      this();
483 rajveer 8129
      this.status = status;
8130
      this.from_date = from_date;
8131
      setFrom_dateIsSet(true);
8132
      this.to_date = to_date;
8133
      setTo_dateIsSet(true);
8134
      this.warehouse_id = warehouse_id;
8135
      setWarehouse_idIsSet(true);
68 ashish 8136
    }
8137
 
8138
    /**
8139
     * Performs a deep copy on <i>other</i>.
8140
     */
483 rajveer 8141
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 8142
      __isset_bit_vector.clear();
8143
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 8144
      if (other.isSetStatus()) {
8145
        this.status = other.status;
8146
      }
8147
      this.from_date = other.from_date;
8148
      this.to_date = other.to_date;
8149
      this.warehouse_id = other.warehouse_id;
68 ashish 8150
    }
8151
 
483 rajveer 8152
    public getAllOrders_args deepCopy() {
8153
      return new getAllOrders_args(this);
68 ashish 8154
    }
8155
 
8156
    @Deprecated
483 rajveer 8157
    public getAllOrders_args clone() {
8158
      return new getAllOrders_args(this);
68 ashish 8159
    }
8160
 
483 rajveer 8161
    /**
8162
     * 
8163
     * @see OrderStatus
8164
     */
8165
    public OrderStatus getStatus() {
8166
      return this.status;
68 ashish 8167
    }
8168
 
483 rajveer 8169
    /**
8170
     * 
8171
     * @see OrderStatus
8172
     */
8173
    public getAllOrders_args setStatus(OrderStatus status) {
8174
      this.status = status;
68 ashish 8175
      return this;
8176
    }
8177
 
483 rajveer 8178
    public void unsetStatus() {
8179
      this.status = null;
68 ashish 8180
    }
8181
 
483 rajveer 8182
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8183
    public boolean isSetStatus() {
8184
      return this.status != null;
68 ashish 8185
    }
8186
 
483 rajveer 8187
    public void setStatusIsSet(boolean value) {
8188
      if (!value) {
8189
        this.status = null;
68 ashish 8190
      }
8191
    }
8192
 
483 rajveer 8193
    public long getFrom_date() {
8194
      return this.from_date;
68 ashish 8195
    }
8196
 
483 rajveer 8197
    public getAllOrders_args setFrom_date(long from_date) {
8198
      this.from_date = from_date;
8199
      setFrom_dateIsSet(true);
8200
      return this;
68 ashish 8201
    }
8202
 
483 rajveer 8203
    public void unsetFrom_date() {
8204
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 8205
    }
8206
 
483 rajveer 8207
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
8208
    public boolean isSetFrom_date() {
8209
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 8210
    }
8211
 
483 rajveer 8212
    public void setFrom_dateIsSet(boolean value) {
8213
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 8214
    }
8215
 
483 rajveer 8216
    public long getTo_date() {
8217
      return this.to_date;
68 ashish 8218
    }
8219
 
483 rajveer 8220
    public getAllOrders_args setTo_date(long to_date) {
8221
      this.to_date = to_date;
8222
      setTo_dateIsSet(true);
68 ashish 8223
      return this;
8224
    }
8225
 
483 rajveer 8226
    public void unsetTo_date() {
8227
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 8228
    }
8229
 
483 rajveer 8230
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
8231
    public boolean isSetTo_date() {
8232
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 8233
    }
8234
 
483 rajveer 8235
    public void setTo_dateIsSet(boolean value) {
8236
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 8237
    }
8238
 
483 rajveer 8239
    public long getWarehouse_id() {
8240
      return this.warehouse_id;
68 ashish 8241
    }
8242
 
483 rajveer 8243
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
8244
      this.warehouse_id = warehouse_id;
8245
      setWarehouse_idIsSet(true);
68 ashish 8246
      return this;
8247
    }
8248
 
483 rajveer 8249
    public void unsetWarehouse_id() {
8250
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8251
    }
8252
 
483 rajveer 8253
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8254
    public boolean isSetWarehouse_id() {
8255
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8256
    }
8257
 
483 rajveer 8258
    public void setWarehouse_idIsSet(boolean value) {
8259
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 8260
    }
8261
 
8262
    public void setFieldValue(_Fields field, Object value) {
8263
      switch (field) {
483 rajveer 8264
      case STATUS:
68 ashish 8265
        if (value == null) {
483 rajveer 8266
          unsetStatus();
68 ashish 8267
        } else {
483 rajveer 8268
          setStatus((OrderStatus)value);
68 ashish 8269
        }
8270
        break;
8271
 
483 rajveer 8272
      case FROM_DATE:
68 ashish 8273
        if (value == null) {
483 rajveer 8274
          unsetFrom_date();
68 ashish 8275
        } else {
483 rajveer 8276
          setFrom_date((Long)value);
68 ashish 8277
        }
8278
        break;
8279
 
483 rajveer 8280
      case TO_DATE:
8281
        if (value == null) {
8282
          unsetTo_date();
8283
        } else {
8284
          setTo_date((Long)value);
8285
        }
8286
        break;
8287
 
8288
      case WAREHOUSE_ID:
8289
        if (value == null) {
8290
          unsetWarehouse_id();
8291
        } else {
8292
          setWarehouse_id((Long)value);
8293
        }
8294
        break;
8295
 
68 ashish 8296
      }
8297
    }
8298
 
8299
    public void setFieldValue(int fieldID, Object value) {
8300
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8301
    }
8302
 
8303
    public Object getFieldValue(_Fields field) {
8304
      switch (field) {
483 rajveer 8305
      case STATUS:
8306
        return getStatus();
68 ashish 8307
 
483 rajveer 8308
      case FROM_DATE:
8309
        return new Long(getFrom_date());
68 ashish 8310
 
483 rajveer 8311
      case TO_DATE:
8312
        return new Long(getTo_date());
8313
 
8314
      case WAREHOUSE_ID:
8315
        return new Long(getWarehouse_id());
8316
 
68 ashish 8317
      }
8318
      throw new IllegalStateException();
8319
    }
8320
 
8321
    public Object getFieldValue(int fieldId) {
8322
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8323
    }
8324
 
8325
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8326
    public boolean isSet(_Fields field) {
8327
      switch (field) {
483 rajveer 8328
      case STATUS:
8329
        return isSetStatus();
8330
      case FROM_DATE:
8331
        return isSetFrom_date();
8332
      case TO_DATE:
8333
        return isSetTo_date();
8334
      case WAREHOUSE_ID:
8335
        return isSetWarehouse_id();
68 ashish 8336
      }
8337
      throw new IllegalStateException();
8338
    }
8339
 
8340
    public boolean isSet(int fieldID) {
8341
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8342
    }
8343
 
8344
    @Override
8345
    public boolean equals(Object that) {
8346
      if (that == null)
8347
        return false;
483 rajveer 8348
      if (that instanceof getAllOrders_args)
8349
        return this.equals((getAllOrders_args)that);
68 ashish 8350
      return false;
8351
    }
8352
 
483 rajveer 8353
    public boolean equals(getAllOrders_args that) {
68 ashish 8354
      if (that == null)
8355
        return false;
8356
 
483 rajveer 8357
      boolean this_present_status = true && this.isSetStatus();
8358
      boolean that_present_status = true && that.isSetStatus();
8359
      if (this_present_status || that_present_status) {
8360
        if (!(this_present_status && that_present_status))
68 ashish 8361
          return false;
483 rajveer 8362
        if (!this.status.equals(that.status))
68 ashish 8363
          return false;
8364
      }
8365
 
483 rajveer 8366
      boolean this_present_from_date = true;
8367
      boolean that_present_from_date = true;
8368
      if (this_present_from_date || that_present_from_date) {
8369
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8370
          return false;
483 rajveer 8371
        if (this.from_date != that.from_date)
68 ashish 8372
          return false;
8373
      }
8374
 
483 rajveer 8375
      boolean this_present_to_date = true;
8376
      boolean that_present_to_date = true;
8377
      if (this_present_to_date || that_present_to_date) {
8378
        if (!(this_present_to_date && that_present_to_date))
8379
          return false;
8380
        if (this.to_date != that.to_date)
8381
          return false;
68 ashish 8382
      }
8383
 
483 rajveer 8384
      boolean this_present_warehouse_id = true;
8385
      boolean that_present_warehouse_id = true;
8386
      if (this_present_warehouse_id || that_present_warehouse_id) {
8387
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8388
          return false;
483 rajveer 8389
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8390
          return false;
8391
      }
8392
 
8393
      return true;
8394
    }
8395
 
8396
    @Override
8397
    public int hashCode() {
8398
      return 0;
8399
    }
8400
 
483 rajveer 8401
    public int compareTo(getAllOrders_args other) {
68 ashish 8402
      if (!getClass().equals(other.getClass())) {
8403
        return getClass().getName().compareTo(other.getClass().getName());
8404
      }
8405
 
8406
      int lastComparison = 0;
483 rajveer 8407
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8408
 
483 rajveer 8409
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8410
      if (lastComparison != 0) {
8411
        return lastComparison;
8412
      }
483 rajveer 8413
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8414
      if (lastComparison != 0) {
8415
        return lastComparison;
8416
      }
483 rajveer 8417
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8418
      if (lastComparison != 0) {
8419
        return lastComparison;
8420
      }
8421
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8422
      if (lastComparison != 0) {
8423
        return lastComparison;
8424
      }
8425
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8426
      if (lastComparison != 0) {
8427
        return lastComparison;
8428
      }
8429
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8430
      if (lastComparison != 0) {
8431
        return lastComparison;
8432
      }
8433
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8434
      if (lastComparison != 0) {
8435
        return lastComparison;
8436
      }
8437
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8438
      if (lastComparison != 0) {
8439
        return lastComparison;
8440
      }
68 ashish 8441
      return 0;
8442
    }
8443
 
8444
    public void read(TProtocol iprot) throws TException {
8445
      TField field;
8446
      iprot.readStructBegin();
8447
      while (true)
8448
      {
8449
        field = iprot.readFieldBegin();
8450
        if (field.type == TType.STOP) { 
8451
          break;
8452
        }
8453
        _Fields fieldId = _Fields.findByThriftId(field.id);
8454
        if (fieldId == null) {
8455
          TProtocolUtil.skip(iprot, field.type);
8456
        } else {
8457
          switch (fieldId) {
483 rajveer 8458
            case STATUS:
8459
              if (field.type == TType.I32) {
8460
                this.status = OrderStatus.findByValue(iprot.readI32());
8461
              } else { 
8462
                TProtocolUtil.skip(iprot, field.type);
8463
              }
8464
              break;
8465
            case FROM_DATE:
68 ashish 8466
              if (field.type == TType.I64) {
483 rajveer 8467
                this.from_date = iprot.readI64();
8468
                setFrom_dateIsSet(true);
68 ashish 8469
              } else { 
8470
                TProtocolUtil.skip(iprot, field.type);
8471
              }
8472
              break;
483 rajveer 8473
            case TO_DATE:
8474
              if (field.type == TType.I64) {
8475
                this.to_date = iprot.readI64();
8476
                setTo_dateIsSet(true);
8477
              } else { 
8478
                TProtocolUtil.skip(iprot, field.type);
8479
              }
8480
              break;
8481
            case WAREHOUSE_ID:
8482
              if (field.type == TType.I64) {
8483
                this.warehouse_id = iprot.readI64();
8484
                setWarehouse_idIsSet(true);
8485
              } else { 
8486
                TProtocolUtil.skip(iprot, field.type);
8487
              }
8488
              break;
68 ashish 8489
          }
8490
          iprot.readFieldEnd();
8491
        }
8492
      }
8493
      iprot.readStructEnd();
8494
      validate();
8495
    }
8496
 
8497
    public void write(TProtocol oprot) throws TException {
8498
      validate();
8499
 
8500
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8501
      if (this.status != null) {
8502
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8503
        oprot.writeI32(this.status.getValue());
8504
        oprot.writeFieldEnd();
8505
      }
8506
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8507
      oprot.writeI64(this.from_date);
68 ashish 8508
      oprot.writeFieldEnd();
483 rajveer 8509
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8510
      oprot.writeI64(this.to_date);
8511
      oprot.writeFieldEnd();
8512
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8513
      oprot.writeI64(this.warehouse_id);
8514
      oprot.writeFieldEnd();
68 ashish 8515
      oprot.writeFieldStop();
8516
      oprot.writeStructEnd();
8517
    }
8518
 
8519
    @Override
8520
    public String toString() {
483 rajveer 8521
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8522
      boolean first = true;
8523
 
483 rajveer 8524
      sb.append("status:");
8525
      if (this.status == null) {
8526
        sb.append("null");
8527
      } else {
8528
        String status_name = status.name();
8529
        if (status_name != null) {
8530
          sb.append(status_name);
8531
          sb.append(" (");
8532
        }
8533
        sb.append(this.status);
8534
        if (status_name != null) {
8535
          sb.append(")");
8536
        }
8537
      }
68 ashish 8538
      first = false;
483 rajveer 8539
      if (!first) sb.append(", ");
8540
      sb.append("from_date:");
8541
      sb.append(this.from_date);
8542
      first = false;
8543
      if (!first) sb.append(", ");
8544
      sb.append("to_date:");
8545
      sb.append(this.to_date);
8546
      first = false;
8547
      if (!first) sb.append(", ");
8548
      sb.append("warehouse_id:");
8549
      sb.append(this.warehouse_id);
8550
      first = false;
68 ashish 8551
      sb.append(")");
8552
      return sb.toString();
8553
    }
8554
 
8555
    public void validate() throws TException {
8556
      // check for required fields
8557
    }
8558
 
8559
  }
8560
 
483 rajveer 8561
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8562
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8563
 
483 rajveer 8564
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8565
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8566
 
483 rajveer 8567
    private List<Order> success;
68 ashish 8568
    private TransactionServiceException ex;
8569
 
8570
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8571
    public enum _Fields implements TFieldIdEnum {
8572
      SUCCESS((short)0, "success"),
8573
      EX((short)1, "ex");
8574
 
8575
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8576
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8577
 
8578
      static {
8579
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8580
          byId.put((int)field._thriftId, field);
8581
          byName.put(field.getFieldName(), field);
8582
        }
8583
      }
8584
 
8585
      /**
8586
       * Find the _Fields constant that matches fieldId, or null if its not found.
8587
       */
8588
      public static _Fields findByThriftId(int fieldId) {
8589
        return byId.get(fieldId);
8590
      }
8591
 
8592
      /**
8593
       * Find the _Fields constant that matches fieldId, throwing an exception
8594
       * if it is not found.
8595
       */
8596
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8597
        _Fields fields = findByThriftId(fieldId);
8598
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8599
        return fields;
8600
      }
8601
 
8602
      /**
8603
       * Find the _Fields constant that matches name, or null if its not found.
8604
       */
8605
      public static _Fields findByName(String name) {
8606
        return byName.get(name);
8607
      }
8608
 
8609
      private final short _thriftId;
8610
      private final String _fieldName;
8611
 
8612
      _Fields(short thriftId, String fieldName) {
8613
        _thriftId = thriftId;
8614
        _fieldName = fieldName;
8615
      }
8616
 
8617
      public short getThriftFieldId() {
8618
        return _thriftId;
8619
      }
8620
 
8621
      public String getFieldName() {
8622
        return _fieldName;
8623
      }
8624
    }
8625
 
8626
    // isset id assignments
8627
 
8628
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8629
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 8630
          new ListMetaData(TType.LIST, 
8631
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 8632
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8633
          new FieldValueMetaData(TType.STRUCT)));
8634
    }});
8635
 
8636
    static {
483 rajveer 8637
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 8638
    }
8639
 
483 rajveer 8640
    public getAllOrders_result() {
68 ashish 8641
    }
8642
 
483 rajveer 8643
    public getAllOrders_result(
8644
      List<Order> success,
68 ashish 8645
      TransactionServiceException ex)
8646
    {
8647
      this();
8648
      this.success = success;
8649
      this.ex = ex;
8650
    }
8651
 
8652
    /**
8653
     * Performs a deep copy on <i>other</i>.
8654
     */
483 rajveer 8655
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 8656
      if (other.isSetSuccess()) {
483 rajveer 8657
        List<Order> __this__success = new ArrayList<Order>();
8658
        for (Order other_element : other.success) {
8659
          __this__success.add(new Order(other_element));
8660
        }
8661
        this.success = __this__success;
68 ashish 8662
      }
8663
      if (other.isSetEx()) {
8664
        this.ex = new TransactionServiceException(other.ex);
8665
      }
8666
    }
8667
 
483 rajveer 8668
    public getAllOrders_result deepCopy() {
8669
      return new getAllOrders_result(this);
68 ashish 8670
    }
8671
 
8672
    @Deprecated
483 rajveer 8673
    public getAllOrders_result clone() {
8674
      return new getAllOrders_result(this);
68 ashish 8675
    }
8676
 
483 rajveer 8677
    public int getSuccessSize() {
8678
      return (this.success == null) ? 0 : this.success.size();
8679
    }
8680
 
8681
    public java.util.Iterator<Order> getSuccessIterator() {
8682
      return (this.success == null) ? null : this.success.iterator();
8683
    }
8684
 
8685
    public void addToSuccess(Order elem) {
8686
      if (this.success == null) {
8687
        this.success = new ArrayList<Order>();
8688
      }
8689
      this.success.add(elem);
8690
    }
8691
 
8692
    public List<Order> getSuccess() {
68 ashish 8693
      return this.success;
8694
    }
8695
 
483 rajveer 8696
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 8697
      this.success = success;
8698
      return this;
8699
    }
8700
 
8701
    public void unsetSuccess() {
8702
      this.success = null;
8703
    }
8704
 
8705
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8706
    public boolean isSetSuccess() {
8707
      return this.success != null;
8708
    }
8709
 
8710
    public void setSuccessIsSet(boolean value) {
8711
      if (!value) {
8712
        this.success = null;
8713
      }
8714
    }
8715
 
8716
    public TransactionServiceException getEx() {
8717
      return this.ex;
8718
    }
8719
 
483 rajveer 8720
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 8721
      this.ex = ex;
8722
      return this;
8723
    }
8724
 
8725
    public void unsetEx() {
8726
      this.ex = null;
8727
    }
8728
 
8729
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8730
    public boolean isSetEx() {
8731
      return this.ex != null;
8732
    }
8733
 
8734
    public void setExIsSet(boolean value) {
8735
      if (!value) {
8736
        this.ex = null;
8737
      }
8738
    }
8739
 
8740
    public void setFieldValue(_Fields field, Object value) {
8741
      switch (field) {
8742
      case SUCCESS:
8743
        if (value == null) {
8744
          unsetSuccess();
8745
        } else {
483 rajveer 8746
          setSuccess((List<Order>)value);
68 ashish 8747
        }
8748
        break;
8749
 
8750
      case EX:
8751
        if (value == null) {
8752
          unsetEx();
8753
        } else {
8754
          setEx((TransactionServiceException)value);
8755
        }
8756
        break;
8757
 
8758
      }
8759
    }
8760
 
8761
    public void setFieldValue(int fieldID, Object value) {
8762
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8763
    }
8764
 
8765
    public Object getFieldValue(_Fields field) {
8766
      switch (field) {
8767
      case SUCCESS:
8768
        return getSuccess();
8769
 
8770
      case EX:
8771
        return getEx();
8772
 
8773
      }
8774
      throw new IllegalStateException();
8775
    }
8776
 
8777
    public Object getFieldValue(int fieldId) {
8778
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8779
    }
8780
 
8781
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8782
    public boolean isSet(_Fields field) {
8783
      switch (field) {
8784
      case SUCCESS:
8785
        return isSetSuccess();
8786
      case EX:
8787
        return isSetEx();
8788
      }
8789
      throw new IllegalStateException();
8790
    }
8791
 
8792
    public boolean isSet(int fieldID) {
8793
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8794
    }
8795
 
8796
    @Override
8797
    public boolean equals(Object that) {
8798
      if (that == null)
8799
        return false;
483 rajveer 8800
      if (that instanceof getAllOrders_result)
8801
        return this.equals((getAllOrders_result)that);
68 ashish 8802
      return false;
8803
    }
8804
 
483 rajveer 8805
    public boolean equals(getAllOrders_result that) {
68 ashish 8806
      if (that == null)
8807
        return false;
8808
 
8809
      boolean this_present_success = true && this.isSetSuccess();
8810
      boolean that_present_success = true && that.isSetSuccess();
8811
      if (this_present_success || that_present_success) {
8812
        if (!(this_present_success && that_present_success))
8813
          return false;
8814
        if (!this.success.equals(that.success))
8815
          return false;
8816
      }
8817
 
8818
      boolean this_present_ex = true && this.isSetEx();
8819
      boolean that_present_ex = true && that.isSetEx();
8820
      if (this_present_ex || that_present_ex) {
8821
        if (!(this_present_ex && that_present_ex))
8822
          return false;
8823
        if (!this.ex.equals(that.ex))
8824
          return false;
8825
      }
8826
 
8827
      return true;
8828
    }
8829
 
8830
    @Override
8831
    public int hashCode() {
8832
      return 0;
8833
    }
8834
 
483 rajveer 8835
    public int compareTo(getAllOrders_result other) {
8836
      if (!getClass().equals(other.getClass())) {
8837
        return getClass().getName().compareTo(other.getClass().getName());
8838
      }
8839
 
8840
      int lastComparison = 0;
8841
      getAllOrders_result typedOther = (getAllOrders_result)other;
8842
 
8843
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8844
      if (lastComparison != 0) {
8845
        return lastComparison;
8846
      }
8847
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8848
      if (lastComparison != 0) {
8849
        return lastComparison;
8850
      }
8851
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8852
      if (lastComparison != 0) {
8853
        return lastComparison;
8854
      }
8855
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8856
      if (lastComparison != 0) {
8857
        return lastComparison;
8858
      }
8859
      return 0;
8860
    }
8861
 
68 ashish 8862
    public void read(TProtocol iprot) throws TException {
8863
      TField field;
8864
      iprot.readStructBegin();
8865
      while (true)
8866
      {
8867
        field = iprot.readFieldBegin();
8868
        if (field.type == TType.STOP) { 
8869
          break;
8870
        }
8871
        _Fields fieldId = _Fields.findByThriftId(field.id);
8872
        if (fieldId == null) {
8873
          TProtocolUtil.skip(iprot, field.type);
8874
        } else {
8875
          switch (fieldId) {
8876
            case SUCCESS:
483 rajveer 8877
              if (field.type == TType.LIST) {
8878
                {
684 chandransh 8879
                  TList _list16 = iprot.readListBegin();
8880
                  this.success = new ArrayList<Order>(_list16.size);
8881
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 8882
                  {
684 chandransh 8883
                    Order _elem18;
8884
                    _elem18 = new Order();
8885
                    _elem18.read(iprot);
8886
                    this.success.add(_elem18);
483 rajveer 8887
                  }
8888
                  iprot.readListEnd();
8889
                }
68 ashish 8890
              } else { 
8891
                TProtocolUtil.skip(iprot, field.type);
8892
              }
8893
              break;
8894
            case EX:
8895
              if (field.type == TType.STRUCT) {
8896
                this.ex = new TransactionServiceException();
8897
                this.ex.read(iprot);
8898
              } else { 
8899
                TProtocolUtil.skip(iprot, field.type);
8900
              }
8901
              break;
8902
          }
8903
          iprot.readFieldEnd();
8904
        }
8905
      }
8906
      iprot.readStructEnd();
8907
      validate();
8908
    }
8909
 
8910
    public void write(TProtocol oprot) throws TException {
8911
      oprot.writeStructBegin(STRUCT_DESC);
8912
 
8913
      if (this.isSetSuccess()) {
8914
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 8915
        {
8916
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 8917
          for (Order _iter19 : this.success)
483 rajveer 8918
          {
684 chandransh 8919
            _iter19.write(oprot);
483 rajveer 8920
          }
8921
          oprot.writeListEnd();
8922
        }
68 ashish 8923
        oprot.writeFieldEnd();
8924
      } else if (this.isSetEx()) {
8925
        oprot.writeFieldBegin(EX_FIELD_DESC);
8926
        this.ex.write(oprot);
8927
        oprot.writeFieldEnd();
8928
      }
8929
      oprot.writeFieldStop();
8930
      oprot.writeStructEnd();
8931
    }
8932
 
8933
    @Override
8934
    public String toString() {
483 rajveer 8935
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 8936
      boolean first = true;
8937
 
8938
      sb.append("success:");
8939
      if (this.success == null) {
8940
        sb.append("null");
8941
      } else {
8942
        sb.append(this.success);
8943
      }
8944
      first = false;
8945
      if (!first) sb.append(", ");
8946
      sb.append("ex:");
8947
      if (this.ex == null) {
8948
        sb.append("null");
8949
      } else {
8950
        sb.append(this.ex);
8951
      }
8952
      first = false;
8953
      sb.append(")");
8954
      return sb.toString();
8955
    }
8956
 
8957
    public void validate() throws TException {
8958
      // check for required fields
8959
    }
8960
 
8961
  }
8962
 
1022 varun.gupt 8963
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
8964
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
8965
 
8966
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8967
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
8968
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
8969
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
8970
 
8971
    private OrderStatus status;
8972
    private long start_billing_date;
8973
    private long end_billing_date;
8974
    private long warehouse_id;
8975
 
8976
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8977
    public enum _Fields implements TFieldIdEnum {
8978
      /**
8979
       * 
8980
       * @see OrderStatus
8981
       */
8982
      STATUS((short)1, "status"),
8983
      START_BILLING_DATE((short)2, "start_billing_date"),
8984
      END_BILLING_DATE((short)3, "end_billing_date"),
8985
      WAREHOUSE_ID((short)4, "warehouse_id");
8986
 
8987
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8988
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8989
 
8990
      static {
8991
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8992
          byId.put((int)field._thriftId, field);
8993
          byName.put(field.getFieldName(), field);
8994
        }
8995
      }
8996
 
8997
      /**
8998
       * Find the _Fields constant that matches fieldId, or null if its not found.
8999
       */
9000
      public static _Fields findByThriftId(int fieldId) {
9001
        return byId.get(fieldId);
9002
      }
9003
 
9004
      /**
9005
       * Find the _Fields constant that matches fieldId, throwing an exception
9006
       * if it is not found.
9007
       */
9008
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9009
        _Fields fields = findByThriftId(fieldId);
9010
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9011
        return fields;
9012
      }
9013
 
9014
      /**
9015
       * Find the _Fields constant that matches name, or null if its not found.
9016
       */
9017
      public static _Fields findByName(String name) {
9018
        return byName.get(name);
9019
      }
9020
 
9021
      private final short _thriftId;
9022
      private final String _fieldName;
9023
 
9024
      _Fields(short thriftId, String fieldName) {
9025
        _thriftId = thriftId;
9026
        _fieldName = fieldName;
9027
      }
9028
 
9029
      public short getThriftFieldId() {
9030
        return _thriftId;
9031
      }
9032
 
9033
      public String getFieldName() {
9034
        return _fieldName;
9035
      }
9036
    }
9037
 
9038
    // isset id assignments
9039
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
9040
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
9041
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
9042
    private BitSet __isset_bit_vector = new BitSet(3);
9043
 
9044
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9045
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
9046
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
9047
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
9048
          new FieldValueMetaData(TType.I64)));
9049
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
9050
          new FieldValueMetaData(TType.I64)));
9051
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
9052
          new FieldValueMetaData(TType.I64)));
9053
    }});
9054
 
9055
    static {
9056
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
9057
    }
9058
 
9059
    public getOrdersByBillingDate_args() {
9060
    }
9061
 
9062
    public getOrdersByBillingDate_args(
9063
      OrderStatus status,
9064
      long start_billing_date,
9065
      long end_billing_date,
9066
      long warehouse_id)
9067
    {
9068
      this();
9069
      this.status = status;
9070
      this.start_billing_date = start_billing_date;
9071
      setStart_billing_dateIsSet(true);
9072
      this.end_billing_date = end_billing_date;
9073
      setEnd_billing_dateIsSet(true);
9074
      this.warehouse_id = warehouse_id;
9075
      setWarehouse_idIsSet(true);
9076
    }
9077
 
9078
    /**
9079
     * Performs a deep copy on <i>other</i>.
9080
     */
9081
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
9082
      __isset_bit_vector.clear();
9083
      __isset_bit_vector.or(other.__isset_bit_vector);
9084
      if (other.isSetStatus()) {
9085
        this.status = other.status;
9086
      }
9087
      this.start_billing_date = other.start_billing_date;
9088
      this.end_billing_date = other.end_billing_date;
9089
      this.warehouse_id = other.warehouse_id;
9090
    }
9091
 
9092
    public getOrdersByBillingDate_args deepCopy() {
9093
      return new getOrdersByBillingDate_args(this);
9094
    }
9095
 
9096
    @Deprecated
9097
    public getOrdersByBillingDate_args clone() {
9098
      return new getOrdersByBillingDate_args(this);
9099
    }
9100
 
9101
    /**
9102
     * 
9103
     * @see OrderStatus
9104
     */
9105
    public OrderStatus getStatus() {
9106
      return this.status;
9107
    }
9108
 
9109
    /**
9110
     * 
9111
     * @see OrderStatus
9112
     */
9113
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
9114
      this.status = status;
9115
      return this;
9116
    }
9117
 
9118
    public void unsetStatus() {
9119
      this.status = null;
9120
    }
9121
 
9122
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
9123
    public boolean isSetStatus() {
9124
      return this.status != null;
9125
    }
9126
 
9127
    public void setStatusIsSet(boolean value) {
9128
      if (!value) {
9129
        this.status = null;
9130
      }
9131
    }
9132
 
9133
    public long getStart_billing_date() {
9134
      return this.start_billing_date;
9135
    }
9136
 
9137
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
9138
      this.start_billing_date = start_billing_date;
9139
      setStart_billing_dateIsSet(true);
9140
      return this;
9141
    }
9142
 
9143
    public void unsetStart_billing_date() {
9144
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
9145
    }
9146
 
9147
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
9148
    public boolean isSetStart_billing_date() {
9149
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
9150
    }
9151
 
9152
    public void setStart_billing_dateIsSet(boolean value) {
9153
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
9154
    }
9155
 
9156
    public long getEnd_billing_date() {
9157
      return this.end_billing_date;
9158
    }
9159
 
9160
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
9161
      this.end_billing_date = end_billing_date;
9162
      setEnd_billing_dateIsSet(true);
9163
      return this;
9164
    }
9165
 
9166
    public void unsetEnd_billing_date() {
9167
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
9168
    }
9169
 
9170
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
9171
    public boolean isSetEnd_billing_date() {
9172
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
9173
    }
9174
 
9175
    public void setEnd_billing_dateIsSet(boolean value) {
9176
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
9177
    }
9178
 
9179
    public long getWarehouse_id() {
9180
      return this.warehouse_id;
9181
    }
9182
 
9183
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
9184
      this.warehouse_id = warehouse_id;
9185
      setWarehouse_idIsSet(true);
9186
      return this;
9187
    }
9188
 
9189
    public void unsetWarehouse_id() {
9190
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
9191
    }
9192
 
9193
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9194
    public boolean isSetWarehouse_id() {
9195
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
9196
    }
9197
 
9198
    public void setWarehouse_idIsSet(boolean value) {
9199
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
9200
    }
9201
 
9202
    public void setFieldValue(_Fields field, Object value) {
9203
      switch (field) {
9204
      case STATUS:
9205
        if (value == null) {
9206
          unsetStatus();
9207
        } else {
9208
          setStatus((OrderStatus)value);
9209
        }
9210
        break;
9211
 
9212
      case START_BILLING_DATE:
9213
        if (value == null) {
9214
          unsetStart_billing_date();
9215
        } else {
9216
          setStart_billing_date((Long)value);
9217
        }
9218
        break;
9219
 
9220
      case END_BILLING_DATE:
9221
        if (value == null) {
9222
          unsetEnd_billing_date();
9223
        } else {
9224
          setEnd_billing_date((Long)value);
9225
        }
9226
        break;
9227
 
9228
      case WAREHOUSE_ID:
9229
        if (value == null) {
9230
          unsetWarehouse_id();
9231
        } else {
9232
          setWarehouse_id((Long)value);
9233
        }
9234
        break;
9235
 
9236
      }
9237
    }
9238
 
9239
    public void setFieldValue(int fieldID, Object value) {
9240
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9241
    }
9242
 
9243
    public Object getFieldValue(_Fields field) {
9244
      switch (field) {
9245
      case STATUS:
9246
        return getStatus();
9247
 
9248
      case START_BILLING_DATE:
9249
        return new Long(getStart_billing_date());
9250
 
9251
      case END_BILLING_DATE:
9252
        return new Long(getEnd_billing_date());
9253
 
9254
      case WAREHOUSE_ID:
9255
        return new Long(getWarehouse_id());
9256
 
9257
      }
9258
      throw new IllegalStateException();
9259
    }
9260
 
9261
    public Object getFieldValue(int fieldId) {
9262
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9263
    }
9264
 
9265
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9266
    public boolean isSet(_Fields field) {
9267
      switch (field) {
9268
      case STATUS:
9269
        return isSetStatus();
9270
      case START_BILLING_DATE:
9271
        return isSetStart_billing_date();
9272
      case END_BILLING_DATE:
9273
        return isSetEnd_billing_date();
9274
      case WAREHOUSE_ID:
9275
        return isSetWarehouse_id();
9276
      }
9277
      throw new IllegalStateException();
9278
    }
9279
 
9280
    public boolean isSet(int fieldID) {
9281
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9282
    }
9283
 
9284
    @Override
9285
    public boolean equals(Object that) {
9286
      if (that == null)
9287
        return false;
9288
      if (that instanceof getOrdersByBillingDate_args)
9289
        return this.equals((getOrdersByBillingDate_args)that);
9290
      return false;
9291
    }
9292
 
9293
    public boolean equals(getOrdersByBillingDate_args that) {
9294
      if (that == null)
9295
        return false;
9296
 
9297
      boolean this_present_status = true && this.isSetStatus();
9298
      boolean that_present_status = true && that.isSetStatus();
9299
      if (this_present_status || that_present_status) {
9300
        if (!(this_present_status && that_present_status))
9301
          return false;
9302
        if (!this.status.equals(that.status))
9303
          return false;
9304
      }
9305
 
9306
      boolean this_present_start_billing_date = true;
9307
      boolean that_present_start_billing_date = true;
9308
      if (this_present_start_billing_date || that_present_start_billing_date) {
9309
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9310
          return false;
9311
        if (this.start_billing_date != that.start_billing_date)
9312
          return false;
9313
      }
9314
 
9315
      boolean this_present_end_billing_date = true;
9316
      boolean that_present_end_billing_date = true;
9317
      if (this_present_end_billing_date || that_present_end_billing_date) {
9318
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9319
          return false;
9320
        if (this.end_billing_date != that.end_billing_date)
9321
          return false;
9322
      }
9323
 
9324
      boolean this_present_warehouse_id = true;
9325
      boolean that_present_warehouse_id = true;
9326
      if (this_present_warehouse_id || that_present_warehouse_id) {
9327
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9328
          return false;
9329
        if (this.warehouse_id != that.warehouse_id)
9330
          return false;
9331
      }
9332
 
9333
      return true;
9334
    }
9335
 
9336
    @Override
9337
    public int hashCode() {
9338
      return 0;
9339
    }
9340
 
9341
    public int compareTo(getOrdersByBillingDate_args other) {
9342
      if (!getClass().equals(other.getClass())) {
9343
        return getClass().getName().compareTo(other.getClass().getName());
9344
      }
9345
 
9346
      int lastComparison = 0;
9347
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9348
 
9349
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9350
      if (lastComparison != 0) {
9351
        return lastComparison;
9352
      }
9353
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9354
      if (lastComparison != 0) {
9355
        return lastComparison;
9356
      }
9357
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9358
      if (lastComparison != 0) {
9359
        return lastComparison;
9360
      }
9361
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9362
      if (lastComparison != 0) {
9363
        return lastComparison;
9364
      }
9365
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9366
      if (lastComparison != 0) {
9367
        return lastComparison;
9368
      }
9369
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9370
      if (lastComparison != 0) {
9371
        return lastComparison;
9372
      }
9373
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9374
      if (lastComparison != 0) {
9375
        return lastComparison;
9376
      }
9377
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9378
      if (lastComparison != 0) {
9379
        return lastComparison;
9380
      }
9381
      return 0;
9382
    }
9383
 
9384
    public void read(TProtocol iprot) throws TException {
9385
      TField field;
9386
      iprot.readStructBegin();
9387
      while (true)
9388
      {
9389
        field = iprot.readFieldBegin();
9390
        if (field.type == TType.STOP) { 
9391
          break;
9392
        }
9393
        _Fields fieldId = _Fields.findByThriftId(field.id);
9394
        if (fieldId == null) {
9395
          TProtocolUtil.skip(iprot, field.type);
9396
        } else {
9397
          switch (fieldId) {
9398
            case STATUS:
9399
              if (field.type == TType.I32) {
9400
                this.status = OrderStatus.findByValue(iprot.readI32());
9401
              } else { 
9402
                TProtocolUtil.skip(iprot, field.type);
9403
              }
9404
              break;
9405
            case START_BILLING_DATE:
9406
              if (field.type == TType.I64) {
9407
                this.start_billing_date = iprot.readI64();
9408
                setStart_billing_dateIsSet(true);
9409
              } else { 
9410
                TProtocolUtil.skip(iprot, field.type);
9411
              }
9412
              break;
9413
            case END_BILLING_DATE:
9414
              if (field.type == TType.I64) {
9415
                this.end_billing_date = iprot.readI64();
9416
                setEnd_billing_dateIsSet(true);
9417
              } else { 
9418
                TProtocolUtil.skip(iprot, field.type);
9419
              }
9420
              break;
9421
            case WAREHOUSE_ID:
9422
              if (field.type == TType.I64) {
9423
                this.warehouse_id = iprot.readI64();
9424
                setWarehouse_idIsSet(true);
9425
              } else { 
9426
                TProtocolUtil.skip(iprot, field.type);
9427
              }
9428
              break;
9429
          }
9430
          iprot.readFieldEnd();
9431
        }
9432
      }
9433
      iprot.readStructEnd();
9434
      validate();
9435
    }
9436
 
9437
    public void write(TProtocol oprot) throws TException {
9438
      validate();
9439
 
9440
      oprot.writeStructBegin(STRUCT_DESC);
9441
      if (this.status != null) {
9442
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9443
        oprot.writeI32(this.status.getValue());
9444
        oprot.writeFieldEnd();
9445
      }
9446
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9447
      oprot.writeI64(this.start_billing_date);
9448
      oprot.writeFieldEnd();
9449
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9450
      oprot.writeI64(this.end_billing_date);
9451
      oprot.writeFieldEnd();
9452
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9453
      oprot.writeI64(this.warehouse_id);
9454
      oprot.writeFieldEnd();
9455
      oprot.writeFieldStop();
9456
      oprot.writeStructEnd();
9457
    }
9458
 
9459
    @Override
9460
    public String toString() {
9461
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9462
      boolean first = true;
9463
 
9464
      sb.append("status:");
9465
      if (this.status == null) {
9466
        sb.append("null");
9467
      } else {
9468
        String status_name = status.name();
9469
        if (status_name != null) {
9470
          sb.append(status_name);
9471
          sb.append(" (");
9472
        }
9473
        sb.append(this.status);
9474
        if (status_name != null) {
9475
          sb.append(")");
9476
        }
9477
      }
9478
      first = false;
9479
      if (!first) sb.append(", ");
9480
      sb.append("start_billing_date:");
9481
      sb.append(this.start_billing_date);
9482
      first = false;
9483
      if (!first) sb.append(", ");
9484
      sb.append("end_billing_date:");
9485
      sb.append(this.end_billing_date);
9486
      first = false;
9487
      if (!first) sb.append(", ");
9488
      sb.append("warehouse_id:");
9489
      sb.append(this.warehouse_id);
9490
      first = false;
9491
      sb.append(")");
9492
      return sb.toString();
9493
    }
9494
 
9495
    public void validate() throws TException {
9496
      // check for required fields
9497
    }
9498
 
9499
  }
9500
 
9501
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9502
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9503
 
9504
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9505
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9506
 
9507
    private List<Order> success;
9508
    private TransactionServiceException ex;
9509
 
9510
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9511
    public enum _Fields implements TFieldIdEnum {
9512
      SUCCESS((short)0, "success"),
9513
      EX((short)1, "ex");
9514
 
9515
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9516
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9517
 
9518
      static {
9519
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9520
          byId.put((int)field._thriftId, field);
9521
          byName.put(field.getFieldName(), field);
9522
        }
9523
      }
9524
 
9525
      /**
9526
       * Find the _Fields constant that matches fieldId, or null if its not found.
9527
       */
9528
      public static _Fields findByThriftId(int fieldId) {
9529
        return byId.get(fieldId);
9530
      }
9531
 
9532
      /**
9533
       * Find the _Fields constant that matches fieldId, throwing an exception
9534
       * if it is not found.
9535
       */
9536
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9537
        _Fields fields = findByThriftId(fieldId);
9538
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9539
        return fields;
9540
      }
9541
 
9542
      /**
9543
       * Find the _Fields constant that matches name, or null if its not found.
9544
       */
9545
      public static _Fields findByName(String name) {
9546
        return byName.get(name);
9547
      }
9548
 
9549
      private final short _thriftId;
9550
      private final String _fieldName;
9551
 
9552
      _Fields(short thriftId, String fieldName) {
9553
        _thriftId = thriftId;
9554
        _fieldName = fieldName;
9555
      }
9556
 
9557
      public short getThriftFieldId() {
9558
        return _thriftId;
9559
      }
9560
 
9561
      public String getFieldName() {
9562
        return _fieldName;
9563
      }
9564
    }
9565
 
9566
    // isset id assignments
9567
 
9568
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9569
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9570
          new ListMetaData(TType.LIST, 
9571
              new StructMetaData(TType.STRUCT, Order.class))));
9572
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9573
          new FieldValueMetaData(TType.STRUCT)));
9574
    }});
9575
 
9576
    static {
9577
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9578
    }
9579
 
9580
    public getOrdersByBillingDate_result() {
9581
    }
9582
 
9583
    public getOrdersByBillingDate_result(
9584
      List<Order> success,
9585
      TransactionServiceException ex)
9586
    {
9587
      this();
9588
      this.success = success;
9589
      this.ex = ex;
9590
    }
9591
 
9592
    /**
9593
     * Performs a deep copy on <i>other</i>.
9594
     */
9595
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9596
      if (other.isSetSuccess()) {
9597
        List<Order> __this__success = new ArrayList<Order>();
9598
        for (Order other_element : other.success) {
9599
          __this__success.add(new Order(other_element));
9600
        }
9601
        this.success = __this__success;
9602
      }
9603
      if (other.isSetEx()) {
9604
        this.ex = new TransactionServiceException(other.ex);
9605
      }
9606
    }
9607
 
9608
    public getOrdersByBillingDate_result deepCopy() {
9609
      return new getOrdersByBillingDate_result(this);
9610
    }
9611
 
9612
    @Deprecated
9613
    public getOrdersByBillingDate_result clone() {
9614
      return new getOrdersByBillingDate_result(this);
9615
    }
9616
 
9617
    public int getSuccessSize() {
9618
      return (this.success == null) ? 0 : this.success.size();
9619
    }
9620
 
9621
    public java.util.Iterator<Order> getSuccessIterator() {
9622
      return (this.success == null) ? null : this.success.iterator();
9623
    }
9624
 
9625
    public void addToSuccess(Order elem) {
9626
      if (this.success == null) {
9627
        this.success = new ArrayList<Order>();
9628
      }
9629
      this.success.add(elem);
9630
    }
9631
 
9632
    public List<Order> getSuccess() {
9633
      return this.success;
9634
    }
9635
 
9636
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
9637
      this.success = success;
9638
      return this;
9639
    }
9640
 
9641
    public void unsetSuccess() {
9642
      this.success = null;
9643
    }
9644
 
9645
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9646
    public boolean isSetSuccess() {
9647
      return this.success != null;
9648
    }
9649
 
9650
    public void setSuccessIsSet(boolean value) {
9651
      if (!value) {
9652
        this.success = null;
9653
      }
9654
    }
9655
 
9656
    public TransactionServiceException getEx() {
9657
      return this.ex;
9658
    }
9659
 
9660
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
9661
      this.ex = ex;
9662
      return this;
9663
    }
9664
 
9665
    public void unsetEx() {
9666
      this.ex = null;
9667
    }
9668
 
9669
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9670
    public boolean isSetEx() {
9671
      return this.ex != null;
9672
    }
9673
 
9674
    public void setExIsSet(boolean value) {
9675
      if (!value) {
9676
        this.ex = null;
9677
      }
9678
    }
9679
 
9680
    public void setFieldValue(_Fields field, Object value) {
9681
      switch (field) {
9682
      case SUCCESS:
9683
        if (value == null) {
9684
          unsetSuccess();
9685
        } else {
9686
          setSuccess((List<Order>)value);
9687
        }
9688
        break;
9689
 
9690
      case EX:
9691
        if (value == null) {
9692
          unsetEx();
9693
        } else {
9694
          setEx((TransactionServiceException)value);
9695
        }
9696
        break;
9697
 
9698
      }
9699
    }
9700
 
9701
    public void setFieldValue(int fieldID, Object value) {
9702
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9703
    }
9704
 
9705
    public Object getFieldValue(_Fields field) {
9706
      switch (field) {
9707
      case SUCCESS:
9708
        return getSuccess();
9709
 
9710
      case EX:
9711
        return getEx();
9712
 
9713
      }
9714
      throw new IllegalStateException();
9715
    }
9716
 
9717
    public Object getFieldValue(int fieldId) {
9718
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9719
    }
9720
 
9721
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9722
    public boolean isSet(_Fields field) {
9723
      switch (field) {
9724
      case SUCCESS:
9725
        return isSetSuccess();
9726
      case EX:
9727
        return isSetEx();
9728
      }
9729
      throw new IllegalStateException();
9730
    }
9731
 
9732
    public boolean isSet(int fieldID) {
9733
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9734
    }
9735
 
9736
    @Override
9737
    public boolean equals(Object that) {
9738
      if (that == null)
9739
        return false;
9740
      if (that instanceof getOrdersByBillingDate_result)
9741
        return this.equals((getOrdersByBillingDate_result)that);
9742
      return false;
9743
    }
9744
 
9745
    public boolean equals(getOrdersByBillingDate_result that) {
9746
      if (that == null)
9747
        return false;
9748
 
9749
      boolean this_present_success = true && this.isSetSuccess();
9750
      boolean that_present_success = true && that.isSetSuccess();
9751
      if (this_present_success || that_present_success) {
9752
        if (!(this_present_success && that_present_success))
9753
          return false;
9754
        if (!this.success.equals(that.success))
9755
          return false;
9756
      }
9757
 
9758
      boolean this_present_ex = true && this.isSetEx();
9759
      boolean that_present_ex = true && that.isSetEx();
9760
      if (this_present_ex || that_present_ex) {
9761
        if (!(this_present_ex && that_present_ex))
9762
          return false;
9763
        if (!this.ex.equals(that.ex))
9764
          return false;
9765
      }
9766
 
9767
      return true;
9768
    }
9769
 
9770
    @Override
9771
    public int hashCode() {
9772
      return 0;
9773
    }
9774
 
9775
    public int compareTo(getOrdersByBillingDate_result other) {
9776
      if (!getClass().equals(other.getClass())) {
9777
        return getClass().getName().compareTo(other.getClass().getName());
9778
      }
9779
 
9780
      int lastComparison = 0;
9781
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
9782
 
9783
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9784
      if (lastComparison != 0) {
9785
        return lastComparison;
9786
      }
9787
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9788
      if (lastComparison != 0) {
9789
        return lastComparison;
9790
      }
9791
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9792
      if (lastComparison != 0) {
9793
        return lastComparison;
9794
      }
9795
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9796
      if (lastComparison != 0) {
9797
        return lastComparison;
9798
      }
9799
      return 0;
9800
    }
9801
 
9802
    public void read(TProtocol iprot) throws TException {
9803
      TField field;
9804
      iprot.readStructBegin();
9805
      while (true)
9806
      {
9807
        field = iprot.readFieldBegin();
9808
        if (field.type == TType.STOP) { 
9809
          break;
9810
        }
9811
        _Fields fieldId = _Fields.findByThriftId(field.id);
9812
        if (fieldId == null) {
9813
          TProtocolUtil.skip(iprot, field.type);
9814
        } else {
9815
          switch (fieldId) {
9816
            case SUCCESS:
9817
              if (field.type == TType.LIST) {
9818
                {
9819
                  TList _list20 = iprot.readListBegin();
9820
                  this.success = new ArrayList<Order>(_list20.size);
9821
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
9822
                  {
9823
                    Order _elem22;
9824
                    _elem22 = new Order();
9825
                    _elem22.read(iprot);
9826
                    this.success.add(_elem22);
9827
                  }
9828
                  iprot.readListEnd();
9829
                }
9830
              } else { 
9831
                TProtocolUtil.skip(iprot, field.type);
9832
              }
9833
              break;
9834
            case EX:
9835
              if (field.type == TType.STRUCT) {
9836
                this.ex = new TransactionServiceException();
9837
                this.ex.read(iprot);
9838
              } else { 
9839
                TProtocolUtil.skip(iprot, field.type);
9840
              }
9841
              break;
9842
          }
9843
          iprot.readFieldEnd();
9844
        }
9845
      }
9846
      iprot.readStructEnd();
9847
      validate();
9848
    }
9849
 
9850
    public void write(TProtocol oprot) throws TException {
9851
      oprot.writeStructBegin(STRUCT_DESC);
9852
 
9853
      if (this.isSetSuccess()) {
9854
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9855
        {
9856
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
9857
          for (Order _iter23 : this.success)
9858
          {
9859
            _iter23.write(oprot);
9860
          }
9861
          oprot.writeListEnd();
9862
        }
9863
        oprot.writeFieldEnd();
9864
      } else if (this.isSetEx()) {
9865
        oprot.writeFieldBegin(EX_FIELD_DESC);
9866
        this.ex.write(oprot);
9867
        oprot.writeFieldEnd();
9868
      }
9869
      oprot.writeFieldStop();
9870
      oprot.writeStructEnd();
9871
    }
9872
 
9873
    @Override
9874
    public String toString() {
9875
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
9876
      boolean first = true;
9877
 
9878
      sb.append("success:");
9879
      if (this.success == null) {
9880
        sb.append("null");
9881
      } else {
9882
        sb.append(this.success);
9883
      }
9884
      first = false;
9885
      if (!first) sb.append(", ");
9886
      sb.append("ex:");
9887
      if (this.ex == null) {
9888
        sb.append("null");
9889
      } else {
9890
        sb.append(this.ex);
9891
      }
9892
      first = false;
9893
      sb.append(")");
9894
      return sb.toString();
9895
    }
9896
 
9897
    public void validate() throws TException {
9898
      // check for required fields
9899
    }
9900
 
9901
  }
9902
 
1382 varun.gupt 9903
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
9904
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
9905
 
9906
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
9907
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
9908
 
9909
    private long customer_id;
9910
    private long limit;
9911
 
9912
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9913
    public enum _Fields implements TFieldIdEnum {
9914
      CUSTOMER_ID((short)1, "customer_id"),
9915
      LIMIT((short)2, "limit");
9916
 
9917
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9918
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9919
 
9920
      static {
9921
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9922
          byId.put((int)field._thriftId, field);
9923
          byName.put(field.getFieldName(), field);
9924
        }
9925
      }
9926
 
9927
      /**
9928
       * Find the _Fields constant that matches fieldId, or null if its not found.
9929
       */
9930
      public static _Fields findByThriftId(int fieldId) {
9931
        return byId.get(fieldId);
9932
      }
9933
 
9934
      /**
9935
       * Find the _Fields constant that matches fieldId, throwing an exception
9936
       * if it is not found.
9937
       */
9938
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9939
        _Fields fields = findByThriftId(fieldId);
9940
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9941
        return fields;
9942
      }
9943
 
9944
      /**
9945
       * Find the _Fields constant that matches name, or null if its not found.
9946
       */
9947
      public static _Fields findByName(String name) {
9948
        return byName.get(name);
9949
      }
9950
 
9951
      private final short _thriftId;
9952
      private final String _fieldName;
9953
 
9954
      _Fields(short thriftId, String fieldName) {
9955
        _thriftId = thriftId;
9956
        _fieldName = fieldName;
9957
      }
9958
 
9959
      public short getThriftFieldId() {
9960
        return _thriftId;
9961
      }
9962
 
9963
      public String getFieldName() {
9964
        return _fieldName;
9965
      }
9966
    }
9967
 
9968
    // isset id assignments
9969
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
9970
    private static final int __LIMIT_ISSET_ID = 1;
9971
    private BitSet __isset_bit_vector = new BitSet(2);
9972
 
9973
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9974
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
9975
          new FieldValueMetaData(TType.I64)));
9976
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
9977
          new FieldValueMetaData(TType.I64)));
9978
    }});
9979
 
9980
    static {
9981
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
9982
    }
9983
 
9984
    public getReturnableOrdersForCustomer_args() {
9985
    }
9986
 
9987
    public getReturnableOrdersForCustomer_args(
9988
      long customer_id,
9989
      long limit)
9990
    {
9991
      this();
9992
      this.customer_id = customer_id;
9993
      setCustomer_idIsSet(true);
9994
      this.limit = limit;
9995
      setLimitIsSet(true);
9996
    }
9997
 
9998
    /**
9999
     * Performs a deep copy on <i>other</i>.
10000
     */
10001
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
10002
      __isset_bit_vector.clear();
10003
      __isset_bit_vector.or(other.__isset_bit_vector);
10004
      this.customer_id = other.customer_id;
10005
      this.limit = other.limit;
10006
    }
10007
 
10008
    public getReturnableOrdersForCustomer_args deepCopy() {
10009
      return new getReturnableOrdersForCustomer_args(this);
10010
    }
10011
 
10012
    @Deprecated
10013
    public getReturnableOrdersForCustomer_args clone() {
10014
      return new getReturnableOrdersForCustomer_args(this);
10015
    }
10016
 
10017
    public long getCustomer_id() {
10018
      return this.customer_id;
10019
    }
10020
 
10021
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
10022
      this.customer_id = customer_id;
10023
      setCustomer_idIsSet(true);
10024
      return this;
10025
    }
10026
 
10027
    public void unsetCustomer_id() {
10028
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10029
    }
10030
 
10031
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10032
    public boolean isSetCustomer_id() {
10033
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10034
    }
10035
 
10036
    public void setCustomer_idIsSet(boolean value) {
10037
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10038
    }
10039
 
10040
    public long getLimit() {
10041
      return this.limit;
10042
    }
10043
 
10044
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
10045
      this.limit = limit;
10046
      setLimitIsSet(true);
10047
      return this;
10048
    }
10049
 
10050
    public void unsetLimit() {
10051
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10052
    }
10053
 
10054
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10055
    public boolean isSetLimit() {
10056
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10057
    }
10058
 
10059
    public void setLimitIsSet(boolean value) {
10060
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10061
    }
10062
 
10063
    public void setFieldValue(_Fields field, Object value) {
10064
      switch (field) {
10065
      case CUSTOMER_ID:
10066
        if (value == null) {
10067
          unsetCustomer_id();
10068
        } else {
10069
          setCustomer_id((Long)value);
10070
        }
10071
        break;
10072
 
10073
      case LIMIT:
10074
        if (value == null) {
10075
          unsetLimit();
10076
        } else {
10077
          setLimit((Long)value);
10078
        }
10079
        break;
10080
 
10081
      }
10082
    }
10083
 
10084
    public void setFieldValue(int fieldID, Object value) {
10085
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10086
    }
10087
 
10088
    public Object getFieldValue(_Fields field) {
10089
      switch (field) {
10090
      case CUSTOMER_ID:
10091
        return new Long(getCustomer_id());
10092
 
10093
      case LIMIT:
10094
        return new Long(getLimit());
10095
 
10096
      }
10097
      throw new IllegalStateException();
10098
    }
10099
 
10100
    public Object getFieldValue(int fieldId) {
10101
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10102
    }
10103
 
10104
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10105
    public boolean isSet(_Fields field) {
10106
      switch (field) {
10107
      case CUSTOMER_ID:
10108
        return isSetCustomer_id();
10109
      case LIMIT:
10110
        return isSetLimit();
10111
      }
10112
      throw new IllegalStateException();
10113
    }
10114
 
10115
    public boolean isSet(int fieldID) {
10116
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10117
    }
10118
 
10119
    @Override
10120
    public boolean equals(Object that) {
10121
      if (that == null)
10122
        return false;
10123
      if (that instanceof getReturnableOrdersForCustomer_args)
10124
        return this.equals((getReturnableOrdersForCustomer_args)that);
10125
      return false;
10126
    }
10127
 
10128
    public boolean equals(getReturnableOrdersForCustomer_args that) {
10129
      if (that == null)
10130
        return false;
10131
 
10132
      boolean this_present_customer_id = true;
10133
      boolean that_present_customer_id = true;
10134
      if (this_present_customer_id || that_present_customer_id) {
10135
        if (!(this_present_customer_id && that_present_customer_id))
10136
          return false;
10137
        if (this.customer_id != that.customer_id)
10138
          return false;
10139
      }
10140
 
10141
      boolean this_present_limit = true;
10142
      boolean that_present_limit = true;
10143
      if (this_present_limit || that_present_limit) {
10144
        if (!(this_present_limit && that_present_limit))
10145
          return false;
10146
        if (this.limit != that.limit)
10147
          return false;
10148
      }
10149
 
10150
      return true;
10151
    }
10152
 
10153
    @Override
10154
    public int hashCode() {
10155
      return 0;
10156
    }
10157
 
10158
    public int compareTo(getReturnableOrdersForCustomer_args other) {
10159
      if (!getClass().equals(other.getClass())) {
10160
        return getClass().getName().compareTo(other.getClass().getName());
10161
      }
10162
 
10163
      int lastComparison = 0;
10164
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
10165
 
10166
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10167
      if (lastComparison != 0) {
10168
        return lastComparison;
10169
      }
10170
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10171
      if (lastComparison != 0) {
10172
        return lastComparison;
10173
      }
10174
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10175
      if (lastComparison != 0) {
10176
        return lastComparison;
10177
      }
10178
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10179
      if (lastComparison != 0) {
10180
        return lastComparison;
10181
      }
10182
      return 0;
10183
    }
10184
 
10185
    public void read(TProtocol iprot) throws TException {
10186
      TField field;
10187
      iprot.readStructBegin();
10188
      while (true)
10189
      {
10190
        field = iprot.readFieldBegin();
10191
        if (field.type == TType.STOP) { 
10192
          break;
10193
        }
10194
        _Fields fieldId = _Fields.findByThriftId(field.id);
10195
        if (fieldId == null) {
10196
          TProtocolUtil.skip(iprot, field.type);
10197
        } else {
10198
          switch (fieldId) {
10199
            case CUSTOMER_ID:
10200
              if (field.type == TType.I64) {
10201
                this.customer_id = iprot.readI64();
10202
                setCustomer_idIsSet(true);
10203
              } else { 
10204
                TProtocolUtil.skip(iprot, field.type);
10205
              }
10206
              break;
10207
            case LIMIT:
10208
              if (field.type == TType.I64) {
10209
                this.limit = iprot.readI64();
10210
                setLimitIsSet(true);
10211
              } else { 
10212
                TProtocolUtil.skip(iprot, field.type);
10213
              }
10214
              break;
10215
          }
10216
          iprot.readFieldEnd();
10217
        }
10218
      }
10219
      iprot.readStructEnd();
10220
      validate();
10221
    }
10222
 
10223
    public void write(TProtocol oprot) throws TException {
10224
      validate();
10225
 
10226
      oprot.writeStructBegin(STRUCT_DESC);
10227
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10228
      oprot.writeI64(this.customer_id);
10229
      oprot.writeFieldEnd();
10230
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10231
      oprot.writeI64(this.limit);
10232
      oprot.writeFieldEnd();
10233
      oprot.writeFieldStop();
10234
      oprot.writeStructEnd();
10235
    }
10236
 
10237
    @Override
10238
    public String toString() {
10239
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
10240
      boolean first = true;
10241
 
10242
      sb.append("customer_id:");
10243
      sb.append(this.customer_id);
10244
      first = false;
10245
      if (!first) sb.append(", ");
10246
      sb.append("limit:");
10247
      sb.append(this.limit);
10248
      first = false;
10249
      sb.append(")");
10250
      return sb.toString();
10251
    }
10252
 
10253
    public void validate() throws TException {
10254
      // check for required fields
10255
    }
10256
 
10257
  }
10258
 
10259
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
10260
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
10261
 
10262
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10263
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10264
 
10265
    private List<Long> success;
10266
    private TransactionServiceException ex;
10267
 
10268
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10269
    public enum _Fields implements TFieldIdEnum {
10270
      SUCCESS((short)0, "success"),
10271
      EX((short)1, "ex");
10272
 
10273
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10274
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10275
 
10276
      static {
10277
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10278
          byId.put((int)field._thriftId, field);
10279
          byName.put(field.getFieldName(), field);
10280
        }
10281
      }
10282
 
10283
      /**
10284
       * Find the _Fields constant that matches fieldId, or null if its not found.
10285
       */
10286
      public static _Fields findByThriftId(int fieldId) {
10287
        return byId.get(fieldId);
10288
      }
10289
 
10290
      /**
10291
       * Find the _Fields constant that matches fieldId, throwing an exception
10292
       * if it is not found.
10293
       */
10294
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10295
        _Fields fields = findByThriftId(fieldId);
10296
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10297
        return fields;
10298
      }
10299
 
10300
      /**
10301
       * Find the _Fields constant that matches name, or null if its not found.
10302
       */
10303
      public static _Fields findByName(String name) {
10304
        return byName.get(name);
10305
      }
10306
 
10307
      private final short _thriftId;
10308
      private final String _fieldName;
10309
 
10310
      _Fields(short thriftId, String fieldName) {
10311
        _thriftId = thriftId;
10312
        _fieldName = fieldName;
10313
      }
10314
 
10315
      public short getThriftFieldId() {
10316
        return _thriftId;
10317
      }
10318
 
10319
      public String getFieldName() {
10320
        return _fieldName;
10321
      }
10322
    }
10323
 
10324
    // isset id assignments
10325
 
10326
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10327
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10328
          new ListMetaData(TType.LIST, 
10329
              new FieldValueMetaData(TType.I64))));
10330
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10331
          new FieldValueMetaData(TType.STRUCT)));
10332
    }});
10333
 
10334
    static {
10335
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10336
    }
10337
 
10338
    public getReturnableOrdersForCustomer_result() {
10339
    }
10340
 
10341
    public getReturnableOrdersForCustomer_result(
10342
      List<Long> success,
10343
      TransactionServiceException ex)
10344
    {
10345
      this();
10346
      this.success = success;
10347
      this.ex = ex;
10348
    }
10349
 
10350
    /**
10351
     * Performs a deep copy on <i>other</i>.
10352
     */
10353
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10354
      if (other.isSetSuccess()) {
10355
        List<Long> __this__success = new ArrayList<Long>();
10356
        for (Long other_element : other.success) {
10357
          __this__success.add(other_element);
10358
        }
10359
        this.success = __this__success;
10360
      }
10361
      if (other.isSetEx()) {
10362
        this.ex = new TransactionServiceException(other.ex);
10363
      }
10364
    }
10365
 
10366
    public getReturnableOrdersForCustomer_result deepCopy() {
10367
      return new getReturnableOrdersForCustomer_result(this);
10368
    }
10369
 
10370
    @Deprecated
10371
    public getReturnableOrdersForCustomer_result clone() {
10372
      return new getReturnableOrdersForCustomer_result(this);
10373
    }
10374
 
10375
    public int getSuccessSize() {
10376
      return (this.success == null) ? 0 : this.success.size();
10377
    }
10378
 
10379
    public java.util.Iterator<Long> getSuccessIterator() {
10380
      return (this.success == null) ? null : this.success.iterator();
10381
    }
10382
 
10383
    public void addToSuccess(long elem) {
10384
      if (this.success == null) {
10385
        this.success = new ArrayList<Long>();
10386
      }
10387
      this.success.add(elem);
10388
    }
10389
 
10390
    public List<Long> getSuccess() {
10391
      return this.success;
10392
    }
10393
 
10394
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10395
      this.success = success;
10396
      return this;
10397
    }
10398
 
10399
    public void unsetSuccess() {
10400
      this.success = null;
10401
    }
10402
 
10403
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10404
    public boolean isSetSuccess() {
10405
      return this.success != null;
10406
    }
10407
 
10408
    public void setSuccessIsSet(boolean value) {
10409
      if (!value) {
10410
        this.success = null;
10411
      }
10412
    }
10413
 
10414
    public TransactionServiceException getEx() {
10415
      return this.ex;
10416
    }
10417
 
10418
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10419
      this.ex = ex;
10420
      return this;
10421
    }
10422
 
10423
    public void unsetEx() {
10424
      this.ex = null;
10425
    }
10426
 
10427
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10428
    public boolean isSetEx() {
10429
      return this.ex != null;
10430
    }
10431
 
10432
    public void setExIsSet(boolean value) {
10433
      if (!value) {
10434
        this.ex = null;
10435
      }
10436
    }
10437
 
10438
    public void setFieldValue(_Fields field, Object value) {
10439
      switch (field) {
10440
      case SUCCESS:
10441
        if (value == null) {
10442
          unsetSuccess();
10443
        } else {
10444
          setSuccess((List<Long>)value);
10445
        }
10446
        break;
10447
 
10448
      case EX:
10449
        if (value == null) {
10450
          unsetEx();
10451
        } else {
10452
          setEx((TransactionServiceException)value);
10453
        }
10454
        break;
10455
 
10456
      }
10457
    }
10458
 
10459
    public void setFieldValue(int fieldID, Object value) {
10460
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10461
    }
10462
 
10463
    public Object getFieldValue(_Fields field) {
10464
      switch (field) {
10465
      case SUCCESS:
10466
        return getSuccess();
10467
 
10468
      case EX:
10469
        return getEx();
10470
 
10471
      }
10472
      throw new IllegalStateException();
10473
    }
10474
 
10475
    public Object getFieldValue(int fieldId) {
10476
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10477
    }
10478
 
10479
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10480
    public boolean isSet(_Fields field) {
10481
      switch (field) {
10482
      case SUCCESS:
10483
        return isSetSuccess();
10484
      case EX:
10485
        return isSetEx();
10486
      }
10487
      throw new IllegalStateException();
10488
    }
10489
 
10490
    public boolean isSet(int fieldID) {
10491
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10492
    }
10493
 
10494
    @Override
10495
    public boolean equals(Object that) {
10496
      if (that == null)
10497
        return false;
10498
      if (that instanceof getReturnableOrdersForCustomer_result)
10499
        return this.equals((getReturnableOrdersForCustomer_result)that);
10500
      return false;
10501
    }
10502
 
10503
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10504
      if (that == null)
10505
        return false;
10506
 
10507
      boolean this_present_success = true && this.isSetSuccess();
10508
      boolean that_present_success = true && that.isSetSuccess();
10509
      if (this_present_success || that_present_success) {
10510
        if (!(this_present_success && that_present_success))
10511
          return false;
10512
        if (!this.success.equals(that.success))
10513
          return false;
10514
      }
10515
 
10516
      boolean this_present_ex = true && this.isSetEx();
10517
      boolean that_present_ex = true && that.isSetEx();
10518
      if (this_present_ex || that_present_ex) {
10519
        if (!(this_present_ex && that_present_ex))
10520
          return false;
10521
        if (!this.ex.equals(that.ex))
10522
          return false;
10523
      }
10524
 
10525
      return true;
10526
    }
10527
 
10528
    @Override
10529
    public int hashCode() {
10530
      return 0;
10531
    }
10532
 
10533
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10534
      if (!getClass().equals(other.getClass())) {
10535
        return getClass().getName().compareTo(other.getClass().getName());
10536
      }
10537
 
10538
      int lastComparison = 0;
10539
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10540
 
10541
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10542
      if (lastComparison != 0) {
10543
        return lastComparison;
10544
      }
10545
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10546
      if (lastComparison != 0) {
10547
        return lastComparison;
10548
      }
10549
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10550
      if (lastComparison != 0) {
10551
        return lastComparison;
10552
      }
10553
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10554
      if (lastComparison != 0) {
10555
        return lastComparison;
10556
      }
10557
      return 0;
10558
    }
10559
 
10560
    public void read(TProtocol iprot) throws TException {
10561
      TField field;
10562
      iprot.readStructBegin();
10563
      while (true)
10564
      {
10565
        field = iprot.readFieldBegin();
10566
        if (field.type == TType.STOP) { 
10567
          break;
10568
        }
10569
        _Fields fieldId = _Fields.findByThriftId(field.id);
10570
        if (fieldId == null) {
10571
          TProtocolUtil.skip(iprot, field.type);
10572
        } else {
10573
          switch (fieldId) {
10574
            case SUCCESS:
10575
              if (field.type == TType.LIST) {
10576
                {
10577
                  TList _list24 = iprot.readListBegin();
10578
                  this.success = new ArrayList<Long>(_list24.size);
10579
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10580
                  {
10581
                    long _elem26;
10582
                    _elem26 = iprot.readI64();
10583
                    this.success.add(_elem26);
10584
                  }
10585
                  iprot.readListEnd();
10586
                }
10587
              } else { 
10588
                TProtocolUtil.skip(iprot, field.type);
10589
              }
10590
              break;
10591
            case EX:
10592
              if (field.type == TType.STRUCT) {
10593
                this.ex = new TransactionServiceException();
10594
                this.ex.read(iprot);
10595
              } else { 
10596
                TProtocolUtil.skip(iprot, field.type);
10597
              }
10598
              break;
10599
          }
10600
          iprot.readFieldEnd();
10601
        }
10602
      }
10603
      iprot.readStructEnd();
10604
      validate();
10605
    }
10606
 
10607
    public void write(TProtocol oprot) throws TException {
10608
      oprot.writeStructBegin(STRUCT_DESC);
10609
 
10610
      if (this.isSetSuccess()) {
10611
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10612
        {
10613
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
10614
          for (long _iter27 : this.success)
10615
          {
10616
            oprot.writeI64(_iter27);
10617
          }
10618
          oprot.writeListEnd();
10619
        }
10620
        oprot.writeFieldEnd();
10621
      } else if (this.isSetEx()) {
10622
        oprot.writeFieldBegin(EX_FIELD_DESC);
10623
        this.ex.write(oprot);
10624
        oprot.writeFieldEnd();
10625
      }
10626
      oprot.writeFieldStop();
10627
      oprot.writeStructEnd();
10628
    }
10629
 
10630
    @Override
10631
    public String toString() {
10632
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
10633
      boolean first = true;
10634
 
10635
      sb.append("success:");
10636
      if (this.success == null) {
10637
        sb.append("null");
10638
      } else {
10639
        sb.append(this.success);
10640
      }
10641
      first = false;
10642
      if (!first) sb.append(", ");
10643
      sb.append("ex:");
10644
      if (this.ex == null) {
10645
        sb.append("null");
10646
      } else {
10647
        sb.append(this.ex);
10648
      }
10649
      first = false;
10650
      sb.append(")");
10651
      return sb.toString();
10652
    }
10653
 
10654
    public void validate() throws TException {
10655
      // check for required fields
10656
    }
10657
 
10658
  }
10659
 
10660
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
10661
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
10662
 
10663
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10664
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10665
 
10666
    private long customer_id;
10667
    private long limit;
10668
 
10669
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10670
    public enum _Fields implements TFieldIdEnum {
10671
      CUSTOMER_ID((short)1, "customer_id"),
10672
      LIMIT((short)2, "limit");
10673
 
10674
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10675
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10676
 
10677
      static {
10678
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10679
          byId.put((int)field._thriftId, field);
10680
          byName.put(field.getFieldName(), field);
10681
        }
10682
      }
10683
 
10684
      /**
10685
       * Find the _Fields constant that matches fieldId, or null if its not found.
10686
       */
10687
      public static _Fields findByThriftId(int fieldId) {
10688
        return byId.get(fieldId);
10689
      }
10690
 
10691
      /**
10692
       * Find the _Fields constant that matches fieldId, throwing an exception
10693
       * if it is not found.
10694
       */
10695
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10696
        _Fields fields = findByThriftId(fieldId);
10697
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10698
        return fields;
10699
      }
10700
 
10701
      /**
10702
       * Find the _Fields constant that matches name, or null if its not found.
10703
       */
10704
      public static _Fields findByName(String name) {
10705
        return byName.get(name);
10706
      }
10707
 
10708
      private final short _thriftId;
10709
      private final String _fieldName;
10710
 
10711
      _Fields(short thriftId, String fieldName) {
10712
        _thriftId = thriftId;
10713
        _fieldName = fieldName;
10714
      }
10715
 
10716
      public short getThriftFieldId() {
10717
        return _thriftId;
10718
      }
10719
 
10720
      public String getFieldName() {
10721
        return _fieldName;
10722
      }
10723
    }
10724
 
10725
    // isset id assignments
10726
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10727
    private static final int __LIMIT_ISSET_ID = 1;
10728
    private BitSet __isset_bit_vector = new BitSet(2);
10729
 
10730
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10731
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10732
          new FieldValueMetaData(TType.I64)));
10733
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10734
          new FieldValueMetaData(TType.I64)));
10735
    }});
10736
 
10737
    static {
10738
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
10739
    }
10740
 
10741
    public getCancellableOrdersForCustomer_args() {
10742
    }
10743
 
10744
    public getCancellableOrdersForCustomer_args(
10745
      long customer_id,
10746
      long limit)
10747
    {
10748
      this();
10749
      this.customer_id = customer_id;
10750
      setCustomer_idIsSet(true);
10751
      this.limit = limit;
10752
      setLimitIsSet(true);
10753
    }
10754
 
10755
    /**
10756
     * Performs a deep copy on <i>other</i>.
10757
     */
10758
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
10759
      __isset_bit_vector.clear();
10760
      __isset_bit_vector.or(other.__isset_bit_vector);
10761
      this.customer_id = other.customer_id;
10762
      this.limit = other.limit;
10763
    }
10764
 
10765
    public getCancellableOrdersForCustomer_args deepCopy() {
10766
      return new getCancellableOrdersForCustomer_args(this);
10767
    }
10768
 
10769
    @Deprecated
10770
    public getCancellableOrdersForCustomer_args clone() {
10771
      return new getCancellableOrdersForCustomer_args(this);
10772
    }
10773
 
10774
    public long getCustomer_id() {
10775
      return this.customer_id;
10776
    }
10777
 
10778
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
10779
      this.customer_id = customer_id;
10780
      setCustomer_idIsSet(true);
10781
      return this;
10782
    }
10783
 
10784
    public void unsetCustomer_id() {
10785
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10786
    }
10787
 
10788
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10789
    public boolean isSetCustomer_id() {
10790
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10791
    }
10792
 
10793
    public void setCustomer_idIsSet(boolean value) {
10794
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10795
    }
10796
 
10797
    public long getLimit() {
10798
      return this.limit;
10799
    }
10800
 
10801
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
10802
      this.limit = limit;
10803
      setLimitIsSet(true);
10804
      return this;
10805
    }
10806
 
10807
    public void unsetLimit() {
10808
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10809
    }
10810
 
10811
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10812
    public boolean isSetLimit() {
10813
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10814
    }
10815
 
10816
    public void setLimitIsSet(boolean value) {
10817
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10818
    }
10819
 
10820
    public void setFieldValue(_Fields field, Object value) {
10821
      switch (field) {
10822
      case CUSTOMER_ID:
10823
        if (value == null) {
10824
          unsetCustomer_id();
10825
        } else {
10826
          setCustomer_id((Long)value);
10827
        }
10828
        break;
10829
 
10830
      case LIMIT:
10831
        if (value == null) {
10832
          unsetLimit();
10833
        } else {
10834
          setLimit((Long)value);
10835
        }
10836
        break;
10837
 
10838
      }
10839
    }
10840
 
10841
    public void setFieldValue(int fieldID, Object value) {
10842
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10843
    }
10844
 
10845
    public Object getFieldValue(_Fields field) {
10846
      switch (field) {
10847
      case CUSTOMER_ID:
10848
        return new Long(getCustomer_id());
10849
 
10850
      case LIMIT:
10851
        return new Long(getLimit());
10852
 
10853
      }
10854
      throw new IllegalStateException();
10855
    }
10856
 
10857
    public Object getFieldValue(int fieldId) {
10858
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10859
    }
10860
 
10861
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10862
    public boolean isSet(_Fields field) {
10863
      switch (field) {
10864
      case CUSTOMER_ID:
10865
        return isSetCustomer_id();
10866
      case LIMIT:
10867
        return isSetLimit();
10868
      }
10869
      throw new IllegalStateException();
10870
    }
10871
 
10872
    public boolean isSet(int fieldID) {
10873
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10874
    }
10875
 
10876
    @Override
10877
    public boolean equals(Object that) {
10878
      if (that == null)
10879
        return false;
10880
      if (that instanceof getCancellableOrdersForCustomer_args)
10881
        return this.equals((getCancellableOrdersForCustomer_args)that);
10882
      return false;
10883
    }
10884
 
10885
    public boolean equals(getCancellableOrdersForCustomer_args that) {
10886
      if (that == null)
10887
        return false;
10888
 
10889
      boolean this_present_customer_id = true;
10890
      boolean that_present_customer_id = true;
10891
      if (this_present_customer_id || that_present_customer_id) {
10892
        if (!(this_present_customer_id && that_present_customer_id))
10893
          return false;
10894
        if (this.customer_id != that.customer_id)
10895
          return false;
10896
      }
10897
 
10898
      boolean this_present_limit = true;
10899
      boolean that_present_limit = true;
10900
      if (this_present_limit || that_present_limit) {
10901
        if (!(this_present_limit && that_present_limit))
10902
          return false;
10903
        if (this.limit != that.limit)
10904
          return false;
10905
      }
10906
 
10907
      return true;
10908
    }
10909
 
10910
    @Override
10911
    public int hashCode() {
10912
      return 0;
10913
    }
10914
 
10915
    public int compareTo(getCancellableOrdersForCustomer_args other) {
10916
      if (!getClass().equals(other.getClass())) {
10917
        return getClass().getName().compareTo(other.getClass().getName());
10918
      }
10919
 
10920
      int lastComparison = 0;
10921
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
10922
 
10923
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10924
      if (lastComparison != 0) {
10925
        return lastComparison;
10926
      }
10927
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10928
      if (lastComparison != 0) {
10929
        return lastComparison;
10930
      }
10931
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10932
      if (lastComparison != 0) {
10933
        return lastComparison;
10934
      }
10935
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10936
      if (lastComparison != 0) {
10937
        return lastComparison;
10938
      }
10939
      return 0;
10940
    }
10941
 
10942
    public void read(TProtocol iprot) throws TException {
10943
      TField field;
10944
      iprot.readStructBegin();
10945
      while (true)
10946
      {
10947
        field = iprot.readFieldBegin();
10948
        if (field.type == TType.STOP) { 
10949
          break;
10950
        }
10951
        _Fields fieldId = _Fields.findByThriftId(field.id);
10952
        if (fieldId == null) {
10953
          TProtocolUtil.skip(iprot, field.type);
10954
        } else {
10955
          switch (fieldId) {
10956
            case CUSTOMER_ID:
10957
              if (field.type == TType.I64) {
10958
                this.customer_id = iprot.readI64();
10959
                setCustomer_idIsSet(true);
10960
              } else { 
10961
                TProtocolUtil.skip(iprot, field.type);
10962
              }
10963
              break;
10964
            case LIMIT:
10965
              if (field.type == TType.I64) {
10966
                this.limit = iprot.readI64();
10967
                setLimitIsSet(true);
10968
              } else { 
10969
                TProtocolUtil.skip(iprot, field.type);
10970
              }
10971
              break;
10972
          }
10973
          iprot.readFieldEnd();
10974
        }
10975
      }
10976
      iprot.readStructEnd();
10977
      validate();
10978
    }
10979
 
10980
    public void write(TProtocol oprot) throws TException {
10981
      validate();
10982
 
10983
      oprot.writeStructBegin(STRUCT_DESC);
10984
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10985
      oprot.writeI64(this.customer_id);
10986
      oprot.writeFieldEnd();
10987
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10988
      oprot.writeI64(this.limit);
10989
      oprot.writeFieldEnd();
10990
      oprot.writeFieldStop();
10991
      oprot.writeStructEnd();
10992
    }
10993
 
10994
    @Override
10995
    public String toString() {
10996
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
10997
      boolean first = true;
10998
 
10999
      sb.append("customer_id:");
11000
      sb.append(this.customer_id);
11001
      first = false;
11002
      if (!first) sb.append(", ");
11003
      sb.append("limit:");
11004
      sb.append(this.limit);
11005
      first = false;
11006
      sb.append(")");
11007
      return sb.toString();
11008
    }
11009
 
11010
    public void validate() throws TException {
11011
      // check for required fields
11012
    }
11013
 
11014
  }
11015
 
11016
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
11017
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
11018
 
11019
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
11020
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11021
 
11022
    private List<Long> success;
11023
    private TransactionServiceException ex;
11024
 
11025
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11026
    public enum _Fields implements TFieldIdEnum {
11027
      SUCCESS((short)0, "success"),
11028
      EX((short)1, "ex");
11029
 
11030
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11031
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11032
 
11033
      static {
11034
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11035
          byId.put((int)field._thriftId, field);
11036
          byName.put(field.getFieldName(), field);
11037
        }
11038
      }
11039
 
11040
      /**
11041
       * Find the _Fields constant that matches fieldId, or null if its not found.
11042
       */
11043
      public static _Fields findByThriftId(int fieldId) {
11044
        return byId.get(fieldId);
11045
      }
11046
 
11047
      /**
11048
       * Find the _Fields constant that matches fieldId, throwing an exception
11049
       * if it is not found.
11050
       */
11051
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11052
        _Fields fields = findByThriftId(fieldId);
11053
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11054
        return fields;
11055
      }
11056
 
11057
      /**
11058
       * Find the _Fields constant that matches name, or null if its not found.
11059
       */
11060
      public static _Fields findByName(String name) {
11061
        return byName.get(name);
11062
      }
11063
 
11064
      private final short _thriftId;
11065
      private final String _fieldName;
11066
 
11067
      _Fields(short thriftId, String fieldName) {
11068
        _thriftId = thriftId;
11069
        _fieldName = fieldName;
11070
      }
11071
 
11072
      public short getThriftFieldId() {
11073
        return _thriftId;
11074
      }
11075
 
11076
      public String getFieldName() {
11077
        return _fieldName;
11078
      }
11079
    }
11080
 
11081
    // isset id assignments
11082
 
11083
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11084
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11085
          new ListMetaData(TType.LIST, 
11086
              new FieldValueMetaData(TType.I64))));
11087
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11088
          new FieldValueMetaData(TType.STRUCT)));
11089
    }});
11090
 
11091
    static {
11092
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
11093
    }
11094
 
11095
    public getCancellableOrdersForCustomer_result() {
11096
    }
11097
 
11098
    public getCancellableOrdersForCustomer_result(
11099
      List<Long> success,
11100
      TransactionServiceException ex)
11101
    {
11102
      this();
11103
      this.success = success;
11104
      this.ex = ex;
11105
    }
11106
 
11107
    /**
11108
     * Performs a deep copy on <i>other</i>.
11109
     */
11110
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
11111
      if (other.isSetSuccess()) {
11112
        List<Long> __this__success = new ArrayList<Long>();
11113
        for (Long other_element : other.success) {
11114
          __this__success.add(other_element);
11115
        }
11116
        this.success = __this__success;
11117
      }
11118
      if (other.isSetEx()) {
11119
        this.ex = new TransactionServiceException(other.ex);
11120
      }
11121
    }
11122
 
11123
    public getCancellableOrdersForCustomer_result deepCopy() {
11124
      return new getCancellableOrdersForCustomer_result(this);
11125
    }
11126
 
11127
    @Deprecated
11128
    public getCancellableOrdersForCustomer_result clone() {
11129
      return new getCancellableOrdersForCustomer_result(this);
11130
    }
11131
 
11132
    public int getSuccessSize() {
11133
      return (this.success == null) ? 0 : this.success.size();
11134
    }
11135
 
11136
    public java.util.Iterator<Long> getSuccessIterator() {
11137
      return (this.success == null) ? null : this.success.iterator();
11138
    }
11139
 
11140
    public void addToSuccess(long elem) {
11141
      if (this.success == null) {
11142
        this.success = new ArrayList<Long>();
11143
      }
11144
      this.success.add(elem);
11145
    }
11146
 
11147
    public List<Long> getSuccess() {
11148
      return this.success;
11149
    }
11150
 
11151
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
11152
      this.success = success;
11153
      return this;
11154
    }
11155
 
11156
    public void unsetSuccess() {
11157
      this.success = null;
11158
    }
11159
 
11160
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11161
    public boolean isSetSuccess() {
11162
      return this.success != null;
11163
    }
11164
 
11165
    public void setSuccessIsSet(boolean value) {
11166
      if (!value) {
11167
        this.success = null;
11168
      }
11169
    }
11170
 
11171
    public TransactionServiceException getEx() {
11172
      return this.ex;
11173
    }
11174
 
11175
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11176
      this.ex = ex;
11177
      return this;
11178
    }
11179
 
11180
    public void unsetEx() {
11181
      this.ex = null;
11182
    }
11183
 
11184
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11185
    public boolean isSetEx() {
11186
      return this.ex != null;
11187
    }
11188
 
11189
    public void setExIsSet(boolean value) {
11190
      if (!value) {
11191
        this.ex = null;
11192
      }
11193
    }
11194
 
11195
    public void setFieldValue(_Fields field, Object value) {
11196
      switch (field) {
11197
      case SUCCESS:
11198
        if (value == null) {
11199
          unsetSuccess();
11200
        } else {
11201
          setSuccess((List<Long>)value);
11202
        }
11203
        break;
11204
 
11205
      case EX:
11206
        if (value == null) {
11207
          unsetEx();
11208
        } else {
11209
          setEx((TransactionServiceException)value);
11210
        }
11211
        break;
11212
 
11213
      }
11214
    }
11215
 
11216
    public void setFieldValue(int fieldID, Object value) {
11217
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11218
    }
11219
 
11220
    public Object getFieldValue(_Fields field) {
11221
      switch (field) {
11222
      case SUCCESS:
11223
        return getSuccess();
11224
 
11225
      case EX:
11226
        return getEx();
11227
 
11228
      }
11229
      throw new IllegalStateException();
11230
    }
11231
 
11232
    public Object getFieldValue(int fieldId) {
11233
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11234
    }
11235
 
11236
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11237
    public boolean isSet(_Fields field) {
11238
      switch (field) {
11239
      case SUCCESS:
11240
        return isSetSuccess();
11241
      case EX:
11242
        return isSetEx();
11243
      }
11244
      throw new IllegalStateException();
11245
    }
11246
 
11247
    public boolean isSet(int fieldID) {
11248
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11249
    }
11250
 
11251
    @Override
11252
    public boolean equals(Object that) {
11253
      if (that == null)
11254
        return false;
11255
      if (that instanceof getCancellableOrdersForCustomer_result)
11256
        return this.equals((getCancellableOrdersForCustomer_result)that);
11257
      return false;
11258
    }
11259
 
11260
    public boolean equals(getCancellableOrdersForCustomer_result that) {
11261
      if (that == null)
11262
        return false;
11263
 
11264
      boolean this_present_success = true && this.isSetSuccess();
11265
      boolean that_present_success = true && that.isSetSuccess();
11266
      if (this_present_success || that_present_success) {
11267
        if (!(this_present_success && that_present_success))
11268
          return false;
11269
        if (!this.success.equals(that.success))
11270
          return false;
11271
      }
11272
 
11273
      boolean this_present_ex = true && this.isSetEx();
11274
      boolean that_present_ex = true && that.isSetEx();
11275
      if (this_present_ex || that_present_ex) {
11276
        if (!(this_present_ex && that_present_ex))
11277
          return false;
11278
        if (!this.ex.equals(that.ex))
11279
          return false;
11280
      }
11281
 
11282
      return true;
11283
    }
11284
 
11285
    @Override
11286
    public int hashCode() {
11287
      return 0;
11288
    }
11289
 
11290
    public int compareTo(getCancellableOrdersForCustomer_result other) {
11291
      if (!getClass().equals(other.getClass())) {
11292
        return getClass().getName().compareTo(other.getClass().getName());
11293
      }
11294
 
11295
      int lastComparison = 0;
11296
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
11297
 
11298
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11299
      if (lastComparison != 0) {
11300
        return lastComparison;
11301
      }
11302
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11303
      if (lastComparison != 0) {
11304
        return lastComparison;
11305
      }
11306
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11307
      if (lastComparison != 0) {
11308
        return lastComparison;
11309
      }
11310
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11311
      if (lastComparison != 0) {
11312
        return lastComparison;
11313
      }
11314
      return 0;
11315
    }
11316
 
11317
    public void read(TProtocol iprot) throws TException {
11318
      TField field;
11319
      iprot.readStructBegin();
11320
      while (true)
11321
      {
11322
        field = iprot.readFieldBegin();
11323
        if (field.type == TType.STOP) { 
11324
          break;
11325
        }
11326
        _Fields fieldId = _Fields.findByThriftId(field.id);
11327
        if (fieldId == null) {
11328
          TProtocolUtil.skip(iprot, field.type);
11329
        } else {
11330
          switch (fieldId) {
11331
            case SUCCESS:
11332
              if (field.type == TType.LIST) {
11333
                {
11334
                  TList _list28 = iprot.readListBegin();
11335
                  this.success = new ArrayList<Long>(_list28.size);
11336
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11337
                  {
11338
                    long _elem30;
11339
                    _elem30 = iprot.readI64();
11340
                    this.success.add(_elem30);
11341
                  }
11342
                  iprot.readListEnd();
11343
                }
11344
              } else { 
11345
                TProtocolUtil.skip(iprot, field.type);
11346
              }
11347
              break;
11348
            case EX:
11349
              if (field.type == TType.STRUCT) {
11350
                this.ex = new TransactionServiceException();
11351
                this.ex.read(iprot);
11352
              } else { 
11353
                TProtocolUtil.skip(iprot, field.type);
11354
              }
11355
              break;
11356
          }
11357
          iprot.readFieldEnd();
11358
        }
11359
      }
11360
      iprot.readStructEnd();
11361
      validate();
11362
    }
11363
 
11364
    public void write(TProtocol oprot) throws TException {
11365
      oprot.writeStructBegin(STRUCT_DESC);
11366
 
11367
      if (this.isSetSuccess()) {
11368
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11369
        {
11370
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11371
          for (long _iter31 : this.success)
11372
          {
11373
            oprot.writeI64(_iter31);
11374
          }
11375
          oprot.writeListEnd();
11376
        }
11377
        oprot.writeFieldEnd();
11378
      } else if (this.isSetEx()) {
11379
        oprot.writeFieldBegin(EX_FIELD_DESC);
11380
        this.ex.write(oprot);
11381
        oprot.writeFieldEnd();
11382
      }
11383
      oprot.writeFieldStop();
11384
      oprot.writeStructEnd();
11385
    }
11386
 
11387
    @Override
11388
    public String toString() {
11389
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11390
      boolean first = true;
11391
 
11392
      sb.append("success:");
11393
      if (this.success == null) {
11394
        sb.append("null");
11395
      } else {
11396
        sb.append(this.success);
11397
      }
11398
      first = false;
11399
      if (!first) sb.append(", ");
11400
      sb.append("ex:");
11401
      if (this.ex == null) {
11402
        sb.append("null");
11403
      } else {
11404
        sb.append(this.ex);
11405
      }
11406
      first = false;
11407
      sb.append(")");
11408
      return sb.toString();
11409
    }
11410
 
11411
    public void validate() throws TException {
11412
      // check for required fields
11413
    }
11414
 
11415
  }
11416
 
483 rajveer 11417
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11418
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11419
 
483 rajveer 11420
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11421
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11422
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11423
 
483 rajveer 11424
    private long orderId;
11425
    private OrderStatus status;
11426
    private String description;
68 ashish 11427
 
11428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11429
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11430
      ORDER_ID((short)1, "orderId"),
11431
      /**
11432
       * 
11433
       * @see OrderStatus
11434
       */
11435
      STATUS((short)2, "status"),
11436
      DESCRIPTION((short)3, "description");
68 ashish 11437
 
11438
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11439
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11440
 
11441
      static {
11442
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11443
          byId.put((int)field._thriftId, field);
11444
          byName.put(field.getFieldName(), field);
11445
        }
11446
      }
11447
 
11448
      /**
11449
       * Find the _Fields constant that matches fieldId, or null if its not found.
11450
       */
11451
      public static _Fields findByThriftId(int fieldId) {
11452
        return byId.get(fieldId);
11453
      }
11454
 
11455
      /**
11456
       * Find the _Fields constant that matches fieldId, throwing an exception
11457
       * if it is not found.
11458
       */
11459
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11460
        _Fields fields = findByThriftId(fieldId);
11461
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11462
        return fields;
11463
      }
11464
 
11465
      /**
11466
       * Find the _Fields constant that matches name, or null if its not found.
11467
       */
11468
      public static _Fields findByName(String name) {
11469
        return byName.get(name);
11470
      }
11471
 
11472
      private final short _thriftId;
11473
      private final String _fieldName;
11474
 
11475
      _Fields(short thriftId, String fieldName) {
11476
        _thriftId = thriftId;
11477
        _fieldName = fieldName;
11478
      }
11479
 
11480
      public short getThriftFieldId() {
11481
        return _thriftId;
11482
      }
11483
 
11484
      public String getFieldName() {
11485
        return _fieldName;
11486
      }
11487
    }
11488
 
11489
    // isset id assignments
483 rajveer 11490
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11491
    private BitSet __isset_bit_vector = new BitSet(1);
11492
 
11493
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11494
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11495
          new FieldValueMetaData(TType.I64)));
483 rajveer 11496
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11497
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11498
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11499
          new FieldValueMetaData(TType.STRING)));
68 ashish 11500
    }});
11501
 
11502
    static {
483 rajveer 11503
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11504
    }
11505
 
483 rajveer 11506
    public changeOrderStatus_args() {
68 ashish 11507
    }
11508
 
483 rajveer 11509
    public changeOrderStatus_args(
11510
      long orderId,
11511
      OrderStatus status,
11512
      String description)
68 ashish 11513
    {
11514
      this();
483 rajveer 11515
      this.orderId = orderId;
11516
      setOrderIdIsSet(true);
11517
      this.status = status;
11518
      this.description = description;
68 ashish 11519
    }
11520
 
11521
    /**
11522
     * Performs a deep copy on <i>other</i>.
11523
     */
483 rajveer 11524
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11525
      __isset_bit_vector.clear();
11526
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11527
      this.orderId = other.orderId;
11528
      if (other.isSetStatus()) {
11529
        this.status = other.status;
11530
      }
11531
      if (other.isSetDescription()) {
11532
        this.description = other.description;
11533
      }
68 ashish 11534
    }
11535
 
483 rajveer 11536
    public changeOrderStatus_args deepCopy() {
11537
      return new changeOrderStatus_args(this);
68 ashish 11538
    }
11539
 
11540
    @Deprecated
483 rajveer 11541
    public changeOrderStatus_args clone() {
11542
      return new changeOrderStatus_args(this);
68 ashish 11543
    }
11544
 
483 rajveer 11545
    public long getOrderId() {
11546
      return this.orderId;
68 ashish 11547
    }
11548
 
483 rajveer 11549
    public changeOrderStatus_args setOrderId(long orderId) {
11550
      this.orderId = orderId;
11551
      setOrderIdIsSet(true);
68 ashish 11552
      return this;
11553
    }
11554
 
483 rajveer 11555
    public void unsetOrderId() {
11556
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11557
    }
11558
 
483 rajveer 11559
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11560
    public boolean isSetOrderId() {
11561
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11562
    }
11563
 
483 rajveer 11564
    public void setOrderIdIsSet(boolean value) {
11565
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11566
    }
11567
 
483 rajveer 11568
    /**
11569
     * 
11570
     * @see OrderStatus
11571
     */
11572
    public OrderStatus getStatus() {
11573
      return this.status;
68 ashish 11574
    }
11575
 
11576
    /**
483 rajveer 11577
     * 
11578
     * @see OrderStatus
68 ashish 11579
     */
483 rajveer 11580
    public changeOrderStatus_args setStatus(OrderStatus status) {
11581
      this.status = status;
68 ashish 11582
      return this;
11583
    }
11584
 
483 rajveer 11585
    public void unsetStatus() {
11586
      this.status = null;
68 ashish 11587
    }
11588
 
483 rajveer 11589
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11590
    public boolean isSetStatus() {
11591
      return this.status != null;
68 ashish 11592
    }
11593
 
483 rajveer 11594
    public void setStatusIsSet(boolean value) {
68 ashish 11595
      if (!value) {
483 rajveer 11596
        this.status = null;
68 ashish 11597
      }
11598
    }
11599
 
483 rajveer 11600
    public String getDescription() {
11601
      return this.description;
68 ashish 11602
    }
11603
 
483 rajveer 11604
    public changeOrderStatus_args setDescription(String description) {
11605
      this.description = description;
68 ashish 11606
      return this;
11607
    }
11608
 
483 rajveer 11609
    public void unsetDescription() {
11610
      this.description = null;
68 ashish 11611
    }
11612
 
483 rajveer 11613
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
11614
    public boolean isSetDescription() {
11615
      return this.description != null;
68 ashish 11616
    }
11617
 
483 rajveer 11618
    public void setDescriptionIsSet(boolean value) {
68 ashish 11619
      if (!value) {
483 rajveer 11620
        this.description = null;
68 ashish 11621
      }
11622
    }
11623
 
11624
    public void setFieldValue(_Fields field, Object value) {
11625
      switch (field) {
483 rajveer 11626
      case ORDER_ID:
68 ashish 11627
        if (value == null) {
483 rajveer 11628
          unsetOrderId();
68 ashish 11629
        } else {
483 rajveer 11630
          setOrderId((Long)value);
68 ashish 11631
        }
11632
        break;
11633
 
483 rajveer 11634
      case STATUS:
68 ashish 11635
        if (value == null) {
483 rajveer 11636
          unsetStatus();
68 ashish 11637
        } else {
483 rajveer 11638
          setStatus((OrderStatus)value);
68 ashish 11639
        }
11640
        break;
11641
 
483 rajveer 11642
      case DESCRIPTION:
11643
        if (value == null) {
11644
          unsetDescription();
11645
        } else {
11646
          setDescription((String)value);
11647
        }
11648
        break;
11649
 
68 ashish 11650
      }
11651
    }
11652
 
11653
    public void setFieldValue(int fieldID, Object value) {
11654
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11655
    }
11656
 
11657
    public Object getFieldValue(_Fields field) {
11658
      switch (field) {
483 rajveer 11659
      case ORDER_ID:
11660
        return new Long(getOrderId());
68 ashish 11661
 
483 rajveer 11662
      case STATUS:
11663
        return getStatus();
68 ashish 11664
 
483 rajveer 11665
      case DESCRIPTION:
11666
        return getDescription();
11667
 
68 ashish 11668
      }
11669
      throw new IllegalStateException();
11670
    }
11671
 
11672
    public Object getFieldValue(int fieldId) {
11673
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11674
    }
11675
 
11676
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11677
    public boolean isSet(_Fields field) {
11678
      switch (field) {
483 rajveer 11679
      case ORDER_ID:
11680
        return isSetOrderId();
11681
      case STATUS:
11682
        return isSetStatus();
11683
      case DESCRIPTION:
11684
        return isSetDescription();
68 ashish 11685
      }
11686
      throw new IllegalStateException();
11687
    }
11688
 
11689
    public boolean isSet(int fieldID) {
11690
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11691
    }
11692
 
11693
    @Override
11694
    public boolean equals(Object that) {
11695
      if (that == null)
11696
        return false;
483 rajveer 11697
      if (that instanceof changeOrderStatus_args)
11698
        return this.equals((changeOrderStatus_args)that);
68 ashish 11699
      return false;
11700
    }
11701
 
483 rajveer 11702
    public boolean equals(changeOrderStatus_args that) {
68 ashish 11703
      if (that == null)
11704
        return false;
11705
 
483 rajveer 11706
      boolean this_present_orderId = true;
11707
      boolean that_present_orderId = true;
11708
      if (this_present_orderId || that_present_orderId) {
11709
        if (!(this_present_orderId && that_present_orderId))
68 ashish 11710
          return false;
483 rajveer 11711
        if (this.orderId != that.orderId)
68 ashish 11712
          return false;
11713
      }
11714
 
483 rajveer 11715
      boolean this_present_status = true && this.isSetStatus();
11716
      boolean that_present_status = true && that.isSetStatus();
11717
      if (this_present_status || that_present_status) {
11718
        if (!(this_present_status && that_present_status))
68 ashish 11719
          return false;
483 rajveer 11720
        if (!this.status.equals(that.status))
68 ashish 11721
          return false;
11722
      }
11723
 
483 rajveer 11724
      boolean this_present_description = true && this.isSetDescription();
11725
      boolean that_present_description = true && that.isSetDescription();
11726
      if (this_present_description || that_present_description) {
11727
        if (!(this_present_description && that_present_description))
11728
          return false;
11729
        if (!this.description.equals(that.description))
11730
          return false;
11731
      }
11732
 
68 ashish 11733
      return true;
11734
    }
11735
 
11736
    @Override
11737
    public int hashCode() {
11738
      return 0;
11739
    }
11740
 
483 rajveer 11741
    public int compareTo(changeOrderStatus_args other) {
11742
      if (!getClass().equals(other.getClass())) {
11743
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 11744
      }
11745
 
483 rajveer 11746
      int lastComparison = 0;
11747
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 11748
 
483 rajveer 11749
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11750
      if (lastComparison != 0) {
11751
        return lastComparison;
68 ashish 11752
      }
483 rajveer 11753
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11754
      if (lastComparison != 0) {
11755
        return lastComparison;
68 ashish 11756
      }
483 rajveer 11757
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11758
      if (lastComparison != 0) {
11759
        return lastComparison;
68 ashish 11760
      }
483 rajveer 11761
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11762
      if (lastComparison != 0) {
11763
        return lastComparison;
68 ashish 11764
      }
483 rajveer 11765
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
11766
      if (lastComparison != 0) {
11767
        return lastComparison;
68 ashish 11768
      }
483 rajveer 11769
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
11770
      if (lastComparison != 0) {
11771
        return lastComparison;
68 ashish 11772
      }
11773
      return 0;
11774
    }
11775
 
11776
    public void read(TProtocol iprot) throws TException {
11777
      TField field;
11778
      iprot.readStructBegin();
11779
      while (true)
11780
      {
11781
        field = iprot.readFieldBegin();
11782
        if (field.type == TType.STOP) { 
11783
          break;
11784
        }
11785
        _Fields fieldId = _Fields.findByThriftId(field.id);
11786
        if (fieldId == null) {
11787
          TProtocolUtil.skip(iprot, field.type);
11788
        } else {
11789
          switch (fieldId) {
483 rajveer 11790
            case ORDER_ID:
68 ashish 11791
              if (field.type == TType.I64) {
483 rajveer 11792
                this.orderId = iprot.readI64();
11793
                setOrderIdIsSet(true);
68 ashish 11794
              } else { 
11795
                TProtocolUtil.skip(iprot, field.type);
11796
              }
11797
              break;
483 rajveer 11798
            case STATUS:
11799
              if (field.type == TType.I32) {
11800
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 11801
              } else { 
11802
                TProtocolUtil.skip(iprot, field.type);
11803
              }
11804
              break;
483 rajveer 11805
            case DESCRIPTION:
11806
              if (field.type == TType.STRING) {
11807
                this.description = iprot.readString();
11808
              } else { 
11809
                TProtocolUtil.skip(iprot, field.type);
11810
              }
11811
              break;
68 ashish 11812
          }
11813
          iprot.readFieldEnd();
11814
        }
11815
      }
11816
      iprot.readStructEnd();
11817
      validate();
11818
    }
11819
 
11820
    public void write(TProtocol oprot) throws TException {
11821
      validate();
11822
 
11823
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 11824
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11825
      oprot.writeI64(this.orderId);
68 ashish 11826
      oprot.writeFieldEnd();
483 rajveer 11827
      if (this.status != null) {
11828
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11829
        oprot.writeI32(this.status.getValue());
68 ashish 11830
        oprot.writeFieldEnd();
11831
      }
483 rajveer 11832
      if (this.description != null) {
11833
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11834
        oprot.writeString(this.description);
11835
        oprot.writeFieldEnd();
11836
      }
68 ashish 11837
      oprot.writeFieldStop();
11838
      oprot.writeStructEnd();
11839
    }
11840
 
11841
    @Override
11842
    public String toString() {
483 rajveer 11843
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 11844
      boolean first = true;
11845
 
483 rajveer 11846
      sb.append("orderId:");
11847
      sb.append(this.orderId);
68 ashish 11848
      first = false;
11849
      if (!first) sb.append(", ");
483 rajveer 11850
      sb.append("status:");
11851
      if (this.status == null) {
68 ashish 11852
        sb.append("null");
11853
      } else {
483 rajveer 11854
        String status_name = status.name();
11855
        if (status_name != null) {
11856
          sb.append(status_name);
11857
          sb.append(" (");
11858
        }
11859
        sb.append(this.status);
11860
        if (status_name != null) {
11861
          sb.append(")");
11862
        }
68 ashish 11863
      }
11864
      first = false;
483 rajveer 11865
      if (!first) sb.append(", ");
11866
      sb.append("description:");
11867
      if (this.description == null) {
11868
        sb.append("null");
11869
      } else {
11870
        sb.append(this.description);
11871
      }
11872
      first = false;
68 ashish 11873
      sb.append(")");
11874
      return sb.toString();
11875
    }
11876
 
11877
    public void validate() throws TException {
11878
      // check for required fields
11879
    }
11880
 
11881
  }
11882
 
483 rajveer 11883
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
11884
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 11885
 
11886
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11887
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11888
 
11889
    private boolean success;
11890
    private TransactionServiceException ex;
11891
 
11892
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11893
    public enum _Fields implements TFieldIdEnum {
11894
      SUCCESS((short)0, "success"),
11895
      EX((short)1, "ex");
11896
 
11897
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11898
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11899
 
11900
      static {
11901
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11902
          byId.put((int)field._thriftId, field);
11903
          byName.put(field.getFieldName(), field);
11904
        }
11905
      }
11906
 
11907
      /**
11908
       * Find the _Fields constant that matches fieldId, or null if its not found.
11909
       */
11910
      public static _Fields findByThriftId(int fieldId) {
11911
        return byId.get(fieldId);
11912
      }
11913
 
11914
      /**
11915
       * Find the _Fields constant that matches fieldId, throwing an exception
11916
       * if it is not found.
11917
       */
11918
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11919
        _Fields fields = findByThriftId(fieldId);
11920
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11921
        return fields;
11922
      }
11923
 
11924
      /**
11925
       * Find the _Fields constant that matches name, or null if its not found.
11926
       */
11927
      public static _Fields findByName(String name) {
11928
        return byName.get(name);
11929
      }
11930
 
11931
      private final short _thriftId;
11932
      private final String _fieldName;
11933
 
11934
      _Fields(short thriftId, String fieldName) {
11935
        _thriftId = thriftId;
11936
        _fieldName = fieldName;
11937
      }
11938
 
11939
      public short getThriftFieldId() {
11940
        return _thriftId;
11941
      }
11942
 
11943
      public String getFieldName() {
11944
        return _fieldName;
11945
      }
11946
    }
11947
 
11948
    // isset id assignments
11949
    private static final int __SUCCESS_ISSET_ID = 0;
11950
    private BitSet __isset_bit_vector = new BitSet(1);
11951
 
11952
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11953
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11954
          new FieldValueMetaData(TType.BOOL)));
11955
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11956
          new FieldValueMetaData(TType.STRUCT)));
11957
    }});
11958
 
11959
    static {
483 rajveer 11960
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 11961
    }
11962
 
483 rajveer 11963
    public changeOrderStatus_result() {
68 ashish 11964
    }
11965
 
483 rajveer 11966
    public changeOrderStatus_result(
68 ashish 11967
      boolean success,
11968
      TransactionServiceException ex)
11969
    {
11970
      this();
11971
      this.success = success;
11972
      setSuccessIsSet(true);
11973
      this.ex = ex;
11974
    }
11975
 
11976
    /**
11977
     * Performs a deep copy on <i>other</i>.
11978
     */
483 rajveer 11979
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 11980
      __isset_bit_vector.clear();
11981
      __isset_bit_vector.or(other.__isset_bit_vector);
11982
      this.success = other.success;
11983
      if (other.isSetEx()) {
11984
        this.ex = new TransactionServiceException(other.ex);
11985
      }
11986
    }
11987
 
483 rajveer 11988
    public changeOrderStatus_result deepCopy() {
11989
      return new changeOrderStatus_result(this);
68 ashish 11990
    }
11991
 
11992
    @Deprecated
483 rajveer 11993
    public changeOrderStatus_result clone() {
11994
      return new changeOrderStatus_result(this);
68 ashish 11995
    }
11996
 
11997
    public boolean isSuccess() {
11998
      return this.success;
11999
    }
12000
 
483 rajveer 12001
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 12002
      this.success = success;
12003
      setSuccessIsSet(true);
12004
      return this;
12005
    }
12006
 
12007
    public void unsetSuccess() {
12008
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12009
    }
12010
 
12011
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12012
    public boolean isSetSuccess() {
12013
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12014
    }
12015
 
12016
    public void setSuccessIsSet(boolean value) {
12017
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12018
    }
12019
 
12020
    public TransactionServiceException getEx() {
12021
      return this.ex;
12022
    }
12023
 
483 rajveer 12024
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 12025
      this.ex = ex;
12026
      return this;
12027
    }
12028
 
12029
    public void unsetEx() {
12030
      this.ex = null;
12031
    }
12032
 
12033
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12034
    public boolean isSetEx() {
12035
      return this.ex != null;
12036
    }
12037
 
12038
    public void setExIsSet(boolean value) {
12039
      if (!value) {
12040
        this.ex = null;
12041
      }
12042
    }
12043
 
12044
    public void setFieldValue(_Fields field, Object value) {
12045
      switch (field) {
12046
      case SUCCESS:
12047
        if (value == null) {
12048
          unsetSuccess();
12049
        } else {
12050
          setSuccess((Boolean)value);
12051
        }
12052
        break;
12053
 
12054
      case EX:
12055
        if (value == null) {
12056
          unsetEx();
12057
        } else {
12058
          setEx((TransactionServiceException)value);
12059
        }
12060
        break;
12061
 
12062
      }
12063
    }
12064
 
12065
    public void setFieldValue(int fieldID, Object value) {
12066
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12067
    }
12068
 
12069
    public Object getFieldValue(_Fields field) {
12070
      switch (field) {
12071
      case SUCCESS:
12072
        return new Boolean(isSuccess());
12073
 
12074
      case EX:
12075
        return getEx();
12076
 
12077
      }
12078
      throw new IllegalStateException();
12079
    }
12080
 
12081
    public Object getFieldValue(int fieldId) {
12082
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12083
    }
12084
 
12085
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12086
    public boolean isSet(_Fields field) {
12087
      switch (field) {
12088
      case SUCCESS:
12089
        return isSetSuccess();
12090
      case EX:
12091
        return isSetEx();
12092
      }
12093
      throw new IllegalStateException();
12094
    }
12095
 
12096
    public boolean isSet(int fieldID) {
12097
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12098
    }
12099
 
12100
    @Override
12101
    public boolean equals(Object that) {
12102
      if (that == null)
12103
        return false;
483 rajveer 12104
      if (that instanceof changeOrderStatus_result)
12105
        return this.equals((changeOrderStatus_result)that);
68 ashish 12106
      return false;
12107
    }
12108
 
483 rajveer 12109
    public boolean equals(changeOrderStatus_result that) {
68 ashish 12110
      if (that == null)
12111
        return false;
12112
 
12113
      boolean this_present_success = true;
12114
      boolean that_present_success = true;
12115
      if (this_present_success || that_present_success) {
12116
        if (!(this_present_success && that_present_success))
12117
          return false;
12118
        if (this.success != that.success)
12119
          return false;
12120
      }
12121
 
12122
      boolean this_present_ex = true && this.isSetEx();
12123
      boolean that_present_ex = true && that.isSetEx();
12124
      if (this_present_ex || that_present_ex) {
12125
        if (!(this_present_ex && that_present_ex))
12126
          return false;
12127
        if (!this.ex.equals(that.ex))
12128
          return false;
12129
      }
12130
 
12131
      return true;
12132
    }
12133
 
12134
    @Override
12135
    public int hashCode() {
12136
      return 0;
12137
    }
12138
 
483 rajveer 12139
    public int compareTo(changeOrderStatus_result other) {
68 ashish 12140
      if (!getClass().equals(other.getClass())) {
12141
        return getClass().getName().compareTo(other.getClass().getName());
12142
      }
12143
 
12144
      int lastComparison = 0;
483 rajveer 12145
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 12146
 
12147
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12148
      if (lastComparison != 0) {
12149
        return lastComparison;
12150
      }
12151
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12152
      if (lastComparison != 0) {
12153
        return lastComparison;
12154
      }
12155
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12156
      if (lastComparison != 0) {
12157
        return lastComparison;
12158
      }
12159
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12160
      if (lastComparison != 0) {
12161
        return lastComparison;
12162
      }
12163
      return 0;
12164
    }
12165
 
12166
    public void read(TProtocol iprot) throws TException {
12167
      TField field;
12168
      iprot.readStructBegin();
12169
      while (true)
12170
      {
12171
        field = iprot.readFieldBegin();
12172
        if (field.type == TType.STOP) { 
12173
          break;
12174
        }
12175
        _Fields fieldId = _Fields.findByThriftId(field.id);
12176
        if (fieldId == null) {
12177
          TProtocolUtil.skip(iprot, field.type);
12178
        } else {
12179
          switch (fieldId) {
12180
            case SUCCESS:
12181
              if (field.type == TType.BOOL) {
12182
                this.success = iprot.readBool();
12183
                setSuccessIsSet(true);
12184
              } else { 
12185
                TProtocolUtil.skip(iprot, field.type);
12186
              }
12187
              break;
12188
            case EX:
12189
              if (field.type == TType.STRUCT) {
12190
                this.ex = new TransactionServiceException();
12191
                this.ex.read(iprot);
12192
              } else { 
12193
                TProtocolUtil.skip(iprot, field.type);
12194
              }
12195
              break;
12196
          }
12197
          iprot.readFieldEnd();
12198
        }
12199
      }
12200
      iprot.readStructEnd();
12201
      validate();
12202
    }
12203
 
12204
    public void write(TProtocol oprot) throws TException {
12205
      oprot.writeStructBegin(STRUCT_DESC);
12206
 
12207
      if (this.isSetSuccess()) {
12208
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12209
        oprot.writeBool(this.success);
12210
        oprot.writeFieldEnd();
12211
      } else if (this.isSetEx()) {
12212
        oprot.writeFieldBegin(EX_FIELD_DESC);
12213
        this.ex.write(oprot);
12214
        oprot.writeFieldEnd();
12215
      }
12216
      oprot.writeFieldStop();
12217
      oprot.writeStructEnd();
12218
    }
12219
 
12220
    @Override
12221
    public String toString() {
483 rajveer 12222
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 12223
      boolean first = true;
12224
 
12225
      sb.append("success:");
12226
      sb.append(this.success);
12227
      first = false;
12228
      if (!first) sb.append(", ");
12229
      sb.append("ex:");
12230
      if (this.ex == null) {
12231
        sb.append("null");
12232
      } else {
12233
        sb.append(this.ex);
12234
      }
12235
      first = false;
12236
      sb.append(")");
12237
      return sb.toString();
12238
    }
12239
 
12240
    public void validate() throws TException {
12241
      // check for required fields
12242
    }
12243
 
12244
  }
12245
 
495 rajveer 12246
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
12247
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
12248
 
12249
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12250
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 12251
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 12252
 
12253
    private long orderId;
12254
    private String invoice_number;
12255
    private String billed_by;
12256
 
12257
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12258
    public enum _Fields implements TFieldIdEnum {
12259
      ORDER_ID((short)1, "orderId"),
12260
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 12261
      BILLED_BY((short)3, "billed_by");
495 rajveer 12262
 
12263
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12264
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12265
 
12266
      static {
12267
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12268
          byId.put((int)field._thriftId, field);
12269
          byName.put(field.getFieldName(), field);
12270
        }
12271
      }
12272
 
12273
      /**
12274
       * Find the _Fields constant that matches fieldId, or null if its not found.
12275
       */
12276
      public static _Fields findByThriftId(int fieldId) {
12277
        return byId.get(fieldId);
12278
      }
12279
 
12280
      /**
12281
       * Find the _Fields constant that matches fieldId, throwing an exception
12282
       * if it is not found.
12283
       */
12284
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12285
        _Fields fields = findByThriftId(fieldId);
12286
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12287
        return fields;
12288
      }
12289
 
12290
      /**
12291
       * Find the _Fields constant that matches name, or null if its not found.
12292
       */
12293
      public static _Fields findByName(String name) {
12294
        return byName.get(name);
12295
      }
12296
 
12297
      private final short _thriftId;
12298
      private final String _fieldName;
12299
 
12300
      _Fields(short thriftId, String fieldName) {
12301
        _thriftId = thriftId;
12302
        _fieldName = fieldName;
12303
      }
12304
 
12305
      public short getThriftFieldId() {
12306
        return _thriftId;
12307
      }
12308
 
12309
      public String getFieldName() {
12310
        return _fieldName;
12311
      }
12312
    }
12313
 
12314
    // isset id assignments
12315
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12316
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12317
 
12318
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12319
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12320
          new FieldValueMetaData(TType.I64)));
12321
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12322
          new FieldValueMetaData(TType.STRING)));
12323
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12324
          new FieldValueMetaData(TType.STRING)));
12325
    }});
12326
 
12327
    static {
12328
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12329
    }
12330
 
12331
    public addBillingDetails_args() {
12332
    }
12333
 
12334
    public addBillingDetails_args(
12335
      long orderId,
12336
      String invoice_number,
12337
      String billed_by)
12338
    {
12339
      this();
12340
      this.orderId = orderId;
12341
      setOrderIdIsSet(true);
12342
      this.invoice_number = invoice_number;
12343
      this.billed_by = billed_by;
12344
    }
12345
 
12346
    /**
12347
     * Performs a deep copy on <i>other</i>.
12348
     */
12349
    public addBillingDetails_args(addBillingDetails_args other) {
12350
      __isset_bit_vector.clear();
12351
      __isset_bit_vector.or(other.__isset_bit_vector);
12352
      this.orderId = other.orderId;
12353
      if (other.isSetInvoice_number()) {
12354
        this.invoice_number = other.invoice_number;
12355
      }
12356
      if (other.isSetBilled_by()) {
12357
        this.billed_by = other.billed_by;
12358
      }
12359
    }
12360
 
12361
    public addBillingDetails_args deepCopy() {
12362
      return new addBillingDetails_args(this);
12363
    }
12364
 
12365
    @Deprecated
12366
    public addBillingDetails_args clone() {
12367
      return new addBillingDetails_args(this);
12368
    }
12369
 
12370
    public long getOrderId() {
12371
      return this.orderId;
12372
    }
12373
 
12374
    public addBillingDetails_args setOrderId(long orderId) {
12375
      this.orderId = orderId;
12376
      setOrderIdIsSet(true);
12377
      return this;
12378
    }
12379
 
12380
    public void unsetOrderId() {
12381
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12382
    }
12383
 
12384
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12385
    public boolean isSetOrderId() {
12386
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12387
    }
12388
 
12389
    public void setOrderIdIsSet(boolean value) {
12390
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12391
    }
12392
 
12393
    public String getInvoice_number() {
12394
      return this.invoice_number;
12395
    }
12396
 
12397
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12398
      this.invoice_number = invoice_number;
12399
      return this;
12400
    }
12401
 
12402
    public void unsetInvoice_number() {
12403
      this.invoice_number = null;
12404
    }
12405
 
12406
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12407
    public boolean isSetInvoice_number() {
12408
      return this.invoice_number != null;
12409
    }
12410
 
12411
    public void setInvoice_numberIsSet(boolean value) {
12412
      if (!value) {
12413
        this.invoice_number = null;
12414
      }
12415
    }
12416
 
12417
    public String getBilled_by() {
12418
      return this.billed_by;
12419
    }
12420
 
12421
    public addBillingDetails_args setBilled_by(String billed_by) {
12422
      this.billed_by = billed_by;
12423
      return this;
12424
    }
12425
 
12426
    public void unsetBilled_by() {
12427
      this.billed_by = null;
12428
    }
12429
 
12430
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12431
    public boolean isSetBilled_by() {
12432
      return this.billed_by != null;
12433
    }
12434
 
12435
    public void setBilled_byIsSet(boolean value) {
12436
      if (!value) {
12437
        this.billed_by = null;
12438
      }
12439
    }
12440
 
12441
    public void setFieldValue(_Fields field, Object value) {
12442
      switch (field) {
12443
      case ORDER_ID:
12444
        if (value == null) {
12445
          unsetOrderId();
12446
        } else {
12447
          setOrderId((Long)value);
12448
        }
12449
        break;
12450
 
12451
      case INVOICE_NUMBER:
12452
        if (value == null) {
12453
          unsetInvoice_number();
12454
        } else {
12455
          setInvoice_number((String)value);
12456
        }
12457
        break;
12458
 
12459
      case BILLED_BY:
12460
        if (value == null) {
12461
          unsetBilled_by();
12462
        } else {
12463
          setBilled_by((String)value);
12464
        }
12465
        break;
12466
 
12467
      }
12468
    }
12469
 
12470
    public void setFieldValue(int fieldID, Object value) {
12471
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12472
    }
12473
 
12474
    public Object getFieldValue(_Fields field) {
12475
      switch (field) {
12476
      case ORDER_ID:
12477
        return new Long(getOrderId());
12478
 
12479
      case INVOICE_NUMBER:
12480
        return getInvoice_number();
12481
 
12482
      case BILLED_BY:
12483
        return getBilled_by();
12484
 
12485
      }
12486
      throw new IllegalStateException();
12487
    }
12488
 
12489
    public Object getFieldValue(int fieldId) {
12490
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12491
    }
12492
 
12493
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12494
    public boolean isSet(_Fields field) {
12495
      switch (field) {
12496
      case ORDER_ID:
12497
        return isSetOrderId();
12498
      case INVOICE_NUMBER:
12499
        return isSetInvoice_number();
12500
      case BILLED_BY:
12501
        return isSetBilled_by();
12502
      }
12503
      throw new IllegalStateException();
12504
    }
12505
 
12506
    public boolean isSet(int fieldID) {
12507
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12508
    }
12509
 
12510
    @Override
12511
    public boolean equals(Object that) {
12512
      if (that == null)
12513
        return false;
12514
      if (that instanceof addBillingDetails_args)
12515
        return this.equals((addBillingDetails_args)that);
12516
      return false;
12517
    }
12518
 
12519
    public boolean equals(addBillingDetails_args that) {
12520
      if (that == null)
12521
        return false;
12522
 
12523
      boolean this_present_orderId = true;
12524
      boolean that_present_orderId = true;
12525
      if (this_present_orderId || that_present_orderId) {
12526
        if (!(this_present_orderId && that_present_orderId))
12527
          return false;
12528
        if (this.orderId != that.orderId)
12529
          return false;
12530
      }
12531
 
12532
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12533
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12534
      if (this_present_invoice_number || that_present_invoice_number) {
12535
        if (!(this_present_invoice_number && that_present_invoice_number))
12536
          return false;
12537
        if (!this.invoice_number.equals(that.invoice_number))
12538
          return false;
12539
      }
12540
 
12541
      boolean this_present_billed_by = true && this.isSetBilled_by();
12542
      boolean that_present_billed_by = true && that.isSetBilled_by();
12543
      if (this_present_billed_by || that_present_billed_by) {
12544
        if (!(this_present_billed_by && that_present_billed_by))
12545
          return false;
12546
        if (!this.billed_by.equals(that.billed_by))
12547
          return false;
12548
      }
12549
 
12550
      return true;
12551
    }
12552
 
12553
    @Override
12554
    public int hashCode() {
12555
      return 0;
12556
    }
12557
 
12558
    public int compareTo(addBillingDetails_args other) {
12559
      if (!getClass().equals(other.getClass())) {
12560
        return getClass().getName().compareTo(other.getClass().getName());
12561
      }
12562
 
12563
      int lastComparison = 0;
12564
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12565
 
12566
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12567
      if (lastComparison != 0) {
12568
        return lastComparison;
12569
      }
12570
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12571
      if (lastComparison != 0) {
12572
        return lastComparison;
12573
      }
12574
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12575
      if (lastComparison != 0) {
12576
        return lastComparison;
12577
      }
12578
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12579
      if (lastComparison != 0) {
12580
        return lastComparison;
12581
      }
12582
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12583
      if (lastComparison != 0) {
12584
        return lastComparison;
12585
      }
12586
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12587
      if (lastComparison != 0) {
12588
        return lastComparison;
12589
      }
12590
      return 0;
12591
    }
12592
 
12593
    public void read(TProtocol iprot) throws TException {
12594
      TField field;
12595
      iprot.readStructBegin();
12596
      while (true)
12597
      {
12598
        field = iprot.readFieldBegin();
12599
        if (field.type == TType.STOP) { 
12600
          break;
12601
        }
12602
        _Fields fieldId = _Fields.findByThriftId(field.id);
12603
        if (fieldId == null) {
12604
          TProtocolUtil.skip(iprot, field.type);
12605
        } else {
12606
          switch (fieldId) {
12607
            case ORDER_ID:
12608
              if (field.type == TType.I64) {
12609
                this.orderId = iprot.readI64();
12610
                setOrderIdIsSet(true);
12611
              } else { 
12612
                TProtocolUtil.skip(iprot, field.type);
12613
              }
12614
              break;
12615
            case INVOICE_NUMBER:
12616
              if (field.type == TType.STRING) {
12617
                this.invoice_number = iprot.readString();
12618
              } else { 
12619
                TProtocolUtil.skip(iprot, field.type);
12620
              }
12621
              break;
12622
            case BILLED_BY:
12623
              if (field.type == TType.STRING) {
12624
                this.billed_by = iprot.readString();
12625
              } else { 
12626
                TProtocolUtil.skip(iprot, field.type);
12627
              }
12628
              break;
12629
          }
12630
          iprot.readFieldEnd();
12631
        }
12632
      }
12633
      iprot.readStructEnd();
12634
      validate();
12635
    }
12636
 
12637
    public void write(TProtocol oprot) throws TException {
12638
      validate();
12639
 
12640
      oprot.writeStructBegin(STRUCT_DESC);
12641
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12642
      oprot.writeI64(this.orderId);
12643
      oprot.writeFieldEnd();
12644
      if (this.invoice_number != null) {
12645
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
12646
        oprot.writeString(this.invoice_number);
12647
        oprot.writeFieldEnd();
12648
      }
12649
      if (this.billed_by != null) {
12650
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
12651
        oprot.writeString(this.billed_by);
12652
        oprot.writeFieldEnd();
12653
      }
12654
      oprot.writeFieldStop();
12655
      oprot.writeStructEnd();
12656
    }
12657
 
12658
    @Override
12659
    public String toString() {
12660
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
12661
      boolean first = true;
12662
 
12663
      sb.append("orderId:");
12664
      sb.append(this.orderId);
12665
      first = false;
12666
      if (!first) sb.append(", ");
12667
      sb.append("invoice_number:");
12668
      if (this.invoice_number == null) {
12669
        sb.append("null");
12670
      } else {
12671
        sb.append(this.invoice_number);
12672
      }
12673
      first = false;
12674
      if (!first) sb.append(", ");
12675
      sb.append("billed_by:");
12676
      if (this.billed_by == null) {
12677
        sb.append("null");
12678
      } else {
12679
        sb.append(this.billed_by);
12680
      }
12681
      first = false;
12682
      sb.append(")");
12683
      return sb.toString();
12684
    }
12685
 
12686
    public void validate() throws TException {
12687
      // check for required fields
12688
    }
12689
 
12690
  }
12691
 
12692
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
12693
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
12694
 
12695
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12696
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12697
 
12698
    private boolean success;
12699
    private TransactionServiceException ex;
12700
 
12701
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12702
    public enum _Fields implements TFieldIdEnum {
12703
      SUCCESS((short)0, "success"),
12704
      EX((short)1, "ex");
12705
 
12706
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12707
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12708
 
12709
      static {
12710
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12711
          byId.put((int)field._thriftId, field);
12712
          byName.put(field.getFieldName(), field);
12713
        }
12714
      }
12715
 
12716
      /**
12717
       * Find the _Fields constant that matches fieldId, or null if its not found.
12718
       */
12719
      public static _Fields findByThriftId(int fieldId) {
12720
        return byId.get(fieldId);
12721
      }
12722
 
12723
      /**
12724
       * Find the _Fields constant that matches fieldId, throwing an exception
12725
       * if it is not found.
12726
       */
12727
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12728
        _Fields fields = findByThriftId(fieldId);
12729
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12730
        return fields;
12731
      }
12732
 
12733
      /**
12734
       * Find the _Fields constant that matches name, or null if its not found.
12735
       */
12736
      public static _Fields findByName(String name) {
12737
        return byName.get(name);
12738
      }
12739
 
12740
      private final short _thriftId;
12741
      private final String _fieldName;
12742
 
12743
      _Fields(short thriftId, String fieldName) {
12744
        _thriftId = thriftId;
12745
        _fieldName = fieldName;
12746
      }
12747
 
12748
      public short getThriftFieldId() {
12749
        return _thriftId;
12750
      }
12751
 
12752
      public String getFieldName() {
12753
        return _fieldName;
12754
      }
12755
    }
12756
 
12757
    // isset id assignments
12758
    private static final int __SUCCESS_ISSET_ID = 0;
12759
    private BitSet __isset_bit_vector = new BitSet(1);
12760
 
12761
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12762
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12763
          new FieldValueMetaData(TType.BOOL)));
12764
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12765
          new FieldValueMetaData(TType.STRUCT)));
12766
    }});
12767
 
12768
    static {
12769
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
12770
    }
12771
 
12772
    public addBillingDetails_result() {
12773
    }
12774
 
12775
    public addBillingDetails_result(
12776
      boolean success,
12777
      TransactionServiceException ex)
12778
    {
12779
      this();
12780
      this.success = success;
12781
      setSuccessIsSet(true);
12782
      this.ex = ex;
12783
    }
12784
 
12785
    /**
12786
     * Performs a deep copy on <i>other</i>.
12787
     */
12788
    public addBillingDetails_result(addBillingDetails_result other) {
12789
      __isset_bit_vector.clear();
12790
      __isset_bit_vector.or(other.__isset_bit_vector);
12791
      this.success = other.success;
12792
      if (other.isSetEx()) {
12793
        this.ex = new TransactionServiceException(other.ex);
12794
      }
12795
    }
12796
 
12797
    public addBillingDetails_result deepCopy() {
12798
      return new addBillingDetails_result(this);
12799
    }
12800
 
12801
    @Deprecated
12802
    public addBillingDetails_result clone() {
12803
      return new addBillingDetails_result(this);
12804
    }
12805
 
12806
    public boolean isSuccess() {
12807
      return this.success;
12808
    }
12809
 
12810
    public addBillingDetails_result setSuccess(boolean success) {
12811
      this.success = success;
12812
      setSuccessIsSet(true);
12813
      return this;
12814
    }
12815
 
12816
    public void unsetSuccess() {
12817
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12818
    }
12819
 
12820
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12821
    public boolean isSetSuccess() {
12822
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12823
    }
12824
 
12825
    public void setSuccessIsSet(boolean value) {
12826
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12827
    }
12828
 
12829
    public TransactionServiceException getEx() {
12830
      return this.ex;
12831
    }
12832
 
12833
    public addBillingDetails_result setEx(TransactionServiceException ex) {
12834
      this.ex = ex;
12835
      return this;
12836
    }
12837
 
12838
    public void unsetEx() {
12839
      this.ex = null;
12840
    }
12841
 
12842
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12843
    public boolean isSetEx() {
12844
      return this.ex != null;
12845
    }
12846
 
12847
    public void setExIsSet(boolean value) {
12848
      if (!value) {
12849
        this.ex = null;
12850
      }
12851
    }
12852
 
12853
    public void setFieldValue(_Fields field, Object value) {
12854
      switch (field) {
12855
      case SUCCESS:
12856
        if (value == null) {
12857
          unsetSuccess();
12858
        } else {
12859
          setSuccess((Boolean)value);
12860
        }
12861
        break;
12862
 
12863
      case EX:
12864
        if (value == null) {
12865
          unsetEx();
12866
        } else {
12867
          setEx((TransactionServiceException)value);
12868
        }
12869
        break;
12870
 
12871
      }
12872
    }
12873
 
12874
    public void setFieldValue(int fieldID, Object value) {
12875
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12876
    }
12877
 
12878
    public Object getFieldValue(_Fields field) {
12879
      switch (field) {
12880
      case SUCCESS:
12881
        return new Boolean(isSuccess());
12882
 
12883
      case EX:
12884
        return getEx();
12885
 
12886
      }
12887
      throw new IllegalStateException();
12888
    }
12889
 
12890
    public Object getFieldValue(int fieldId) {
12891
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12892
    }
12893
 
12894
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12895
    public boolean isSet(_Fields field) {
12896
      switch (field) {
12897
      case SUCCESS:
12898
        return isSetSuccess();
12899
      case EX:
12900
        return isSetEx();
12901
      }
12902
      throw new IllegalStateException();
12903
    }
12904
 
12905
    public boolean isSet(int fieldID) {
12906
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12907
    }
12908
 
12909
    @Override
12910
    public boolean equals(Object that) {
12911
      if (that == null)
12912
        return false;
12913
      if (that instanceof addBillingDetails_result)
12914
        return this.equals((addBillingDetails_result)that);
12915
      return false;
12916
    }
12917
 
12918
    public boolean equals(addBillingDetails_result that) {
12919
      if (that == null)
12920
        return false;
12921
 
12922
      boolean this_present_success = true;
12923
      boolean that_present_success = true;
12924
      if (this_present_success || that_present_success) {
12925
        if (!(this_present_success && that_present_success))
12926
          return false;
12927
        if (this.success != that.success)
12928
          return false;
12929
      }
12930
 
12931
      boolean this_present_ex = true && this.isSetEx();
12932
      boolean that_present_ex = true && that.isSetEx();
12933
      if (this_present_ex || that_present_ex) {
12934
        if (!(this_present_ex && that_present_ex))
12935
          return false;
12936
        if (!this.ex.equals(that.ex))
12937
          return false;
12938
      }
12939
 
12940
      return true;
12941
    }
12942
 
12943
    @Override
12944
    public int hashCode() {
12945
      return 0;
12946
    }
12947
 
12948
    public int compareTo(addBillingDetails_result other) {
12949
      if (!getClass().equals(other.getClass())) {
12950
        return getClass().getName().compareTo(other.getClass().getName());
12951
      }
12952
 
12953
      int lastComparison = 0;
12954
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
12955
 
12956
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12957
      if (lastComparison != 0) {
12958
        return lastComparison;
12959
      }
12960
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12961
      if (lastComparison != 0) {
12962
        return lastComparison;
12963
      }
12964
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12965
      if (lastComparison != 0) {
12966
        return lastComparison;
12967
      }
12968
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12969
      if (lastComparison != 0) {
12970
        return lastComparison;
12971
      }
12972
      return 0;
12973
    }
12974
 
12975
    public void read(TProtocol iprot) throws TException {
12976
      TField field;
12977
      iprot.readStructBegin();
12978
      while (true)
12979
      {
12980
        field = iprot.readFieldBegin();
12981
        if (field.type == TType.STOP) { 
12982
          break;
12983
        }
12984
        _Fields fieldId = _Fields.findByThriftId(field.id);
12985
        if (fieldId == null) {
12986
          TProtocolUtil.skip(iprot, field.type);
12987
        } else {
12988
          switch (fieldId) {
12989
            case SUCCESS:
12990
              if (field.type == TType.BOOL) {
12991
                this.success = iprot.readBool();
12992
                setSuccessIsSet(true);
12993
              } else { 
12994
                TProtocolUtil.skip(iprot, field.type);
12995
              }
12996
              break;
12997
            case EX:
12998
              if (field.type == TType.STRUCT) {
12999
                this.ex = new TransactionServiceException();
13000
                this.ex.read(iprot);
13001
              } else { 
13002
                TProtocolUtil.skip(iprot, field.type);
13003
              }
13004
              break;
13005
          }
13006
          iprot.readFieldEnd();
13007
        }
13008
      }
13009
      iprot.readStructEnd();
13010
      validate();
13011
    }
13012
 
13013
    public void write(TProtocol oprot) throws TException {
13014
      oprot.writeStructBegin(STRUCT_DESC);
13015
 
13016
      if (this.isSetSuccess()) {
13017
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13018
        oprot.writeBool(this.success);
13019
        oprot.writeFieldEnd();
13020
      } else if (this.isSetEx()) {
13021
        oprot.writeFieldBegin(EX_FIELD_DESC);
13022
        this.ex.write(oprot);
13023
        oprot.writeFieldEnd();
13024
      }
13025
      oprot.writeFieldStop();
13026
      oprot.writeStructEnd();
13027
    }
13028
 
13029
    @Override
13030
    public String toString() {
13031
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
13032
      boolean first = true;
13033
 
13034
      sb.append("success:");
13035
      sb.append(this.success);
13036
      first = false;
13037
      if (!first) sb.append(", ");
13038
      sb.append("ex:");
13039
      if (this.ex == null) {
13040
        sb.append("null");
13041
      } else {
13042
        sb.append(this.ex);
13043
      }
13044
      first = false;
13045
      sb.append(")");
13046
      return sb.toString();
13047
    }
13048
 
13049
    public void validate() throws TException {
13050
      // check for required fields
13051
    }
13052
 
13053
  }
13054
 
1148 chandransh 13055
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
13056
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
13057
 
13058
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13059
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
13060
 
13061
    private long orderId;
13062
    private long jacketNumber;
13063
 
13064
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13065
    public enum _Fields implements TFieldIdEnum {
13066
      ORDER_ID((short)1, "orderId"),
13067
      JACKET_NUMBER((short)2, "jacketNumber");
13068
 
13069
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13070
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13071
 
13072
      static {
13073
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13074
          byId.put((int)field._thriftId, field);
13075
          byName.put(field.getFieldName(), field);
13076
        }
13077
      }
13078
 
13079
      /**
13080
       * Find the _Fields constant that matches fieldId, or null if its not found.
13081
       */
13082
      public static _Fields findByThriftId(int fieldId) {
13083
        return byId.get(fieldId);
13084
      }
13085
 
13086
      /**
13087
       * Find the _Fields constant that matches fieldId, throwing an exception
13088
       * if it is not found.
13089
       */
13090
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13091
        _Fields fields = findByThriftId(fieldId);
13092
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13093
        return fields;
13094
      }
13095
 
13096
      /**
13097
       * Find the _Fields constant that matches name, or null if its not found.
13098
       */
13099
      public static _Fields findByName(String name) {
13100
        return byName.get(name);
13101
      }
13102
 
13103
      private final short _thriftId;
13104
      private final String _fieldName;
13105
 
13106
      _Fields(short thriftId, String fieldName) {
13107
        _thriftId = thriftId;
13108
        _fieldName = fieldName;
13109
      }
13110
 
13111
      public short getThriftFieldId() {
13112
        return _thriftId;
13113
      }
13114
 
13115
      public String getFieldName() {
13116
        return _fieldName;
13117
      }
13118
    }
13119
 
13120
    // isset id assignments
13121
    private static final int __ORDERID_ISSET_ID = 0;
13122
    private static final int __JACKETNUMBER_ISSET_ID = 1;
13123
    private BitSet __isset_bit_vector = new BitSet(2);
13124
 
13125
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13126
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13127
          new FieldValueMetaData(TType.I64)));
13128
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
13129
          new FieldValueMetaData(TType.I64)));
13130
    }});
13131
 
13132
    static {
13133
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
13134
    }
13135
 
13136
    public addJacketNumber_args() {
13137
    }
13138
 
13139
    public addJacketNumber_args(
13140
      long orderId,
13141
      long jacketNumber)
13142
    {
13143
      this();
13144
      this.orderId = orderId;
13145
      setOrderIdIsSet(true);
13146
      this.jacketNumber = jacketNumber;
13147
      setJacketNumberIsSet(true);
13148
    }
13149
 
13150
    /**
13151
     * Performs a deep copy on <i>other</i>.
13152
     */
13153
    public addJacketNumber_args(addJacketNumber_args other) {
13154
      __isset_bit_vector.clear();
13155
      __isset_bit_vector.or(other.__isset_bit_vector);
13156
      this.orderId = other.orderId;
13157
      this.jacketNumber = other.jacketNumber;
13158
    }
13159
 
13160
    public addJacketNumber_args deepCopy() {
13161
      return new addJacketNumber_args(this);
13162
    }
13163
 
13164
    @Deprecated
13165
    public addJacketNumber_args clone() {
13166
      return new addJacketNumber_args(this);
13167
    }
13168
 
13169
    public long getOrderId() {
13170
      return this.orderId;
13171
    }
13172
 
13173
    public addJacketNumber_args setOrderId(long orderId) {
13174
      this.orderId = orderId;
13175
      setOrderIdIsSet(true);
13176
      return this;
13177
    }
13178
 
13179
    public void unsetOrderId() {
13180
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13181
    }
13182
 
13183
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13184
    public boolean isSetOrderId() {
13185
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13186
    }
13187
 
13188
    public void setOrderIdIsSet(boolean value) {
13189
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13190
    }
13191
 
13192
    public long getJacketNumber() {
13193
      return this.jacketNumber;
13194
    }
13195
 
13196
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
13197
      this.jacketNumber = jacketNumber;
13198
      setJacketNumberIsSet(true);
13199
      return this;
13200
    }
13201
 
13202
    public void unsetJacketNumber() {
13203
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
13204
    }
13205
 
13206
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
13207
    public boolean isSetJacketNumber() {
13208
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
13209
    }
13210
 
13211
    public void setJacketNumberIsSet(boolean value) {
13212
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
13213
    }
13214
 
13215
    public void setFieldValue(_Fields field, Object value) {
13216
      switch (field) {
13217
      case ORDER_ID:
13218
        if (value == null) {
13219
          unsetOrderId();
13220
        } else {
13221
          setOrderId((Long)value);
13222
        }
13223
        break;
13224
 
13225
      case JACKET_NUMBER:
13226
        if (value == null) {
13227
          unsetJacketNumber();
13228
        } else {
13229
          setJacketNumber((Long)value);
13230
        }
13231
        break;
13232
 
13233
      }
13234
    }
13235
 
13236
    public void setFieldValue(int fieldID, Object value) {
13237
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13238
    }
13239
 
13240
    public Object getFieldValue(_Fields field) {
13241
      switch (field) {
13242
      case ORDER_ID:
13243
        return new Long(getOrderId());
13244
 
13245
      case JACKET_NUMBER:
13246
        return new Long(getJacketNumber());
13247
 
13248
      }
13249
      throw new IllegalStateException();
13250
    }
13251
 
13252
    public Object getFieldValue(int fieldId) {
13253
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13254
    }
13255
 
13256
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13257
    public boolean isSet(_Fields field) {
13258
      switch (field) {
13259
      case ORDER_ID:
13260
        return isSetOrderId();
13261
      case JACKET_NUMBER:
13262
        return isSetJacketNumber();
13263
      }
13264
      throw new IllegalStateException();
13265
    }
13266
 
13267
    public boolean isSet(int fieldID) {
13268
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13269
    }
13270
 
13271
    @Override
13272
    public boolean equals(Object that) {
13273
      if (that == null)
13274
        return false;
13275
      if (that instanceof addJacketNumber_args)
13276
        return this.equals((addJacketNumber_args)that);
13277
      return false;
13278
    }
13279
 
13280
    public boolean equals(addJacketNumber_args that) {
13281
      if (that == null)
13282
        return false;
13283
 
13284
      boolean this_present_orderId = true;
13285
      boolean that_present_orderId = true;
13286
      if (this_present_orderId || that_present_orderId) {
13287
        if (!(this_present_orderId && that_present_orderId))
13288
          return false;
13289
        if (this.orderId != that.orderId)
13290
          return false;
13291
      }
13292
 
13293
      boolean this_present_jacketNumber = true;
13294
      boolean that_present_jacketNumber = true;
13295
      if (this_present_jacketNumber || that_present_jacketNumber) {
13296
        if (!(this_present_jacketNumber && that_present_jacketNumber))
13297
          return false;
13298
        if (this.jacketNumber != that.jacketNumber)
13299
          return false;
13300
      }
13301
 
13302
      return true;
13303
    }
13304
 
13305
    @Override
13306
    public int hashCode() {
13307
      return 0;
13308
    }
13309
 
13310
    public int compareTo(addJacketNumber_args other) {
13311
      if (!getClass().equals(other.getClass())) {
13312
        return getClass().getName().compareTo(other.getClass().getName());
13313
      }
13314
 
13315
      int lastComparison = 0;
13316
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13317
 
13318
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13319
      if (lastComparison != 0) {
13320
        return lastComparison;
13321
      }
13322
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13323
      if (lastComparison != 0) {
13324
        return lastComparison;
13325
      }
13326
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13327
      if (lastComparison != 0) {
13328
        return lastComparison;
13329
      }
13330
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13331
      if (lastComparison != 0) {
13332
        return lastComparison;
13333
      }
13334
      return 0;
13335
    }
13336
 
13337
    public void read(TProtocol iprot) throws TException {
13338
      TField field;
13339
      iprot.readStructBegin();
13340
      while (true)
13341
      {
13342
        field = iprot.readFieldBegin();
13343
        if (field.type == TType.STOP) { 
13344
          break;
13345
        }
13346
        _Fields fieldId = _Fields.findByThriftId(field.id);
13347
        if (fieldId == null) {
13348
          TProtocolUtil.skip(iprot, field.type);
13349
        } else {
13350
          switch (fieldId) {
13351
            case ORDER_ID:
13352
              if (field.type == TType.I64) {
13353
                this.orderId = iprot.readI64();
13354
                setOrderIdIsSet(true);
13355
              } else { 
13356
                TProtocolUtil.skip(iprot, field.type);
13357
              }
13358
              break;
13359
            case JACKET_NUMBER:
13360
              if (field.type == TType.I64) {
13361
                this.jacketNumber = iprot.readI64();
13362
                setJacketNumberIsSet(true);
13363
              } else { 
13364
                TProtocolUtil.skip(iprot, field.type);
13365
              }
13366
              break;
13367
          }
13368
          iprot.readFieldEnd();
13369
        }
13370
      }
13371
      iprot.readStructEnd();
13372
      validate();
13373
    }
13374
 
13375
    public void write(TProtocol oprot) throws TException {
13376
      validate();
13377
 
13378
      oprot.writeStructBegin(STRUCT_DESC);
13379
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13380
      oprot.writeI64(this.orderId);
13381
      oprot.writeFieldEnd();
13382
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13383
      oprot.writeI64(this.jacketNumber);
13384
      oprot.writeFieldEnd();
13385
      oprot.writeFieldStop();
13386
      oprot.writeStructEnd();
13387
    }
13388
 
13389
    @Override
13390
    public String toString() {
13391
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13392
      boolean first = true;
13393
 
13394
      sb.append("orderId:");
13395
      sb.append(this.orderId);
13396
      first = false;
13397
      if (!first) sb.append(", ");
13398
      sb.append("jacketNumber:");
13399
      sb.append(this.jacketNumber);
13400
      first = false;
13401
      sb.append(")");
13402
      return sb.toString();
13403
    }
13404
 
13405
    public void validate() throws TException {
13406
      // check for required fields
13407
    }
13408
 
13409
  }
13410
 
13411
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13412
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13413
 
13414
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13415
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13416
 
13417
    private boolean success;
13418
    private TransactionServiceException ex;
13419
 
13420
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13421
    public enum _Fields implements TFieldIdEnum {
13422
      SUCCESS((short)0, "success"),
13423
      EX((short)1, "ex");
13424
 
13425
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13426
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13427
 
13428
      static {
13429
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13430
          byId.put((int)field._thriftId, field);
13431
          byName.put(field.getFieldName(), field);
13432
        }
13433
      }
13434
 
13435
      /**
13436
       * Find the _Fields constant that matches fieldId, or null if its not found.
13437
       */
13438
      public static _Fields findByThriftId(int fieldId) {
13439
        return byId.get(fieldId);
13440
      }
13441
 
13442
      /**
13443
       * Find the _Fields constant that matches fieldId, throwing an exception
13444
       * if it is not found.
13445
       */
13446
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13447
        _Fields fields = findByThriftId(fieldId);
13448
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13449
        return fields;
13450
      }
13451
 
13452
      /**
13453
       * Find the _Fields constant that matches name, or null if its not found.
13454
       */
13455
      public static _Fields findByName(String name) {
13456
        return byName.get(name);
13457
      }
13458
 
13459
      private final short _thriftId;
13460
      private final String _fieldName;
13461
 
13462
      _Fields(short thriftId, String fieldName) {
13463
        _thriftId = thriftId;
13464
        _fieldName = fieldName;
13465
      }
13466
 
13467
      public short getThriftFieldId() {
13468
        return _thriftId;
13469
      }
13470
 
13471
      public String getFieldName() {
13472
        return _fieldName;
13473
      }
13474
    }
13475
 
13476
    // isset id assignments
13477
    private static final int __SUCCESS_ISSET_ID = 0;
13478
    private BitSet __isset_bit_vector = new BitSet(1);
13479
 
13480
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13481
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13482
          new FieldValueMetaData(TType.BOOL)));
13483
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13484
          new FieldValueMetaData(TType.STRUCT)));
13485
    }});
13486
 
13487
    static {
13488
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13489
    }
13490
 
13491
    public addJacketNumber_result() {
13492
    }
13493
 
13494
    public addJacketNumber_result(
13495
      boolean success,
13496
      TransactionServiceException ex)
13497
    {
13498
      this();
13499
      this.success = success;
13500
      setSuccessIsSet(true);
13501
      this.ex = ex;
13502
    }
13503
 
13504
    /**
13505
     * Performs a deep copy on <i>other</i>.
13506
     */
13507
    public addJacketNumber_result(addJacketNumber_result other) {
13508
      __isset_bit_vector.clear();
13509
      __isset_bit_vector.or(other.__isset_bit_vector);
13510
      this.success = other.success;
13511
      if (other.isSetEx()) {
13512
        this.ex = new TransactionServiceException(other.ex);
13513
      }
13514
    }
13515
 
13516
    public addJacketNumber_result deepCopy() {
13517
      return new addJacketNumber_result(this);
13518
    }
13519
 
13520
    @Deprecated
13521
    public addJacketNumber_result clone() {
13522
      return new addJacketNumber_result(this);
13523
    }
13524
 
13525
    public boolean isSuccess() {
13526
      return this.success;
13527
    }
13528
 
13529
    public addJacketNumber_result setSuccess(boolean success) {
13530
      this.success = success;
13531
      setSuccessIsSet(true);
13532
      return this;
13533
    }
13534
 
13535
    public void unsetSuccess() {
13536
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13537
    }
13538
 
13539
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13540
    public boolean isSetSuccess() {
13541
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13542
    }
13543
 
13544
    public void setSuccessIsSet(boolean value) {
13545
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13546
    }
13547
 
13548
    public TransactionServiceException getEx() {
13549
      return this.ex;
13550
    }
13551
 
13552
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13553
      this.ex = ex;
13554
      return this;
13555
    }
13556
 
13557
    public void unsetEx() {
13558
      this.ex = null;
13559
    }
13560
 
13561
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13562
    public boolean isSetEx() {
13563
      return this.ex != null;
13564
    }
13565
 
13566
    public void setExIsSet(boolean value) {
13567
      if (!value) {
13568
        this.ex = null;
13569
      }
13570
    }
13571
 
13572
    public void setFieldValue(_Fields field, Object value) {
13573
      switch (field) {
13574
      case SUCCESS:
13575
        if (value == null) {
13576
          unsetSuccess();
13577
        } else {
13578
          setSuccess((Boolean)value);
13579
        }
13580
        break;
13581
 
13582
      case EX:
13583
        if (value == null) {
13584
          unsetEx();
13585
        } else {
13586
          setEx((TransactionServiceException)value);
13587
        }
13588
        break;
13589
 
13590
      }
13591
    }
13592
 
13593
    public void setFieldValue(int fieldID, Object value) {
13594
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13595
    }
13596
 
13597
    public Object getFieldValue(_Fields field) {
13598
      switch (field) {
13599
      case SUCCESS:
13600
        return new Boolean(isSuccess());
13601
 
13602
      case EX:
13603
        return getEx();
13604
 
13605
      }
13606
      throw new IllegalStateException();
13607
    }
13608
 
13609
    public Object getFieldValue(int fieldId) {
13610
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13611
    }
13612
 
13613
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13614
    public boolean isSet(_Fields field) {
13615
      switch (field) {
13616
      case SUCCESS:
13617
        return isSetSuccess();
13618
      case EX:
13619
        return isSetEx();
13620
      }
13621
      throw new IllegalStateException();
13622
    }
13623
 
13624
    public boolean isSet(int fieldID) {
13625
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13626
    }
13627
 
13628
    @Override
13629
    public boolean equals(Object that) {
13630
      if (that == null)
13631
        return false;
13632
      if (that instanceof addJacketNumber_result)
13633
        return this.equals((addJacketNumber_result)that);
13634
      return false;
13635
    }
13636
 
13637
    public boolean equals(addJacketNumber_result that) {
13638
      if (that == null)
13639
        return false;
13640
 
13641
      boolean this_present_success = true;
13642
      boolean that_present_success = true;
13643
      if (this_present_success || that_present_success) {
13644
        if (!(this_present_success && that_present_success))
13645
          return false;
13646
        if (this.success != that.success)
13647
          return false;
13648
      }
13649
 
13650
      boolean this_present_ex = true && this.isSetEx();
13651
      boolean that_present_ex = true && that.isSetEx();
13652
      if (this_present_ex || that_present_ex) {
13653
        if (!(this_present_ex && that_present_ex))
13654
          return false;
13655
        if (!this.ex.equals(that.ex))
13656
          return false;
13657
      }
13658
 
13659
      return true;
13660
    }
13661
 
13662
    @Override
13663
    public int hashCode() {
13664
      return 0;
13665
    }
13666
 
13667
    public int compareTo(addJacketNumber_result other) {
13668
      if (!getClass().equals(other.getClass())) {
13669
        return getClass().getName().compareTo(other.getClass().getName());
13670
      }
13671
 
13672
      int lastComparison = 0;
13673
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
13674
 
13675
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13676
      if (lastComparison != 0) {
13677
        return lastComparison;
13678
      }
13679
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13680
      if (lastComparison != 0) {
13681
        return lastComparison;
13682
      }
13683
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13684
      if (lastComparison != 0) {
13685
        return lastComparison;
13686
      }
13687
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13688
      if (lastComparison != 0) {
13689
        return lastComparison;
13690
      }
13691
      return 0;
13692
    }
13693
 
13694
    public void read(TProtocol iprot) throws TException {
13695
      TField field;
13696
      iprot.readStructBegin();
13697
      while (true)
13698
      {
13699
        field = iprot.readFieldBegin();
13700
        if (field.type == TType.STOP) { 
13701
          break;
13702
        }
13703
        _Fields fieldId = _Fields.findByThriftId(field.id);
13704
        if (fieldId == null) {
13705
          TProtocolUtil.skip(iprot, field.type);
13706
        } else {
13707
          switch (fieldId) {
13708
            case SUCCESS:
13709
              if (field.type == TType.BOOL) {
13710
                this.success = iprot.readBool();
13711
                setSuccessIsSet(true);
13712
              } else { 
13713
                TProtocolUtil.skip(iprot, field.type);
13714
              }
13715
              break;
13716
            case EX:
13717
              if (field.type == TType.STRUCT) {
13718
                this.ex = new TransactionServiceException();
13719
                this.ex.read(iprot);
13720
              } else { 
13721
                TProtocolUtil.skip(iprot, field.type);
13722
              }
13723
              break;
13724
          }
13725
          iprot.readFieldEnd();
13726
        }
13727
      }
13728
      iprot.readStructEnd();
13729
      validate();
13730
    }
13731
 
13732
    public void write(TProtocol oprot) throws TException {
13733
      oprot.writeStructBegin(STRUCT_DESC);
13734
 
13735
      if (this.isSetSuccess()) {
13736
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13737
        oprot.writeBool(this.success);
13738
        oprot.writeFieldEnd();
13739
      } else if (this.isSetEx()) {
13740
        oprot.writeFieldBegin(EX_FIELD_DESC);
13741
        this.ex.write(oprot);
13742
        oprot.writeFieldEnd();
13743
      }
13744
      oprot.writeFieldStop();
13745
      oprot.writeStructEnd();
13746
    }
13747
 
13748
    @Override
13749
    public String toString() {
13750
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
13751
      boolean first = true;
13752
 
13753
      sb.append("success:");
13754
      sb.append(this.success);
13755
      first = false;
13756
      if (!first) sb.append(", ");
13757
      sb.append("ex:");
13758
      if (this.ex == null) {
13759
        sb.append("null");
13760
      } else {
13761
        sb.append(this.ex);
13762
      }
13763
      first = false;
13764
      sb.append(")");
13765
      return sb.toString();
13766
    }
13767
 
13768
    public void validate() throws TException {
13769
      // check for required fields
13770
    }
13771
 
13772
  }
13773
 
923 rajveer 13774
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
13775
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
13776
 
13777
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13778
 
13779
    private long orderId;
13780
 
13781
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13782
    public enum _Fields implements TFieldIdEnum {
13783
      ORDER_ID((short)1, "orderId");
13784
 
13785
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13786
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13787
 
13788
      static {
13789
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13790
          byId.put((int)field._thriftId, field);
13791
          byName.put(field.getFieldName(), field);
13792
        }
13793
      }
13794
 
13795
      /**
13796
       * Find the _Fields constant that matches fieldId, or null if its not found.
13797
       */
13798
      public static _Fields findByThriftId(int fieldId) {
13799
        return byId.get(fieldId);
13800
      }
13801
 
13802
      /**
13803
       * Find the _Fields constant that matches fieldId, throwing an exception
13804
       * if it is not found.
13805
       */
13806
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13807
        _Fields fields = findByThriftId(fieldId);
13808
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13809
        return fields;
13810
      }
13811
 
13812
      /**
13813
       * Find the _Fields constant that matches name, or null if its not found.
13814
       */
13815
      public static _Fields findByName(String name) {
13816
        return byName.get(name);
13817
      }
13818
 
13819
      private final short _thriftId;
13820
      private final String _fieldName;
13821
 
13822
      _Fields(short thriftId, String fieldName) {
13823
        _thriftId = thriftId;
13824
        _fieldName = fieldName;
13825
      }
13826
 
13827
      public short getThriftFieldId() {
13828
        return _thriftId;
13829
      }
13830
 
13831
      public String getFieldName() {
13832
        return _fieldName;
13833
      }
13834
    }
13835
 
13836
    // isset id assignments
13837
    private static final int __ORDERID_ISSET_ID = 0;
13838
    private BitSet __isset_bit_vector = new BitSet(1);
13839
 
13840
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13841
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13842
          new FieldValueMetaData(TType.I64)));
13843
    }});
13844
 
13845
    static {
13846
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
13847
    }
13848
 
13849
    public acceptOrder_args() {
13850
    }
13851
 
13852
    public acceptOrder_args(
13853
      long orderId)
13854
    {
13855
      this();
13856
      this.orderId = orderId;
13857
      setOrderIdIsSet(true);
13858
    }
13859
 
13860
    /**
13861
     * Performs a deep copy on <i>other</i>.
13862
     */
13863
    public acceptOrder_args(acceptOrder_args other) {
13864
      __isset_bit_vector.clear();
13865
      __isset_bit_vector.or(other.__isset_bit_vector);
13866
      this.orderId = other.orderId;
13867
    }
13868
 
13869
    public acceptOrder_args deepCopy() {
13870
      return new acceptOrder_args(this);
13871
    }
13872
 
13873
    @Deprecated
13874
    public acceptOrder_args clone() {
13875
      return new acceptOrder_args(this);
13876
    }
13877
 
13878
    public long getOrderId() {
13879
      return this.orderId;
13880
    }
13881
 
13882
    public acceptOrder_args setOrderId(long orderId) {
13883
      this.orderId = orderId;
13884
      setOrderIdIsSet(true);
13885
      return this;
13886
    }
13887
 
13888
    public void unsetOrderId() {
13889
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13890
    }
13891
 
13892
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13893
    public boolean isSetOrderId() {
13894
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13895
    }
13896
 
13897
    public void setOrderIdIsSet(boolean value) {
13898
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13899
    }
13900
 
13901
    public void setFieldValue(_Fields field, Object value) {
13902
      switch (field) {
13903
      case ORDER_ID:
13904
        if (value == null) {
13905
          unsetOrderId();
13906
        } else {
13907
          setOrderId((Long)value);
13908
        }
13909
        break;
13910
 
13911
      }
13912
    }
13913
 
13914
    public void setFieldValue(int fieldID, Object value) {
13915
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13916
    }
13917
 
13918
    public Object getFieldValue(_Fields field) {
13919
      switch (field) {
13920
      case ORDER_ID:
13921
        return new Long(getOrderId());
13922
 
13923
      }
13924
      throw new IllegalStateException();
13925
    }
13926
 
13927
    public Object getFieldValue(int fieldId) {
13928
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13929
    }
13930
 
13931
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13932
    public boolean isSet(_Fields field) {
13933
      switch (field) {
13934
      case ORDER_ID:
13935
        return isSetOrderId();
13936
      }
13937
      throw new IllegalStateException();
13938
    }
13939
 
13940
    public boolean isSet(int fieldID) {
13941
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13942
    }
13943
 
13944
    @Override
13945
    public boolean equals(Object that) {
13946
      if (that == null)
13947
        return false;
13948
      if (that instanceof acceptOrder_args)
13949
        return this.equals((acceptOrder_args)that);
13950
      return false;
13951
    }
13952
 
13953
    public boolean equals(acceptOrder_args that) {
13954
      if (that == null)
13955
        return false;
13956
 
13957
      boolean this_present_orderId = true;
13958
      boolean that_present_orderId = true;
13959
      if (this_present_orderId || that_present_orderId) {
13960
        if (!(this_present_orderId && that_present_orderId))
13961
          return false;
13962
        if (this.orderId != that.orderId)
13963
          return false;
13964
      }
13965
 
13966
      return true;
13967
    }
13968
 
13969
    @Override
13970
    public int hashCode() {
13971
      return 0;
13972
    }
13973
 
13974
    public int compareTo(acceptOrder_args other) {
13975
      if (!getClass().equals(other.getClass())) {
13976
        return getClass().getName().compareTo(other.getClass().getName());
13977
      }
13978
 
13979
      int lastComparison = 0;
13980
      acceptOrder_args typedOther = (acceptOrder_args)other;
13981
 
13982
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13983
      if (lastComparison != 0) {
13984
        return lastComparison;
13985
      }
13986
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13987
      if (lastComparison != 0) {
13988
        return lastComparison;
13989
      }
13990
      return 0;
13991
    }
13992
 
13993
    public void read(TProtocol iprot) throws TException {
13994
      TField field;
13995
      iprot.readStructBegin();
13996
      while (true)
13997
      {
13998
        field = iprot.readFieldBegin();
13999
        if (field.type == TType.STOP) { 
14000
          break;
14001
        }
14002
        _Fields fieldId = _Fields.findByThriftId(field.id);
14003
        if (fieldId == null) {
14004
          TProtocolUtil.skip(iprot, field.type);
14005
        } else {
14006
          switch (fieldId) {
14007
            case ORDER_ID:
14008
              if (field.type == TType.I64) {
14009
                this.orderId = iprot.readI64();
14010
                setOrderIdIsSet(true);
14011
              } else { 
14012
                TProtocolUtil.skip(iprot, field.type);
14013
              }
14014
              break;
14015
          }
14016
          iprot.readFieldEnd();
14017
        }
14018
      }
14019
      iprot.readStructEnd();
14020
      validate();
14021
    }
14022
 
14023
    public void write(TProtocol oprot) throws TException {
14024
      validate();
14025
 
14026
      oprot.writeStructBegin(STRUCT_DESC);
14027
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14028
      oprot.writeI64(this.orderId);
14029
      oprot.writeFieldEnd();
14030
      oprot.writeFieldStop();
14031
      oprot.writeStructEnd();
14032
    }
14033
 
14034
    @Override
14035
    public String toString() {
14036
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
14037
      boolean first = true;
14038
 
14039
      sb.append("orderId:");
14040
      sb.append(this.orderId);
14041
      first = false;
14042
      sb.append(")");
14043
      return sb.toString();
14044
    }
14045
 
14046
    public void validate() throws TException {
14047
      // check for required fields
14048
    }
14049
 
14050
  }
14051
 
14052
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
14053
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
14054
 
14055
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14056
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14057
 
14058
    private boolean success;
14059
    private TransactionServiceException ex;
14060
 
14061
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14062
    public enum _Fields implements TFieldIdEnum {
14063
      SUCCESS((short)0, "success"),
14064
      EX((short)1, "ex");
14065
 
14066
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14067
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14068
 
14069
      static {
14070
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14071
          byId.put((int)field._thriftId, field);
14072
          byName.put(field.getFieldName(), field);
14073
        }
14074
      }
14075
 
14076
      /**
14077
       * Find the _Fields constant that matches fieldId, or null if its not found.
14078
       */
14079
      public static _Fields findByThriftId(int fieldId) {
14080
        return byId.get(fieldId);
14081
      }
14082
 
14083
      /**
14084
       * Find the _Fields constant that matches fieldId, throwing an exception
14085
       * if it is not found.
14086
       */
14087
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14088
        _Fields fields = findByThriftId(fieldId);
14089
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14090
        return fields;
14091
      }
14092
 
14093
      /**
14094
       * Find the _Fields constant that matches name, or null if its not found.
14095
       */
14096
      public static _Fields findByName(String name) {
14097
        return byName.get(name);
14098
      }
14099
 
14100
      private final short _thriftId;
14101
      private final String _fieldName;
14102
 
14103
      _Fields(short thriftId, String fieldName) {
14104
        _thriftId = thriftId;
14105
        _fieldName = fieldName;
14106
      }
14107
 
14108
      public short getThriftFieldId() {
14109
        return _thriftId;
14110
      }
14111
 
14112
      public String getFieldName() {
14113
        return _fieldName;
14114
      }
14115
    }
14116
 
14117
    // isset id assignments
14118
    private static final int __SUCCESS_ISSET_ID = 0;
14119
    private BitSet __isset_bit_vector = new BitSet(1);
14120
 
14121
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14122
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14123
          new FieldValueMetaData(TType.BOOL)));
14124
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14125
          new FieldValueMetaData(TType.STRUCT)));
14126
    }});
14127
 
14128
    static {
14129
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
14130
    }
14131
 
14132
    public acceptOrder_result() {
14133
    }
14134
 
14135
    public acceptOrder_result(
14136
      boolean success,
14137
      TransactionServiceException ex)
14138
    {
14139
      this();
14140
      this.success = success;
14141
      setSuccessIsSet(true);
14142
      this.ex = ex;
14143
    }
14144
 
14145
    /**
14146
     * Performs a deep copy on <i>other</i>.
14147
     */
14148
    public acceptOrder_result(acceptOrder_result other) {
14149
      __isset_bit_vector.clear();
14150
      __isset_bit_vector.or(other.__isset_bit_vector);
14151
      this.success = other.success;
14152
      if (other.isSetEx()) {
14153
        this.ex = new TransactionServiceException(other.ex);
14154
      }
14155
    }
14156
 
14157
    public acceptOrder_result deepCopy() {
14158
      return new acceptOrder_result(this);
14159
    }
14160
 
14161
    @Deprecated
14162
    public acceptOrder_result clone() {
14163
      return new acceptOrder_result(this);
14164
    }
14165
 
14166
    public boolean isSuccess() {
14167
      return this.success;
14168
    }
14169
 
14170
    public acceptOrder_result setSuccess(boolean success) {
14171
      this.success = success;
14172
      setSuccessIsSet(true);
14173
      return this;
14174
    }
14175
 
14176
    public void unsetSuccess() {
14177
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14178
    }
14179
 
14180
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14181
    public boolean isSetSuccess() {
14182
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14183
    }
14184
 
14185
    public void setSuccessIsSet(boolean value) {
14186
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14187
    }
14188
 
14189
    public TransactionServiceException getEx() {
14190
      return this.ex;
14191
    }
14192
 
14193
    public acceptOrder_result setEx(TransactionServiceException ex) {
14194
      this.ex = ex;
14195
      return this;
14196
    }
14197
 
14198
    public void unsetEx() {
14199
      this.ex = null;
14200
    }
14201
 
14202
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14203
    public boolean isSetEx() {
14204
      return this.ex != null;
14205
    }
14206
 
14207
    public void setExIsSet(boolean value) {
14208
      if (!value) {
14209
        this.ex = null;
14210
      }
14211
    }
14212
 
14213
    public void setFieldValue(_Fields field, Object value) {
14214
      switch (field) {
14215
      case SUCCESS:
14216
        if (value == null) {
14217
          unsetSuccess();
14218
        } else {
14219
          setSuccess((Boolean)value);
14220
        }
14221
        break;
14222
 
14223
      case EX:
14224
        if (value == null) {
14225
          unsetEx();
14226
        } else {
14227
          setEx((TransactionServiceException)value);
14228
        }
14229
        break;
14230
 
14231
      }
14232
    }
14233
 
14234
    public void setFieldValue(int fieldID, Object value) {
14235
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14236
    }
14237
 
14238
    public Object getFieldValue(_Fields field) {
14239
      switch (field) {
14240
      case SUCCESS:
14241
        return new Boolean(isSuccess());
14242
 
14243
      case EX:
14244
        return getEx();
14245
 
14246
      }
14247
      throw new IllegalStateException();
14248
    }
14249
 
14250
    public Object getFieldValue(int fieldId) {
14251
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14252
    }
14253
 
14254
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14255
    public boolean isSet(_Fields field) {
14256
      switch (field) {
14257
      case SUCCESS:
14258
        return isSetSuccess();
14259
      case EX:
14260
        return isSetEx();
14261
      }
14262
      throw new IllegalStateException();
14263
    }
14264
 
14265
    public boolean isSet(int fieldID) {
14266
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14267
    }
14268
 
14269
    @Override
14270
    public boolean equals(Object that) {
14271
      if (that == null)
14272
        return false;
14273
      if (that instanceof acceptOrder_result)
14274
        return this.equals((acceptOrder_result)that);
14275
      return false;
14276
    }
14277
 
14278
    public boolean equals(acceptOrder_result that) {
14279
      if (that == null)
14280
        return false;
14281
 
14282
      boolean this_present_success = true;
14283
      boolean that_present_success = true;
14284
      if (this_present_success || that_present_success) {
14285
        if (!(this_present_success && that_present_success))
14286
          return false;
14287
        if (this.success != that.success)
14288
          return false;
14289
      }
14290
 
14291
      boolean this_present_ex = true && this.isSetEx();
14292
      boolean that_present_ex = true && that.isSetEx();
14293
      if (this_present_ex || that_present_ex) {
14294
        if (!(this_present_ex && that_present_ex))
14295
          return false;
14296
        if (!this.ex.equals(that.ex))
14297
          return false;
14298
      }
14299
 
14300
      return true;
14301
    }
14302
 
14303
    @Override
14304
    public int hashCode() {
14305
      return 0;
14306
    }
14307
 
14308
    public int compareTo(acceptOrder_result other) {
14309
      if (!getClass().equals(other.getClass())) {
14310
        return getClass().getName().compareTo(other.getClass().getName());
14311
      }
14312
 
14313
      int lastComparison = 0;
14314
      acceptOrder_result typedOther = (acceptOrder_result)other;
14315
 
14316
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14317
      if (lastComparison != 0) {
14318
        return lastComparison;
14319
      }
14320
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14321
      if (lastComparison != 0) {
14322
        return lastComparison;
14323
      }
14324
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14325
      if (lastComparison != 0) {
14326
        return lastComparison;
14327
      }
14328
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14329
      if (lastComparison != 0) {
14330
        return lastComparison;
14331
      }
14332
      return 0;
14333
    }
14334
 
14335
    public void read(TProtocol iprot) throws TException {
14336
      TField field;
14337
      iprot.readStructBegin();
14338
      while (true)
14339
      {
14340
        field = iprot.readFieldBegin();
14341
        if (field.type == TType.STOP) { 
14342
          break;
14343
        }
14344
        _Fields fieldId = _Fields.findByThriftId(field.id);
14345
        if (fieldId == null) {
14346
          TProtocolUtil.skip(iprot, field.type);
14347
        } else {
14348
          switch (fieldId) {
14349
            case SUCCESS:
14350
              if (field.type == TType.BOOL) {
14351
                this.success = iprot.readBool();
14352
                setSuccessIsSet(true);
14353
              } else { 
14354
                TProtocolUtil.skip(iprot, field.type);
14355
              }
14356
              break;
14357
            case EX:
14358
              if (field.type == TType.STRUCT) {
14359
                this.ex = new TransactionServiceException();
14360
                this.ex.read(iprot);
14361
              } else { 
14362
                TProtocolUtil.skip(iprot, field.type);
14363
              }
14364
              break;
14365
          }
14366
          iprot.readFieldEnd();
14367
        }
14368
      }
14369
      iprot.readStructEnd();
14370
      validate();
14371
    }
14372
 
14373
    public void write(TProtocol oprot) throws TException {
14374
      oprot.writeStructBegin(STRUCT_DESC);
14375
 
14376
      if (this.isSetSuccess()) {
14377
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14378
        oprot.writeBool(this.success);
14379
        oprot.writeFieldEnd();
14380
      } else if (this.isSetEx()) {
14381
        oprot.writeFieldBegin(EX_FIELD_DESC);
14382
        this.ex.write(oprot);
14383
        oprot.writeFieldEnd();
14384
      }
14385
      oprot.writeFieldStop();
14386
      oprot.writeStructEnd();
14387
    }
14388
 
14389
    @Override
14390
    public String toString() {
14391
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14392
      boolean first = true;
14393
 
14394
      sb.append("success:");
14395
      sb.append(this.success);
14396
      first = false;
14397
      if (!first) sb.append(", ");
14398
      sb.append("ex:");
14399
      if (this.ex == null) {
14400
        sb.append("null");
14401
      } else {
14402
        sb.append(this.ex);
14403
      }
14404
      first = false;
14405
      sb.append(")");
14406
      return sb.toString();
14407
    }
14408
 
14409
    public void validate() throws TException {
14410
      // check for required fields
14411
    }
14412
 
14413
  }
14414
 
14415
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14416
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14417
 
14418
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14419
 
14420
    private long orderId;
14421
 
14422
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14423
    public enum _Fields implements TFieldIdEnum {
14424
      ORDER_ID((short)1, "orderId");
14425
 
14426
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14427
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14428
 
14429
      static {
14430
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14431
          byId.put((int)field._thriftId, field);
14432
          byName.put(field.getFieldName(), field);
14433
        }
14434
      }
14435
 
14436
      /**
14437
       * Find the _Fields constant that matches fieldId, or null if its not found.
14438
       */
14439
      public static _Fields findByThriftId(int fieldId) {
14440
        return byId.get(fieldId);
14441
      }
14442
 
14443
      /**
14444
       * Find the _Fields constant that matches fieldId, throwing an exception
14445
       * if it is not found.
14446
       */
14447
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14448
        _Fields fields = findByThriftId(fieldId);
14449
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14450
        return fields;
14451
      }
14452
 
14453
      /**
14454
       * Find the _Fields constant that matches name, or null if its not found.
14455
       */
14456
      public static _Fields findByName(String name) {
14457
        return byName.get(name);
14458
      }
14459
 
14460
      private final short _thriftId;
14461
      private final String _fieldName;
14462
 
14463
      _Fields(short thriftId, String fieldName) {
14464
        _thriftId = thriftId;
14465
        _fieldName = fieldName;
14466
      }
14467
 
14468
      public short getThriftFieldId() {
14469
        return _thriftId;
14470
      }
14471
 
14472
      public String getFieldName() {
14473
        return _fieldName;
14474
      }
14475
    }
14476
 
14477
    // isset id assignments
14478
    private static final int __ORDERID_ISSET_ID = 0;
14479
    private BitSet __isset_bit_vector = new BitSet(1);
14480
 
14481
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14482
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14483
          new FieldValueMetaData(TType.I64)));
14484
    }});
14485
 
14486
    static {
14487
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14488
    }
14489
 
14490
    public billOrder_args() {
14491
    }
14492
 
14493
    public billOrder_args(
14494
      long orderId)
14495
    {
14496
      this();
14497
      this.orderId = orderId;
14498
      setOrderIdIsSet(true);
14499
    }
14500
 
14501
    /**
14502
     * Performs a deep copy on <i>other</i>.
14503
     */
14504
    public billOrder_args(billOrder_args other) {
14505
      __isset_bit_vector.clear();
14506
      __isset_bit_vector.or(other.__isset_bit_vector);
14507
      this.orderId = other.orderId;
14508
    }
14509
 
14510
    public billOrder_args deepCopy() {
14511
      return new billOrder_args(this);
14512
    }
14513
 
14514
    @Deprecated
14515
    public billOrder_args clone() {
14516
      return new billOrder_args(this);
14517
    }
14518
 
14519
    public long getOrderId() {
14520
      return this.orderId;
14521
    }
14522
 
14523
    public billOrder_args setOrderId(long orderId) {
14524
      this.orderId = orderId;
14525
      setOrderIdIsSet(true);
14526
      return this;
14527
    }
14528
 
14529
    public void unsetOrderId() {
14530
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14531
    }
14532
 
14533
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14534
    public boolean isSetOrderId() {
14535
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14536
    }
14537
 
14538
    public void setOrderIdIsSet(boolean value) {
14539
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14540
    }
14541
 
14542
    public void setFieldValue(_Fields field, Object value) {
14543
      switch (field) {
14544
      case ORDER_ID:
14545
        if (value == null) {
14546
          unsetOrderId();
14547
        } else {
14548
          setOrderId((Long)value);
14549
        }
14550
        break;
14551
 
14552
      }
14553
    }
14554
 
14555
    public void setFieldValue(int fieldID, Object value) {
14556
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14557
    }
14558
 
14559
    public Object getFieldValue(_Fields field) {
14560
      switch (field) {
14561
      case ORDER_ID:
14562
        return new Long(getOrderId());
14563
 
14564
      }
14565
      throw new IllegalStateException();
14566
    }
14567
 
14568
    public Object getFieldValue(int fieldId) {
14569
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14570
    }
14571
 
14572
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14573
    public boolean isSet(_Fields field) {
14574
      switch (field) {
14575
      case ORDER_ID:
14576
        return isSetOrderId();
14577
      }
14578
      throw new IllegalStateException();
14579
    }
14580
 
14581
    public boolean isSet(int fieldID) {
14582
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14583
    }
14584
 
14585
    @Override
14586
    public boolean equals(Object that) {
14587
      if (that == null)
14588
        return false;
14589
      if (that instanceof billOrder_args)
14590
        return this.equals((billOrder_args)that);
14591
      return false;
14592
    }
14593
 
14594
    public boolean equals(billOrder_args that) {
14595
      if (that == null)
14596
        return false;
14597
 
14598
      boolean this_present_orderId = true;
14599
      boolean that_present_orderId = true;
14600
      if (this_present_orderId || that_present_orderId) {
14601
        if (!(this_present_orderId && that_present_orderId))
14602
          return false;
14603
        if (this.orderId != that.orderId)
14604
          return false;
14605
      }
14606
 
14607
      return true;
14608
    }
14609
 
14610
    @Override
14611
    public int hashCode() {
14612
      return 0;
14613
    }
14614
 
14615
    public int compareTo(billOrder_args other) {
14616
      if (!getClass().equals(other.getClass())) {
14617
        return getClass().getName().compareTo(other.getClass().getName());
14618
      }
14619
 
14620
      int lastComparison = 0;
14621
      billOrder_args typedOther = (billOrder_args)other;
14622
 
14623
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14624
      if (lastComparison != 0) {
14625
        return lastComparison;
14626
      }
14627
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14628
      if (lastComparison != 0) {
14629
        return lastComparison;
14630
      }
14631
      return 0;
14632
    }
14633
 
14634
    public void read(TProtocol iprot) throws TException {
14635
      TField field;
14636
      iprot.readStructBegin();
14637
      while (true)
14638
      {
14639
        field = iprot.readFieldBegin();
14640
        if (field.type == TType.STOP) { 
14641
          break;
14642
        }
14643
        _Fields fieldId = _Fields.findByThriftId(field.id);
14644
        if (fieldId == null) {
14645
          TProtocolUtil.skip(iprot, field.type);
14646
        } else {
14647
          switch (fieldId) {
14648
            case ORDER_ID:
14649
              if (field.type == TType.I64) {
14650
                this.orderId = iprot.readI64();
14651
                setOrderIdIsSet(true);
14652
              } else { 
14653
                TProtocolUtil.skip(iprot, field.type);
14654
              }
14655
              break;
14656
          }
14657
          iprot.readFieldEnd();
14658
        }
14659
      }
14660
      iprot.readStructEnd();
14661
      validate();
14662
    }
14663
 
14664
    public void write(TProtocol oprot) throws TException {
14665
      validate();
14666
 
14667
      oprot.writeStructBegin(STRUCT_DESC);
14668
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14669
      oprot.writeI64(this.orderId);
14670
      oprot.writeFieldEnd();
14671
      oprot.writeFieldStop();
14672
      oprot.writeStructEnd();
14673
    }
14674
 
14675
    @Override
14676
    public String toString() {
14677
      StringBuilder sb = new StringBuilder("billOrder_args(");
14678
      boolean first = true;
14679
 
14680
      sb.append("orderId:");
14681
      sb.append(this.orderId);
14682
      first = false;
14683
      sb.append(")");
14684
      return sb.toString();
14685
    }
14686
 
14687
    public void validate() throws TException {
14688
      // check for required fields
14689
    }
14690
 
14691
  }
14692
 
14693
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
14694
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
14695
 
14696
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14697
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14698
 
14699
    private boolean success;
14700
    private TransactionServiceException ex;
14701
 
14702
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14703
    public enum _Fields implements TFieldIdEnum {
14704
      SUCCESS((short)0, "success"),
14705
      EX((short)1, "ex");
14706
 
14707
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14708
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14709
 
14710
      static {
14711
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14712
          byId.put((int)field._thriftId, field);
14713
          byName.put(field.getFieldName(), field);
14714
        }
14715
      }
14716
 
14717
      /**
14718
       * Find the _Fields constant that matches fieldId, or null if its not found.
14719
       */
14720
      public static _Fields findByThriftId(int fieldId) {
14721
        return byId.get(fieldId);
14722
      }
14723
 
14724
      /**
14725
       * Find the _Fields constant that matches fieldId, throwing an exception
14726
       * if it is not found.
14727
       */
14728
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14729
        _Fields fields = findByThriftId(fieldId);
14730
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14731
        return fields;
14732
      }
14733
 
14734
      /**
14735
       * Find the _Fields constant that matches name, or null if its not found.
14736
       */
14737
      public static _Fields findByName(String name) {
14738
        return byName.get(name);
14739
      }
14740
 
14741
      private final short _thriftId;
14742
      private final String _fieldName;
14743
 
14744
      _Fields(short thriftId, String fieldName) {
14745
        _thriftId = thriftId;
14746
        _fieldName = fieldName;
14747
      }
14748
 
14749
      public short getThriftFieldId() {
14750
        return _thriftId;
14751
      }
14752
 
14753
      public String getFieldName() {
14754
        return _fieldName;
14755
      }
14756
    }
14757
 
14758
    // isset id assignments
14759
    private static final int __SUCCESS_ISSET_ID = 0;
14760
    private BitSet __isset_bit_vector = new BitSet(1);
14761
 
14762
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14763
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14764
          new FieldValueMetaData(TType.BOOL)));
14765
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14766
          new FieldValueMetaData(TType.STRUCT)));
14767
    }});
14768
 
14769
    static {
14770
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
14771
    }
14772
 
14773
    public billOrder_result() {
14774
    }
14775
 
14776
    public billOrder_result(
14777
      boolean success,
14778
      TransactionServiceException ex)
14779
    {
14780
      this();
14781
      this.success = success;
14782
      setSuccessIsSet(true);
14783
      this.ex = ex;
14784
    }
14785
 
14786
    /**
14787
     * Performs a deep copy on <i>other</i>.
14788
     */
14789
    public billOrder_result(billOrder_result other) {
14790
      __isset_bit_vector.clear();
14791
      __isset_bit_vector.or(other.__isset_bit_vector);
14792
      this.success = other.success;
14793
      if (other.isSetEx()) {
14794
        this.ex = new TransactionServiceException(other.ex);
14795
      }
14796
    }
14797
 
14798
    public billOrder_result deepCopy() {
14799
      return new billOrder_result(this);
14800
    }
14801
 
14802
    @Deprecated
14803
    public billOrder_result clone() {
14804
      return new billOrder_result(this);
14805
    }
14806
 
14807
    public boolean isSuccess() {
14808
      return this.success;
14809
    }
14810
 
14811
    public billOrder_result setSuccess(boolean success) {
14812
      this.success = success;
14813
      setSuccessIsSet(true);
14814
      return this;
14815
    }
14816
 
14817
    public void unsetSuccess() {
14818
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14819
    }
14820
 
14821
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14822
    public boolean isSetSuccess() {
14823
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14824
    }
14825
 
14826
    public void setSuccessIsSet(boolean value) {
14827
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14828
    }
14829
 
14830
    public TransactionServiceException getEx() {
14831
      return this.ex;
14832
    }
14833
 
14834
    public billOrder_result setEx(TransactionServiceException ex) {
14835
      this.ex = ex;
14836
      return this;
14837
    }
14838
 
14839
    public void unsetEx() {
14840
      this.ex = null;
14841
    }
14842
 
14843
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14844
    public boolean isSetEx() {
14845
      return this.ex != null;
14846
    }
14847
 
14848
    public void setExIsSet(boolean value) {
14849
      if (!value) {
14850
        this.ex = null;
14851
      }
14852
    }
14853
 
14854
    public void setFieldValue(_Fields field, Object value) {
14855
      switch (field) {
14856
      case SUCCESS:
14857
        if (value == null) {
14858
          unsetSuccess();
14859
        } else {
14860
          setSuccess((Boolean)value);
14861
        }
14862
        break;
14863
 
14864
      case EX:
14865
        if (value == null) {
14866
          unsetEx();
14867
        } else {
14868
          setEx((TransactionServiceException)value);
14869
        }
14870
        break;
14871
 
14872
      }
14873
    }
14874
 
14875
    public void setFieldValue(int fieldID, Object value) {
14876
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14877
    }
14878
 
14879
    public Object getFieldValue(_Fields field) {
14880
      switch (field) {
14881
      case SUCCESS:
14882
        return new Boolean(isSuccess());
14883
 
14884
      case EX:
14885
        return getEx();
14886
 
14887
      }
14888
      throw new IllegalStateException();
14889
    }
14890
 
14891
    public Object getFieldValue(int fieldId) {
14892
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14893
    }
14894
 
14895
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14896
    public boolean isSet(_Fields field) {
14897
      switch (field) {
14898
      case SUCCESS:
14899
        return isSetSuccess();
14900
      case EX:
14901
        return isSetEx();
14902
      }
14903
      throw new IllegalStateException();
14904
    }
14905
 
14906
    public boolean isSet(int fieldID) {
14907
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14908
    }
14909
 
14910
    @Override
14911
    public boolean equals(Object that) {
14912
      if (that == null)
14913
        return false;
14914
      if (that instanceof billOrder_result)
14915
        return this.equals((billOrder_result)that);
14916
      return false;
14917
    }
14918
 
14919
    public boolean equals(billOrder_result that) {
14920
      if (that == null)
14921
        return false;
14922
 
14923
      boolean this_present_success = true;
14924
      boolean that_present_success = true;
14925
      if (this_present_success || that_present_success) {
14926
        if (!(this_present_success && that_present_success))
14927
          return false;
14928
        if (this.success != that.success)
14929
          return false;
14930
      }
14931
 
14932
      boolean this_present_ex = true && this.isSetEx();
14933
      boolean that_present_ex = true && that.isSetEx();
14934
      if (this_present_ex || that_present_ex) {
14935
        if (!(this_present_ex && that_present_ex))
14936
          return false;
14937
        if (!this.ex.equals(that.ex))
14938
          return false;
14939
      }
14940
 
14941
      return true;
14942
    }
14943
 
14944
    @Override
14945
    public int hashCode() {
14946
      return 0;
14947
    }
14948
 
14949
    public int compareTo(billOrder_result other) {
14950
      if (!getClass().equals(other.getClass())) {
14951
        return getClass().getName().compareTo(other.getClass().getName());
14952
      }
14953
 
14954
      int lastComparison = 0;
14955
      billOrder_result typedOther = (billOrder_result)other;
14956
 
14957
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14958
      if (lastComparison != 0) {
14959
        return lastComparison;
14960
      }
14961
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14962
      if (lastComparison != 0) {
14963
        return lastComparison;
14964
      }
14965
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14966
      if (lastComparison != 0) {
14967
        return lastComparison;
14968
      }
14969
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14970
      if (lastComparison != 0) {
14971
        return lastComparison;
14972
      }
14973
      return 0;
14974
    }
14975
 
14976
    public void read(TProtocol iprot) throws TException {
14977
      TField field;
14978
      iprot.readStructBegin();
14979
      while (true)
14980
      {
14981
        field = iprot.readFieldBegin();
14982
        if (field.type == TType.STOP) { 
14983
          break;
14984
        }
14985
        _Fields fieldId = _Fields.findByThriftId(field.id);
14986
        if (fieldId == null) {
14987
          TProtocolUtil.skip(iprot, field.type);
14988
        } else {
14989
          switch (fieldId) {
14990
            case SUCCESS:
14991
              if (field.type == TType.BOOL) {
14992
                this.success = iprot.readBool();
14993
                setSuccessIsSet(true);
14994
              } else { 
14995
                TProtocolUtil.skip(iprot, field.type);
14996
              }
14997
              break;
14998
            case EX:
14999
              if (field.type == TType.STRUCT) {
15000
                this.ex = new TransactionServiceException();
15001
                this.ex.read(iprot);
15002
              } else { 
15003
                TProtocolUtil.skip(iprot, field.type);
15004
              }
15005
              break;
15006
          }
15007
          iprot.readFieldEnd();
15008
        }
15009
      }
15010
      iprot.readStructEnd();
15011
      validate();
15012
    }
15013
 
15014
    public void write(TProtocol oprot) throws TException {
15015
      oprot.writeStructBegin(STRUCT_DESC);
15016
 
15017
      if (this.isSetSuccess()) {
15018
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
15019
        oprot.writeBool(this.success);
15020
        oprot.writeFieldEnd();
15021
      } else if (this.isSetEx()) {
15022
        oprot.writeFieldBegin(EX_FIELD_DESC);
15023
        this.ex.write(oprot);
15024
        oprot.writeFieldEnd();
15025
      }
15026
      oprot.writeFieldStop();
15027
      oprot.writeStructEnd();
15028
    }
15029
 
15030
    @Override
15031
    public String toString() {
15032
      StringBuilder sb = new StringBuilder("billOrder_result(");
15033
      boolean first = true;
15034
 
15035
      sb.append("success:");
15036
      sb.append(this.success);
15037
      first = false;
15038
      if (!first) sb.append(", ");
15039
      sb.append("ex:");
15040
      if (this.ex == null) {
15041
        sb.append("null");
15042
      } else {
15043
        sb.append(this.ex);
15044
      }
15045
      first = false;
15046
      sb.append(")");
15047
      return sb.toString();
15048
    }
15049
 
15050
    public void validate() throws TException {
15051
      // check for required fields
15052
    }
15053
 
15054
  }
15055
 
483 rajveer 15056
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
15057
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 15058
 
15059
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 15060
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 15061
 
15062
    private long transactionId;
1529 ankur.sing 15063
    private long customerId;
68 ashish 15064
 
15065
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15066
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 15067
      TRANSACTION_ID((short)1, "transactionId"),
15068
      CUSTOMER_ID((short)2, "customerId");
68 ashish 15069
 
15070
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15071
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15072
 
15073
      static {
15074
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15075
          byId.put((int)field._thriftId, field);
15076
          byName.put(field.getFieldName(), field);
15077
        }
15078
      }
15079
 
15080
      /**
15081
       * Find the _Fields constant that matches fieldId, or null if its not found.
15082
       */
15083
      public static _Fields findByThriftId(int fieldId) {
15084
        return byId.get(fieldId);
15085
      }
15086
 
15087
      /**
15088
       * Find the _Fields constant that matches fieldId, throwing an exception
15089
       * if it is not found.
15090
       */
15091
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15092
        _Fields fields = findByThriftId(fieldId);
15093
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15094
        return fields;
15095
      }
15096
 
15097
      /**
15098
       * Find the _Fields constant that matches name, or null if its not found.
15099
       */
15100
      public static _Fields findByName(String name) {
15101
        return byName.get(name);
15102
      }
15103
 
15104
      private final short _thriftId;
15105
      private final String _fieldName;
15106
 
15107
      _Fields(short thriftId, String fieldName) {
15108
        _thriftId = thriftId;
15109
        _fieldName = fieldName;
15110
      }
15111
 
15112
      public short getThriftFieldId() {
15113
        return _thriftId;
15114
      }
15115
 
15116
      public String getFieldName() {
15117
        return _fieldName;
15118
      }
15119
    }
15120
 
15121
    // isset id assignments
15122
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 15123
    private static final int __CUSTOMERID_ISSET_ID = 1;
15124
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 15125
 
15126
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15127
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
15128
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 15129
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
15130
          new FieldValueMetaData(TType.I64)));
68 ashish 15131
    }});
15132
 
15133
    static {
483 rajveer 15134
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 15135
    }
15136
 
483 rajveer 15137
    public getOrdersForTransaction_args() {
68 ashish 15138
    }
15139
 
483 rajveer 15140
    public getOrdersForTransaction_args(
1529 ankur.sing 15141
      long transactionId,
15142
      long customerId)
68 ashish 15143
    {
15144
      this();
15145
      this.transactionId = transactionId;
15146
      setTransactionIdIsSet(true);
1529 ankur.sing 15147
      this.customerId = customerId;
15148
      setCustomerIdIsSet(true);
68 ashish 15149
    }
15150
 
15151
    /**
15152
     * Performs a deep copy on <i>other</i>.
15153
     */
483 rajveer 15154
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 15155
      __isset_bit_vector.clear();
15156
      __isset_bit_vector.or(other.__isset_bit_vector);
15157
      this.transactionId = other.transactionId;
1529 ankur.sing 15158
      this.customerId = other.customerId;
68 ashish 15159
    }
15160
 
483 rajveer 15161
    public getOrdersForTransaction_args deepCopy() {
15162
      return new getOrdersForTransaction_args(this);
68 ashish 15163
    }
15164
 
15165
    @Deprecated
483 rajveer 15166
    public getOrdersForTransaction_args clone() {
15167
      return new getOrdersForTransaction_args(this);
68 ashish 15168
    }
15169
 
15170
    public long getTransactionId() {
15171
      return this.transactionId;
15172
    }
15173
 
483 rajveer 15174
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 15175
      this.transactionId = transactionId;
15176
      setTransactionIdIsSet(true);
15177
      return this;
15178
    }
15179
 
15180
    public void unsetTransactionId() {
15181
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15182
    }
15183
 
15184
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15185
    public boolean isSetTransactionId() {
15186
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15187
    }
15188
 
15189
    public void setTransactionIdIsSet(boolean value) {
15190
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15191
    }
15192
 
1529 ankur.sing 15193
    public long getCustomerId() {
15194
      return this.customerId;
15195
    }
15196
 
15197
    public getOrdersForTransaction_args setCustomerId(long customerId) {
15198
      this.customerId = customerId;
15199
      setCustomerIdIsSet(true);
15200
      return this;
15201
    }
15202
 
15203
    public void unsetCustomerId() {
15204
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
15205
    }
15206
 
15207
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15208
    public boolean isSetCustomerId() {
15209
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
15210
    }
15211
 
15212
    public void setCustomerIdIsSet(boolean value) {
15213
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
15214
    }
15215
 
68 ashish 15216
    public void setFieldValue(_Fields field, Object value) {
15217
      switch (field) {
15218
      case TRANSACTION_ID:
15219
        if (value == null) {
15220
          unsetTransactionId();
15221
        } else {
15222
          setTransactionId((Long)value);
15223
        }
15224
        break;
15225
 
1529 ankur.sing 15226
      case CUSTOMER_ID:
15227
        if (value == null) {
15228
          unsetCustomerId();
15229
        } else {
15230
          setCustomerId((Long)value);
15231
        }
15232
        break;
15233
 
68 ashish 15234
      }
15235
    }
15236
 
15237
    public void setFieldValue(int fieldID, Object value) {
15238
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15239
    }
15240
 
15241
    public Object getFieldValue(_Fields field) {
15242
      switch (field) {
15243
      case TRANSACTION_ID:
15244
        return new Long(getTransactionId());
15245
 
1529 ankur.sing 15246
      case CUSTOMER_ID:
15247
        return new Long(getCustomerId());
15248
 
68 ashish 15249
      }
15250
      throw new IllegalStateException();
15251
    }
15252
 
15253
    public Object getFieldValue(int fieldId) {
15254
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15255
    }
15256
 
15257
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15258
    public boolean isSet(_Fields field) {
15259
      switch (field) {
15260
      case TRANSACTION_ID:
15261
        return isSetTransactionId();
1529 ankur.sing 15262
      case CUSTOMER_ID:
15263
        return isSetCustomerId();
68 ashish 15264
      }
15265
      throw new IllegalStateException();
15266
    }
15267
 
15268
    public boolean isSet(int fieldID) {
15269
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15270
    }
15271
 
15272
    @Override
15273
    public boolean equals(Object that) {
15274
      if (that == null)
15275
        return false;
483 rajveer 15276
      if (that instanceof getOrdersForTransaction_args)
15277
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 15278
      return false;
15279
    }
15280
 
483 rajveer 15281
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 15282
      if (that == null)
15283
        return false;
15284
 
15285
      boolean this_present_transactionId = true;
15286
      boolean that_present_transactionId = true;
15287
      if (this_present_transactionId || that_present_transactionId) {
15288
        if (!(this_present_transactionId && that_present_transactionId))
15289
          return false;
15290
        if (this.transactionId != that.transactionId)
15291
          return false;
15292
      }
15293
 
1529 ankur.sing 15294
      boolean this_present_customerId = true;
15295
      boolean that_present_customerId = true;
15296
      if (this_present_customerId || that_present_customerId) {
15297
        if (!(this_present_customerId && that_present_customerId))
15298
          return false;
15299
        if (this.customerId != that.customerId)
15300
          return false;
15301
      }
15302
 
68 ashish 15303
      return true;
15304
    }
15305
 
15306
    @Override
15307
    public int hashCode() {
15308
      return 0;
15309
    }
15310
 
483 rajveer 15311
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 15312
      if (!getClass().equals(other.getClass())) {
15313
        return getClass().getName().compareTo(other.getClass().getName());
15314
      }
15315
 
15316
      int lastComparison = 0;
483 rajveer 15317
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 15318
 
15319
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15320
      if (lastComparison != 0) {
15321
        return lastComparison;
15322
      }
15323
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15324
      if (lastComparison != 0) {
15325
        return lastComparison;
15326
      }
1529 ankur.sing 15327
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
15328
      if (lastComparison != 0) {
15329
        return lastComparison;
15330
      }
15331
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
15332
      if (lastComparison != 0) {
15333
        return lastComparison;
15334
      }
68 ashish 15335
      return 0;
15336
    }
15337
 
15338
    public void read(TProtocol iprot) throws TException {
15339
      TField field;
15340
      iprot.readStructBegin();
15341
      while (true)
15342
      {
15343
        field = iprot.readFieldBegin();
15344
        if (field.type == TType.STOP) { 
15345
          break;
15346
        }
15347
        _Fields fieldId = _Fields.findByThriftId(field.id);
15348
        if (fieldId == null) {
15349
          TProtocolUtil.skip(iprot, field.type);
15350
        } else {
15351
          switch (fieldId) {
15352
            case TRANSACTION_ID:
15353
              if (field.type == TType.I64) {
15354
                this.transactionId = iprot.readI64();
15355
                setTransactionIdIsSet(true);
15356
              } else { 
15357
                TProtocolUtil.skip(iprot, field.type);
15358
              }
15359
              break;
1529 ankur.sing 15360
            case CUSTOMER_ID:
15361
              if (field.type == TType.I64) {
15362
                this.customerId = iprot.readI64();
15363
                setCustomerIdIsSet(true);
15364
              } else { 
15365
                TProtocolUtil.skip(iprot, field.type);
15366
              }
15367
              break;
68 ashish 15368
          }
15369
          iprot.readFieldEnd();
15370
        }
15371
      }
15372
      iprot.readStructEnd();
15373
      validate();
15374
    }
15375
 
15376
    public void write(TProtocol oprot) throws TException {
15377
      validate();
15378
 
15379
      oprot.writeStructBegin(STRUCT_DESC);
15380
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15381
      oprot.writeI64(this.transactionId);
15382
      oprot.writeFieldEnd();
1529 ankur.sing 15383
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15384
      oprot.writeI64(this.customerId);
15385
      oprot.writeFieldEnd();
68 ashish 15386
      oprot.writeFieldStop();
15387
      oprot.writeStructEnd();
15388
    }
15389
 
15390
    @Override
15391
    public String toString() {
483 rajveer 15392
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15393
      boolean first = true;
15394
 
15395
      sb.append("transactionId:");
15396
      sb.append(this.transactionId);
15397
      first = false;
1529 ankur.sing 15398
      if (!first) sb.append(", ");
15399
      sb.append("customerId:");
15400
      sb.append(this.customerId);
15401
      first = false;
68 ashish 15402
      sb.append(")");
15403
      return sb.toString();
15404
    }
15405
 
15406
    public void validate() throws TException {
15407
      // check for required fields
15408
    }
15409
 
15410
  }
15411
 
483 rajveer 15412
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15413
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15414
 
483 rajveer 15415
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15416
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15417
 
483 rajveer 15418
    private List<Order> success;
68 ashish 15419
    private TransactionServiceException ex;
15420
 
15421
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15422
    public enum _Fields implements TFieldIdEnum {
15423
      SUCCESS((short)0, "success"),
15424
      EX((short)1, "ex");
15425
 
15426
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15427
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15428
 
15429
      static {
15430
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15431
          byId.put((int)field._thriftId, field);
15432
          byName.put(field.getFieldName(), field);
15433
        }
15434
      }
15435
 
15436
      /**
15437
       * Find the _Fields constant that matches fieldId, or null if its not found.
15438
       */
15439
      public static _Fields findByThriftId(int fieldId) {
15440
        return byId.get(fieldId);
15441
      }
15442
 
15443
      /**
15444
       * Find the _Fields constant that matches fieldId, throwing an exception
15445
       * if it is not found.
15446
       */
15447
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15448
        _Fields fields = findByThriftId(fieldId);
15449
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15450
        return fields;
15451
      }
15452
 
15453
      /**
15454
       * Find the _Fields constant that matches name, or null if its not found.
15455
       */
15456
      public static _Fields findByName(String name) {
15457
        return byName.get(name);
15458
      }
15459
 
15460
      private final short _thriftId;
15461
      private final String _fieldName;
15462
 
15463
      _Fields(short thriftId, String fieldName) {
15464
        _thriftId = thriftId;
15465
        _fieldName = fieldName;
15466
      }
15467
 
15468
      public short getThriftFieldId() {
15469
        return _thriftId;
15470
      }
15471
 
15472
      public String getFieldName() {
15473
        return _fieldName;
15474
      }
15475
    }
15476
 
15477
    // isset id assignments
15478
 
15479
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15480
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15481
          new ListMetaData(TType.LIST, 
15482
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15483
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15484
          new FieldValueMetaData(TType.STRUCT)));
15485
    }});
15486
 
15487
    static {
483 rajveer 15488
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15489
    }
15490
 
483 rajveer 15491
    public getOrdersForTransaction_result() {
68 ashish 15492
    }
15493
 
483 rajveer 15494
    public getOrdersForTransaction_result(
15495
      List<Order> success,
68 ashish 15496
      TransactionServiceException ex)
15497
    {
15498
      this();
15499
      this.success = success;
15500
      this.ex = ex;
15501
    }
15502
 
15503
    /**
15504
     * Performs a deep copy on <i>other</i>.
15505
     */
483 rajveer 15506
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15507
      if (other.isSetSuccess()) {
15508
        List<Order> __this__success = new ArrayList<Order>();
15509
        for (Order other_element : other.success) {
15510
          __this__success.add(new Order(other_element));
15511
        }
15512
        this.success = __this__success;
15513
      }
68 ashish 15514
      if (other.isSetEx()) {
15515
        this.ex = new TransactionServiceException(other.ex);
15516
      }
15517
    }
15518
 
483 rajveer 15519
    public getOrdersForTransaction_result deepCopy() {
15520
      return new getOrdersForTransaction_result(this);
68 ashish 15521
    }
15522
 
15523
    @Deprecated
483 rajveer 15524
    public getOrdersForTransaction_result clone() {
15525
      return new getOrdersForTransaction_result(this);
68 ashish 15526
    }
15527
 
483 rajveer 15528
    public int getSuccessSize() {
15529
      return (this.success == null) ? 0 : this.success.size();
15530
    }
15531
 
15532
    public java.util.Iterator<Order> getSuccessIterator() {
15533
      return (this.success == null) ? null : this.success.iterator();
15534
    }
15535
 
15536
    public void addToSuccess(Order elem) {
15537
      if (this.success == null) {
15538
        this.success = new ArrayList<Order>();
15539
      }
15540
      this.success.add(elem);
15541
    }
15542
 
15543
    public List<Order> getSuccess() {
68 ashish 15544
      return this.success;
15545
    }
15546
 
483 rajveer 15547
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15548
      this.success = success;
15549
      return this;
15550
    }
15551
 
15552
    public void unsetSuccess() {
483 rajveer 15553
      this.success = null;
68 ashish 15554
    }
15555
 
15556
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15557
    public boolean isSetSuccess() {
483 rajveer 15558
      return this.success != null;
68 ashish 15559
    }
15560
 
15561
    public void setSuccessIsSet(boolean value) {
483 rajveer 15562
      if (!value) {
15563
        this.success = null;
15564
      }
68 ashish 15565
    }
15566
 
15567
    public TransactionServiceException getEx() {
15568
      return this.ex;
15569
    }
15570
 
483 rajveer 15571
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15572
      this.ex = ex;
15573
      return this;
15574
    }
15575
 
15576
    public void unsetEx() {
15577
      this.ex = null;
15578
    }
15579
 
15580
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15581
    public boolean isSetEx() {
15582
      return this.ex != null;
15583
    }
15584
 
15585
    public void setExIsSet(boolean value) {
15586
      if (!value) {
15587
        this.ex = null;
15588
      }
15589
    }
15590
 
15591
    public void setFieldValue(_Fields field, Object value) {
15592
      switch (field) {
15593
      case SUCCESS:
15594
        if (value == null) {
15595
          unsetSuccess();
15596
        } else {
483 rajveer 15597
          setSuccess((List<Order>)value);
68 ashish 15598
        }
15599
        break;
15600
 
15601
      case EX:
15602
        if (value == null) {
15603
          unsetEx();
15604
        } else {
15605
          setEx((TransactionServiceException)value);
15606
        }
15607
        break;
15608
 
15609
      }
15610
    }
15611
 
15612
    public void setFieldValue(int fieldID, Object value) {
15613
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15614
    }
15615
 
15616
    public Object getFieldValue(_Fields field) {
15617
      switch (field) {
15618
      case SUCCESS:
483 rajveer 15619
        return getSuccess();
68 ashish 15620
 
15621
      case EX:
15622
        return getEx();
15623
 
15624
      }
15625
      throw new IllegalStateException();
15626
    }
15627
 
15628
    public Object getFieldValue(int fieldId) {
15629
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15630
    }
15631
 
15632
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15633
    public boolean isSet(_Fields field) {
15634
      switch (field) {
15635
      case SUCCESS:
15636
        return isSetSuccess();
15637
      case EX:
15638
        return isSetEx();
15639
      }
15640
      throw new IllegalStateException();
15641
    }
15642
 
15643
    public boolean isSet(int fieldID) {
15644
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15645
    }
15646
 
15647
    @Override
15648
    public boolean equals(Object that) {
15649
      if (that == null)
15650
        return false;
483 rajveer 15651
      if (that instanceof getOrdersForTransaction_result)
15652
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 15653
      return false;
15654
    }
15655
 
483 rajveer 15656
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 15657
      if (that == null)
15658
        return false;
15659
 
483 rajveer 15660
      boolean this_present_success = true && this.isSetSuccess();
15661
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15662
      if (this_present_success || that_present_success) {
15663
        if (!(this_present_success && that_present_success))
15664
          return false;
483 rajveer 15665
        if (!this.success.equals(that.success))
68 ashish 15666
          return false;
15667
      }
15668
 
15669
      boolean this_present_ex = true && this.isSetEx();
15670
      boolean that_present_ex = true && that.isSetEx();
15671
      if (this_present_ex || that_present_ex) {
15672
        if (!(this_present_ex && that_present_ex))
15673
          return false;
15674
        if (!this.ex.equals(that.ex))
15675
          return false;
15676
      }
15677
 
15678
      return true;
15679
    }
15680
 
15681
    @Override
15682
    public int hashCode() {
15683
      return 0;
15684
    }
15685
 
483 rajveer 15686
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 15687
      if (!getClass().equals(other.getClass())) {
15688
        return getClass().getName().compareTo(other.getClass().getName());
15689
      }
15690
 
15691
      int lastComparison = 0;
483 rajveer 15692
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 15693
 
15694
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15695
      if (lastComparison != 0) {
15696
        return lastComparison;
15697
      }
15698
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15699
      if (lastComparison != 0) {
15700
        return lastComparison;
15701
      }
15702
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15703
      if (lastComparison != 0) {
15704
        return lastComparison;
15705
      }
15706
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15707
      if (lastComparison != 0) {
15708
        return lastComparison;
15709
      }
15710
      return 0;
15711
    }
15712
 
15713
    public void read(TProtocol iprot) throws TException {
15714
      TField field;
15715
      iprot.readStructBegin();
15716
      while (true)
15717
      {
15718
        field = iprot.readFieldBegin();
15719
        if (field.type == TType.STOP) { 
15720
          break;
15721
        }
15722
        _Fields fieldId = _Fields.findByThriftId(field.id);
15723
        if (fieldId == null) {
15724
          TProtocolUtil.skip(iprot, field.type);
15725
        } else {
15726
          switch (fieldId) {
15727
            case SUCCESS:
483 rajveer 15728
              if (field.type == TType.LIST) {
15729
                {
1382 varun.gupt 15730
                  TList _list32 = iprot.readListBegin();
15731
                  this.success = new ArrayList<Order>(_list32.size);
15732
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15733
                  {
1382 varun.gupt 15734
                    Order _elem34;
15735
                    _elem34 = new Order();
15736
                    _elem34.read(iprot);
15737
                    this.success.add(_elem34);
483 rajveer 15738
                  }
15739
                  iprot.readListEnd();
15740
                }
68 ashish 15741
              } else { 
15742
                TProtocolUtil.skip(iprot, field.type);
15743
              }
15744
              break;
15745
            case EX:
15746
              if (field.type == TType.STRUCT) {
15747
                this.ex = new TransactionServiceException();
15748
                this.ex.read(iprot);
15749
              } else { 
15750
                TProtocolUtil.skip(iprot, field.type);
15751
              }
15752
              break;
15753
          }
15754
          iprot.readFieldEnd();
15755
        }
15756
      }
15757
      iprot.readStructEnd();
15758
      validate();
15759
    }
15760
 
15761
    public void write(TProtocol oprot) throws TException {
15762
      oprot.writeStructBegin(STRUCT_DESC);
15763
 
15764
      if (this.isSetSuccess()) {
15765
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15766
        {
15767
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 15768
          for (Order _iter35 : this.success)
483 rajveer 15769
          {
1382 varun.gupt 15770
            _iter35.write(oprot);
483 rajveer 15771
          }
15772
          oprot.writeListEnd();
15773
        }
68 ashish 15774
        oprot.writeFieldEnd();
15775
      } else if (this.isSetEx()) {
15776
        oprot.writeFieldBegin(EX_FIELD_DESC);
15777
        this.ex.write(oprot);
15778
        oprot.writeFieldEnd();
15779
      }
15780
      oprot.writeFieldStop();
15781
      oprot.writeStructEnd();
15782
    }
15783
 
15784
    @Override
15785
    public String toString() {
483 rajveer 15786
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 15787
      boolean first = true;
15788
 
15789
      sb.append("success:");
483 rajveer 15790
      if (this.success == null) {
15791
        sb.append("null");
15792
      } else {
15793
        sb.append(this.success);
15794
      }
68 ashish 15795
      first = false;
15796
      if (!first) sb.append(", ");
15797
      sb.append("ex:");
15798
      if (this.ex == null) {
15799
        sb.append("null");
15800
      } else {
15801
        sb.append(this.ex);
15802
      }
15803
      first = false;
15804
      sb.append(")");
15805
      return sb.toString();
15806
    }
15807
 
15808
    public void validate() throws TException {
15809
      // check for required fields
15810
    }
15811
 
15812
  }
15813
 
483 rajveer 15814
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
15815
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 15816
 
483 rajveer 15817
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
15818
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
15819
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
15820
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 15821
 
483 rajveer 15822
    private long customerId;
15823
    private long from_date;
15824
    private long to_date;
15825
    private OrderStatus status;
68 ashish 15826
 
15827
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15828
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15829
      CUSTOMER_ID((short)1, "customerId"),
15830
      FROM_DATE((short)2, "from_date"),
15831
      TO_DATE((short)3, "to_date"),
15832
      /**
15833
       * 
15834
       * @see OrderStatus
15835
       */
15836
      STATUS((short)4, "status");
68 ashish 15837
 
15838
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15839
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15840
 
15841
      static {
15842
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15843
          byId.put((int)field._thriftId, field);
15844
          byName.put(field.getFieldName(), field);
15845
        }
15846
      }
15847
 
15848
      /**
15849
       * Find the _Fields constant that matches fieldId, or null if its not found.
15850
       */
15851
      public static _Fields findByThriftId(int fieldId) {
15852
        return byId.get(fieldId);
15853
      }
15854
 
15855
      /**
15856
       * Find the _Fields constant that matches fieldId, throwing an exception
15857
       * if it is not found.
15858
       */
15859
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15860
        _Fields fields = findByThriftId(fieldId);
15861
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15862
        return fields;
15863
      }
15864
 
15865
      /**
15866
       * Find the _Fields constant that matches name, or null if its not found.
15867
       */
15868
      public static _Fields findByName(String name) {
15869
        return byName.get(name);
15870
      }
15871
 
15872
      private final short _thriftId;
15873
      private final String _fieldName;
15874
 
15875
      _Fields(short thriftId, String fieldName) {
15876
        _thriftId = thriftId;
15877
        _fieldName = fieldName;
15878
      }
15879
 
15880
      public short getThriftFieldId() {
15881
        return _thriftId;
15882
      }
15883
 
15884
      public String getFieldName() {
15885
        return _fieldName;
15886
      }
15887
    }
15888
 
15889
    // isset id assignments
483 rajveer 15890
    private static final int __CUSTOMERID_ISSET_ID = 0;
15891
    private static final int __FROM_DATE_ISSET_ID = 1;
15892
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 15893
    private BitSet __isset_bit_vector = new BitSet(3);
15894
 
15895
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15896
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 15897
          new FieldValueMetaData(TType.I64)));
483 rajveer 15898
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 15899
          new FieldValueMetaData(TType.I64)));
483 rajveer 15900
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 15901
          new FieldValueMetaData(TType.I64)));
483 rajveer 15902
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15903
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 15904
    }});
15905
 
15906
    static {
483 rajveer 15907
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 15908
    }
15909
 
483 rajveer 15910
    public getOrdersForCustomer_args() {
68 ashish 15911
    }
15912
 
483 rajveer 15913
    public getOrdersForCustomer_args(
15914
      long customerId,
15915
      long from_date,
15916
      long to_date,
15917
      OrderStatus status)
68 ashish 15918
    {
15919
      this();
483 rajveer 15920
      this.customerId = customerId;
15921
      setCustomerIdIsSet(true);
15922
      this.from_date = from_date;
15923
      setFrom_dateIsSet(true);
15924
      this.to_date = to_date;
15925
      setTo_dateIsSet(true);
15926
      this.status = status;
68 ashish 15927
    }
15928
 
15929
    /**
15930
     * Performs a deep copy on <i>other</i>.
15931
     */
483 rajveer 15932
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 15933
      __isset_bit_vector.clear();
15934
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15935
      this.customerId = other.customerId;
15936
      this.from_date = other.from_date;
15937
      this.to_date = other.to_date;
15938
      if (other.isSetStatus()) {
15939
        this.status = other.status;
15940
      }
68 ashish 15941
    }
15942
 
483 rajveer 15943
    public getOrdersForCustomer_args deepCopy() {
15944
      return new getOrdersForCustomer_args(this);
68 ashish 15945
    }
15946
 
15947
    @Deprecated
483 rajveer 15948
    public getOrdersForCustomer_args clone() {
15949
      return new getOrdersForCustomer_args(this);
68 ashish 15950
    }
15951
 
483 rajveer 15952
    public long getCustomerId() {
15953
      return this.customerId;
68 ashish 15954
    }
15955
 
483 rajveer 15956
    public getOrdersForCustomer_args setCustomerId(long customerId) {
15957
      this.customerId = customerId;
15958
      setCustomerIdIsSet(true);
68 ashish 15959
      return this;
15960
    }
15961
 
483 rajveer 15962
    public void unsetCustomerId() {
15963
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 15964
    }
15965
 
483 rajveer 15966
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15967
    public boolean isSetCustomerId() {
15968
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 15969
    }
15970
 
483 rajveer 15971
    public void setCustomerIdIsSet(boolean value) {
15972
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 15973
    }
15974
 
483 rajveer 15975
    public long getFrom_date() {
15976
      return this.from_date;
68 ashish 15977
    }
15978
 
483 rajveer 15979
    public getOrdersForCustomer_args setFrom_date(long from_date) {
15980
      this.from_date = from_date;
15981
      setFrom_dateIsSet(true);
68 ashish 15982
      return this;
15983
    }
15984
 
483 rajveer 15985
    public void unsetFrom_date() {
15986
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 15987
    }
15988
 
483 rajveer 15989
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
15990
    public boolean isSetFrom_date() {
15991
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 15992
    }
15993
 
483 rajveer 15994
    public void setFrom_dateIsSet(boolean value) {
15995
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 15996
    }
15997
 
483 rajveer 15998
    public long getTo_date() {
15999
      return this.to_date;
68 ashish 16000
    }
16001
 
483 rajveer 16002
    public getOrdersForCustomer_args setTo_date(long to_date) {
16003
      this.to_date = to_date;
16004
      setTo_dateIsSet(true);
68 ashish 16005
      return this;
16006
    }
16007
 
483 rajveer 16008
    public void unsetTo_date() {
16009
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 16010
    }
16011
 
483 rajveer 16012
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
16013
    public boolean isSetTo_date() {
16014
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 16015
    }
16016
 
483 rajveer 16017
    public void setTo_dateIsSet(boolean value) {
16018
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 16019
    }
16020
 
483 rajveer 16021
    /**
16022
     * 
16023
     * @see OrderStatus
16024
     */
16025
    public OrderStatus getStatus() {
16026
      return this.status;
16027
    }
16028
 
16029
    /**
16030
     * 
16031
     * @see OrderStatus
16032
     */
16033
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
16034
      this.status = status;
16035
      return this;
16036
    }
16037
 
16038
    public void unsetStatus() {
16039
      this.status = null;
16040
    }
16041
 
16042
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
16043
    public boolean isSetStatus() {
16044
      return this.status != null;
16045
    }
16046
 
16047
    public void setStatusIsSet(boolean value) {
16048
      if (!value) {
16049
        this.status = null;
16050
      }
16051
    }
16052
 
68 ashish 16053
    public void setFieldValue(_Fields field, Object value) {
16054
      switch (field) {
483 rajveer 16055
      case CUSTOMER_ID:
68 ashish 16056
        if (value == null) {
483 rajveer 16057
          unsetCustomerId();
68 ashish 16058
        } else {
483 rajveer 16059
          setCustomerId((Long)value);
68 ashish 16060
        }
16061
        break;
16062
 
483 rajveer 16063
      case FROM_DATE:
68 ashish 16064
        if (value == null) {
483 rajveer 16065
          unsetFrom_date();
68 ashish 16066
        } else {
483 rajveer 16067
          setFrom_date((Long)value);
68 ashish 16068
        }
16069
        break;
16070
 
483 rajveer 16071
      case TO_DATE:
68 ashish 16072
        if (value == null) {
483 rajveer 16073
          unsetTo_date();
68 ashish 16074
        } else {
483 rajveer 16075
          setTo_date((Long)value);
68 ashish 16076
        }
16077
        break;
16078
 
483 rajveer 16079
      case STATUS:
16080
        if (value == null) {
16081
          unsetStatus();
16082
        } else {
16083
          setStatus((OrderStatus)value);
16084
        }
16085
        break;
16086
 
68 ashish 16087
      }
16088
    }
16089
 
16090
    public void setFieldValue(int fieldID, Object value) {
16091
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16092
    }
16093
 
16094
    public Object getFieldValue(_Fields field) {
16095
      switch (field) {
483 rajveer 16096
      case CUSTOMER_ID:
16097
        return new Long(getCustomerId());
68 ashish 16098
 
483 rajveer 16099
      case FROM_DATE:
16100
        return new Long(getFrom_date());
68 ashish 16101
 
483 rajveer 16102
      case TO_DATE:
16103
        return new Long(getTo_date());
68 ashish 16104
 
483 rajveer 16105
      case STATUS:
16106
        return getStatus();
16107
 
68 ashish 16108
      }
16109
      throw new IllegalStateException();
16110
    }
16111
 
16112
    public Object getFieldValue(int fieldId) {
16113
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16114
    }
16115
 
16116
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16117
    public boolean isSet(_Fields field) {
16118
      switch (field) {
483 rajveer 16119
      case CUSTOMER_ID:
16120
        return isSetCustomerId();
16121
      case FROM_DATE:
16122
        return isSetFrom_date();
16123
      case TO_DATE:
16124
        return isSetTo_date();
16125
      case STATUS:
16126
        return isSetStatus();
68 ashish 16127
      }
16128
      throw new IllegalStateException();
16129
    }
16130
 
16131
    public boolean isSet(int fieldID) {
16132
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16133
    }
16134
 
16135
    @Override
16136
    public boolean equals(Object that) {
16137
      if (that == null)
16138
        return false;
483 rajveer 16139
      if (that instanceof getOrdersForCustomer_args)
16140
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 16141
      return false;
16142
    }
16143
 
483 rajveer 16144
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 16145
      if (that == null)
16146
        return false;
16147
 
483 rajveer 16148
      boolean this_present_customerId = true;
16149
      boolean that_present_customerId = true;
16150
      if (this_present_customerId || that_present_customerId) {
16151
        if (!(this_present_customerId && that_present_customerId))
68 ashish 16152
          return false;
483 rajveer 16153
        if (this.customerId != that.customerId)
68 ashish 16154
          return false;
16155
      }
16156
 
483 rajveer 16157
      boolean this_present_from_date = true;
16158
      boolean that_present_from_date = true;
16159
      if (this_present_from_date || that_present_from_date) {
16160
        if (!(this_present_from_date && that_present_from_date))
68 ashish 16161
          return false;
483 rajveer 16162
        if (this.from_date != that.from_date)
68 ashish 16163
          return false;
16164
      }
16165
 
483 rajveer 16166
      boolean this_present_to_date = true;
16167
      boolean that_present_to_date = true;
16168
      if (this_present_to_date || that_present_to_date) {
16169
        if (!(this_present_to_date && that_present_to_date))
68 ashish 16170
          return false;
483 rajveer 16171
        if (this.to_date != that.to_date)
68 ashish 16172
          return false;
16173
      }
16174
 
483 rajveer 16175
      boolean this_present_status = true && this.isSetStatus();
16176
      boolean that_present_status = true && that.isSetStatus();
16177
      if (this_present_status || that_present_status) {
16178
        if (!(this_present_status && that_present_status))
16179
          return false;
16180
        if (!this.status.equals(that.status))
16181
          return false;
16182
      }
16183
 
68 ashish 16184
      return true;
16185
    }
16186
 
16187
    @Override
16188
    public int hashCode() {
16189
      return 0;
16190
    }
16191
 
483 rajveer 16192
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 16193
      if (!getClass().equals(other.getClass())) {
16194
        return getClass().getName().compareTo(other.getClass().getName());
16195
      }
16196
 
16197
      int lastComparison = 0;
483 rajveer 16198
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 16199
 
483 rajveer 16200
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 16201
      if (lastComparison != 0) {
16202
        return lastComparison;
16203
      }
483 rajveer 16204
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 16205
      if (lastComparison != 0) {
16206
        return lastComparison;
16207
      }
483 rajveer 16208
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 16209
      if (lastComparison != 0) {
16210
        return lastComparison;
16211
      }
483 rajveer 16212
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 16213
      if (lastComparison != 0) {
16214
        return lastComparison;
16215
      }
483 rajveer 16216
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 16217
      if (lastComparison != 0) {
16218
        return lastComparison;
16219
      }
483 rajveer 16220
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 16221
      if (lastComparison != 0) {
16222
        return lastComparison;
16223
      }
483 rajveer 16224
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16225
      if (lastComparison != 0) {
16226
        return lastComparison;
16227
      }
16228
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16229
      if (lastComparison != 0) {
16230
        return lastComparison;
16231
      }
68 ashish 16232
      return 0;
16233
    }
16234
 
16235
    public void read(TProtocol iprot) throws TException {
16236
      TField field;
16237
      iprot.readStructBegin();
16238
      while (true)
16239
      {
16240
        field = iprot.readFieldBegin();
16241
        if (field.type == TType.STOP) { 
16242
          break;
16243
        }
16244
        _Fields fieldId = _Fields.findByThriftId(field.id);
16245
        if (fieldId == null) {
16246
          TProtocolUtil.skip(iprot, field.type);
16247
        } else {
16248
          switch (fieldId) {
483 rajveer 16249
            case CUSTOMER_ID:
68 ashish 16250
              if (field.type == TType.I64) {
483 rajveer 16251
                this.customerId = iprot.readI64();
16252
                setCustomerIdIsSet(true);
68 ashish 16253
              } else { 
16254
                TProtocolUtil.skip(iprot, field.type);
16255
              }
16256
              break;
483 rajveer 16257
            case FROM_DATE:
68 ashish 16258
              if (field.type == TType.I64) {
483 rajveer 16259
                this.from_date = iprot.readI64();
16260
                setFrom_dateIsSet(true);
68 ashish 16261
              } else { 
16262
                TProtocolUtil.skip(iprot, field.type);
16263
              }
16264
              break;
483 rajveer 16265
            case TO_DATE:
68 ashish 16266
              if (field.type == TType.I64) {
483 rajveer 16267
                this.to_date = iprot.readI64();
16268
                setTo_dateIsSet(true);
68 ashish 16269
              } else { 
16270
                TProtocolUtil.skip(iprot, field.type);
16271
              }
16272
              break;
483 rajveer 16273
            case STATUS:
16274
              if (field.type == TType.I32) {
16275
                this.status = OrderStatus.findByValue(iprot.readI32());
16276
              } else { 
16277
                TProtocolUtil.skip(iprot, field.type);
16278
              }
16279
              break;
68 ashish 16280
          }
16281
          iprot.readFieldEnd();
16282
        }
16283
      }
16284
      iprot.readStructEnd();
16285
      validate();
16286
    }
16287
 
16288
    public void write(TProtocol oprot) throws TException {
16289
      validate();
16290
 
16291
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16292
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16293
      oprot.writeI64(this.customerId);
68 ashish 16294
      oprot.writeFieldEnd();
483 rajveer 16295
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
16296
      oprot.writeI64(this.from_date);
68 ashish 16297
      oprot.writeFieldEnd();
483 rajveer 16298
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
16299
      oprot.writeI64(this.to_date);
68 ashish 16300
      oprot.writeFieldEnd();
483 rajveer 16301
      if (this.status != null) {
16302
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16303
        oprot.writeI32(this.status.getValue());
16304
        oprot.writeFieldEnd();
16305
      }
68 ashish 16306
      oprot.writeFieldStop();
16307
      oprot.writeStructEnd();
16308
    }
16309
 
16310
    @Override
16311
    public String toString() {
483 rajveer 16312
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 16313
      boolean first = true;
16314
 
483 rajveer 16315
      sb.append("customerId:");
16316
      sb.append(this.customerId);
68 ashish 16317
      first = false;
16318
      if (!first) sb.append(", ");
483 rajveer 16319
      sb.append("from_date:");
16320
      sb.append(this.from_date);
68 ashish 16321
      first = false;
16322
      if (!first) sb.append(", ");
483 rajveer 16323
      sb.append("to_date:");
16324
      sb.append(this.to_date);
68 ashish 16325
      first = false;
483 rajveer 16326
      if (!first) sb.append(", ");
16327
      sb.append("status:");
16328
      if (this.status == null) {
16329
        sb.append("null");
16330
      } else {
16331
        String status_name = status.name();
16332
        if (status_name != null) {
16333
          sb.append(status_name);
16334
          sb.append(" (");
16335
        }
16336
        sb.append(this.status);
16337
        if (status_name != null) {
16338
          sb.append(")");
16339
        }
16340
      }
16341
      first = false;
68 ashish 16342
      sb.append(")");
16343
      return sb.toString();
16344
    }
16345
 
16346
    public void validate() throws TException {
16347
      // check for required fields
16348
    }
16349
 
16350
  }
16351
 
483 rajveer 16352
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
16353
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 16354
 
483 rajveer 16355
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16356
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16357
 
483 rajveer 16358
    private List<Order> success;
68 ashish 16359
    private TransactionServiceException ex;
16360
 
16361
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16362
    public enum _Fields implements TFieldIdEnum {
16363
      SUCCESS((short)0, "success"),
16364
      EX((short)1, "ex");
16365
 
16366
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16367
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16368
 
16369
      static {
16370
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16371
          byId.put((int)field._thriftId, field);
16372
          byName.put(field.getFieldName(), field);
16373
        }
16374
      }
16375
 
16376
      /**
16377
       * Find the _Fields constant that matches fieldId, or null if its not found.
16378
       */
16379
      public static _Fields findByThriftId(int fieldId) {
16380
        return byId.get(fieldId);
16381
      }
16382
 
16383
      /**
16384
       * Find the _Fields constant that matches fieldId, throwing an exception
16385
       * if it is not found.
16386
       */
16387
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16388
        _Fields fields = findByThriftId(fieldId);
16389
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16390
        return fields;
16391
      }
16392
 
16393
      /**
16394
       * Find the _Fields constant that matches name, or null if its not found.
16395
       */
16396
      public static _Fields findByName(String name) {
16397
        return byName.get(name);
16398
      }
16399
 
16400
      private final short _thriftId;
16401
      private final String _fieldName;
16402
 
16403
      _Fields(short thriftId, String fieldName) {
16404
        _thriftId = thriftId;
16405
        _fieldName = fieldName;
16406
      }
16407
 
16408
      public short getThriftFieldId() {
16409
        return _thriftId;
16410
      }
16411
 
16412
      public String getFieldName() {
16413
        return _fieldName;
16414
      }
16415
    }
16416
 
16417
    // isset id assignments
16418
 
16419
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16420
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16421
          new ListMetaData(TType.LIST, 
16422
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16423
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16424
          new FieldValueMetaData(TType.STRUCT)));
16425
    }});
16426
 
16427
    static {
483 rajveer 16428
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16429
    }
16430
 
483 rajveer 16431
    public getOrdersForCustomer_result() {
68 ashish 16432
    }
16433
 
483 rajveer 16434
    public getOrdersForCustomer_result(
16435
      List<Order> success,
68 ashish 16436
      TransactionServiceException ex)
16437
    {
16438
      this();
16439
      this.success = success;
16440
      this.ex = ex;
16441
    }
16442
 
16443
    /**
16444
     * Performs a deep copy on <i>other</i>.
16445
     */
483 rajveer 16446
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16447
      if (other.isSetSuccess()) {
16448
        List<Order> __this__success = new ArrayList<Order>();
16449
        for (Order other_element : other.success) {
16450
          __this__success.add(new Order(other_element));
16451
        }
16452
        this.success = __this__success;
16453
      }
68 ashish 16454
      if (other.isSetEx()) {
16455
        this.ex = new TransactionServiceException(other.ex);
16456
      }
16457
    }
16458
 
483 rajveer 16459
    public getOrdersForCustomer_result deepCopy() {
16460
      return new getOrdersForCustomer_result(this);
68 ashish 16461
    }
16462
 
16463
    @Deprecated
483 rajveer 16464
    public getOrdersForCustomer_result clone() {
16465
      return new getOrdersForCustomer_result(this);
68 ashish 16466
    }
16467
 
483 rajveer 16468
    public int getSuccessSize() {
16469
      return (this.success == null) ? 0 : this.success.size();
16470
    }
16471
 
16472
    public java.util.Iterator<Order> getSuccessIterator() {
16473
      return (this.success == null) ? null : this.success.iterator();
16474
    }
16475
 
16476
    public void addToSuccess(Order elem) {
16477
      if (this.success == null) {
16478
        this.success = new ArrayList<Order>();
16479
      }
16480
      this.success.add(elem);
16481
    }
16482
 
16483
    public List<Order> getSuccess() {
68 ashish 16484
      return this.success;
16485
    }
16486
 
483 rajveer 16487
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16488
      this.success = success;
16489
      return this;
16490
    }
16491
 
16492
    public void unsetSuccess() {
483 rajveer 16493
      this.success = null;
68 ashish 16494
    }
16495
 
16496
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16497
    public boolean isSetSuccess() {
483 rajveer 16498
      return this.success != null;
68 ashish 16499
    }
16500
 
16501
    public void setSuccessIsSet(boolean value) {
483 rajveer 16502
      if (!value) {
16503
        this.success = null;
16504
      }
68 ashish 16505
    }
16506
 
16507
    public TransactionServiceException getEx() {
16508
      return this.ex;
16509
    }
16510
 
483 rajveer 16511
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16512
      this.ex = ex;
16513
      return this;
16514
    }
16515
 
16516
    public void unsetEx() {
16517
      this.ex = null;
16518
    }
16519
 
16520
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16521
    public boolean isSetEx() {
16522
      return this.ex != null;
16523
    }
16524
 
16525
    public void setExIsSet(boolean value) {
16526
      if (!value) {
16527
        this.ex = null;
16528
      }
16529
    }
16530
 
16531
    public void setFieldValue(_Fields field, Object value) {
16532
      switch (field) {
16533
      case SUCCESS:
16534
        if (value == null) {
16535
          unsetSuccess();
16536
        } else {
483 rajveer 16537
          setSuccess((List<Order>)value);
68 ashish 16538
        }
16539
        break;
16540
 
16541
      case EX:
16542
        if (value == null) {
16543
          unsetEx();
16544
        } else {
16545
          setEx((TransactionServiceException)value);
16546
        }
16547
        break;
16548
 
16549
      }
16550
    }
16551
 
16552
    public void setFieldValue(int fieldID, Object value) {
16553
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16554
    }
16555
 
16556
    public Object getFieldValue(_Fields field) {
16557
      switch (field) {
16558
      case SUCCESS:
483 rajveer 16559
        return getSuccess();
68 ashish 16560
 
16561
      case EX:
16562
        return getEx();
16563
 
16564
      }
16565
      throw new IllegalStateException();
16566
    }
16567
 
16568
    public Object getFieldValue(int fieldId) {
16569
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16570
    }
16571
 
16572
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16573
    public boolean isSet(_Fields field) {
16574
      switch (field) {
16575
      case SUCCESS:
16576
        return isSetSuccess();
16577
      case EX:
16578
        return isSetEx();
16579
      }
16580
      throw new IllegalStateException();
16581
    }
16582
 
16583
    public boolean isSet(int fieldID) {
16584
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16585
    }
16586
 
16587
    @Override
16588
    public boolean equals(Object that) {
16589
      if (that == null)
16590
        return false;
483 rajveer 16591
      if (that instanceof getOrdersForCustomer_result)
16592
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16593
      return false;
16594
    }
16595
 
483 rajveer 16596
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16597
      if (that == null)
16598
        return false;
16599
 
483 rajveer 16600
      boolean this_present_success = true && this.isSetSuccess();
16601
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16602
      if (this_present_success || that_present_success) {
16603
        if (!(this_present_success && that_present_success))
16604
          return false;
483 rajveer 16605
        if (!this.success.equals(that.success))
68 ashish 16606
          return false;
16607
      }
16608
 
16609
      boolean this_present_ex = true && this.isSetEx();
16610
      boolean that_present_ex = true && that.isSetEx();
16611
      if (this_present_ex || that_present_ex) {
16612
        if (!(this_present_ex && that_present_ex))
16613
          return false;
16614
        if (!this.ex.equals(that.ex))
16615
          return false;
16616
      }
16617
 
16618
      return true;
16619
    }
16620
 
16621
    @Override
16622
    public int hashCode() {
16623
      return 0;
16624
    }
16625
 
483 rajveer 16626
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 16627
      if (!getClass().equals(other.getClass())) {
16628
        return getClass().getName().compareTo(other.getClass().getName());
16629
      }
16630
 
16631
      int lastComparison = 0;
483 rajveer 16632
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 16633
 
16634
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16635
      if (lastComparison != 0) {
16636
        return lastComparison;
16637
      }
16638
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16639
      if (lastComparison != 0) {
16640
        return lastComparison;
16641
      }
16642
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16643
      if (lastComparison != 0) {
16644
        return lastComparison;
16645
      }
16646
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16647
      if (lastComparison != 0) {
16648
        return lastComparison;
16649
      }
16650
      return 0;
16651
    }
16652
 
16653
    public void read(TProtocol iprot) throws TException {
16654
      TField field;
16655
      iprot.readStructBegin();
16656
      while (true)
16657
      {
16658
        field = iprot.readFieldBegin();
16659
        if (field.type == TType.STOP) { 
16660
          break;
16661
        }
16662
        _Fields fieldId = _Fields.findByThriftId(field.id);
16663
        if (fieldId == null) {
16664
          TProtocolUtil.skip(iprot, field.type);
16665
        } else {
16666
          switch (fieldId) {
16667
            case SUCCESS:
483 rajveer 16668
              if (field.type == TType.LIST) {
16669
                {
1382 varun.gupt 16670
                  TList _list36 = iprot.readListBegin();
16671
                  this.success = new ArrayList<Order>(_list36.size);
16672
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 16673
                  {
1382 varun.gupt 16674
                    Order _elem38;
16675
                    _elem38 = new Order();
16676
                    _elem38.read(iprot);
16677
                    this.success.add(_elem38);
483 rajveer 16678
                  }
16679
                  iprot.readListEnd();
16680
                }
68 ashish 16681
              } else { 
16682
                TProtocolUtil.skip(iprot, field.type);
16683
              }
16684
              break;
16685
            case EX:
16686
              if (field.type == TType.STRUCT) {
16687
                this.ex = new TransactionServiceException();
16688
                this.ex.read(iprot);
16689
              } else { 
16690
                TProtocolUtil.skip(iprot, field.type);
16691
              }
16692
              break;
16693
          }
16694
          iprot.readFieldEnd();
16695
        }
16696
      }
16697
      iprot.readStructEnd();
16698
      validate();
16699
    }
16700
 
16701
    public void write(TProtocol oprot) throws TException {
16702
      oprot.writeStructBegin(STRUCT_DESC);
16703
 
16704
      if (this.isSetSuccess()) {
16705
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16706
        {
16707
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16708
          for (Order _iter39 : this.success)
483 rajveer 16709
          {
1382 varun.gupt 16710
            _iter39.write(oprot);
483 rajveer 16711
          }
16712
          oprot.writeListEnd();
16713
        }
68 ashish 16714
        oprot.writeFieldEnd();
16715
      } else if (this.isSetEx()) {
16716
        oprot.writeFieldBegin(EX_FIELD_DESC);
16717
        this.ex.write(oprot);
16718
        oprot.writeFieldEnd();
16719
      }
16720
      oprot.writeFieldStop();
16721
      oprot.writeStructEnd();
16722
    }
16723
 
16724
    @Override
16725
    public String toString() {
483 rajveer 16726
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 16727
      boolean first = true;
16728
 
16729
      sb.append("success:");
483 rajveer 16730
      if (this.success == null) {
16731
        sb.append("null");
16732
      } else {
16733
        sb.append(this.success);
16734
      }
68 ashish 16735
      first = false;
16736
      if (!first) sb.append(", ");
16737
      sb.append("ex:");
16738
      if (this.ex == null) {
16739
        sb.append("null");
16740
      } else {
16741
        sb.append(this.ex);
16742
      }
16743
      first = false;
16744
      sb.append(")");
16745
      return sb.toString();
16746
    }
16747
 
16748
    public void validate() throws TException {
16749
      // check for required fields
16750
    }
16751
 
16752
  }
16753
 
483 rajveer 16754
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
16755
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 16756
 
483 rajveer 16757
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 16758
 
483 rajveer 16759
    private Order order;
68 ashish 16760
 
16761
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16762
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16763
      ORDER((short)1, "order");
68 ashish 16764
 
16765
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16766
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16767
 
16768
      static {
16769
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16770
          byId.put((int)field._thriftId, field);
16771
          byName.put(field.getFieldName(), field);
16772
        }
16773
      }
16774
 
16775
      /**
16776
       * Find the _Fields constant that matches fieldId, or null if its not found.
16777
       */
16778
      public static _Fields findByThriftId(int fieldId) {
16779
        return byId.get(fieldId);
16780
      }
16781
 
16782
      /**
16783
       * Find the _Fields constant that matches fieldId, throwing an exception
16784
       * if it is not found.
16785
       */
16786
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16787
        _Fields fields = findByThriftId(fieldId);
16788
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16789
        return fields;
16790
      }
16791
 
16792
      /**
16793
       * Find the _Fields constant that matches name, or null if its not found.
16794
       */
16795
      public static _Fields findByName(String name) {
16796
        return byName.get(name);
16797
      }
16798
 
16799
      private final short _thriftId;
16800
      private final String _fieldName;
16801
 
16802
      _Fields(short thriftId, String fieldName) {
16803
        _thriftId = thriftId;
16804
        _fieldName = fieldName;
16805
      }
16806
 
16807
      public short getThriftFieldId() {
16808
        return _thriftId;
16809
      }
16810
 
16811
      public String getFieldName() {
16812
        return _fieldName;
16813
      }
16814
    }
16815
 
16816
    // isset id assignments
16817
 
16818
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16819
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
16820
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 16821
    }});
16822
 
16823
    static {
483 rajveer 16824
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 16825
    }
16826
 
483 rajveer 16827
    public createOrder_args() {
68 ashish 16828
    }
16829
 
483 rajveer 16830
    public createOrder_args(
16831
      Order order)
68 ashish 16832
    {
16833
      this();
483 rajveer 16834
      this.order = order;
68 ashish 16835
    }
16836
 
16837
    /**
16838
     * Performs a deep copy on <i>other</i>.
16839
     */
483 rajveer 16840
    public createOrder_args(createOrder_args other) {
16841
      if (other.isSetOrder()) {
16842
        this.order = new Order(other.order);
16843
      }
68 ashish 16844
    }
16845
 
483 rajveer 16846
    public createOrder_args deepCopy() {
16847
      return new createOrder_args(this);
68 ashish 16848
    }
16849
 
16850
    @Deprecated
483 rajveer 16851
    public createOrder_args clone() {
16852
      return new createOrder_args(this);
68 ashish 16853
    }
16854
 
483 rajveer 16855
    public Order getOrder() {
16856
      return this.order;
68 ashish 16857
    }
16858
 
483 rajveer 16859
    public createOrder_args setOrder(Order order) {
16860
      this.order = order;
68 ashish 16861
      return this;
16862
    }
16863
 
483 rajveer 16864
    public void unsetOrder() {
16865
      this.order = null;
68 ashish 16866
    }
16867
 
483 rajveer 16868
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
16869
    public boolean isSetOrder() {
16870
      return this.order != null;
68 ashish 16871
    }
16872
 
483 rajveer 16873
    public void setOrderIsSet(boolean value) {
16874
      if (!value) {
16875
        this.order = null;
16876
      }
68 ashish 16877
    }
16878
 
16879
    public void setFieldValue(_Fields field, Object value) {
16880
      switch (field) {
483 rajveer 16881
      case ORDER:
68 ashish 16882
        if (value == null) {
483 rajveer 16883
          unsetOrder();
68 ashish 16884
        } else {
483 rajveer 16885
          setOrder((Order)value);
68 ashish 16886
        }
16887
        break;
16888
 
16889
      }
16890
    }
16891
 
16892
    public void setFieldValue(int fieldID, Object value) {
16893
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16894
    }
16895
 
16896
    public Object getFieldValue(_Fields field) {
16897
      switch (field) {
483 rajveer 16898
      case ORDER:
16899
        return getOrder();
68 ashish 16900
 
16901
      }
16902
      throw new IllegalStateException();
16903
    }
16904
 
16905
    public Object getFieldValue(int fieldId) {
16906
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16907
    }
16908
 
16909
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16910
    public boolean isSet(_Fields field) {
16911
      switch (field) {
483 rajveer 16912
      case ORDER:
16913
        return isSetOrder();
68 ashish 16914
      }
16915
      throw new IllegalStateException();
16916
    }
16917
 
16918
    public boolean isSet(int fieldID) {
16919
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16920
    }
16921
 
16922
    @Override
16923
    public boolean equals(Object that) {
16924
      if (that == null)
16925
        return false;
483 rajveer 16926
      if (that instanceof createOrder_args)
16927
        return this.equals((createOrder_args)that);
68 ashish 16928
      return false;
16929
    }
16930
 
483 rajveer 16931
    public boolean equals(createOrder_args that) {
68 ashish 16932
      if (that == null)
16933
        return false;
16934
 
483 rajveer 16935
      boolean this_present_order = true && this.isSetOrder();
16936
      boolean that_present_order = true && that.isSetOrder();
16937
      if (this_present_order || that_present_order) {
16938
        if (!(this_present_order && that_present_order))
68 ashish 16939
          return false;
483 rajveer 16940
        if (!this.order.equals(that.order))
68 ashish 16941
          return false;
16942
      }
16943
 
16944
      return true;
16945
    }
16946
 
16947
    @Override
16948
    public int hashCode() {
16949
      return 0;
16950
    }
16951
 
483 rajveer 16952
    public int compareTo(createOrder_args other) {
68 ashish 16953
      if (!getClass().equals(other.getClass())) {
16954
        return getClass().getName().compareTo(other.getClass().getName());
16955
      }
16956
 
16957
      int lastComparison = 0;
483 rajveer 16958
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 16959
 
483 rajveer 16960
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 16961
      if (lastComparison != 0) {
16962
        return lastComparison;
16963
      }
483 rajveer 16964
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 16965
      if (lastComparison != 0) {
16966
        return lastComparison;
16967
      }
16968
      return 0;
16969
    }
16970
 
16971
    public void read(TProtocol iprot) throws TException {
16972
      TField field;
16973
      iprot.readStructBegin();
16974
      while (true)
16975
      {
16976
        field = iprot.readFieldBegin();
16977
        if (field.type == TType.STOP) { 
16978
          break;
16979
        }
16980
        _Fields fieldId = _Fields.findByThriftId(field.id);
16981
        if (fieldId == null) {
16982
          TProtocolUtil.skip(iprot, field.type);
16983
        } else {
16984
          switch (fieldId) {
483 rajveer 16985
            case ORDER:
16986
              if (field.type == TType.STRUCT) {
16987
                this.order = new Order();
16988
                this.order.read(iprot);
68 ashish 16989
              } else { 
16990
                TProtocolUtil.skip(iprot, field.type);
16991
              }
16992
              break;
16993
          }
16994
          iprot.readFieldEnd();
16995
        }
16996
      }
16997
      iprot.readStructEnd();
16998
      validate();
16999
    }
17000
 
17001
    public void write(TProtocol oprot) throws TException {
17002
      validate();
17003
 
17004
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17005
      if (this.order != null) {
17006
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
17007
        this.order.write(oprot);
17008
        oprot.writeFieldEnd();
17009
      }
68 ashish 17010
      oprot.writeFieldStop();
17011
      oprot.writeStructEnd();
17012
    }
17013
 
17014
    @Override
17015
    public String toString() {
483 rajveer 17016
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 17017
      boolean first = true;
17018
 
483 rajveer 17019
      sb.append("order:");
17020
      if (this.order == null) {
17021
        sb.append("null");
17022
      } else {
17023
        sb.append(this.order);
17024
      }
68 ashish 17025
      first = false;
17026
      sb.append(")");
17027
      return sb.toString();
17028
    }
17029
 
17030
    public void validate() throws TException {
17031
      // check for required fields
17032
    }
17033
 
17034
  }
17035
 
483 rajveer 17036
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
17037
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 17038
 
483 rajveer 17039
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 17040
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17041
 
483 rajveer 17042
    private long success;
68 ashish 17043
    private TransactionServiceException ex;
17044
 
17045
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17046
    public enum _Fields implements TFieldIdEnum {
17047
      SUCCESS((short)0, "success"),
17048
      EX((short)1, "ex");
17049
 
17050
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17051
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17052
 
17053
      static {
17054
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17055
          byId.put((int)field._thriftId, field);
17056
          byName.put(field.getFieldName(), field);
17057
        }
17058
      }
17059
 
17060
      /**
17061
       * Find the _Fields constant that matches fieldId, or null if its not found.
17062
       */
17063
      public static _Fields findByThriftId(int fieldId) {
17064
        return byId.get(fieldId);
17065
      }
17066
 
17067
      /**
17068
       * Find the _Fields constant that matches fieldId, throwing an exception
17069
       * if it is not found.
17070
       */
17071
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17072
        _Fields fields = findByThriftId(fieldId);
17073
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17074
        return fields;
17075
      }
17076
 
17077
      /**
17078
       * Find the _Fields constant that matches name, or null if its not found.
17079
       */
17080
      public static _Fields findByName(String name) {
17081
        return byName.get(name);
17082
      }
17083
 
17084
      private final short _thriftId;
17085
      private final String _fieldName;
17086
 
17087
      _Fields(short thriftId, String fieldName) {
17088
        _thriftId = thriftId;
17089
        _fieldName = fieldName;
17090
      }
17091
 
17092
      public short getThriftFieldId() {
17093
        return _thriftId;
17094
      }
17095
 
17096
      public String getFieldName() {
17097
        return _fieldName;
17098
      }
17099
    }
17100
 
17101
    // isset id assignments
17102
    private static final int __SUCCESS_ISSET_ID = 0;
17103
    private BitSet __isset_bit_vector = new BitSet(1);
17104
 
17105
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17106
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17107
          new FieldValueMetaData(TType.I64)));
68 ashish 17108
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17109
          new FieldValueMetaData(TType.STRUCT)));
17110
    }});
17111
 
17112
    static {
483 rajveer 17113
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 17114
    }
17115
 
483 rajveer 17116
    public createOrder_result() {
68 ashish 17117
    }
17118
 
483 rajveer 17119
    public createOrder_result(
17120
      long success,
68 ashish 17121
      TransactionServiceException ex)
17122
    {
17123
      this();
17124
      this.success = success;
17125
      setSuccessIsSet(true);
17126
      this.ex = ex;
17127
    }
17128
 
17129
    /**
17130
     * Performs a deep copy on <i>other</i>.
17131
     */
483 rajveer 17132
    public createOrder_result(createOrder_result other) {
68 ashish 17133
      __isset_bit_vector.clear();
17134
      __isset_bit_vector.or(other.__isset_bit_vector);
17135
      this.success = other.success;
17136
      if (other.isSetEx()) {
17137
        this.ex = new TransactionServiceException(other.ex);
17138
      }
17139
    }
17140
 
483 rajveer 17141
    public createOrder_result deepCopy() {
17142
      return new createOrder_result(this);
68 ashish 17143
    }
17144
 
17145
    @Deprecated
483 rajveer 17146
    public createOrder_result clone() {
17147
      return new createOrder_result(this);
68 ashish 17148
    }
17149
 
483 rajveer 17150
    public long getSuccess() {
68 ashish 17151
      return this.success;
17152
    }
17153
 
483 rajveer 17154
    public createOrder_result setSuccess(long success) {
68 ashish 17155
      this.success = success;
17156
      setSuccessIsSet(true);
17157
      return this;
17158
    }
17159
 
17160
    public void unsetSuccess() {
17161
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
17162
    }
17163
 
17164
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17165
    public boolean isSetSuccess() {
17166
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
17167
    }
17168
 
17169
    public void setSuccessIsSet(boolean value) {
17170
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17171
    }
17172
 
17173
    public TransactionServiceException getEx() {
17174
      return this.ex;
17175
    }
17176
 
483 rajveer 17177
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 17178
      this.ex = ex;
17179
      return this;
17180
    }
17181
 
17182
    public void unsetEx() {
17183
      this.ex = null;
17184
    }
17185
 
17186
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17187
    public boolean isSetEx() {
17188
      return this.ex != null;
17189
    }
17190
 
17191
    public void setExIsSet(boolean value) {
17192
      if (!value) {
17193
        this.ex = null;
17194
      }
17195
    }
17196
 
17197
    public void setFieldValue(_Fields field, Object value) {
17198
      switch (field) {
17199
      case SUCCESS:
17200
        if (value == null) {
17201
          unsetSuccess();
17202
        } else {
483 rajveer 17203
          setSuccess((Long)value);
68 ashish 17204
        }
17205
        break;
17206
 
17207
      case EX:
17208
        if (value == null) {
17209
          unsetEx();
17210
        } else {
17211
          setEx((TransactionServiceException)value);
17212
        }
17213
        break;
17214
 
17215
      }
17216
    }
17217
 
17218
    public void setFieldValue(int fieldID, Object value) {
17219
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17220
    }
17221
 
17222
    public Object getFieldValue(_Fields field) {
17223
      switch (field) {
17224
      case SUCCESS:
483 rajveer 17225
        return new Long(getSuccess());
68 ashish 17226
 
17227
      case EX:
17228
        return getEx();
17229
 
17230
      }
17231
      throw new IllegalStateException();
17232
    }
17233
 
17234
    public Object getFieldValue(int fieldId) {
17235
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17236
    }
17237
 
17238
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17239
    public boolean isSet(_Fields field) {
17240
      switch (field) {
17241
      case SUCCESS:
17242
        return isSetSuccess();
17243
      case EX:
17244
        return isSetEx();
17245
      }
17246
      throw new IllegalStateException();
17247
    }
17248
 
17249
    public boolean isSet(int fieldID) {
17250
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17251
    }
17252
 
17253
    @Override
17254
    public boolean equals(Object that) {
17255
      if (that == null)
17256
        return false;
483 rajveer 17257
      if (that instanceof createOrder_result)
17258
        return this.equals((createOrder_result)that);
68 ashish 17259
      return false;
17260
    }
17261
 
483 rajveer 17262
    public boolean equals(createOrder_result that) {
68 ashish 17263
      if (that == null)
17264
        return false;
17265
 
17266
      boolean this_present_success = true;
17267
      boolean that_present_success = true;
17268
      if (this_present_success || that_present_success) {
17269
        if (!(this_present_success && that_present_success))
17270
          return false;
17271
        if (this.success != that.success)
17272
          return false;
17273
      }
17274
 
17275
      boolean this_present_ex = true && this.isSetEx();
17276
      boolean that_present_ex = true && that.isSetEx();
17277
      if (this_present_ex || that_present_ex) {
17278
        if (!(this_present_ex && that_present_ex))
17279
          return false;
17280
        if (!this.ex.equals(that.ex))
17281
          return false;
17282
      }
17283
 
17284
      return true;
17285
    }
17286
 
17287
    @Override
17288
    public int hashCode() {
17289
      return 0;
17290
    }
17291
 
483 rajveer 17292
    public int compareTo(createOrder_result other) {
68 ashish 17293
      if (!getClass().equals(other.getClass())) {
17294
        return getClass().getName().compareTo(other.getClass().getName());
17295
      }
17296
 
17297
      int lastComparison = 0;
483 rajveer 17298
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 17299
 
17300
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17301
      if (lastComparison != 0) {
17302
        return lastComparison;
17303
      }
17304
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17305
      if (lastComparison != 0) {
17306
        return lastComparison;
17307
      }
17308
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17309
      if (lastComparison != 0) {
17310
        return lastComparison;
17311
      }
17312
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17313
      if (lastComparison != 0) {
17314
        return lastComparison;
17315
      }
17316
      return 0;
17317
    }
17318
 
17319
    public void read(TProtocol iprot) throws TException {
17320
      TField field;
17321
      iprot.readStructBegin();
17322
      while (true)
17323
      {
17324
        field = iprot.readFieldBegin();
17325
        if (field.type == TType.STOP) { 
17326
          break;
17327
        }
17328
        _Fields fieldId = _Fields.findByThriftId(field.id);
17329
        if (fieldId == null) {
17330
          TProtocolUtil.skip(iprot, field.type);
17331
        } else {
17332
          switch (fieldId) {
17333
            case SUCCESS:
483 rajveer 17334
              if (field.type == TType.I64) {
17335
                this.success = iprot.readI64();
68 ashish 17336
                setSuccessIsSet(true);
17337
              } else { 
17338
                TProtocolUtil.skip(iprot, field.type);
17339
              }
17340
              break;
17341
            case EX:
17342
              if (field.type == TType.STRUCT) {
17343
                this.ex = new TransactionServiceException();
17344
                this.ex.read(iprot);
17345
              } else { 
17346
                TProtocolUtil.skip(iprot, field.type);
17347
              }
17348
              break;
17349
          }
17350
          iprot.readFieldEnd();
17351
        }
17352
      }
17353
      iprot.readStructEnd();
17354
      validate();
17355
    }
17356
 
17357
    public void write(TProtocol oprot) throws TException {
17358
      oprot.writeStructBegin(STRUCT_DESC);
17359
 
17360
      if (this.isSetSuccess()) {
17361
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17362
        oprot.writeI64(this.success);
68 ashish 17363
        oprot.writeFieldEnd();
17364
      } else if (this.isSetEx()) {
17365
        oprot.writeFieldBegin(EX_FIELD_DESC);
17366
        this.ex.write(oprot);
17367
        oprot.writeFieldEnd();
17368
      }
17369
      oprot.writeFieldStop();
17370
      oprot.writeStructEnd();
17371
    }
17372
 
17373
    @Override
17374
    public String toString() {
483 rajveer 17375
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 17376
      boolean first = true;
17377
 
17378
      sb.append("success:");
17379
      sb.append(this.success);
17380
      first = false;
17381
      if (!first) sb.append(", ");
17382
      sb.append("ex:");
17383
      if (this.ex == null) {
17384
        sb.append("null");
17385
      } else {
17386
        sb.append(this.ex);
17387
      }
17388
      first = false;
17389
      sb.append(")");
17390
      return sb.toString();
17391
    }
17392
 
17393
    public void validate() throws TException {
17394
      // check for required fields
17395
    }
17396
 
17397
  }
17398
 
483 rajveer 17399
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17400
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17401
 
483 rajveer 17402
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17403
 
483 rajveer 17404
    private long id;
68 ashish 17405
 
17406
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17407
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17408
      ID((short)1, "id");
68 ashish 17409
 
17410
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17411
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17412
 
17413
      static {
17414
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17415
          byId.put((int)field._thriftId, field);
17416
          byName.put(field.getFieldName(), field);
17417
        }
17418
      }
17419
 
17420
      /**
17421
       * Find the _Fields constant that matches fieldId, or null if its not found.
17422
       */
17423
      public static _Fields findByThriftId(int fieldId) {
17424
        return byId.get(fieldId);
17425
      }
17426
 
17427
      /**
17428
       * Find the _Fields constant that matches fieldId, throwing an exception
17429
       * if it is not found.
17430
       */
17431
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17432
        _Fields fields = findByThriftId(fieldId);
17433
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17434
        return fields;
17435
      }
17436
 
17437
      /**
17438
       * Find the _Fields constant that matches name, or null if its not found.
17439
       */
17440
      public static _Fields findByName(String name) {
17441
        return byName.get(name);
17442
      }
17443
 
17444
      private final short _thriftId;
17445
      private final String _fieldName;
17446
 
17447
      _Fields(short thriftId, String fieldName) {
17448
        _thriftId = thriftId;
17449
        _fieldName = fieldName;
17450
      }
17451
 
17452
      public short getThriftFieldId() {
17453
        return _thriftId;
17454
      }
17455
 
17456
      public String getFieldName() {
17457
        return _fieldName;
17458
      }
17459
    }
17460
 
17461
    // isset id assignments
483 rajveer 17462
    private static final int __ID_ISSET_ID = 0;
17463
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17464
 
17465
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17466
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17467
          new FieldValueMetaData(TType.I64)));
17468
    }});
17469
 
17470
    static {
483 rajveer 17471
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17472
    }
17473
 
483 rajveer 17474
    public getOrder_args() {
68 ashish 17475
    }
17476
 
483 rajveer 17477
    public getOrder_args(
17478
      long id)
68 ashish 17479
    {
17480
      this();
483 rajveer 17481
      this.id = id;
17482
      setIdIsSet(true);
68 ashish 17483
    }
17484
 
17485
    /**
17486
     * Performs a deep copy on <i>other</i>.
17487
     */
483 rajveer 17488
    public getOrder_args(getOrder_args other) {
68 ashish 17489
      __isset_bit_vector.clear();
17490
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17491
      this.id = other.id;
68 ashish 17492
    }
17493
 
483 rajveer 17494
    public getOrder_args deepCopy() {
17495
      return new getOrder_args(this);
68 ashish 17496
    }
17497
 
17498
    @Deprecated
483 rajveer 17499
    public getOrder_args clone() {
17500
      return new getOrder_args(this);
68 ashish 17501
    }
17502
 
483 rajveer 17503
    public long getId() {
17504
      return this.id;
68 ashish 17505
    }
17506
 
483 rajveer 17507
    public getOrder_args setId(long id) {
17508
      this.id = id;
17509
      setIdIsSet(true);
68 ashish 17510
      return this;
17511
    }
17512
 
483 rajveer 17513
    public void unsetId() {
17514
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17515
    }
17516
 
483 rajveer 17517
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17518
    public boolean isSetId() {
17519
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17520
    }
17521
 
483 rajveer 17522
    public void setIdIsSet(boolean value) {
17523
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17524
    }
17525
 
17526
    public void setFieldValue(_Fields field, Object value) {
17527
      switch (field) {
483 rajveer 17528
      case ID:
68 ashish 17529
        if (value == null) {
483 rajveer 17530
          unsetId();
68 ashish 17531
        } else {
483 rajveer 17532
          setId((Long)value);
68 ashish 17533
        }
17534
        break;
17535
 
17536
      }
17537
    }
17538
 
17539
    public void setFieldValue(int fieldID, Object value) {
17540
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17541
    }
17542
 
17543
    public Object getFieldValue(_Fields field) {
17544
      switch (field) {
483 rajveer 17545
      case ID:
17546
        return new Long(getId());
68 ashish 17547
 
17548
      }
17549
      throw new IllegalStateException();
17550
    }
17551
 
17552
    public Object getFieldValue(int fieldId) {
17553
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17554
    }
17555
 
17556
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17557
    public boolean isSet(_Fields field) {
17558
      switch (field) {
483 rajveer 17559
      case ID:
17560
        return isSetId();
68 ashish 17561
      }
17562
      throw new IllegalStateException();
17563
    }
17564
 
17565
    public boolean isSet(int fieldID) {
17566
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17567
    }
17568
 
17569
    @Override
17570
    public boolean equals(Object that) {
17571
      if (that == null)
17572
        return false;
483 rajveer 17573
      if (that instanceof getOrder_args)
17574
        return this.equals((getOrder_args)that);
68 ashish 17575
      return false;
17576
    }
17577
 
483 rajveer 17578
    public boolean equals(getOrder_args that) {
68 ashish 17579
      if (that == null)
17580
        return false;
17581
 
483 rajveer 17582
      boolean this_present_id = true;
17583
      boolean that_present_id = true;
17584
      if (this_present_id || that_present_id) {
17585
        if (!(this_present_id && that_present_id))
68 ashish 17586
          return false;
483 rajveer 17587
        if (this.id != that.id)
68 ashish 17588
          return false;
17589
      }
17590
 
17591
      return true;
17592
    }
17593
 
17594
    @Override
17595
    public int hashCode() {
17596
      return 0;
17597
    }
17598
 
483 rajveer 17599
    public int compareTo(getOrder_args other) {
68 ashish 17600
      if (!getClass().equals(other.getClass())) {
17601
        return getClass().getName().compareTo(other.getClass().getName());
17602
      }
17603
 
17604
      int lastComparison = 0;
483 rajveer 17605
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17606
 
483 rajveer 17607
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17608
      if (lastComparison != 0) {
17609
        return lastComparison;
17610
      }
483 rajveer 17611
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 17612
      if (lastComparison != 0) {
17613
        return lastComparison;
17614
      }
17615
      return 0;
17616
    }
17617
 
17618
    public void read(TProtocol iprot) throws TException {
17619
      TField field;
17620
      iprot.readStructBegin();
17621
      while (true)
17622
      {
17623
        field = iprot.readFieldBegin();
17624
        if (field.type == TType.STOP) { 
17625
          break;
17626
        }
17627
        _Fields fieldId = _Fields.findByThriftId(field.id);
17628
        if (fieldId == null) {
17629
          TProtocolUtil.skip(iprot, field.type);
17630
        } else {
17631
          switch (fieldId) {
483 rajveer 17632
            case ID:
68 ashish 17633
              if (field.type == TType.I64) {
483 rajveer 17634
                this.id = iprot.readI64();
17635
                setIdIsSet(true);
68 ashish 17636
              } else { 
17637
                TProtocolUtil.skip(iprot, field.type);
17638
              }
17639
              break;
17640
          }
17641
          iprot.readFieldEnd();
17642
        }
17643
      }
17644
      iprot.readStructEnd();
17645
      validate();
17646
    }
17647
 
17648
    public void write(TProtocol oprot) throws TException {
17649
      validate();
17650
 
17651
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17652
      oprot.writeFieldBegin(ID_FIELD_DESC);
17653
      oprot.writeI64(this.id);
68 ashish 17654
      oprot.writeFieldEnd();
17655
      oprot.writeFieldStop();
17656
      oprot.writeStructEnd();
17657
    }
17658
 
17659
    @Override
17660
    public String toString() {
483 rajveer 17661
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 17662
      boolean first = true;
17663
 
483 rajveer 17664
      sb.append("id:");
17665
      sb.append(this.id);
68 ashish 17666
      first = false;
17667
      sb.append(")");
17668
      return sb.toString();
17669
    }
17670
 
17671
    public void validate() throws TException {
17672
      // check for required fields
17673
    }
17674
 
17675
  }
17676
 
483 rajveer 17677
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
17678
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 17679
 
483 rajveer 17680
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 17681
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17682
 
483 rajveer 17683
    private Order success;
68 ashish 17684
    private TransactionServiceException ex;
17685
 
17686
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17687
    public enum _Fields implements TFieldIdEnum {
17688
      SUCCESS((short)0, "success"),
17689
      EX((short)1, "ex");
17690
 
17691
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17692
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17693
 
17694
      static {
17695
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17696
          byId.put((int)field._thriftId, field);
17697
          byName.put(field.getFieldName(), field);
17698
        }
17699
      }
17700
 
17701
      /**
17702
       * Find the _Fields constant that matches fieldId, or null if its not found.
17703
       */
17704
      public static _Fields findByThriftId(int fieldId) {
17705
        return byId.get(fieldId);
17706
      }
17707
 
17708
      /**
17709
       * Find the _Fields constant that matches fieldId, throwing an exception
17710
       * if it is not found.
17711
       */
17712
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17713
        _Fields fields = findByThriftId(fieldId);
17714
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17715
        return fields;
17716
      }
17717
 
17718
      /**
17719
       * Find the _Fields constant that matches name, or null if its not found.
17720
       */
17721
      public static _Fields findByName(String name) {
17722
        return byName.get(name);
17723
      }
17724
 
17725
      private final short _thriftId;
17726
      private final String _fieldName;
17727
 
17728
      _Fields(short thriftId, String fieldName) {
17729
        _thriftId = thriftId;
17730
        _fieldName = fieldName;
17731
      }
17732
 
17733
      public short getThriftFieldId() {
17734
        return _thriftId;
17735
      }
17736
 
17737
      public String getFieldName() {
17738
        return _fieldName;
17739
      }
17740
    }
17741
 
17742
    // isset id assignments
17743
 
17744
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17745
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17746
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17747
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17748
          new FieldValueMetaData(TType.STRUCT)));
17749
    }});
17750
 
17751
    static {
483 rajveer 17752
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 17753
    }
17754
 
483 rajveer 17755
    public getOrder_result() {
68 ashish 17756
    }
17757
 
483 rajveer 17758
    public getOrder_result(
17759
      Order success,
68 ashish 17760
      TransactionServiceException ex)
17761
    {
17762
      this();
17763
      this.success = success;
17764
      this.ex = ex;
17765
    }
17766
 
17767
    /**
17768
     * Performs a deep copy on <i>other</i>.
17769
     */
483 rajveer 17770
    public getOrder_result(getOrder_result other) {
17771
      if (other.isSetSuccess()) {
17772
        this.success = new Order(other.success);
17773
      }
68 ashish 17774
      if (other.isSetEx()) {
17775
        this.ex = new TransactionServiceException(other.ex);
17776
      }
17777
    }
17778
 
483 rajveer 17779
    public getOrder_result deepCopy() {
17780
      return new getOrder_result(this);
68 ashish 17781
    }
17782
 
17783
    @Deprecated
483 rajveer 17784
    public getOrder_result clone() {
17785
      return new getOrder_result(this);
68 ashish 17786
    }
17787
 
483 rajveer 17788
    public Order getSuccess() {
68 ashish 17789
      return this.success;
17790
    }
17791
 
483 rajveer 17792
    public getOrder_result setSuccess(Order success) {
68 ashish 17793
      this.success = success;
17794
      return this;
17795
    }
17796
 
17797
    public void unsetSuccess() {
483 rajveer 17798
      this.success = null;
68 ashish 17799
    }
17800
 
17801
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17802
    public boolean isSetSuccess() {
483 rajveer 17803
      return this.success != null;
68 ashish 17804
    }
17805
 
17806
    public void setSuccessIsSet(boolean value) {
483 rajveer 17807
      if (!value) {
17808
        this.success = null;
17809
      }
68 ashish 17810
    }
17811
 
17812
    public TransactionServiceException getEx() {
17813
      return this.ex;
17814
    }
17815
 
483 rajveer 17816
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 17817
      this.ex = ex;
17818
      return this;
17819
    }
17820
 
17821
    public void unsetEx() {
17822
      this.ex = null;
17823
    }
17824
 
17825
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17826
    public boolean isSetEx() {
17827
      return this.ex != null;
17828
    }
17829
 
17830
    public void setExIsSet(boolean value) {
17831
      if (!value) {
17832
        this.ex = null;
17833
      }
17834
    }
17835
 
17836
    public void setFieldValue(_Fields field, Object value) {
17837
      switch (field) {
17838
      case SUCCESS:
17839
        if (value == null) {
17840
          unsetSuccess();
17841
        } else {
483 rajveer 17842
          setSuccess((Order)value);
68 ashish 17843
        }
17844
        break;
17845
 
17846
      case EX:
17847
        if (value == null) {
17848
          unsetEx();
17849
        } else {
17850
          setEx((TransactionServiceException)value);
17851
        }
17852
        break;
17853
 
17854
      }
17855
    }
17856
 
17857
    public void setFieldValue(int fieldID, Object value) {
17858
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17859
    }
17860
 
17861
    public Object getFieldValue(_Fields field) {
17862
      switch (field) {
17863
      case SUCCESS:
483 rajveer 17864
        return getSuccess();
68 ashish 17865
 
17866
      case EX:
17867
        return getEx();
17868
 
17869
      }
17870
      throw new IllegalStateException();
17871
    }
17872
 
17873
    public Object getFieldValue(int fieldId) {
17874
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17875
    }
17876
 
17877
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17878
    public boolean isSet(_Fields field) {
17879
      switch (field) {
17880
      case SUCCESS:
17881
        return isSetSuccess();
17882
      case EX:
17883
        return isSetEx();
17884
      }
17885
      throw new IllegalStateException();
17886
    }
17887
 
17888
    public boolean isSet(int fieldID) {
17889
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17890
    }
17891
 
17892
    @Override
17893
    public boolean equals(Object that) {
17894
      if (that == null)
17895
        return false;
483 rajveer 17896
      if (that instanceof getOrder_result)
17897
        return this.equals((getOrder_result)that);
68 ashish 17898
      return false;
17899
    }
17900
 
483 rajveer 17901
    public boolean equals(getOrder_result that) {
68 ashish 17902
      if (that == null)
17903
        return false;
17904
 
483 rajveer 17905
      boolean this_present_success = true && this.isSetSuccess();
17906
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17907
      if (this_present_success || that_present_success) {
17908
        if (!(this_present_success && that_present_success))
17909
          return false;
483 rajveer 17910
        if (!this.success.equals(that.success))
68 ashish 17911
          return false;
17912
      }
17913
 
17914
      boolean this_present_ex = true && this.isSetEx();
17915
      boolean that_present_ex = true && that.isSetEx();
17916
      if (this_present_ex || that_present_ex) {
17917
        if (!(this_present_ex && that_present_ex))
17918
          return false;
17919
        if (!this.ex.equals(that.ex))
17920
          return false;
17921
      }
17922
 
17923
      return true;
17924
    }
17925
 
17926
    @Override
17927
    public int hashCode() {
17928
      return 0;
17929
    }
17930
 
483 rajveer 17931
    public int compareTo(getOrder_result other) {
68 ashish 17932
      if (!getClass().equals(other.getClass())) {
17933
        return getClass().getName().compareTo(other.getClass().getName());
17934
      }
17935
 
17936
      int lastComparison = 0;
483 rajveer 17937
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 17938
 
17939
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17940
      if (lastComparison != 0) {
17941
        return lastComparison;
17942
      }
17943
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17944
      if (lastComparison != 0) {
17945
        return lastComparison;
17946
      }
17947
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17948
      if (lastComparison != 0) {
17949
        return lastComparison;
17950
      }
17951
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17952
      if (lastComparison != 0) {
17953
        return lastComparison;
17954
      }
17955
      return 0;
17956
    }
17957
 
17958
    public void read(TProtocol iprot) throws TException {
17959
      TField field;
17960
      iprot.readStructBegin();
17961
      while (true)
17962
      {
17963
        field = iprot.readFieldBegin();
17964
        if (field.type == TType.STOP) { 
17965
          break;
17966
        }
17967
        _Fields fieldId = _Fields.findByThriftId(field.id);
17968
        if (fieldId == null) {
17969
          TProtocolUtil.skip(iprot, field.type);
17970
        } else {
17971
          switch (fieldId) {
17972
            case SUCCESS:
483 rajveer 17973
              if (field.type == TType.STRUCT) {
17974
                this.success = new Order();
17975
                this.success.read(iprot);
68 ashish 17976
              } else { 
17977
                TProtocolUtil.skip(iprot, field.type);
17978
              }
17979
              break;
17980
            case EX:
17981
              if (field.type == TType.STRUCT) {
17982
                this.ex = new TransactionServiceException();
17983
                this.ex.read(iprot);
17984
              } else { 
17985
                TProtocolUtil.skip(iprot, field.type);
17986
              }
17987
              break;
17988
          }
17989
          iprot.readFieldEnd();
17990
        }
17991
      }
17992
      iprot.readStructEnd();
17993
      validate();
17994
    }
17995
 
17996
    public void write(TProtocol oprot) throws TException {
17997
      oprot.writeStructBegin(STRUCT_DESC);
17998
 
17999
      if (this.isSetSuccess()) {
18000
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18001
        this.success.write(oprot);
68 ashish 18002
        oprot.writeFieldEnd();
18003
      } else if (this.isSetEx()) {
18004
        oprot.writeFieldBegin(EX_FIELD_DESC);
18005
        this.ex.write(oprot);
18006
        oprot.writeFieldEnd();
18007
      }
18008
      oprot.writeFieldStop();
18009
      oprot.writeStructEnd();
18010
    }
18011
 
18012
    @Override
18013
    public String toString() {
483 rajveer 18014
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 18015
      boolean first = true;
18016
 
18017
      sb.append("success:");
483 rajveer 18018
      if (this.success == null) {
18019
        sb.append("null");
18020
      } else {
18021
        sb.append(this.success);
18022
      }
68 ashish 18023
      first = false;
18024
      if (!first) sb.append(", ");
18025
      sb.append("ex:");
18026
      if (this.ex == null) {
18027
        sb.append("null");
18028
      } else {
18029
        sb.append(this.ex);
18030
      }
18031
      first = false;
18032
      sb.append(")");
18033
      return sb.toString();
18034
    }
18035
 
18036
    public void validate() throws TException {
18037
      // check for required fields
18038
    }
18039
 
18040
  }
18041
 
483 rajveer 18042
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
18043
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 18044
 
483 rajveer 18045
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 18046
 
483 rajveer 18047
    private long orderId;
68 ashish 18048
 
18049
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18050
    public enum _Fields implements TFieldIdEnum {
483 rajveer 18051
      ORDER_ID((short)1, "orderId");
68 ashish 18052
 
18053
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18054
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18055
 
18056
      static {
18057
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18058
          byId.put((int)field._thriftId, field);
18059
          byName.put(field.getFieldName(), field);
18060
        }
18061
      }
18062
 
18063
      /**
18064
       * Find the _Fields constant that matches fieldId, or null if its not found.
18065
       */
18066
      public static _Fields findByThriftId(int fieldId) {
18067
        return byId.get(fieldId);
18068
      }
18069
 
18070
      /**
18071
       * Find the _Fields constant that matches fieldId, throwing an exception
18072
       * if it is not found.
18073
       */
18074
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18075
        _Fields fields = findByThriftId(fieldId);
18076
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18077
        return fields;
18078
      }
18079
 
18080
      /**
18081
       * Find the _Fields constant that matches name, or null if its not found.
18082
       */
18083
      public static _Fields findByName(String name) {
18084
        return byName.get(name);
18085
      }
18086
 
18087
      private final short _thriftId;
18088
      private final String _fieldName;
18089
 
18090
      _Fields(short thriftId, String fieldName) {
18091
        _thriftId = thriftId;
18092
        _fieldName = fieldName;
18093
      }
18094
 
18095
      public short getThriftFieldId() {
18096
        return _thriftId;
18097
      }
18098
 
18099
      public String getFieldName() {
18100
        return _fieldName;
18101
      }
18102
    }
18103
 
18104
    // isset id assignments
483 rajveer 18105
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 18106
    private BitSet __isset_bit_vector = new BitSet(1);
18107
 
18108
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 18109
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 18110
          new FieldValueMetaData(TType.I64)));
18111
    }});
18112
 
18113
    static {
483 rajveer 18114
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 18115
    }
18116
 
483 rajveer 18117
    public getLineItemsForOrder_args() {
68 ashish 18118
    }
18119
 
483 rajveer 18120
    public getLineItemsForOrder_args(
18121
      long orderId)
68 ashish 18122
    {
18123
      this();
483 rajveer 18124
      this.orderId = orderId;
18125
      setOrderIdIsSet(true);
68 ashish 18126
    }
18127
 
18128
    /**
18129
     * Performs a deep copy on <i>other</i>.
18130
     */
483 rajveer 18131
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 18132
      __isset_bit_vector.clear();
18133
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 18134
      this.orderId = other.orderId;
68 ashish 18135
    }
18136
 
483 rajveer 18137
    public getLineItemsForOrder_args deepCopy() {
18138
      return new getLineItemsForOrder_args(this);
68 ashish 18139
    }
18140
 
18141
    @Deprecated
483 rajveer 18142
    public getLineItemsForOrder_args clone() {
18143
      return new getLineItemsForOrder_args(this);
68 ashish 18144
    }
18145
 
483 rajveer 18146
    public long getOrderId() {
18147
      return this.orderId;
68 ashish 18148
    }
18149
 
483 rajveer 18150
    public getLineItemsForOrder_args setOrderId(long orderId) {
18151
      this.orderId = orderId;
18152
      setOrderIdIsSet(true);
68 ashish 18153
      return this;
18154
    }
18155
 
483 rajveer 18156
    public void unsetOrderId() {
18157
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 18158
    }
18159
 
483 rajveer 18160
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18161
    public boolean isSetOrderId() {
18162
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 18163
    }
18164
 
483 rajveer 18165
    public void setOrderIdIsSet(boolean value) {
18166
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 18167
    }
18168
 
18169
    public void setFieldValue(_Fields field, Object value) {
18170
      switch (field) {
483 rajveer 18171
      case ORDER_ID:
68 ashish 18172
        if (value == null) {
483 rajveer 18173
          unsetOrderId();
68 ashish 18174
        } else {
483 rajveer 18175
          setOrderId((Long)value);
68 ashish 18176
        }
18177
        break;
18178
 
18179
      }
18180
    }
18181
 
18182
    public void setFieldValue(int fieldID, Object value) {
18183
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18184
    }
18185
 
18186
    public Object getFieldValue(_Fields field) {
18187
      switch (field) {
483 rajveer 18188
      case ORDER_ID:
18189
        return new Long(getOrderId());
68 ashish 18190
 
18191
      }
18192
      throw new IllegalStateException();
18193
    }
18194
 
18195
    public Object getFieldValue(int fieldId) {
18196
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18197
    }
18198
 
18199
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18200
    public boolean isSet(_Fields field) {
18201
      switch (field) {
483 rajveer 18202
      case ORDER_ID:
18203
        return isSetOrderId();
68 ashish 18204
      }
18205
      throw new IllegalStateException();
18206
    }
18207
 
18208
    public boolean isSet(int fieldID) {
18209
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18210
    }
18211
 
18212
    @Override
18213
    public boolean equals(Object that) {
18214
      if (that == null)
18215
        return false;
483 rajveer 18216
      if (that instanceof getLineItemsForOrder_args)
18217
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 18218
      return false;
18219
    }
18220
 
483 rajveer 18221
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 18222
      if (that == null)
18223
        return false;
18224
 
483 rajveer 18225
      boolean this_present_orderId = true;
18226
      boolean that_present_orderId = true;
18227
      if (this_present_orderId || that_present_orderId) {
18228
        if (!(this_present_orderId && that_present_orderId))
68 ashish 18229
          return false;
483 rajveer 18230
        if (this.orderId != that.orderId)
68 ashish 18231
          return false;
18232
      }
18233
 
18234
      return true;
18235
    }
18236
 
18237
    @Override
18238
    public int hashCode() {
18239
      return 0;
18240
    }
18241
 
483 rajveer 18242
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 18243
      if (!getClass().equals(other.getClass())) {
18244
        return getClass().getName().compareTo(other.getClass().getName());
18245
      }
18246
 
18247
      int lastComparison = 0;
483 rajveer 18248
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 18249
 
483 rajveer 18250
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 18251
      if (lastComparison != 0) {
18252
        return lastComparison;
18253
      }
483 rajveer 18254
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 18255
      if (lastComparison != 0) {
18256
        return lastComparison;
18257
      }
18258
      return 0;
18259
    }
18260
 
18261
    public void read(TProtocol iprot) throws TException {
18262
      TField field;
18263
      iprot.readStructBegin();
18264
      while (true)
18265
      {
18266
        field = iprot.readFieldBegin();
18267
        if (field.type == TType.STOP) { 
18268
          break;
18269
        }
18270
        _Fields fieldId = _Fields.findByThriftId(field.id);
18271
        if (fieldId == null) {
18272
          TProtocolUtil.skip(iprot, field.type);
18273
        } else {
18274
          switch (fieldId) {
483 rajveer 18275
            case ORDER_ID:
68 ashish 18276
              if (field.type == TType.I64) {
483 rajveer 18277
                this.orderId = iprot.readI64();
18278
                setOrderIdIsSet(true);
68 ashish 18279
              } else { 
18280
                TProtocolUtil.skip(iprot, field.type);
18281
              }
18282
              break;
18283
          }
18284
          iprot.readFieldEnd();
18285
        }
18286
      }
18287
      iprot.readStructEnd();
18288
      validate();
18289
    }
18290
 
18291
    public void write(TProtocol oprot) throws TException {
18292
      validate();
18293
 
18294
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18295
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18296
      oprot.writeI64(this.orderId);
68 ashish 18297
      oprot.writeFieldEnd();
18298
      oprot.writeFieldStop();
18299
      oprot.writeStructEnd();
18300
    }
18301
 
18302
    @Override
18303
    public String toString() {
483 rajveer 18304
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 18305
      boolean first = true;
18306
 
483 rajveer 18307
      sb.append("orderId:");
18308
      sb.append(this.orderId);
68 ashish 18309
      first = false;
18310
      sb.append(")");
18311
      return sb.toString();
18312
    }
18313
 
18314
    public void validate() throws TException {
18315
      // check for required fields
18316
    }
18317
 
18318
  }
18319
 
483 rajveer 18320
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
18321
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 18322
 
483 rajveer 18323
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 18324
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18325
 
483 rajveer 18326
    private List<LineItem> success;
68 ashish 18327
    private TransactionServiceException ex;
18328
 
18329
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18330
    public enum _Fields implements TFieldIdEnum {
18331
      SUCCESS((short)0, "success"),
18332
      EX((short)1, "ex");
18333
 
18334
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18335
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18336
 
18337
      static {
18338
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18339
          byId.put((int)field._thriftId, field);
18340
          byName.put(field.getFieldName(), field);
18341
        }
18342
      }
18343
 
18344
      /**
18345
       * Find the _Fields constant that matches fieldId, or null if its not found.
18346
       */
18347
      public static _Fields findByThriftId(int fieldId) {
18348
        return byId.get(fieldId);
18349
      }
18350
 
18351
      /**
18352
       * Find the _Fields constant that matches fieldId, throwing an exception
18353
       * if it is not found.
18354
       */
18355
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18356
        _Fields fields = findByThriftId(fieldId);
18357
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18358
        return fields;
18359
      }
18360
 
18361
      /**
18362
       * Find the _Fields constant that matches name, or null if its not found.
18363
       */
18364
      public static _Fields findByName(String name) {
18365
        return byName.get(name);
18366
      }
18367
 
18368
      private final short _thriftId;
18369
      private final String _fieldName;
18370
 
18371
      _Fields(short thriftId, String fieldName) {
18372
        _thriftId = thriftId;
18373
        _fieldName = fieldName;
18374
      }
18375
 
18376
      public short getThriftFieldId() {
18377
        return _thriftId;
18378
      }
18379
 
18380
      public String getFieldName() {
18381
        return _fieldName;
18382
      }
18383
    }
18384
 
18385
    // isset id assignments
18386
 
18387
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18388
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18389
          new ListMetaData(TType.LIST, 
18390
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18391
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18392
          new FieldValueMetaData(TType.STRUCT)));
18393
    }});
18394
 
18395
    static {
483 rajveer 18396
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18397
    }
18398
 
483 rajveer 18399
    public getLineItemsForOrder_result() {
68 ashish 18400
    }
18401
 
483 rajveer 18402
    public getLineItemsForOrder_result(
18403
      List<LineItem> success,
68 ashish 18404
      TransactionServiceException ex)
18405
    {
18406
      this();
18407
      this.success = success;
18408
      this.ex = ex;
18409
    }
18410
 
18411
    /**
18412
     * Performs a deep copy on <i>other</i>.
18413
     */
483 rajveer 18414
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18415
      if (other.isSetSuccess()) {
18416
        List<LineItem> __this__success = new ArrayList<LineItem>();
18417
        for (LineItem other_element : other.success) {
18418
          __this__success.add(new LineItem(other_element));
18419
        }
18420
        this.success = __this__success;
18421
      }
68 ashish 18422
      if (other.isSetEx()) {
18423
        this.ex = new TransactionServiceException(other.ex);
18424
      }
18425
    }
18426
 
483 rajveer 18427
    public getLineItemsForOrder_result deepCopy() {
18428
      return new getLineItemsForOrder_result(this);
68 ashish 18429
    }
18430
 
18431
    @Deprecated
483 rajveer 18432
    public getLineItemsForOrder_result clone() {
18433
      return new getLineItemsForOrder_result(this);
68 ashish 18434
    }
18435
 
483 rajveer 18436
    public int getSuccessSize() {
18437
      return (this.success == null) ? 0 : this.success.size();
18438
    }
18439
 
18440
    public java.util.Iterator<LineItem> getSuccessIterator() {
18441
      return (this.success == null) ? null : this.success.iterator();
18442
    }
18443
 
18444
    public void addToSuccess(LineItem elem) {
18445
      if (this.success == null) {
18446
        this.success = new ArrayList<LineItem>();
18447
      }
18448
      this.success.add(elem);
18449
    }
18450
 
18451
    public List<LineItem> getSuccess() {
68 ashish 18452
      return this.success;
18453
    }
18454
 
483 rajveer 18455
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18456
      this.success = success;
18457
      return this;
18458
    }
18459
 
18460
    public void unsetSuccess() {
483 rajveer 18461
      this.success = null;
68 ashish 18462
    }
18463
 
18464
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18465
    public boolean isSetSuccess() {
483 rajveer 18466
      return this.success != null;
68 ashish 18467
    }
18468
 
18469
    public void setSuccessIsSet(boolean value) {
483 rajveer 18470
      if (!value) {
18471
        this.success = null;
18472
      }
68 ashish 18473
    }
18474
 
18475
    public TransactionServiceException getEx() {
18476
      return this.ex;
18477
    }
18478
 
483 rajveer 18479
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18480
      this.ex = ex;
18481
      return this;
18482
    }
18483
 
18484
    public void unsetEx() {
18485
      this.ex = null;
18486
    }
18487
 
18488
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18489
    public boolean isSetEx() {
18490
      return this.ex != null;
18491
    }
18492
 
18493
    public void setExIsSet(boolean value) {
18494
      if (!value) {
18495
        this.ex = null;
18496
      }
18497
    }
18498
 
18499
    public void setFieldValue(_Fields field, Object value) {
18500
      switch (field) {
18501
      case SUCCESS:
18502
        if (value == null) {
18503
          unsetSuccess();
18504
        } else {
483 rajveer 18505
          setSuccess((List<LineItem>)value);
68 ashish 18506
        }
18507
        break;
18508
 
18509
      case EX:
18510
        if (value == null) {
18511
          unsetEx();
18512
        } else {
18513
          setEx((TransactionServiceException)value);
18514
        }
18515
        break;
18516
 
18517
      }
18518
    }
18519
 
18520
    public void setFieldValue(int fieldID, Object value) {
18521
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18522
    }
18523
 
18524
    public Object getFieldValue(_Fields field) {
18525
      switch (field) {
18526
      case SUCCESS:
483 rajveer 18527
        return getSuccess();
68 ashish 18528
 
18529
      case EX:
18530
        return getEx();
18531
 
18532
      }
18533
      throw new IllegalStateException();
18534
    }
18535
 
18536
    public Object getFieldValue(int fieldId) {
18537
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18538
    }
18539
 
18540
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18541
    public boolean isSet(_Fields field) {
18542
      switch (field) {
18543
      case SUCCESS:
18544
        return isSetSuccess();
18545
      case EX:
18546
        return isSetEx();
18547
      }
18548
      throw new IllegalStateException();
18549
    }
18550
 
18551
    public boolean isSet(int fieldID) {
18552
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18553
    }
18554
 
18555
    @Override
18556
    public boolean equals(Object that) {
18557
      if (that == null)
18558
        return false;
483 rajveer 18559
      if (that instanceof getLineItemsForOrder_result)
18560
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18561
      return false;
18562
    }
18563
 
483 rajveer 18564
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18565
      if (that == null)
18566
        return false;
18567
 
483 rajveer 18568
      boolean this_present_success = true && this.isSetSuccess();
18569
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18570
      if (this_present_success || that_present_success) {
18571
        if (!(this_present_success && that_present_success))
18572
          return false;
483 rajveer 18573
        if (!this.success.equals(that.success))
68 ashish 18574
          return false;
18575
      }
18576
 
18577
      boolean this_present_ex = true && this.isSetEx();
18578
      boolean that_present_ex = true && that.isSetEx();
18579
      if (this_present_ex || that_present_ex) {
18580
        if (!(this_present_ex && that_present_ex))
18581
          return false;
18582
        if (!this.ex.equals(that.ex))
18583
          return false;
18584
      }
18585
 
18586
      return true;
18587
    }
18588
 
18589
    @Override
18590
    public int hashCode() {
18591
      return 0;
18592
    }
18593
 
483 rajveer 18594
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18595
      if (!getClass().equals(other.getClass())) {
18596
        return getClass().getName().compareTo(other.getClass().getName());
18597
      }
18598
 
18599
      int lastComparison = 0;
483 rajveer 18600
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18601
 
18602
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18603
      if (lastComparison != 0) {
18604
        return lastComparison;
18605
      }
18606
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18607
      if (lastComparison != 0) {
18608
        return lastComparison;
18609
      }
18610
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18611
      if (lastComparison != 0) {
18612
        return lastComparison;
18613
      }
18614
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18615
      if (lastComparison != 0) {
18616
        return lastComparison;
18617
      }
18618
      return 0;
18619
    }
18620
 
18621
    public void read(TProtocol iprot) throws TException {
18622
      TField field;
18623
      iprot.readStructBegin();
18624
      while (true)
18625
      {
18626
        field = iprot.readFieldBegin();
18627
        if (field.type == TType.STOP) { 
18628
          break;
18629
        }
18630
        _Fields fieldId = _Fields.findByThriftId(field.id);
18631
        if (fieldId == null) {
18632
          TProtocolUtil.skip(iprot, field.type);
18633
        } else {
18634
          switch (fieldId) {
18635
            case SUCCESS:
483 rajveer 18636
              if (field.type == TType.LIST) {
18637
                {
1382 varun.gupt 18638
                  TList _list40 = iprot.readListBegin();
18639
                  this.success = new ArrayList<LineItem>(_list40.size);
18640
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 18641
                  {
1382 varun.gupt 18642
                    LineItem _elem42;
18643
                    _elem42 = new LineItem();
18644
                    _elem42.read(iprot);
18645
                    this.success.add(_elem42);
483 rajveer 18646
                  }
18647
                  iprot.readListEnd();
18648
                }
68 ashish 18649
              } else { 
18650
                TProtocolUtil.skip(iprot, field.type);
18651
              }
18652
              break;
18653
            case EX:
18654
              if (field.type == TType.STRUCT) {
18655
                this.ex = new TransactionServiceException();
18656
                this.ex.read(iprot);
18657
              } else { 
18658
                TProtocolUtil.skip(iprot, field.type);
18659
              }
18660
              break;
18661
          }
18662
          iprot.readFieldEnd();
18663
        }
18664
      }
18665
      iprot.readStructEnd();
18666
      validate();
18667
    }
18668
 
18669
    public void write(TProtocol oprot) throws TException {
18670
      oprot.writeStructBegin(STRUCT_DESC);
18671
 
18672
      if (this.isSetSuccess()) {
18673
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18674
        {
18675
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18676
          for (LineItem _iter43 : this.success)
483 rajveer 18677
          {
1382 varun.gupt 18678
            _iter43.write(oprot);
483 rajveer 18679
          }
18680
          oprot.writeListEnd();
18681
        }
68 ashish 18682
        oprot.writeFieldEnd();
18683
      } else if (this.isSetEx()) {
18684
        oprot.writeFieldBegin(EX_FIELD_DESC);
18685
        this.ex.write(oprot);
18686
        oprot.writeFieldEnd();
18687
      }
18688
      oprot.writeFieldStop();
18689
      oprot.writeStructEnd();
18690
    }
18691
 
18692
    @Override
18693
    public String toString() {
483 rajveer 18694
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 18695
      boolean first = true;
18696
 
18697
      sb.append("success:");
483 rajveer 18698
      if (this.success == null) {
18699
        sb.append("null");
18700
      } else {
18701
        sb.append(this.success);
18702
      }
68 ashish 18703
      first = false;
18704
      if (!first) sb.append(", ");
18705
      sb.append("ex:");
18706
      if (this.ex == null) {
18707
        sb.append("null");
18708
      } else {
18709
        sb.append(this.ex);
18710
      }
18711
      first = false;
18712
      sb.append(")");
18713
      return sb.toString();
18714
    }
18715
 
18716
    public void validate() throws TException {
18717
      // check for required fields
18718
    }
18719
 
18720
  }
18721
 
1529 ankur.sing 18722
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
18723
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
18724
 
18725
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
18726
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
18727
 
18728
    private long orderId;
18729
    private long customerId;
18730
 
18731
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18732
    public enum _Fields implements TFieldIdEnum {
18733
      ORDER_ID((short)1, "orderId"),
18734
      CUSTOMER_ID((short)2, "customerId");
18735
 
18736
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18737
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18738
 
18739
      static {
18740
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18741
          byId.put((int)field._thriftId, field);
18742
          byName.put(field.getFieldName(), field);
18743
        }
18744
      }
18745
 
18746
      /**
18747
       * Find the _Fields constant that matches fieldId, or null if its not found.
18748
       */
18749
      public static _Fields findByThriftId(int fieldId) {
18750
        return byId.get(fieldId);
18751
      }
18752
 
18753
      /**
18754
       * Find the _Fields constant that matches fieldId, throwing an exception
18755
       * if it is not found.
18756
       */
18757
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18758
        _Fields fields = findByThriftId(fieldId);
18759
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18760
        return fields;
18761
      }
18762
 
18763
      /**
18764
       * Find the _Fields constant that matches name, or null if its not found.
18765
       */
18766
      public static _Fields findByName(String name) {
18767
        return byName.get(name);
18768
      }
18769
 
18770
      private final short _thriftId;
18771
      private final String _fieldName;
18772
 
18773
      _Fields(short thriftId, String fieldName) {
18774
        _thriftId = thriftId;
18775
        _fieldName = fieldName;
18776
      }
18777
 
18778
      public short getThriftFieldId() {
18779
        return _thriftId;
18780
      }
18781
 
18782
      public String getFieldName() {
18783
        return _fieldName;
18784
      }
18785
    }
18786
 
18787
    // isset id assignments
18788
    private static final int __ORDERID_ISSET_ID = 0;
18789
    private static final int __CUSTOMERID_ISSET_ID = 1;
18790
    private BitSet __isset_bit_vector = new BitSet(2);
18791
 
18792
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18793
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
18794
          new FieldValueMetaData(TType.I64)));
18795
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
18796
          new FieldValueMetaData(TType.I64)));
18797
    }});
18798
 
18799
    static {
18800
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
18801
    }
18802
 
18803
    public getOrderForCustomer_args() {
18804
    }
18805
 
18806
    public getOrderForCustomer_args(
18807
      long orderId,
18808
      long customerId)
18809
    {
18810
      this();
18811
      this.orderId = orderId;
18812
      setOrderIdIsSet(true);
18813
      this.customerId = customerId;
18814
      setCustomerIdIsSet(true);
18815
    }
18816
 
18817
    /**
18818
     * Performs a deep copy on <i>other</i>.
18819
     */
18820
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
18821
      __isset_bit_vector.clear();
18822
      __isset_bit_vector.or(other.__isset_bit_vector);
18823
      this.orderId = other.orderId;
18824
      this.customerId = other.customerId;
18825
    }
18826
 
18827
    public getOrderForCustomer_args deepCopy() {
18828
      return new getOrderForCustomer_args(this);
18829
    }
18830
 
18831
    @Deprecated
18832
    public getOrderForCustomer_args clone() {
18833
      return new getOrderForCustomer_args(this);
18834
    }
18835
 
18836
    public long getOrderId() {
18837
      return this.orderId;
18838
    }
18839
 
18840
    public getOrderForCustomer_args setOrderId(long orderId) {
18841
      this.orderId = orderId;
18842
      setOrderIdIsSet(true);
18843
      return this;
18844
    }
18845
 
18846
    public void unsetOrderId() {
18847
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
18848
    }
18849
 
18850
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18851
    public boolean isSetOrderId() {
18852
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
18853
    }
18854
 
18855
    public void setOrderIdIsSet(boolean value) {
18856
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
18857
    }
18858
 
18859
    public long getCustomerId() {
18860
      return this.customerId;
18861
    }
18862
 
18863
    public getOrderForCustomer_args setCustomerId(long customerId) {
18864
      this.customerId = customerId;
18865
      setCustomerIdIsSet(true);
18866
      return this;
18867
    }
18868
 
18869
    public void unsetCustomerId() {
18870
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
18871
    }
18872
 
18873
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
18874
    public boolean isSetCustomerId() {
18875
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
18876
    }
18877
 
18878
    public void setCustomerIdIsSet(boolean value) {
18879
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
18880
    }
18881
 
18882
    public void setFieldValue(_Fields field, Object value) {
18883
      switch (field) {
18884
      case ORDER_ID:
18885
        if (value == null) {
18886
          unsetOrderId();
18887
        } else {
18888
          setOrderId((Long)value);
18889
        }
18890
        break;
18891
 
18892
      case CUSTOMER_ID:
18893
        if (value == null) {
18894
          unsetCustomerId();
18895
        } else {
18896
          setCustomerId((Long)value);
18897
        }
18898
        break;
18899
 
18900
      }
18901
    }
18902
 
18903
    public void setFieldValue(int fieldID, Object value) {
18904
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18905
    }
18906
 
18907
    public Object getFieldValue(_Fields field) {
18908
      switch (field) {
18909
      case ORDER_ID:
18910
        return new Long(getOrderId());
18911
 
18912
      case CUSTOMER_ID:
18913
        return new Long(getCustomerId());
18914
 
18915
      }
18916
      throw new IllegalStateException();
18917
    }
18918
 
18919
    public Object getFieldValue(int fieldId) {
18920
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18921
    }
18922
 
18923
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18924
    public boolean isSet(_Fields field) {
18925
      switch (field) {
18926
      case ORDER_ID:
18927
        return isSetOrderId();
18928
      case CUSTOMER_ID:
18929
        return isSetCustomerId();
18930
      }
18931
      throw new IllegalStateException();
18932
    }
18933
 
18934
    public boolean isSet(int fieldID) {
18935
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18936
    }
18937
 
18938
    @Override
18939
    public boolean equals(Object that) {
18940
      if (that == null)
18941
        return false;
18942
      if (that instanceof getOrderForCustomer_args)
18943
        return this.equals((getOrderForCustomer_args)that);
18944
      return false;
18945
    }
18946
 
18947
    public boolean equals(getOrderForCustomer_args that) {
18948
      if (that == null)
18949
        return false;
18950
 
18951
      boolean this_present_orderId = true;
18952
      boolean that_present_orderId = true;
18953
      if (this_present_orderId || that_present_orderId) {
18954
        if (!(this_present_orderId && that_present_orderId))
18955
          return false;
18956
        if (this.orderId != that.orderId)
18957
          return false;
18958
      }
18959
 
18960
      boolean this_present_customerId = true;
18961
      boolean that_present_customerId = true;
18962
      if (this_present_customerId || that_present_customerId) {
18963
        if (!(this_present_customerId && that_present_customerId))
18964
          return false;
18965
        if (this.customerId != that.customerId)
18966
          return false;
18967
      }
18968
 
18969
      return true;
18970
    }
18971
 
18972
    @Override
18973
    public int hashCode() {
18974
      return 0;
18975
    }
18976
 
18977
    public int compareTo(getOrderForCustomer_args other) {
18978
      if (!getClass().equals(other.getClass())) {
18979
        return getClass().getName().compareTo(other.getClass().getName());
18980
      }
18981
 
18982
      int lastComparison = 0;
18983
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
18984
 
18985
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
18986
      if (lastComparison != 0) {
18987
        return lastComparison;
18988
      }
18989
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
18990
      if (lastComparison != 0) {
18991
        return lastComparison;
18992
      }
18993
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
18994
      if (lastComparison != 0) {
18995
        return lastComparison;
18996
      }
18997
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
18998
      if (lastComparison != 0) {
18999
        return lastComparison;
19000
      }
19001
      return 0;
19002
    }
19003
 
19004
    public void read(TProtocol iprot) throws TException {
19005
      TField field;
19006
      iprot.readStructBegin();
19007
      while (true)
19008
      {
19009
        field = iprot.readFieldBegin();
19010
        if (field.type == TType.STOP) { 
19011
          break;
19012
        }
19013
        _Fields fieldId = _Fields.findByThriftId(field.id);
19014
        if (fieldId == null) {
19015
          TProtocolUtil.skip(iprot, field.type);
19016
        } else {
19017
          switch (fieldId) {
19018
            case ORDER_ID:
19019
              if (field.type == TType.I64) {
19020
                this.orderId = iprot.readI64();
19021
                setOrderIdIsSet(true);
19022
              } else { 
19023
                TProtocolUtil.skip(iprot, field.type);
19024
              }
19025
              break;
19026
            case CUSTOMER_ID:
19027
              if (field.type == TType.I64) {
19028
                this.customerId = iprot.readI64();
19029
                setCustomerIdIsSet(true);
19030
              } else { 
19031
                TProtocolUtil.skip(iprot, field.type);
19032
              }
19033
              break;
19034
          }
19035
          iprot.readFieldEnd();
19036
        }
19037
      }
19038
      iprot.readStructEnd();
19039
      validate();
19040
    }
19041
 
19042
    public void write(TProtocol oprot) throws TException {
19043
      validate();
19044
 
19045
      oprot.writeStructBegin(STRUCT_DESC);
19046
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
19047
      oprot.writeI64(this.orderId);
19048
      oprot.writeFieldEnd();
19049
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
19050
      oprot.writeI64(this.customerId);
19051
      oprot.writeFieldEnd();
19052
      oprot.writeFieldStop();
19053
      oprot.writeStructEnd();
19054
    }
19055
 
19056
    @Override
19057
    public String toString() {
19058
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
19059
      boolean first = true;
19060
 
19061
      sb.append("orderId:");
19062
      sb.append(this.orderId);
19063
      first = false;
19064
      if (!first) sb.append(", ");
19065
      sb.append("customerId:");
19066
      sb.append(this.customerId);
19067
      first = false;
19068
      sb.append(")");
19069
      return sb.toString();
19070
    }
19071
 
19072
    public void validate() throws TException {
19073
      // check for required fields
19074
    }
19075
 
19076
  }
19077
 
19078
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
19079
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
19080
 
19081
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
19082
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19083
 
19084
    private Order success;
19085
    private TransactionServiceException ex;
19086
 
19087
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19088
    public enum _Fields implements TFieldIdEnum {
19089
      SUCCESS((short)0, "success"),
19090
      EX((short)1, "ex");
19091
 
19092
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19093
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19094
 
19095
      static {
19096
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19097
          byId.put((int)field._thriftId, field);
19098
          byName.put(field.getFieldName(), field);
19099
        }
19100
      }
19101
 
19102
      /**
19103
       * Find the _Fields constant that matches fieldId, or null if its not found.
19104
       */
19105
      public static _Fields findByThriftId(int fieldId) {
19106
        return byId.get(fieldId);
19107
      }
19108
 
19109
      /**
19110
       * Find the _Fields constant that matches fieldId, throwing an exception
19111
       * if it is not found.
19112
       */
19113
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19114
        _Fields fields = findByThriftId(fieldId);
19115
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19116
        return fields;
19117
      }
19118
 
19119
      /**
19120
       * Find the _Fields constant that matches name, or null if its not found.
19121
       */
19122
      public static _Fields findByName(String name) {
19123
        return byName.get(name);
19124
      }
19125
 
19126
      private final short _thriftId;
19127
      private final String _fieldName;
19128
 
19129
      _Fields(short thriftId, String fieldName) {
19130
        _thriftId = thriftId;
19131
        _fieldName = fieldName;
19132
      }
19133
 
19134
      public short getThriftFieldId() {
19135
        return _thriftId;
19136
      }
19137
 
19138
      public String getFieldName() {
19139
        return _fieldName;
19140
      }
19141
    }
19142
 
19143
    // isset id assignments
19144
 
19145
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19146
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19147
          new StructMetaData(TType.STRUCT, Order.class)));
19148
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19149
          new FieldValueMetaData(TType.STRUCT)));
19150
    }});
19151
 
19152
    static {
19153
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
19154
    }
19155
 
19156
    public getOrderForCustomer_result() {
19157
    }
19158
 
19159
    public getOrderForCustomer_result(
19160
      Order success,
19161
      TransactionServiceException ex)
19162
    {
19163
      this();
19164
      this.success = success;
19165
      this.ex = ex;
19166
    }
19167
 
19168
    /**
19169
     * Performs a deep copy on <i>other</i>.
19170
     */
19171
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
19172
      if (other.isSetSuccess()) {
19173
        this.success = new Order(other.success);
19174
      }
19175
      if (other.isSetEx()) {
19176
        this.ex = new TransactionServiceException(other.ex);
19177
      }
19178
    }
19179
 
19180
    public getOrderForCustomer_result deepCopy() {
19181
      return new getOrderForCustomer_result(this);
19182
    }
19183
 
19184
    @Deprecated
19185
    public getOrderForCustomer_result clone() {
19186
      return new getOrderForCustomer_result(this);
19187
    }
19188
 
19189
    public Order getSuccess() {
19190
      return this.success;
19191
    }
19192
 
19193
    public getOrderForCustomer_result setSuccess(Order success) {
19194
      this.success = success;
19195
      return this;
19196
    }
19197
 
19198
    public void unsetSuccess() {
19199
      this.success = null;
19200
    }
19201
 
19202
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19203
    public boolean isSetSuccess() {
19204
      return this.success != null;
19205
    }
19206
 
19207
    public void setSuccessIsSet(boolean value) {
19208
      if (!value) {
19209
        this.success = null;
19210
      }
19211
    }
19212
 
19213
    public TransactionServiceException getEx() {
19214
      return this.ex;
19215
    }
19216
 
19217
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
19218
      this.ex = ex;
19219
      return this;
19220
    }
19221
 
19222
    public void unsetEx() {
19223
      this.ex = null;
19224
    }
19225
 
19226
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19227
    public boolean isSetEx() {
19228
      return this.ex != null;
19229
    }
19230
 
19231
    public void setExIsSet(boolean value) {
19232
      if (!value) {
19233
        this.ex = null;
19234
      }
19235
    }
19236
 
19237
    public void setFieldValue(_Fields field, Object value) {
19238
      switch (field) {
19239
      case SUCCESS:
19240
        if (value == null) {
19241
          unsetSuccess();
19242
        } else {
19243
          setSuccess((Order)value);
19244
        }
19245
        break;
19246
 
19247
      case EX:
19248
        if (value == null) {
19249
          unsetEx();
19250
        } else {
19251
          setEx((TransactionServiceException)value);
19252
        }
19253
        break;
19254
 
19255
      }
19256
    }
19257
 
19258
    public void setFieldValue(int fieldID, Object value) {
19259
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19260
    }
19261
 
19262
    public Object getFieldValue(_Fields field) {
19263
      switch (field) {
19264
      case SUCCESS:
19265
        return getSuccess();
19266
 
19267
      case EX:
19268
        return getEx();
19269
 
19270
      }
19271
      throw new IllegalStateException();
19272
    }
19273
 
19274
    public Object getFieldValue(int fieldId) {
19275
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19276
    }
19277
 
19278
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19279
    public boolean isSet(_Fields field) {
19280
      switch (field) {
19281
      case SUCCESS:
19282
        return isSetSuccess();
19283
      case EX:
19284
        return isSetEx();
19285
      }
19286
      throw new IllegalStateException();
19287
    }
19288
 
19289
    public boolean isSet(int fieldID) {
19290
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19291
    }
19292
 
19293
    @Override
19294
    public boolean equals(Object that) {
19295
      if (that == null)
19296
        return false;
19297
      if (that instanceof getOrderForCustomer_result)
19298
        return this.equals((getOrderForCustomer_result)that);
19299
      return false;
19300
    }
19301
 
19302
    public boolean equals(getOrderForCustomer_result that) {
19303
      if (that == null)
19304
        return false;
19305
 
19306
      boolean this_present_success = true && this.isSetSuccess();
19307
      boolean that_present_success = true && that.isSetSuccess();
19308
      if (this_present_success || that_present_success) {
19309
        if (!(this_present_success && that_present_success))
19310
          return false;
19311
        if (!this.success.equals(that.success))
19312
          return false;
19313
      }
19314
 
19315
      boolean this_present_ex = true && this.isSetEx();
19316
      boolean that_present_ex = true && that.isSetEx();
19317
      if (this_present_ex || that_present_ex) {
19318
        if (!(this_present_ex && that_present_ex))
19319
          return false;
19320
        if (!this.ex.equals(that.ex))
19321
          return false;
19322
      }
19323
 
19324
      return true;
19325
    }
19326
 
19327
    @Override
19328
    public int hashCode() {
19329
      return 0;
19330
    }
19331
 
19332
    public int compareTo(getOrderForCustomer_result other) {
19333
      if (!getClass().equals(other.getClass())) {
19334
        return getClass().getName().compareTo(other.getClass().getName());
19335
      }
19336
 
19337
      int lastComparison = 0;
19338
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
19339
 
19340
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19341
      if (lastComparison != 0) {
19342
        return lastComparison;
19343
      }
19344
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19345
      if (lastComparison != 0) {
19346
        return lastComparison;
19347
      }
19348
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19349
      if (lastComparison != 0) {
19350
        return lastComparison;
19351
      }
19352
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19353
      if (lastComparison != 0) {
19354
        return lastComparison;
19355
      }
19356
      return 0;
19357
    }
19358
 
19359
    public void read(TProtocol iprot) throws TException {
19360
      TField field;
19361
      iprot.readStructBegin();
19362
      while (true)
19363
      {
19364
        field = iprot.readFieldBegin();
19365
        if (field.type == TType.STOP) { 
19366
          break;
19367
        }
19368
        _Fields fieldId = _Fields.findByThriftId(field.id);
19369
        if (fieldId == null) {
19370
          TProtocolUtil.skip(iprot, field.type);
19371
        } else {
19372
          switch (fieldId) {
19373
            case SUCCESS:
19374
              if (field.type == TType.STRUCT) {
19375
                this.success = new Order();
19376
                this.success.read(iprot);
19377
              } else { 
19378
                TProtocolUtil.skip(iprot, field.type);
19379
              }
19380
              break;
19381
            case EX:
19382
              if (field.type == TType.STRUCT) {
19383
                this.ex = new TransactionServiceException();
19384
                this.ex.read(iprot);
19385
              } else { 
19386
                TProtocolUtil.skip(iprot, field.type);
19387
              }
19388
              break;
19389
          }
19390
          iprot.readFieldEnd();
19391
        }
19392
      }
19393
      iprot.readStructEnd();
19394
      validate();
19395
    }
19396
 
19397
    public void write(TProtocol oprot) throws TException {
19398
      oprot.writeStructBegin(STRUCT_DESC);
19399
 
19400
      if (this.isSetSuccess()) {
19401
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19402
        this.success.write(oprot);
19403
        oprot.writeFieldEnd();
19404
      } else if (this.isSetEx()) {
19405
        oprot.writeFieldBegin(EX_FIELD_DESC);
19406
        this.ex.write(oprot);
19407
        oprot.writeFieldEnd();
19408
      }
19409
      oprot.writeFieldStop();
19410
      oprot.writeStructEnd();
19411
    }
19412
 
19413
    @Override
19414
    public String toString() {
19415
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
19416
      boolean first = true;
19417
 
19418
      sb.append("success:");
19419
      if (this.success == null) {
19420
        sb.append("null");
19421
      } else {
19422
        sb.append(this.success);
19423
      }
19424
      first = false;
19425
      if (!first) sb.append(", ");
19426
      sb.append("ex:");
19427
      if (this.ex == null) {
19428
        sb.append("null");
19429
      } else {
19430
        sb.append(this.ex);
19431
      }
19432
      first = false;
19433
      sb.append(")");
19434
      return sb.toString();
19435
    }
19436
 
19437
    public void validate() throws TException {
19438
      // check for required fields
19439
    }
19440
 
19441
  }
19442
 
1221 chandransh 19443
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
19444
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
19445
 
19446
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19447
 
19448
    private long warehouseId;
19449
 
19450
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19451
    public enum _Fields implements TFieldIdEnum {
19452
      WAREHOUSE_ID((short)1, "warehouseId");
19453
 
19454
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19455
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19456
 
19457
      static {
19458
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19459
          byId.put((int)field._thriftId, field);
19460
          byName.put(field.getFieldName(), field);
19461
        }
19462
      }
19463
 
19464
      /**
19465
       * Find the _Fields constant that matches fieldId, or null if its not found.
19466
       */
19467
      public static _Fields findByThriftId(int fieldId) {
19468
        return byId.get(fieldId);
19469
      }
19470
 
19471
      /**
19472
       * Find the _Fields constant that matches fieldId, throwing an exception
19473
       * if it is not found.
19474
       */
19475
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19476
        _Fields fields = findByThriftId(fieldId);
19477
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19478
        return fields;
19479
      }
19480
 
19481
      /**
19482
       * Find the _Fields constant that matches name, or null if its not found.
19483
       */
19484
      public static _Fields findByName(String name) {
19485
        return byName.get(name);
19486
      }
19487
 
19488
      private final short _thriftId;
19489
      private final String _fieldName;
19490
 
19491
      _Fields(short thriftId, String fieldName) {
19492
        _thriftId = thriftId;
19493
        _fieldName = fieldName;
19494
      }
19495
 
19496
      public short getThriftFieldId() {
19497
        return _thriftId;
19498
      }
19499
 
19500
      public String getFieldName() {
19501
        return _fieldName;
19502
      }
19503
    }
19504
 
19505
    // isset id assignments
19506
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19507
    private BitSet __isset_bit_vector = new BitSet(1);
19508
 
19509
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19510
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19511
          new FieldValueMetaData(TType.I64)));
19512
    }});
19513
 
19514
    static {
19515
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
19516
    }
19517
 
19518
    public batchOrders_args() {
19519
    }
19520
 
19521
    public batchOrders_args(
19522
      long warehouseId)
19523
    {
19524
      this();
19525
      this.warehouseId = warehouseId;
19526
      setWarehouseIdIsSet(true);
19527
    }
19528
 
19529
    /**
19530
     * Performs a deep copy on <i>other</i>.
19531
     */
19532
    public batchOrders_args(batchOrders_args other) {
19533
      __isset_bit_vector.clear();
19534
      __isset_bit_vector.or(other.__isset_bit_vector);
19535
      this.warehouseId = other.warehouseId;
19536
    }
19537
 
19538
    public batchOrders_args deepCopy() {
19539
      return new batchOrders_args(this);
19540
    }
19541
 
19542
    @Deprecated
19543
    public batchOrders_args clone() {
19544
      return new batchOrders_args(this);
19545
    }
19546
 
19547
    public long getWarehouseId() {
19548
      return this.warehouseId;
19549
    }
19550
 
19551
    public batchOrders_args setWarehouseId(long warehouseId) {
19552
      this.warehouseId = warehouseId;
19553
      setWarehouseIdIsSet(true);
19554
      return this;
19555
    }
19556
 
19557
    public void unsetWarehouseId() {
19558
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19559
    }
19560
 
19561
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19562
    public boolean isSetWarehouseId() {
19563
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19564
    }
19565
 
19566
    public void setWarehouseIdIsSet(boolean value) {
19567
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19568
    }
19569
 
19570
    public void setFieldValue(_Fields field, Object value) {
19571
      switch (field) {
19572
      case WAREHOUSE_ID:
19573
        if (value == null) {
19574
          unsetWarehouseId();
19575
        } else {
19576
          setWarehouseId((Long)value);
19577
        }
19578
        break;
19579
 
19580
      }
19581
    }
19582
 
19583
    public void setFieldValue(int fieldID, Object value) {
19584
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19585
    }
19586
 
19587
    public Object getFieldValue(_Fields field) {
19588
      switch (field) {
19589
      case WAREHOUSE_ID:
19590
        return new Long(getWarehouseId());
19591
 
19592
      }
19593
      throw new IllegalStateException();
19594
    }
19595
 
19596
    public Object getFieldValue(int fieldId) {
19597
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19598
    }
19599
 
19600
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19601
    public boolean isSet(_Fields field) {
19602
      switch (field) {
19603
      case WAREHOUSE_ID:
19604
        return isSetWarehouseId();
19605
      }
19606
      throw new IllegalStateException();
19607
    }
19608
 
19609
    public boolean isSet(int fieldID) {
19610
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19611
    }
19612
 
19613
    @Override
19614
    public boolean equals(Object that) {
19615
      if (that == null)
19616
        return false;
19617
      if (that instanceof batchOrders_args)
19618
        return this.equals((batchOrders_args)that);
19619
      return false;
19620
    }
19621
 
19622
    public boolean equals(batchOrders_args that) {
19623
      if (that == null)
19624
        return false;
19625
 
19626
      boolean this_present_warehouseId = true;
19627
      boolean that_present_warehouseId = true;
19628
      if (this_present_warehouseId || that_present_warehouseId) {
19629
        if (!(this_present_warehouseId && that_present_warehouseId))
19630
          return false;
19631
        if (this.warehouseId != that.warehouseId)
19632
          return false;
19633
      }
19634
 
19635
      return true;
19636
    }
19637
 
19638
    @Override
19639
    public int hashCode() {
19640
      return 0;
19641
    }
19642
 
19643
    public int compareTo(batchOrders_args other) {
19644
      if (!getClass().equals(other.getClass())) {
19645
        return getClass().getName().compareTo(other.getClass().getName());
19646
      }
19647
 
19648
      int lastComparison = 0;
19649
      batchOrders_args typedOther = (batchOrders_args)other;
19650
 
19651
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
19652
      if (lastComparison != 0) {
19653
        return lastComparison;
19654
      }
19655
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
19656
      if (lastComparison != 0) {
19657
        return lastComparison;
19658
      }
19659
      return 0;
19660
    }
19661
 
19662
    public void read(TProtocol iprot) throws TException {
19663
      TField field;
19664
      iprot.readStructBegin();
19665
      while (true)
19666
      {
19667
        field = iprot.readFieldBegin();
19668
        if (field.type == TType.STOP) { 
19669
          break;
19670
        }
19671
        _Fields fieldId = _Fields.findByThriftId(field.id);
19672
        if (fieldId == null) {
19673
          TProtocolUtil.skip(iprot, field.type);
19674
        } else {
19675
          switch (fieldId) {
19676
            case WAREHOUSE_ID:
19677
              if (field.type == TType.I64) {
19678
                this.warehouseId = iprot.readI64();
19679
                setWarehouseIdIsSet(true);
19680
              } else { 
19681
                TProtocolUtil.skip(iprot, field.type);
19682
              }
19683
              break;
19684
          }
19685
          iprot.readFieldEnd();
19686
        }
19687
      }
19688
      iprot.readStructEnd();
19689
      validate();
19690
    }
19691
 
19692
    public void write(TProtocol oprot) throws TException {
19693
      validate();
19694
 
19695
      oprot.writeStructBegin(STRUCT_DESC);
19696
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19697
      oprot.writeI64(this.warehouseId);
19698
      oprot.writeFieldEnd();
19699
      oprot.writeFieldStop();
19700
      oprot.writeStructEnd();
19701
    }
19702
 
19703
    @Override
19704
    public String toString() {
19705
      StringBuilder sb = new StringBuilder("batchOrders_args(");
19706
      boolean first = true;
19707
 
19708
      sb.append("warehouseId:");
19709
      sb.append(this.warehouseId);
19710
      first = false;
19711
      sb.append(")");
19712
      return sb.toString();
19713
    }
19714
 
19715
    public void validate() throws TException {
19716
      // check for required fields
19717
    }
19718
 
19719
  }
19720
 
19721
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
19722
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
19723
 
19724
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19725
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19726
 
19727
    private List<Order> success;
19728
    private TransactionServiceException ex;
19729
 
19730
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19731
    public enum _Fields implements TFieldIdEnum {
19732
      SUCCESS((short)0, "success"),
19733
      EX((short)1, "ex");
19734
 
19735
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19736
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19737
 
19738
      static {
19739
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19740
          byId.put((int)field._thriftId, field);
19741
          byName.put(field.getFieldName(), field);
19742
        }
19743
      }
19744
 
19745
      /**
19746
       * Find the _Fields constant that matches fieldId, or null if its not found.
19747
       */
19748
      public static _Fields findByThriftId(int fieldId) {
19749
        return byId.get(fieldId);
19750
      }
19751
 
19752
      /**
19753
       * Find the _Fields constant that matches fieldId, throwing an exception
19754
       * if it is not found.
19755
       */
19756
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19757
        _Fields fields = findByThriftId(fieldId);
19758
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19759
        return fields;
19760
      }
19761
 
19762
      /**
19763
       * Find the _Fields constant that matches name, or null if its not found.
19764
       */
19765
      public static _Fields findByName(String name) {
19766
        return byName.get(name);
19767
      }
19768
 
19769
      private final short _thriftId;
19770
      private final String _fieldName;
19771
 
19772
      _Fields(short thriftId, String fieldName) {
19773
        _thriftId = thriftId;
19774
        _fieldName = fieldName;
19775
      }
19776
 
19777
      public short getThriftFieldId() {
19778
        return _thriftId;
19779
      }
19780
 
19781
      public String getFieldName() {
19782
        return _fieldName;
19783
      }
19784
    }
19785
 
19786
    // isset id assignments
19787
 
19788
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19789
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19790
          new ListMetaData(TType.LIST, 
19791
              new StructMetaData(TType.STRUCT, Order.class))));
19792
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19793
          new FieldValueMetaData(TType.STRUCT)));
19794
    }});
19795
 
19796
    static {
19797
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
19798
    }
19799
 
19800
    public batchOrders_result() {
19801
    }
19802
 
19803
    public batchOrders_result(
19804
      List<Order> success,
19805
      TransactionServiceException ex)
19806
    {
19807
      this();
19808
      this.success = success;
19809
      this.ex = ex;
19810
    }
19811
 
19812
    /**
19813
     * Performs a deep copy on <i>other</i>.
19814
     */
19815
    public batchOrders_result(batchOrders_result other) {
19816
      if (other.isSetSuccess()) {
19817
        List<Order> __this__success = new ArrayList<Order>();
19818
        for (Order other_element : other.success) {
19819
          __this__success.add(new Order(other_element));
19820
        }
19821
        this.success = __this__success;
19822
      }
19823
      if (other.isSetEx()) {
19824
        this.ex = new TransactionServiceException(other.ex);
19825
      }
19826
    }
19827
 
19828
    public batchOrders_result deepCopy() {
19829
      return new batchOrders_result(this);
19830
    }
19831
 
19832
    @Deprecated
19833
    public batchOrders_result clone() {
19834
      return new batchOrders_result(this);
19835
    }
19836
 
19837
    public int getSuccessSize() {
19838
      return (this.success == null) ? 0 : this.success.size();
19839
    }
19840
 
19841
    public java.util.Iterator<Order> getSuccessIterator() {
19842
      return (this.success == null) ? null : this.success.iterator();
19843
    }
19844
 
19845
    public void addToSuccess(Order elem) {
19846
      if (this.success == null) {
19847
        this.success = new ArrayList<Order>();
19848
      }
19849
      this.success.add(elem);
19850
    }
19851
 
19852
    public List<Order> getSuccess() {
19853
      return this.success;
19854
    }
19855
 
19856
    public batchOrders_result setSuccess(List<Order> success) {
19857
      this.success = success;
19858
      return this;
19859
    }
19860
 
19861
    public void unsetSuccess() {
19862
      this.success = null;
19863
    }
19864
 
19865
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19866
    public boolean isSetSuccess() {
19867
      return this.success != null;
19868
    }
19869
 
19870
    public void setSuccessIsSet(boolean value) {
19871
      if (!value) {
19872
        this.success = null;
19873
      }
19874
    }
19875
 
19876
    public TransactionServiceException getEx() {
19877
      return this.ex;
19878
    }
19879
 
19880
    public batchOrders_result setEx(TransactionServiceException ex) {
19881
      this.ex = ex;
19882
      return this;
19883
    }
19884
 
19885
    public void unsetEx() {
19886
      this.ex = null;
19887
    }
19888
 
19889
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19890
    public boolean isSetEx() {
19891
      return this.ex != null;
19892
    }
19893
 
19894
    public void setExIsSet(boolean value) {
19895
      if (!value) {
19896
        this.ex = null;
19897
      }
19898
    }
19899
 
19900
    public void setFieldValue(_Fields field, Object value) {
19901
      switch (field) {
19902
      case SUCCESS:
19903
        if (value == null) {
19904
          unsetSuccess();
19905
        } else {
19906
          setSuccess((List<Order>)value);
19907
        }
19908
        break;
19909
 
19910
      case EX:
19911
        if (value == null) {
19912
          unsetEx();
19913
        } else {
19914
          setEx((TransactionServiceException)value);
19915
        }
19916
        break;
19917
 
19918
      }
19919
    }
19920
 
19921
    public void setFieldValue(int fieldID, Object value) {
19922
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19923
    }
19924
 
19925
    public Object getFieldValue(_Fields field) {
19926
      switch (field) {
19927
      case SUCCESS:
19928
        return getSuccess();
19929
 
19930
      case EX:
19931
        return getEx();
19932
 
19933
      }
19934
      throw new IllegalStateException();
19935
    }
19936
 
19937
    public Object getFieldValue(int fieldId) {
19938
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19939
    }
19940
 
19941
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19942
    public boolean isSet(_Fields field) {
19943
      switch (field) {
19944
      case SUCCESS:
19945
        return isSetSuccess();
19946
      case EX:
19947
        return isSetEx();
19948
      }
19949
      throw new IllegalStateException();
19950
    }
19951
 
19952
    public boolean isSet(int fieldID) {
19953
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19954
    }
19955
 
19956
    @Override
19957
    public boolean equals(Object that) {
19958
      if (that == null)
19959
        return false;
19960
      if (that instanceof batchOrders_result)
19961
        return this.equals((batchOrders_result)that);
19962
      return false;
19963
    }
19964
 
19965
    public boolean equals(batchOrders_result that) {
19966
      if (that == null)
19967
        return false;
19968
 
19969
      boolean this_present_success = true && this.isSetSuccess();
19970
      boolean that_present_success = true && that.isSetSuccess();
19971
      if (this_present_success || that_present_success) {
19972
        if (!(this_present_success && that_present_success))
19973
          return false;
19974
        if (!this.success.equals(that.success))
19975
          return false;
19976
      }
19977
 
19978
      boolean this_present_ex = true && this.isSetEx();
19979
      boolean that_present_ex = true && that.isSetEx();
19980
      if (this_present_ex || that_present_ex) {
19981
        if (!(this_present_ex && that_present_ex))
19982
          return false;
19983
        if (!this.ex.equals(that.ex))
19984
          return false;
19985
      }
19986
 
19987
      return true;
19988
    }
19989
 
19990
    @Override
19991
    public int hashCode() {
19992
      return 0;
19993
    }
19994
 
19995
    public int compareTo(batchOrders_result other) {
19996
      if (!getClass().equals(other.getClass())) {
19997
        return getClass().getName().compareTo(other.getClass().getName());
19998
      }
19999
 
20000
      int lastComparison = 0;
20001
      batchOrders_result typedOther = (batchOrders_result)other;
20002
 
20003
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20004
      if (lastComparison != 0) {
20005
        return lastComparison;
20006
      }
20007
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20008
      if (lastComparison != 0) {
20009
        return lastComparison;
20010
      }
20011
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20012
      if (lastComparison != 0) {
20013
        return lastComparison;
20014
      }
20015
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20016
      if (lastComparison != 0) {
20017
        return lastComparison;
20018
      }
20019
      return 0;
20020
    }
20021
 
20022
    public void read(TProtocol iprot) throws TException {
20023
      TField field;
20024
      iprot.readStructBegin();
20025
      while (true)
20026
      {
20027
        field = iprot.readFieldBegin();
20028
        if (field.type == TType.STOP) { 
20029
          break;
20030
        }
20031
        _Fields fieldId = _Fields.findByThriftId(field.id);
20032
        if (fieldId == null) {
20033
          TProtocolUtil.skip(iprot, field.type);
20034
        } else {
20035
          switch (fieldId) {
20036
            case SUCCESS:
20037
              if (field.type == TType.LIST) {
20038
                {
1382 varun.gupt 20039
                  TList _list44 = iprot.readListBegin();
20040
                  this.success = new ArrayList<Order>(_list44.size);
20041
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 20042
                  {
1382 varun.gupt 20043
                    Order _elem46;
20044
                    _elem46 = new Order();
20045
                    _elem46.read(iprot);
20046
                    this.success.add(_elem46);
1221 chandransh 20047
                  }
20048
                  iprot.readListEnd();
20049
                }
20050
              } else { 
20051
                TProtocolUtil.skip(iprot, field.type);
20052
              }
20053
              break;
20054
            case EX:
20055
              if (field.type == TType.STRUCT) {
20056
                this.ex = new TransactionServiceException();
20057
                this.ex.read(iprot);
20058
              } else { 
20059
                TProtocolUtil.skip(iprot, field.type);
20060
              }
20061
              break;
20062
          }
20063
          iprot.readFieldEnd();
20064
        }
20065
      }
20066
      iprot.readStructEnd();
20067
      validate();
20068
    }
20069
 
20070
    public void write(TProtocol oprot) throws TException {
20071
      oprot.writeStructBegin(STRUCT_DESC);
20072
 
20073
      if (this.isSetSuccess()) {
20074
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20075
        {
20076
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 20077
          for (Order _iter47 : this.success)
1221 chandransh 20078
          {
1382 varun.gupt 20079
            _iter47.write(oprot);
1221 chandransh 20080
          }
20081
          oprot.writeListEnd();
20082
        }
20083
        oprot.writeFieldEnd();
20084
      } else if (this.isSetEx()) {
20085
        oprot.writeFieldBegin(EX_FIELD_DESC);
20086
        this.ex.write(oprot);
20087
        oprot.writeFieldEnd();
20088
      }
20089
      oprot.writeFieldStop();
20090
      oprot.writeStructEnd();
20091
    }
20092
 
20093
    @Override
20094
    public String toString() {
20095
      StringBuilder sb = new StringBuilder("batchOrders_result(");
20096
      boolean first = true;
20097
 
20098
      sb.append("success:");
20099
      if (this.success == null) {
20100
        sb.append("null");
20101
      } else {
20102
        sb.append(this.success);
20103
      }
20104
      first = false;
20105
      if (!first) sb.append(", ");
20106
      sb.append("ex:");
20107
      if (this.ex == null) {
20108
        sb.append("null");
20109
      } else {
20110
        sb.append(this.ex);
20111
      }
20112
      first = false;
20113
      sb.append(")");
20114
      return sb.toString();
20115
    }
20116
 
20117
    public void validate() throws TException {
20118
      // check for required fields
20119
    }
20120
 
20121
  }
20122
 
1209 chandransh 20123
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
20124
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
20125
 
20126
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
20127
 
20128
    private long orderId;
20129
 
20130
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20131
    public enum _Fields implements TFieldIdEnum {
20132
      ORDER_ID((short)1, "orderId");
20133
 
20134
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20135
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20136
 
20137
      static {
20138
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20139
          byId.put((int)field._thriftId, field);
20140
          byName.put(field.getFieldName(), field);
20141
        }
20142
      }
20143
 
20144
      /**
20145
       * Find the _Fields constant that matches fieldId, or null if its not found.
20146
       */
20147
      public static _Fields findByThriftId(int fieldId) {
20148
        return byId.get(fieldId);
20149
      }
20150
 
20151
      /**
20152
       * Find the _Fields constant that matches fieldId, throwing an exception
20153
       * if it is not found.
20154
       */
20155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20156
        _Fields fields = findByThriftId(fieldId);
20157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20158
        return fields;
20159
      }
20160
 
20161
      /**
20162
       * Find the _Fields constant that matches name, or null if its not found.
20163
       */
20164
      public static _Fields findByName(String name) {
20165
        return byName.get(name);
20166
      }
20167
 
20168
      private final short _thriftId;
20169
      private final String _fieldName;
20170
 
20171
      _Fields(short thriftId, String fieldName) {
20172
        _thriftId = thriftId;
20173
        _fieldName = fieldName;
20174
      }
20175
 
20176
      public short getThriftFieldId() {
20177
        return _thriftId;
20178
      }
20179
 
20180
      public String getFieldName() {
20181
        return _fieldName;
20182
      }
20183
    }
20184
 
20185
    // isset id assignments
20186
    private static final int __ORDERID_ISSET_ID = 0;
20187
    private BitSet __isset_bit_vector = new BitSet(1);
20188
 
20189
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20190
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
20191
          new FieldValueMetaData(TType.I64)));
20192
    }});
20193
 
20194
    static {
20195
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
20196
    }
20197
 
20198
    public markOrderAsOutOfStock_args() {
20199
    }
20200
 
20201
    public markOrderAsOutOfStock_args(
20202
      long orderId)
20203
    {
20204
      this();
20205
      this.orderId = orderId;
20206
      setOrderIdIsSet(true);
20207
    }
20208
 
20209
    /**
20210
     * Performs a deep copy on <i>other</i>.
20211
     */
20212
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
20213
      __isset_bit_vector.clear();
20214
      __isset_bit_vector.or(other.__isset_bit_vector);
20215
      this.orderId = other.orderId;
20216
    }
20217
 
20218
    public markOrderAsOutOfStock_args deepCopy() {
20219
      return new markOrderAsOutOfStock_args(this);
20220
    }
20221
 
20222
    @Deprecated
20223
    public markOrderAsOutOfStock_args clone() {
20224
      return new markOrderAsOutOfStock_args(this);
20225
    }
20226
 
20227
    public long getOrderId() {
20228
      return this.orderId;
20229
    }
20230
 
20231
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
20232
      this.orderId = orderId;
20233
      setOrderIdIsSet(true);
20234
      return this;
20235
    }
20236
 
20237
    public void unsetOrderId() {
20238
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20239
    }
20240
 
20241
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20242
    public boolean isSetOrderId() {
20243
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20244
    }
20245
 
20246
    public void setOrderIdIsSet(boolean value) {
20247
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20248
    }
20249
 
20250
    public void setFieldValue(_Fields field, Object value) {
20251
      switch (field) {
20252
      case ORDER_ID:
20253
        if (value == null) {
20254
          unsetOrderId();
20255
        } else {
20256
          setOrderId((Long)value);
20257
        }
20258
        break;
20259
 
20260
      }
20261
    }
20262
 
20263
    public void setFieldValue(int fieldID, Object value) {
20264
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20265
    }
20266
 
20267
    public Object getFieldValue(_Fields field) {
20268
      switch (field) {
20269
      case ORDER_ID:
20270
        return new Long(getOrderId());
20271
 
20272
      }
20273
      throw new IllegalStateException();
20274
    }
20275
 
20276
    public Object getFieldValue(int fieldId) {
20277
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20278
    }
20279
 
20280
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20281
    public boolean isSet(_Fields field) {
20282
      switch (field) {
20283
      case ORDER_ID:
20284
        return isSetOrderId();
20285
      }
20286
      throw new IllegalStateException();
20287
    }
20288
 
20289
    public boolean isSet(int fieldID) {
20290
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20291
    }
20292
 
20293
    @Override
20294
    public boolean equals(Object that) {
20295
      if (that == null)
20296
        return false;
20297
      if (that instanceof markOrderAsOutOfStock_args)
20298
        return this.equals((markOrderAsOutOfStock_args)that);
20299
      return false;
20300
    }
20301
 
20302
    public boolean equals(markOrderAsOutOfStock_args that) {
20303
      if (that == null)
20304
        return false;
20305
 
20306
      boolean this_present_orderId = true;
20307
      boolean that_present_orderId = true;
20308
      if (this_present_orderId || that_present_orderId) {
20309
        if (!(this_present_orderId && that_present_orderId))
20310
          return false;
20311
        if (this.orderId != that.orderId)
20312
          return false;
20313
      }
20314
 
20315
      return true;
20316
    }
20317
 
20318
    @Override
20319
    public int hashCode() {
20320
      return 0;
20321
    }
20322
 
20323
    public int compareTo(markOrderAsOutOfStock_args other) {
20324
      if (!getClass().equals(other.getClass())) {
20325
        return getClass().getName().compareTo(other.getClass().getName());
20326
      }
20327
 
20328
      int lastComparison = 0;
20329
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
20330
 
20331
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20332
      if (lastComparison != 0) {
20333
        return lastComparison;
20334
      }
20335
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20336
      if (lastComparison != 0) {
20337
        return lastComparison;
20338
      }
20339
      return 0;
20340
    }
20341
 
20342
    public void read(TProtocol iprot) throws TException {
20343
      TField field;
20344
      iprot.readStructBegin();
20345
      while (true)
20346
      {
20347
        field = iprot.readFieldBegin();
20348
        if (field.type == TType.STOP) { 
20349
          break;
20350
        }
20351
        _Fields fieldId = _Fields.findByThriftId(field.id);
20352
        if (fieldId == null) {
20353
          TProtocolUtil.skip(iprot, field.type);
20354
        } else {
20355
          switch (fieldId) {
20356
            case ORDER_ID:
20357
              if (field.type == TType.I64) {
20358
                this.orderId = iprot.readI64();
20359
                setOrderIdIsSet(true);
20360
              } else { 
20361
                TProtocolUtil.skip(iprot, field.type);
20362
              }
20363
              break;
20364
          }
20365
          iprot.readFieldEnd();
20366
        }
20367
      }
20368
      iprot.readStructEnd();
20369
      validate();
20370
    }
20371
 
20372
    public void write(TProtocol oprot) throws TException {
20373
      validate();
20374
 
20375
      oprot.writeStructBegin(STRUCT_DESC);
20376
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20377
      oprot.writeI64(this.orderId);
20378
      oprot.writeFieldEnd();
20379
      oprot.writeFieldStop();
20380
      oprot.writeStructEnd();
20381
    }
20382
 
20383
    @Override
20384
    public String toString() {
20385
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
20386
      boolean first = true;
20387
 
20388
      sb.append("orderId:");
20389
      sb.append(this.orderId);
20390
      first = false;
20391
      sb.append(")");
20392
      return sb.toString();
20393
    }
20394
 
20395
    public void validate() throws TException {
20396
      // check for required fields
20397
    }
20398
 
20399
  }
20400
 
20401
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
20402
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
20403
 
20404
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20405
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20406
 
20407
    private boolean success;
20408
    private TransactionServiceException ex;
20409
 
20410
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20411
    public enum _Fields implements TFieldIdEnum {
20412
      SUCCESS((short)0, "success"),
20413
      EX((short)1, "ex");
20414
 
20415
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20416
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20417
 
20418
      static {
20419
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20420
          byId.put((int)field._thriftId, field);
20421
          byName.put(field.getFieldName(), field);
20422
        }
20423
      }
20424
 
20425
      /**
20426
       * Find the _Fields constant that matches fieldId, or null if its not found.
20427
       */
20428
      public static _Fields findByThriftId(int fieldId) {
20429
        return byId.get(fieldId);
20430
      }
20431
 
20432
      /**
20433
       * Find the _Fields constant that matches fieldId, throwing an exception
20434
       * if it is not found.
20435
       */
20436
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20437
        _Fields fields = findByThriftId(fieldId);
20438
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20439
        return fields;
20440
      }
20441
 
20442
      /**
20443
       * Find the _Fields constant that matches name, or null if its not found.
20444
       */
20445
      public static _Fields findByName(String name) {
20446
        return byName.get(name);
20447
      }
20448
 
20449
      private final short _thriftId;
20450
      private final String _fieldName;
20451
 
20452
      _Fields(short thriftId, String fieldName) {
20453
        _thriftId = thriftId;
20454
        _fieldName = fieldName;
20455
      }
20456
 
20457
      public short getThriftFieldId() {
20458
        return _thriftId;
20459
      }
20460
 
20461
      public String getFieldName() {
20462
        return _fieldName;
20463
      }
20464
    }
20465
 
20466
    // isset id assignments
20467
    private static final int __SUCCESS_ISSET_ID = 0;
20468
    private BitSet __isset_bit_vector = new BitSet(1);
20469
 
20470
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20471
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20472
          new FieldValueMetaData(TType.BOOL)));
20473
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20474
          new FieldValueMetaData(TType.STRUCT)));
20475
    }});
20476
 
20477
    static {
20478
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
20479
    }
20480
 
20481
    public markOrderAsOutOfStock_result() {
20482
    }
20483
 
20484
    public markOrderAsOutOfStock_result(
20485
      boolean success,
20486
      TransactionServiceException ex)
20487
    {
20488
      this();
20489
      this.success = success;
20490
      setSuccessIsSet(true);
20491
      this.ex = ex;
20492
    }
20493
 
20494
    /**
20495
     * Performs a deep copy on <i>other</i>.
20496
     */
20497
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
20498
      __isset_bit_vector.clear();
20499
      __isset_bit_vector.or(other.__isset_bit_vector);
20500
      this.success = other.success;
20501
      if (other.isSetEx()) {
20502
        this.ex = new TransactionServiceException(other.ex);
20503
      }
20504
    }
20505
 
20506
    public markOrderAsOutOfStock_result deepCopy() {
20507
      return new markOrderAsOutOfStock_result(this);
20508
    }
20509
 
20510
    @Deprecated
20511
    public markOrderAsOutOfStock_result clone() {
20512
      return new markOrderAsOutOfStock_result(this);
20513
    }
20514
 
20515
    public boolean isSuccess() {
20516
      return this.success;
20517
    }
20518
 
20519
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
20520
      this.success = success;
20521
      setSuccessIsSet(true);
20522
      return this;
20523
    }
20524
 
20525
    public void unsetSuccess() {
20526
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20527
    }
20528
 
20529
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20530
    public boolean isSetSuccess() {
20531
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20532
    }
20533
 
20534
    public void setSuccessIsSet(boolean value) {
20535
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20536
    }
20537
 
20538
    public TransactionServiceException getEx() {
20539
      return this.ex;
20540
    }
20541
 
20542
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
20543
      this.ex = ex;
20544
      return this;
20545
    }
20546
 
20547
    public void unsetEx() {
20548
      this.ex = null;
20549
    }
20550
 
20551
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20552
    public boolean isSetEx() {
20553
      return this.ex != null;
20554
    }
20555
 
20556
    public void setExIsSet(boolean value) {
20557
      if (!value) {
20558
        this.ex = null;
20559
      }
20560
    }
20561
 
20562
    public void setFieldValue(_Fields field, Object value) {
20563
      switch (field) {
20564
      case SUCCESS:
20565
        if (value == null) {
20566
          unsetSuccess();
20567
        } else {
20568
          setSuccess((Boolean)value);
20569
        }
20570
        break;
20571
 
20572
      case EX:
20573
        if (value == null) {
20574
          unsetEx();
20575
        } else {
20576
          setEx((TransactionServiceException)value);
20577
        }
20578
        break;
20579
 
20580
      }
20581
    }
20582
 
20583
    public void setFieldValue(int fieldID, Object value) {
20584
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20585
    }
20586
 
20587
    public Object getFieldValue(_Fields field) {
20588
      switch (field) {
20589
      case SUCCESS:
20590
        return new Boolean(isSuccess());
20591
 
20592
      case EX:
20593
        return getEx();
20594
 
20595
      }
20596
      throw new IllegalStateException();
20597
    }
20598
 
20599
    public Object getFieldValue(int fieldId) {
20600
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20601
    }
20602
 
20603
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20604
    public boolean isSet(_Fields field) {
20605
      switch (field) {
20606
      case SUCCESS:
20607
        return isSetSuccess();
20608
      case EX:
20609
        return isSetEx();
20610
      }
20611
      throw new IllegalStateException();
20612
    }
20613
 
20614
    public boolean isSet(int fieldID) {
20615
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20616
    }
20617
 
20618
    @Override
20619
    public boolean equals(Object that) {
20620
      if (that == null)
20621
        return false;
20622
      if (that instanceof markOrderAsOutOfStock_result)
20623
        return this.equals((markOrderAsOutOfStock_result)that);
20624
      return false;
20625
    }
20626
 
20627
    public boolean equals(markOrderAsOutOfStock_result that) {
20628
      if (that == null)
20629
        return false;
20630
 
20631
      boolean this_present_success = true;
20632
      boolean that_present_success = true;
20633
      if (this_present_success || that_present_success) {
20634
        if (!(this_present_success && that_present_success))
20635
          return false;
20636
        if (this.success != that.success)
20637
          return false;
20638
      }
20639
 
20640
      boolean this_present_ex = true && this.isSetEx();
20641
      boolean that_present_ex = true && that.isSetEx();
20642
      if (this_present_ex || that_present_ex) {
20643
        if (!(this_present_ex && that_present_ex))
20644
          return false;
20645
        if (!this.ex.equals(that.ex))
20646
          return false;
20647
      }
20648
 
20649
      return true;
20650
    }
20651
 
20652
    @Override
20653
    public int hashCode() {
20654
      return 0;
20655
    }
20656
 
20657
    public int compareTo(markOrderAsOutOfStock_result other) {
20658
      if (!getClass().equals(other.getClass())) {
20659
        return getClass().getName().compareTo(other.getClass().getName());
20660
      }
20661
 
20662
      int lastComparison = 0;
20663
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
20664
 
20665
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20666
      if (lastComparison != 0) {
20667
        return lastComparison;
20668
      }
20669
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20670
      if (lastComparison != 0) {
20671
        return lastComparison;
20672
      }
20673
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20674
      if (lastComparison != 0) {
20675
        return lastComparison;
20676
      }
20677
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20678
      if (lastComparison != 0) {
20679
        return lastComparison;
20680
      }
20681
      return 0;
20682
    }
20683
 
20684
    public void read(TProtocol iprot) throws TException {
20685
      TField field;
20686
      iprot.readStructBegin();
20687
      while (true)
20688
      {
20689
        field = iprot.readFieldBegin();
20690
        if (field.type == TType.STOP) { 
20691
          break;
20692
        }
20693
        _Fields fieldId = _Fields.findByThriftId(field.id);
20694
        if (fieldId == null) {
20695
          TProtocolUtil.skip(iprot, field.type);
20696
        } else {
20697
          switch (fieldId) {
20698
            case SUCCESS:
20699
              if (field.type == TType.BOOL) {
20700
                this.success = iprot.readBool();
20701
                setSuccessIsSet(true);
20702
              } else { 
20703
                TProtocolUtil.skip(iprot, field.type);
20704
              }
20705
              break;
20706
            case EX:
20707
              if (field.type == TType.STRUCT) {
20708
                this.ex = new TransactionServiceException();
20709
                this.ex.read(iprot);
20710
              } else { 
20711
                TProtocolUtil.skip(iprot, field.type);
20712
              }
20713
              break;
20714
          }
20715
          iprot.readFieldEnd();
20716
        }
20717
      }
20718
      iprot.readStructEnd();
20719
      validate();
20720
    }
20721
 
20722
    public void write(TProtocol oprot) throws TException {
20723
      oprot.writeStructBegin(STRUCT_DESC);
20724
 
20725
      if (this.isSetSuccess()) {
20726
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20727
        oprot.writeBool(this.success);
20728
        oprot.writeFieldEnd();
20729
      } else if (this.isSetEx()) {
20730
        oprot.writeFieldBegin(EX_FIELD_DESC);
20731
        this.ex.write(oprot);
20732
        oprot.writeFieldEnd();
20733
      }
20734
      oprot.writeFieldStop();
20735
      oprot.writeStructEnd();
20736
    }
20737
 
20738
    @Override
20739
    public String toString() {
20740
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
20741
      boolean first = true;
20742
 
20743
      sb.append("success:");
20744
      sb.append(this.success);
20745
      first = false;
20746
      if (!first) sb.append(", ");
20747
      sb.append("ex:");
20748
      if (this.ex == null) {
20749
        sb.append("null");
20750
      } else {
20751
        sb.append(this.ex);
20752
      }
20753
      first = false;
20754
      sb.append(")");
20755
      return sb.toString();
20756
    }
20757
 
20758
    public void validate() throws TException {
20759
      // check for required fields
20760
    }
20761
 
20762
  }
20763
 
758 chandransh 20764
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
20765
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
20766
 
20767
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
20768
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
20769
 
20770
    private long warehouseId;
20771
    private long providerId;
20772
 
20773
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20774
    public enum _Fields implements TFieldIdEnum {
20775
      WAREHOUSE_ID((short)1, "warehouseId"),
20776
      PROVIDER_ID((short)2, "providerId");
20777
 
20778
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20779
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20780
 
20781
      static {
20782
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20783
          byId.put((int)field._thriftId, field);
20784
          byName.put(field.getFieldName(), field);
20785
        }
20786
      }
20787
 
20788
      /**
20789
       * Find the _Fields constant that matches fieldId, or null if its not found.
20790
       */
20791
      public static _Fields findByThriftId(int fieldId) {
20792
        return byId.get(fieldId);
20793
      }
20794
 
20795
      /**
20796
       * Find the _Fields constant that matches fieldId, throwing an exception
20797
       * if it is not found.
20798
       */
20799
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20800
        _Fields fields = findByThriftId(fieldId);
20801
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20802
        return fields;
20803
      }
20804
 
20805
      /**
20806
       * Find the _Fields constant that matches name, or null if its not found.
20807
       */
20808
      public static _Fields findByName(String name) {
20809
        return byName.get(name);
20810
      }
20811
 
20812
      private final short _thriftId;
20813
      private final String _fieldName;
20814
 
20815
      _Fields(short thriftId, String fieldName) {
20816
        _thriftId = thriftId;
20817
        _fieldName = fieldName;
20818
      }
20819
 
20820
      public short getThriftFieldId() {
20821
        return _thriftId;
20822
      }
20823
 
20824
      public String getFieldName() {
20825
        return _fieldName;
20826
      }
20827
    }
20828
 
20829
    // isset id assignments
20830
    private static final int __WAREHOUSEID_ISSET_ID = 0;
20831
    private static final int __PROVIDERID_ISSET_ID = 1;
20832
    private BitSet __isset_bit_vector = new BitSet(2);
20833
 
20834
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20835
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
20836
          new FieldValueMetaData(TType.I64)));
20837
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
20838
          new FieldValueMetaData(TType.I64)));
20839
    }});
20840
 
20841
    static {
20842
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
20843
    }
20844
 
20845
    public markOrdersAsManifested_args() {
20846
    }
20847
 
20848
    public markOrdersAsManifested_args(
20849
      long warehouseId,
20850
      long providerId)
20851
    {
20852
      this();
20853
      this.warehouseId = warehouseId;
20854
      setWarehouseIdIsSet(true);
20855
      this.providerId = providerId;
20856
      setProviderIdIsSet(true);
20857
    }
20858
 
20859
    /**
20860
     * Performs a deep copy on <i>other</i>.
20861
     */
20862
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
20863
      __isset_bit_vector.clear();
20864
      __isset_bit_vector.or(other.__isset_bit_vector);
20865
      this.warehouseId = other.warehouseId;
20866
      this.providerId = other.providerId;
20867
    }
20868
 
20869
    public markOrdersAsManifested_args deepCopy() {
20870
      return new markOrdersAsManifested_args(this);
20871
    }
20872
 
20873
    @Deprecated
20874
    public markOrdersAsManifested_args clone() {
20875
      return new markOrdersAsManifested_args(this);
20876
    }
20877
 
20878
    public long getWarehouseId() {
20879
      return this.warehouseId;
20880
    }
20881
 
20882
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
20883
      this.warehouseId = warehouseId;
20884
      setWarehouseIdIsSet(true);
20885
      return this;
20886
    }
20887
 
20888
    public void unsetWarehouseId() {
20889
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20890
    }
20891
 
20892
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
20893
    public boolean isSetWarehouseId() {
20894
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20895
    }
20896
 
20897
    public void setWarehouseIdIsSet(boolean value) {
20898
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20899
    }
20900
 
20901
    public long getProviderId() {
20902
      return this.providerId;
20903
    }
20904
 
20905
    public markOrdersAsManifested_args setProviderId(long providerId) {
20906
      this.providerId = providerId;
20907
      setProviderIdIsSet(true);
20908
      return this;
20909
    }
20910
 
20911
    public void unsetProviderId() {
20912
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
20913
    }
20914
 
20915
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
20916
    public boolean isSetProviderId() {
20917
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
20918
    }
20919
 
20920
    public void setProviderIdIsSet(boolean value) {
20921
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
20922
    }
20923
 
20924
    public void setFieldValue(_Fields field, Object value) {
20925
      switch (field) {
20926
      case WAREHOUSE_ID:
20927
        if (value == null) {
20928
          unsetWarehouseId();
20929
        } else {
20930
          setWarehouseId((Long)value);
20931
        }
20932
        break;
20933
 
20934
      case PROVIDER_ID:
20935
        if (value == null) {
20936
          unsetProviderId();
20937
        } else {
20938
          setProviderId((Long)value);
20939
        }
20940
        break;
20941
 
20942
      }
20943
    }
20944
 
20945
    public void setFieldValue(int fieldID, Object value) {
20946
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20947
    }
20948
 
20949
    public Object getFieldValue(_Fields field) {
20950
      switch (field) {
20951
      case WAREHOUSE_ID:
20952
        return new Long(getWarehouseId());
20953
 
20954
      case PROVIDER_ID:
20955
        return new Long(getProviderId());
20956
 
20957
      }
20958
      throw new IllegalStateException();
20959
    }
20960
 
20961
    public Object getFieldValue(int fieldId) {
20962
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20963
    }
20964
 
20965
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20966
    public boolean isSet(_Fields field) {
20967
      switch (field) {
20968
      case WAREHOUSE_ID:
20969
        return isSetWarehouseId();
20970
      case PROVIDER_ID:
20971
        return isSetProviderId();
20972
      }
20973
      throw new IllegalStateException();
20974
    }
20975
 
20976
    public boolean isSet(int fieldID) {
20977
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20978
    }
20979
 
20980
    @Override
20981
    public boolean equals(Object that) {
20982
      if (that == null)
20983
        return false;
20984
      if (that instanceof markOrdersAsManifested_args)
20985
        return this.equals((markOrdersAsManifested_args)that);
20986
      return false;
20987
    }
20988
 
20989
    public boolean equals(markOrdersAsManifested_args that) {
20990
      if (that == null)
20991
        return false;
20992
 
20993
      boolean this_present_warehouseId = true;
20994
      boolean that_present_warehouseId = true;
20995
      if (this_present_warehouseId || that_present_warehouseId) {
20996
        if (!(this_present_warehouseId && that_present_warehouseId))
20997
          return false;
20998
        if (this.warehouseId != that.warehouseId)
20999
          return false;
21000
      }
21001
 
21002
      boolean this_present_providerId = true;
21003
      boolean that_present_providerId = true;
21004
      if (this_present_providerId || that_present_providerId) {
21005
        if (!(this_present_providerId && that_present_providerId))
21006
          return false;
21007
        if (this.providerId != that.providerId)
21008
          return false;
21009
      }
21010
 
21011
      return true;
21012
    }
21013
 
21014
    @Override
21015
    public int hashCode() {
21016
      return 0;
21017
    }
21018
 
21019
    public int compareTo(markOrdersAsManifested_args other) {
21020
      if (!getClass().equals(other.getClass())) {
21021
        return getClass().getName().compareTo(other.getClass().getName());
21022
      }
21023
 
21024
      int lastComparison = 0;
21025
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
21026
 
21027
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
21028
      if (lastComparison != 0) {
21029
        return lastComparison;
21030
      }
21031
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
21032
      if (lastComparison != 0) {
21033
        return lastComparison;
21034
      }
21035
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
21036
      if (lastComparison != 0) {
21037
        return lastComparison;
21038
      }
21039
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
21040
      if (lastComparison != 0) {
21041
        return lastComparison;
21042
      }
21043
      return 0;
21044
    }
21045
 
21046
    public void read(TProtocol iprot) throws TException {
21047
      TField field;
21048
      iprot.readStructBegin();
21049
      while (true)
21050
      {
21051
        field = iprot.readFieldBegin();
21052
        if (field.type == TType.STOP) { 
21053
          break;
21054
        }
21055
        _Fields fieldId = _Fields.findByThriftId(field.id);
21056
        if (fieldId == null) {
21057
          TProtocolUtil.skip(iprot, field.type);
21058
        } else {
21059
          switch (fieldId) {
21060
            case WAREHOUSE_ID:
21061
              if (field.type == TType.I64) {
21062
                this.warehouseId = iprot.readI64();
21063
                setWarehouseIdIsSet(true);
21064
              } else { 
21065
                TProtocolUtil.skip(iprot, field.type);
21066
              }
21067
              break;
21068
            case PROVIDER_ID:
21069
              if (field.type == TType.I64) {
21070
                this.providerId = iprot.readI64();
21071
                setProviderIdIsSet(true);
21072
              } else { 
21073
                TProtocolUtil.skip(iprot, field.type);
21074
              }
21075
              break;
21076
          }
21077
          iprot.readFieldEnd();
21078
        }
21079
      }
21080
      iprot.readStructEnd();
21081
      validate();
21082
    }
21083
 
21084
    public void write(TProtocol oprot) throws TException {
21085
      validate();
21086
 
21087
      oprot.writeStructBegin(STRUCT_DESC);
21088
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
21089
      oprot.writeI64(this.warehouseId);
21090
      oprot.writeFieldEnd();
21091
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21092
      oprot.writeI64(this.providerId);
21093
      oprot.writeFieldEnd();
21094
      oprot.writeFieldStop();
21095
      oprot.writeStructEnd();
21096
    }
21097
 
21098
    @Override
21099
    public String toString() {
21100
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
21101
      boolean first = true;
21102
 
21103
      sb.append("warehouseId:");
21104
      sb.append(this.warehouseId);
21105
      first = false;
21106
      if (!first) sb.append(", ");
21107
      sb.append("providerId:");
21108
      sb.append(this.providerId);
21109
      first = false;
21110
      sb.append(")");
21111
      return sb.toString();
21112
    }
21113
 
21114
    public void validate() throws TException {
21115
      // check for required fields
21116
    }
21117
 
21118
  }
21119
 
21120
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
21121
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
21122
 
21123
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
21124
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21125
 
21126
    private boolean success;
21127
    private TransactionServiceException ex;
21128
 
21129
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21130
    public enum _Fields implements TFieldIdEnum {
21131
      SUCCESS((short)0, "success"),
21132
      EX((short)1, "ex");
21133
 
21134
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21135
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21136
 
21137
      static {
21138
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21139
          byId.put((int)field._thriftId, field);
21140
          byName.put(field.getFieldName(), field);
21141
        }
21142
      }
21143
 
21144
      /**
21145
       * Find the _Fields constant that matches fieldId, or null if its not found.
21146
       */
21147
      public static _Fields findByThriftId(int fieldId) {
21148
        return byId.get(fieldId);
21149
      }
21150
 
21151
      /**
21152
       * Find the _Fields constant that matches fieldId, throwing an exception
21153
       * if it is not found.
21154
       */
21155
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21156
        _Fields fields = findByThriftId(fieldId);
21157
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21158
        return fields;
21159
      }
21160
 
21161
      /**
21162
       * Find the _Fields constant that matches name, or null if its not found.
21163
       */
21164
      public static _Fields findByName(String name) {
21165
        return byName.get(name);
21166
      }
21167
 
21168
      private final short _thriftId;
21169
      private final String _fieldName;
21170
 
21171
      _Fields(short thriftId, String fieldName) {
21172
        _thriftId = thriftId;
21173
        _fieldName = fieldName;
21174
      }
21175
 
21176
      public short getThriftFieldId() {
21177
        return _thriftId;
21178
      }
21179
 
21180
      public String getFieldName() {
21181
        return _fieldName;
21182
      }
21183
    }
21184
 
21185
    // isset id assignments
21186
    private static final int __SUCCESS_ISSET_ID = 0;
21187
    private BitSet __isset_bit_vector = new BitSet(1);
21188
 
21189
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21190
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21191
          new FieldValueMetaData(TType.BOOL)));
21192
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21193
          new FieldValueMetaData(TType.STRUCT)));
21194
    }});
21195
 
21196
    static {
21197
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
21198
    }
21199
 
21200
    public markOrdersAsManifested_result() {
21201
    }
21202
 
21203
    public markOrdersAsManifested_result(
21204
      boolean success,
21205
      TransactionServiceException ex)
21206
    {
21207
      this();
21208
      this.success = success;
21209
      setSuccessIsSet(true);
21210
      this.ex = ex;
21211
    }
21212
 
21213
    /**
21214
     * Performs a deep copy on <i>other</i>.
21215
     */
21216
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
21217
      __isset_bit_vector.clear();
21218
      __isset_bit_vector.or(other.__isset_bit_vector);
21219
      this.success = other.success;
21220
      if (other.isSetEx()) {
21221
        this.ex = new TransactionServiceException(other.ex);
21222
      }
21223
    }
21224
 
21225
    public markOrdersAsManifested_result deepCopy() {
21226
      return new markOrdersAsManifested_result(this);
21227
    }
21228
 
21229
    @Deprecated
21230
    public markOrdersAsManifested_result clone() {
21231
      return new markOrdersAsManifested_result(this);
21232
    }
21233
 
21234
    public boolean isSuccess() {
21235
      return this.success;
21236
    }
21237
 
21238
    public markOrdersAsManifested_result setSuccess(boolean success) {
21239
      this.success = success;
21240
      setSuccessIsSet(true);
21241
      return this;
21242
    }
21243
 
21244
    public void unsetSuccess() {
21245
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21246
    }
21247
 
21248
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21249
    public boolean isSetSuccess() {
21250
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21251
    }
21252
 
21253
    public void setSuccessIsSet(boolean value) {
21254
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21255
    }
21256
 
21257
    public TransactionServiceException getEx() {
21258
      return this.ex;
21259
    }
21260
 
21261
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
21262
      this.ex = ex;
21263
      return this;
21264
    }
21265
 
21266
    public void unsetEx() {
21267
      this.ex = null;
21268
    }
21269
 
21270
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21271
    public boolean isSetEx() {
21272
      return this.ex != null;
21273
    }
21274
 
21275
    public void setExIsSet(boolean value) {
21276
      if (!value) {
21277
        this.ex = null;
21278
      }
21279
    }
21280
 
21281
    public void setFieldValue(_Fields field, Object value) {
21282
      switch (field) {
21283
      case SUCCESS:
21284
        if (value == null) {
21285
          unsetSuccess();
21286
        } else {
21287
          setSuccess((Boolean)value);
21288
        }
21289
        break;
21290
 
21291
      case EX:
21292
        if (value == null) {
21293
          unsetEx();
21294
        } else {
21295
          setEx((TransactionServiceException)value);
21296
        }
21297
        break;
21298
 
21299
      }
21300
    }
21301
 
21302
    public void setFieldValue(int fieldID, Object value) {
21303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21304
    }
21305
 
21306
    public Object getFieldValue(_Fields field) {
21307
      switch (field) {
21308
      case SUCCESS:
21309
        return new Boolean(isSuccess());
21310
 
21311
      case EX:
21312
        return getEx();
21313
 
21314
      }
21315
      throw new IllegalStateException();
21316
    }
21317
 
21318
    public Object getFieldValue(int fieldId) {
21319
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21320
    }
21321
 
21322
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21323
    public boolean isSet(_Fields field) {
21324
      switch (field) {
21325
      case SUCCESS:
21326
        return isSetSuccess();
21327
      case EX:
21328
        return isSetEx();
21329
      }
21330
      throw new IllegalStateException();
21331
    }
21332
 
21333
    public boolean isSet(int fieldID) {
21334
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21335
    }
21336
 
21337
    @Override
21338
    public boolean equals(Object that) {
21339
      if (that == null)
21340
        return false;
21341
      if (that instanceof markOrdersAsManifested_result)
21342
        return this.equals((markOrdersAsManifested_result)that);
21343
      return false;
21344
    }
21345
 
21346
    public boolean equals(markOrdersAsManifested_result that) {
21347
      if (that == null)
21348
        return false;
21349
 
21350
      boolean this_present_success = true;
21351
      boolean that_present_success = true;
21352
      if (this_present_success || that_present_success) {
21353
        if (!(this_present_success && that_present_success))
21354
          return false;
21355
        if (this.success != that.success)
21356
          return false;
21357
      }
21358
 
21359
      boolean this_present_ex = true && this.isSetEx();
21360
      boolean that_present_ex = true && that.isSetEx();
21361
      if (this_present_ex || that_present_ex) {
21362
        if (!(this_present_ex && that_present_ex))
21363
          return false;
21364
        if (!this.ex.equals(that.ex))
21365
          return false;
21366
      }
21367
 
21368
      return true;
21369
    }
21370
 
21371
    @Override
21372
    public int hashCode() {
21373
      return 0;
21374
    }
21375
 
21376
    public int compareTo(markOrdersAsManifested_result other) {
21377
      if (!getClass().equals(other.getClass())) {
21378
        return getClass().getName().compareTo(other.getClass().getName());
21379
      }
21380
 
21381
      int lastComparison = 0;
21382
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
21383
 
21384
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21385
      if (lastComparison != 0) {
21386
        return lastComparison;
21387
      }
21388
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21389
      if (lastComparison != 0) {
21390
        return lastComparison;
21391
      }
21392
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21393
      if (lastComparison != 0) {
21394
        return lastComparison;
21395
      }
21396
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21397
      if (lastComparison != 0) {
21398
        return lastComparison;
21399
      }
21400
      return 0;
21401
    }
21402
 
21403
    public void read(TProtocol iprot) throws TException {
21404
      TField field;
21405
      iprot.readStructBegin();
21406
      while (true)
21407
      {
21408
        field = iprot.readFieldBegin();
21409
        if (field.type == TType.STOP) { 
21410
          break;
21411
        }
21412
        _Fields fieldId = _Fields.findByThriftId(field.id);
21413
        if (fieldId == null) {
21414
          TProtocolUtil.skip(iprot, field.type);
21415
        } else {
21416
          switch (fieldId) {
21417
            case SUCCESS:
21418
              if (field.type == TType.BOOL) {
21419
                this.success = iprot.readBool();
21420
                setSuccessIsSet(true);
21421
              } else { 
21422
                TProtocolUtil.skip(iprot, field.type);
21423
              }
21424
              break;
21425
            case EX:
21426
              if (field.type == TType.STRUCT) {
21427
                this.ex = new TransactionServiceException();
21428
                this.ex.read(iprot);
21429
              } else { 
21430
                TProtocolUtil.skip(iprot, field.type);
21431
              }
21432
              break;
21433
          }
21434
          iprot.readFieldEnd();
21435
        }
21436
      }
21437
      iprot.readStructEnd();
21438
      validate();
21439
    }
21440
 
21441
    public void write(TProtocol oprot) throws TException {
21442
      oprot.writeStructBegin(STRUCT_DESC);
21443
 
21444
      if (this.isSetSuccess()) {
21445
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21446
        oprot.writeBool(this.success);
21447
        oprot.writeFieldEnd();
21448
      } else if (this.isSetEx()) {
21449
        oprot.writeFieldBegin(EX_FIELD_DESC);
21450
        this.ex.write(oprot);
21451
        oprot.writeFieldEnd();
21452
      }
21453
      oprot.writeFieldStop();
21454
      oprot.writeStructEnd();
21455
    }
21456
 
21457
    @Override
21458
    public String toString() {
21459
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
21460
      boolean first = true;
21461
 
21462
      sb.append("success:");
21463
      sb.append(this.success);
21464
      first = false;
21465
      if (!first) sb.append(", ");
21466
      sb.append("ex:");
21467
      if (this.ex == null) {
21468
        sb.append("null");
21469
      } else {
21470
        sb.append(this.ex);
21471
      }
21472
      first = false;
21473
      sb.append(")");
21474
      return sb.toString();
21475
    }
21476
 
21477
    public void validate() throws TException {
21478
      // check for required fields
21479
    }
21480
 
21481
  }
21482
 
1114 chandransh 21483
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
21484
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
21485
 
21486
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21487
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
21488
 
21489
    private long providerId;
1245 chandransh 21490
    private Map<String,String> pickupDetails;
1114 chandransh 21491
 
21492
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21493
    public enum _Fields implements TFieldIdEnum {
21494
      PROVIDER_ID((short)1, "providerId"),
21495
      PICKUP_DETAILS((short)2, "pickupDetails");
21496
 
21497
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21498
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21499
 
21500
      static {
21501
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21502
          byId.put((int)field._thriftId, field);
21503
          byName.put(field.getFieldName(), field);
21504
        }
21505
      }
21506
 
21507
      /**
21508
       * Find the _Fields constant that matches fieldId, or null if its not found.
21509
       */
21510
      public static _Fields findByThriftId(int fieldId) {
21511
        return byId.get(fieldId);
21512
      }
21513
 
21514
      /**
21515
       * Find the _Fields constant that matches fieldId, throwing an exception
21516
       * if it is not found.
21517
       */
21518
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21519
        _Fields fields = findByThriftId(fieldId);
21520
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21521
        return fields;
21522
      }
21523
 
21524
      /**
21525
       * Find the _Fields constant that matches name, or null if its not found.
21526
       */
21527
      public static _Fields findByName(String name) {
21528
        return byName.get(name);
21529
      }
21530
 
21531
      private final short _thriftId;
21532
      private final String _fieldName;
21533
 
21534
      _Fields(short thriftId, String fieldName) {
21535
        _thriftId = thriftId;
21536
        _fieldName = fieldName;
21537
      }
21538
 
21539
      public short getThriftFieldId() {
21540
        return _thriftId;
21541
      }
21542
 
21543
      public String getFieldName() {
21544
        return _fieldName;
21545
      }
21546
    }
21547
 
21548
    // isset id assignments
21549
    private static final int __PROVIDERID_ISSET_ID = 0;
21550
    private BitSet __isset_bit_vector = new BitSet(1);
21551
 
21552
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21553
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21554
          new FieldValueMetaData(TType.I64)));
21555
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
21556
          new MapMetaData(TType.MAP, 
21557
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 21558
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 21559
    }});
21560
 
21561
    static {
21562
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
21563
    }
21564
 
21565
    public markOrdersAsPickedUp_args() {
21566
    }
21567
 
21568
    public markOrdersAsPickedUp_args(
21569
      long providerId,
1245 chandransh 21570
      Map<String,String> pickupDetails)
1114 chandransh 21571
    {
21572
      this();
21573
      this.providerId = providerId;
21574
      setProviderIdIsSet(true);
21575
      this.pickupDetails = pickupDetails;
21576
    }
21577
 
21578
    /**
21579
     * Performs a deep copy on <i>other</i>.
21580
     */
21581
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
21582
      __isset_bit_vector.clear();
21583
      __isset_bit_vector.or(other.__isset_bit_vector);
21584
      this.providerId = other.providerId;
21585
      if (other.isSetPickupDetails()) {
1245 chandransh 21586
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
21587
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 21588
 
21589
          String other_element_key = other_element.getKey();
1245 chandransh 21590
          String other_element_value = other_element.getValue();
1114 chandransh 21591
 
21592
          String __this__pickupDetails_copy_key = other_element_key;
21593
 
1245 chandransh 21594
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 21595
 
21596
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
21597
        }
21598
        this.pickupDetails = __this__pickupDetails;
21599
      }
21600
    }
21601
 
21602
    public markOrdersAsPickedUp_args deepCopy() {
21603
      return new markOrdersAsPickedUp_args(this);
21604
    }
21605
 
21606
    @Deprecated
21607
    public markOrdersAsPickedUp_args clone() {
21608
      return new markOrdersAsPickedUp_args(this);
21609
    }
21610
 
21611
    public long getProviderId() {
21612
      return this.providerId;
21613
    }
21614
 
21615
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
21616
      this.providerId = providerId;
21617
      setProviderIdIsSet(true);
21618
      return this;
21619
    }
21620
 
21621
    public void unsetProviderId() {
21622
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21623
    }
21624
 
21625
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21626
    public boolean isSetProviderId() {
21627
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21628
    }
21629
 
21630
    public void setProviderIdIsSet(boolean value) {
21631
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21632
    }
21633
 
21634
    public int getPickupDetailsSize() {
21635
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
21636
    }
21637
 
1245 chandransh 21638
    public void putToPickupDetails(String key, String val) {
1114 chandransh 21639
      if (this.pickupDetails == null) {
1245 chandransh 21640
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 21641
      }
21642
      this.pickupDetails.put(key, val);
21643
    }
21644
 
1245 chandransh 21645
    public Map<String,String> getPickupDetails() {
1114 chandransh 21646
      return this.pickupDetails;
21647
    }
21648
 
1245 chandransh 21649
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 21650
      this.pickupDetails = pickupDetails;
21651
      return this;
21652
    }
21653
 
21654
    public void unsetPickupDetails() {
21655
      this.pickupDetails = null;
21656
    }
21657
 
21658
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
21659
    public boolean isSetPickupDetails() {
21660
      return this.pickupDetails != null;
21661
    }
21662
 
21663
    public void setPickupDetailsIsSet(boolean value) {
21664
      if (!value) {
21665
        this.pickupDetails = null;
21666
      }
21667
    }
21668
 
21669
    public void setFieldValue(_Fields field, Object value) {
21670
      switch (field) {
21671
      case PROVIDER_ID:
21672
        if (value == null) {
21673
          unsetProviderId();
21674
        } else {
21675
          setProviderId((Long)value);
21676
        }
21677
        break;
21678
 
21679
      case PICKUP_DETAILS:
21680
        if (value == null) {
21681
          unsetPickupDetails();
21682
        } else {
1245 chandransh 21683
          setPickupDetails((Map<String,String>)value);
1114 chandransh 21684
        }
21685
        break;
21686
 
21687
      }
21688
    }
21689
 
21690
    public void setFieldValue(int fieldID, Object value) {
21691
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21692
    }
21693
 
21694
    public Object getFieldValue(_Fields field) {
21695
      switch (field) {
21696
      case PROVIDER_ID:
21697
        return new Long(getProviderId());
21698
 
21699
      case PICKUP_DETAILS:
21700
        return getPickupDetails();
21701
 
21702
      }
21703
      throw new IllegalStateException();
21704
    }
21705
 
21706
    public Object getFieldValue(int fieldId) {
21707
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21708
    }
21709
 
21710
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21711
    public boolean isSet(_Fields field) {
21712
      switch (field) {
21713
      case PROVIDER_ID:
21714
        return isSetProviderId();
21715
      case PICKUP_DETAILS:
21716
        return isSetPickupDetails();
21717
      }
21718
      throw new IllegalStateException();
21719
    }
21720
 
21721
    public boolean isSet(int fieldID) {
21722
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21723
    }
21724
 
21725
    @Override
21726
    public boolean equals(Object that) {
21727
      if (that == null)
21728
        return false;
21729
      if (that instanceof markOrdersAsPickedUp_args)
21730
        return this.equals((markOrdersAsPickedUp_args)that);
21731
      return false;
21732
    }
21733
 
21734
    public boolean equals(markOrdersAsPickedUp_args that) {
21735
      if (that == null)
21736
        return false;
21737
 
21738
      boolean this_present_providerId = true;
21739
      boolean that_present_providerId = true;
21740
      if (this_present_providerId || that_present_providerId) {
21741
        if (!(this_present_providerId && that_present_providerId))
21742
          return false;
21743
        if (this.providerId != that.providerId)
21744
          return false;
21745
      }
21746
 
21747
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
21748
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
21749
      if (this_present_pickupDetails || that_present_pickupDetails) {
21750
        if (!(this_present_pickupDetails && that_present_pickupDetails))
21751
          return false;
21752
        if (!this.pickupDetails.equals(that.pickupDetails))
21753
          return false;
21754
      }
21755
 
21756
      return true;
21757
    }
21758
 
21759
    @Override
21760
    public int hashCode() {
21761
      return 0;
21762
    }
21763
 
21764
    public void read(TProtocol iprot) throws TException {
21765
      TField field;
21766
      iprot.readStructBegin();
21767
      while (true)
21768
      {
21769
        field = iprot.readFieldBegin();
21770
        if (field.type == TType.STOP) { 
21771
          break;
21772
        }
21773
        _Fields fieldId = _Fields.findByThriftId(field.id);
21774
        if (fieldId == null) {
21775
          TProtocolUtil.skip(iprot, field.type);
21776
        } else {
21777
          switch (fieldId) {
21778
            case PROVIDER_ID:
21779
              if (field.type == TType.I64) {
21780
                this.providerId = iprot.readI64();
21781
                setProviderIdIsSet(true);
21782
              } else { 
21783
                TProtocolUtil.skip(iprot, field.type);
21784
              }
21785
              break;
21786
            case PICKUP_DETAILS:
21787
              if (field.type == TType.MAP) {
21788
                {
1382 varun.gupt 21789
                  TMap _map48 = iprot.readMapBegin();
21790
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
21791
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 21792
                  {
1382 varun.gupt 21793
                    String _key50;
21794
                    String _val51;
21795
                    _key50 = iprot.readString();
21796
                    _val51 = iprot.readString();
21797
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 21798
                  }
21799
                  iprot.readMapEnd();
21800
                }
21801
              } else { 
21802
                TProtocolUtil.skip(iprot, field.type);
21803
              }
21804
              break;
21805
          }
21806
          iprot.readFieldEnd();
21807
        }
21808
      }
21809
      iprot.readStructEnd();
21810
      validate();
21811
    }
21812
 
21813
    public void write(TProtocol oprot) throws TException {
21814
      validate();
21815
 
21816
      oprot.writeStructBegin(STRUCT_DESC);
21817
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21818
      oprot.writeI64(this.providerId);
21819
      oprot.writeFieldEnd();
21820
      if (this.pickupDetails != null) {
21821
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
21822
        {
1245 chandransh 21823
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 21824
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 21825
          {
1382 varun.gupt 21826
            oprot.writeString(_iter52.getKey());
21827
            oprot.writeString(_iter52.getValue());
1114 chandransh 21828
          }
21829
          oprot.writeMapEnd();
21830
        }
21831
        oprot.writeFieldEnd();
21832
      }
21833
      oprot.writeFieldStop();
21834
      oprot.writeStructEnd();
21835
    }
21836
 
21837
    @Override
21838
    public String toString() {
21839
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
21840
      boolean first = true;
21841
 
21842
      sb.append("providerId:");
21843
      sb.append(this.providerId);
21844
      first = false;
21845
      if (!first) sb.append(", ");
21846
      sb.append("pickupDetails:");
21847
      if (this.pickupDetails == null) {
21848
        sb.append("null");
21849
      } else {
21850
        sb.append(this.pickupDetails);
21851
      }
21852
      first = false;
21853
      sb.append(")");
21854
      return sb.toString();
21855
    }
21856
 
21857
    public void validate() throws TException {
21858
      // check for required fields
21859
    }
21860
 
21861
  }
21862
 
21863
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
21864
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
21865
 
21866
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
21867
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21868
 
21869
    private List<Order> success;
21870
    private TransactionServiceException ex;
21871
 
21872
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21873
    public enum _Fields implements TFieldIdEnum {
21874
      SUCCESS((short)0, "success"),
21875
      EX((short)1, "ex");
21876
 
21877
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21878
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21879
 
21880
      static {
21881
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21882
          byId.put((int)field._thriftId, field);
21883
          byName.put(field.getFieldName(), field);
21884
        }
21885
      }
21886
 
21887
      /**
21888
       * Find the _Fields constant that matches fieldId, or null if its not found.
21889
       */
21890
      public static _Fields findByThriftId(int fieldId) {
21891
        return byId.get(fieldId);
21892
      }
21893
 
21894
      /**
21895
       * Find the _Fields constant that matches fieldId, throwing an exception
21896
       * if it is not found.
21897
       */
21898
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21899
        _Fields fields = findByThriftId(fieldId);
21900
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21901
        return fields;
21902
      }
21903
 
21904
      /**
21905
       * Find the _Fields constant that matches name, or null if its not found.
21906
       */
21907
      public static _Fields findByName(String name) {
21908
        return byName.get(name);
21909
      }
21910
 
21911
      private final short _thriftId;
21912
      private final String _fieldName;
21913
 
21914
      _Fields(short thriftId, String fieldName) {
21915
        _thriftId = thriftId;
21916
        _fieldName = fieldName;
21917
      }
21918
 
21919
      public short getThriftFieldId() {
21920
        return _thriftId;
21921
      }
21922
 
21923
      public String getFieldName() {
21924
        return _fieldName;
21925
      }
21926
    }
21927
 
21928
    // isset id assignments
21929
 
21930
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21931
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21932
          new ListMetaData(TType.LIST, 
21933
              new StructMetaData(TType.STRUCT, Order.class))));
21934
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21935
          new FieldValueMetaData(TType.STRUCT)));
21936
    }});
21937
 
21938
    static {
21939
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
21940
    }
21941
 
21942
    public markOrdersAsPickedUp_result() {
21943
    }
21944
 
21945
    public markOrdersAsPickedUp_result(
21946
      List<Order> success,
21947
      TransactionServiceException ex)
21948
    {
21949
      this();
21950
      this.success = success;
21951
      this.ex = ex;
21952
    }
21953
 
21954
    /**
21955
     * Performs a deep copy on <i>other</i>.
21956
     */
21957
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
21958
      if (other.isSetSuccess()) {
21959
        List<Order> __this__success = new ArrayList<Order>();
21960
        for (Order other_element : other.success) {
21961
          __this__success.add(new Order(other_element));
21962
        }
21963
        this.success = __this__success;
21964
      }
21965
      if (other.isSetEx()) {
21966
        this.ex = new TransactionServiceException(other.ex);
21967
      }
21968
    }
21969
 
21970
    public markOrdersAsPickedUp_result deepCopy() {
21971
      return new markOrdersAsPickedUp_result(this);
21972
    }
21973
 
21974
    @Deprecated
21975
    public markOrdersAsPickedUp_result clone() {
21976
      return new markOrdersAsPickedUp_result(this);
21977
    }
21978
 
21979
    public int getSuccessSize() {
21980
      return (this.success == null) ? 0 : this.success.size();
21981
    }
21982
 
21983
    public java.util.Iterator<Order> getSuccessIterator() {
21984
      return (this.success == null) ? null : this.success.iterator();
21985
    }
21986
 
21987
    public void addToSuccess(Order elem) {
21988
      if (this.success == null) {
21989
        this.success = new ArrayList<Order>();
21990
      }
21991
      this.success.add(elem);
21992
    }
21993
 
21994
    public List<Order> getSuccess() {
21995
      return this.success;
21996
    }
21997
 
21998
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
21999
      this.success = success;
22000
      return this;
22001
    }
22002
 
22003
    public void unsetSuccess() {
22004
      this.success = null;
22005
    }
22006
 
22007
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
22008
    public boolean isSetSuccess() {
22009
      return this.success != null;
22010
    }
22011
 
22012
    public void setSuccessIsSet(boolean value) {
22013
      if (!value) {
22014
        this.success = null;
22015
      }
22016
    }
22017
 
22018
    public TransactionServiceException getEx() {
22019
      return this.ex;
22020
    }
22021
 
22022
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
22023
      this.ex = ex;
22024
      return this;
22025
    }
22026
 
22027
    public void unsetEx() {
22028
      this.ex = null;
22029
    }
22030
 
22031
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22032
    public boolean isSetEx() {
22033
      return this.ex != null;
22034
    }
22035
 
22036
    public void setExIsSet(boolean value) {
22037
      if (!value) {
22038
        this.ex = null;
22039
      }
22040
    }
22041
 
22042
    public void setFieldValue(_Fields field, Object value) {
22043
      switch (field) {
22044
      case SUCCESS:
22045
        if (value == null) {
22046
          unsetSuccess();
22047
        } else {
22048
          setSuccess((List<Order>)value);
22049
        }
22050
        break;
22051
 
22052
      case EX:
22053
        if (value == null) {
22054
          unsetEx();
22055
        } else {
22056
          setEx((TransactionServiceException)value);
22057
        }
22058
        break;
22059
 
22060
      }
22061
    }
22062
 
22063
    public void setFieldValue(int fieldID, Object value) {
22064
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22065
    }
22066
 
22067
    public Object getFieldValue(_Fields field) {
22068
      switch (field) {
22069
      case SUCCESS:
22070
        return getSuccess();
22071
 
22072
      case EX:
22073
        return getEx();
22074
 
22075
      }
22076
      throw new IllegalStateException();
22077
    }
22078
 
22079
    public Object getFieldValue(int fieldId) {
22080
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22081
    }
22082
 
22083
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22084
    public boolean isSet(_Fields field) {
22085
      switch (field) {
22086
      case SUCCESS:
22087
        return isSetSuccess();
22088
      case EX:
22089
        return isSetEx();
22090
      }
22091
      throw new IllegalStateException();
22092
    }
22093
 
22094
    public boolean isSet(int fieldID) {
22095
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22096
    }
22097
 
22098
    @Override
22099
    public boolean equals(Object that) {
22100
      if (that == null)
22101
        return false;
22102
      if (that instanceof markOrdersAsPickedUp_result)
22103
        return this.equals((markOrdersAsPickedUp_result)that);
22104
      return false;
22105
    }
22106
 
22107
    public boolean equals(markOrdersAsPickedUp_result that) {
22108
      if (that == null)
22109
        return false;
22110
 
22111
      boolean this_present_success = true && this.isSetSuccess();
22112
      boolean that_present_success = true && that.isSetSuccess();
22113
      if (this_present_success || that_present_success) {
22114
        if (!(this_present_success && that_present_success))
22115
          return false;
22116
        if (!this.success.equals(that.success))
22117
          return false;
22118
      }
22119
 
22120
      boolean this_present_ex = true && this.isSetEx();
22121
      boolean that_present_ex = true && that.isSetEx();
22122
      if (this_present_ex || that_present_ex) {
22123
        if (!(this_present_ex && that_present_ex))
22124
          return false;
22125
        if (!this.ex.equals(that.ex))
22126
          return false;
22127
      }
22128
 
22129
      return true;
22130
    }
22131
 
22132
    @Override
22133
    public int hashCode() {
22134
      return 0;
22135
    }
22136
 
22137
    public int compareTo(markOrdersAsPickedUp_result other) {
22138
      if (!getClass().equals(other.getClass())) {
22139
        return getClass().getName().compareTo(other.getClass().getName());
22140
      }
22141
 
22142
      int lastComparison = 0;
22143
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
22144
 
22145
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
22146
      if (lastComparison != 0) {
22147
        return lastComparison;
22148
      }
22149
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
22150
      if (lastComparison != 0) {
22151
        return lastComparison;
22152
      }
22153
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22154
      if (lastComparison != 0) {
22155
        return lastComparison;
22156
      }
22157
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22158
      if (lastComparison != 0) {
22159
        return lastComparison;
22160
      }
22161
      return 0;
22162
    }
22163
 
22164
    public void read(TProtocol iprot) throws TException {
22165
      TField field;
22166
      iprot.readStructBegin();
22167
      while (true)
22168
      {
22169
        field = iprot.readFieldBegin();
22170
        if (field.type == TType.STOP) { 
22171
          break;
22172
        }
22173
        _Fields fieldId = _Fields.findByThriftId(field.id);
22174
        if (fieldId == null) {
22175
          TProtocolUtil.skip(iprot, field.type);
22176
        } else {
22177
          switch (fieldId) {
22178
            case SUCCESS:
22179
              if (field.type == TType.LIST) {
22180
                {
1382 varun.gupt 22181
                  TList _list53 = iprot.readListBegin();
22182
                  this.success = new ArrayList<Order>(_list53.size);
22183
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 22184
                  {
1382 varun.gupt 22185
                    Order _elem55;
22186
                    _elem55 = new Order();
22187
                    _elem55.read(iprot);
22188
                    this.success.add(_elem55);
1114 chandransh 22189
                  }
22190
                  iprot.readListEnd();
22191
                }
22192
              } else { 
22193
                TProtocolUtil.skip(iprot, field.type);
22194
              }
22195
              break;
22196
            case EX:
22197
              if (field.type == TType.STRUCT) {
22198
                this.ex = new TransactionServiceException();
22199
                this.ex.read(iprot);
22200
              } else { 
22201
                TProtocolUtil.skip(iprot, field.type);
22202
              }
22203
              break;
22204
          }
22205
          iprot.readFieldEnd();
22206
        }
22207
      }
22208
      iprot.readStructEnd();
22209
      validate();
22210
    }
22211
 
22212
    public void write(TProtocol oprot) throws TException {
22213
      oprot.writeStructBegin(STRUCT_DESC);
22214
 
22215
      if (this.isSetSuccess()) {
22216
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22217
        {
22218
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 22219
          for (Order _iter56 : this.success)
1114 chandransh 22220
          {
1382 varun.gupt 22221
            _iter56.write(oprot);
1114 chandransh 22222
          }
22223
          oprot.writeListEnd();
22224
        }
22225
        oprot.writeFieldEnd();
22226
      } else if (this.isSetEx()) {
22227
        oprot.writeFieldBegin(EX_FIELD_DESC);
22228
        this.ex.write(oprot);
22229
        oprot.writeFieldEnd();
22230
      }
22231
      oprot.writeFieldStop();
22232
      oprot.writeStructEnd();
22233
    }
22234
 
22235
    @Override
22236
    public String toString() {
22237
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
22238
      boolean first = true;
22239
 
22240
      sb.append("success:");
22241
      if (this.success == null) {
22242
        sb.append("null");
22243
      } else {
22244
        sb.append(this.success);
22245
      }
22246
      first = false;
22247
      if (!first) sb.append(", ");
22248
      sb.append("ex:");
22249
      if (this.ex == null) {
22250
        sb.append("null");
22251
      } else {
22252
        sb.append(this.ex);
22253
      }
22254
      first = false;
22255
      sb.append(")");
22256
      return sb.toString();
22257
    }
22258
 
22259
    public void validate() throws TException {
22260
      // check for required fields
22261
    }
22262
 
22263
  }
22264
 
1133 chandransh 22265
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
22266
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
22267
 
22268
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22269
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
22270
 
22271
    private long providerId;
22272
    private Map<String,String> deliveredOrders;
22273
 
22274
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22275
    public enum _Fields implements TFieldIdEnum {
22276
      PROVIDER_ID((short)1, "providerId"),
22277
      DELIVERED_ORDERS((short)2, "deliveredOrders");
22278
 
22279
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22280
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22281
 
22282
      static {
22283
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22284
          byId.put((int)field._thriftId, field);
22285
          byName.put(field.getFieldName(), field);
22286
        }
22287
      }
22288
 
22289
      /**
22290
       * Find the _Fields constant that matches fieldId, or null if its not found.
22291
       */
22292
      public static _Fields findByThriftId(int fieldId) {
22293
        return byId.get(fieldId);
22294
      }
22295
 
22296
      /**
22297
       * Find the _Fields constant that matches fieldId, throwing an exception
22298
       * if it is not found.
22299
       */
22300
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22301
        _Fields fields = findByThriftId(fieldId);
22302
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22303
        return fields;
22304
      }
22305
 
22306
      /**
22307
       * Find the _Fields constant that matches name, or null if its not found.
22308
       */
22309
      public static _Fields findByName(String name) {
22310
        return byName.get(name);
22311
      }
22312
 
22313
      private final short _thriftId;
22314
      private final String _fieldName;
22315
 
22316
      _Fields(short thriftId, String fieldName) {
22317
        _thriftId = thriftId;
22318
        _fieldName = fieldName;
22319
      }
22320
 
22321
      public short getThriftFieldId() {
22322
        return _thriftId;
22323
      }
22324
 
22325
      public String getFieldName() {
22326
        return _fieldName;
22327
      }
22328
    }
22329
 
22330
    // isset id assignments
22331
    private static final int __PROVIDERID_ISSET_ID = 0;
22332
    private BitSet __isset_bit_vector = new BitSet(1);
22333
 
22334
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22335
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22336
          new FieldValueMetaData(TType.I64)));
22337
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
22338
          new MapMetaData(TType.MAP, 
22339
              new FieldValueMetaData(TType.STRING), 
22340
              new FieldValueMetaData(TType.STRING))));
22341
    }});
22342
 
22343
    static {
22344
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
22345
    }
22346
 
22347
    public markOrdersAsDelivered_args() {
22348
    }
22349
 
22350
    public markOrdersAsDelivered_args(
22351
      long providerId,
22352
      Map<String,String> deliveredOrders)
22353
    {
22354
      this();
22355
      this.providerId = providerId;
22356
      setProviderIdIsSet(true);
22357
      this.deliveredOrders = deliveredOrders;
22358
    }
22359
 
22360
    /**
22361
     * Performs a deep copy on <i>other</i>.
22362
     */
22363
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
22364
      __isset_bit_vector.clear();
22365
      __isset_bit_vector.or(other.__isset_bit_vector);
22366
      this.providerId = other.providerId;
22367
      if (other.isSetDeliveredOrders()) {
22368
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
22369
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
22370
 
22371
          String other_element_key = other_element.getKey();
22372
          String other_element_value = other_element.getValue();
22373
 
22374
          String __this__deliveredOrders_copy_key = other_element_key;
22375
 
22376
          String __this__deliveredOrders_copy_value = other_element_value;
22377
 
22378
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
22379
        }
22380
        this.deliveredOrders = __this__deliveredOrders;
22381
      }
22382
    }
22383
 
22384
    public markOrdersAsDelivered_args deepCopy() {
22385
      return new markOrdersAsDelivered_args(this);
22386
    }
22387
 
22388
    @Deprecated
22389
    public markOrdersAsDelivered_args clone() {
22390
      return new markOrdersAsDelivered_args(this);
22391
    }
22392
 
22393
    public long getProviderId() {
22394
      return this.providerId;
22395
    }
22396
 
22397
    public markOrdersAsDelivered_args setProviderId(long providerId) {
22398
      this.providerId = providerId;
22399
      setProviderIdIsSet(true);
22400
      return this;
22401
    }
22402
 
22403
    public void unsetProviderId() {
22404
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22405
    }
22406
 
22407
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22408
    public boolean isSetProviderId() {
22409
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22410
    }
22411
 
22412
    public void setProviderIdIsSet(boolean value) {
22413
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22414
    }
22415
 
22416
    public int getDeliveredOrdersSize() {
22417
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
22418
    }
22419
 
22420
    public void putToDeliveredOrders(String key, String val) {
22421
      if (this.deliveredOrders == null) {
22422
        this.deliveredOrders = new HashMap<String,String>();
22423
      }
22424
      this.deliveredOrders.put(key, val);
22425
    }
22426
 
22427
    public Map<String,String> getDeliveredOrders() {
22428
      return this.deliveredOrders;
22429
    }
22430
 
22431
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
22432
      this.deliveredOrders = deliveredOrders;
22433
      return this;
22434
    }
22435
 
22436
    public void unsetDeliveredOrders() {
22437
      this.deliveredOrders = null;
22438
    }
22439
 
22440
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
22441
    public boolean isSetDeliveredOrders() {
22442
      return this.deliveredOrders != null;
22443
    }
22444
 
22445
    public void setDeliveredOrdersIsSet(boolean value) {
22446
      if (!value) {
22447
        this.deliveredOrders = null;
22448
      }
22449
    }
22450
 
22451
    public void setFieldValue(_Fields field, Object value) {
22452
      switch (field) {
22453
      case PROVIDER_ID:
22454
        if (value == null) {
22455
          unsetProviderId();
22456
        } else {
22457
          setProviderId((Long)value);
22458
        }
22459
        break;
22460
 
22461
      case DELIVERED_ORDERS:
22462
        if (value == null) {
22463
          unsetDeliveredOrders();
22464
        } else {
22465
          setDeliveredOrders((Map<String,String>)value);
22466
        }
22467
        break;
22468
 
22469
      }
22470
    }
22471
 
22472
    public void setFieldValue(int fieldID, Object value) {
22473
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22474
    }
22475
 
22476
    public Object getFieldValue(_Fields field) {
22477
      switch (field) {
22478
      case PROVIDER_ID:
22479
        return new Long(getProviderId());
22480
 
22481
      case DELIVERED_ORDERS:
22482
        return getDeliveredOrders();
22483
 
22484
      }
22485
      throw new IllegalStateException();
22486
    }
22487
 
22488
    public Object getFieldValue(int fieldId) {
22489
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22490
    }
22491
 
22492
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22493
    public boolean isSet(_Fields field) {
22494
      switch (field) {
22495
      case PROVIDER_ID:
22496
        return isSetProviderId();
22497
      case DELIVERED_ORDERS:
22498
        return isSetDeliveredOrders();
22499
      }
22500
      throw new IllegalStateException();
22501
    }
22502
 
22503
    public boolean isSet(int fieldID) {
22504
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22505
    }
22506
 
22507
    @Override
22508
    public boolean equals(Object that) {
22509
      if (that == null)
22510
        return false;
22511
      if (that instanceof markOrdersAsDelivered_args)
22512
        return this.equals((markOrdersAsDelivered_args)that);
22513
      return false;
22514
    }
22515
 
22516
    public boolean equals(markOrdersAsDelivered_args that) {
22517
      if (that == null)
22518
        return false;
22519
 
22520
      boolean this_present_providerId = true;
22521
      boolean that_present_providerId = true;
22522
      if (this_present_providerId || that_present_providerId) {
22523
        if (!(this_present_providerId && that_present_providerId))
22524
          return false;
22525
        if (this.providerId != that.providerId)
22526
          return false;
22527
      }
22528
 
22529
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
22530
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
22531
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
22532
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
22533
          return false;
22534
        if (!this.deliveredOrders.equals(that.deliveredOrders))
22535
          return false;
22536
      }
22537
 
22538
      return true;
22539
    }
22540
 
22541
    @Override
22542
    public int hashCode() {
22543
      return 0;
22544
    }
22545
 
22546
    public void read(TProtocol iprot) throws TException {
22547
      TField field;
22548
      iprot.readStructBegin();
22549
      while (true)
22550
      {
22551
        field = iprot.readFieldBegin();
22552
        if (field.type == TType.STOP) { 
22553
          break;
22554
        }
22555
        _Fields fieldId = _Fields.findByThriftId(field.id);
22556
        if (fieldId == null) {
22557
          TProtocolUtil.skip(iprot, field.type);
22558
        } else {
22559
          switch (fieldId) {
22560
            case PROVIDER_ID:
22561
              if (field.type == TType.I64) {
22562
                this.providerId = iprot.readI64();
22563
                setProviderIdIsSet(true);
22564
              } else { 
22565
                TProtocolUtil.skip(iprot, field.type);
22566
              }
22567
              break;
22568
            case DELIVERED_ORDERS:
22569
              if (field.type == TType.MAP) {
22570
                {
1382 varun.gupt 22571
                  TMap _map57 = iprot.readMapBegin();
22572
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
22573
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 22574
                  {
1382 varun.gupt 22575
                    String _key59;
22576
                    String _val60;
22577
                    _key59 = iprot.readString();
22578
                    _val60 = iprot.readString();
22579
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 22580
                  }
22581
                  iprot.readMapEnd();
22582
                }
22583
              } else { 
22584
                TProtocolUtil.skip(iprot, field.type);
22585
              }
22586
              break;
22587
          }
22588
          iprot.readFieldEnd();
22589
        }
22590
      }
22591
      iprot.readStructEnd();
22592
      validate();
22593
    }
22594
 
22595
    public void write(TProtocol oprot) throws TException {
22596
      validate();
22597
 
22598
      oprot.writeStructBegin(STRUCT_DESC);
22599
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22600
      oprot.writeI64(this.providerId);
22601
      oprot.writeFieldEnd();
22602
      if (this.deliveredOrders != null) {
22603
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
22604
        {
22605
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 22606
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 22607
          {
1382 varun.gupt 22608
            oprot.writeString(_iter61.getKey());
22609
            oprot.writeString(_iter61.getValue());
1133 chandransh 22610
          }
22611
          oprot.writeMapEnd();
22612
        }
22613
        oprot.writeFieldEnd();
22614
      }
22615
      oprot.writeFieldStop();
22616
      oprot.writeStructEnd();
22617
    }
22618
 
22619
    @Override
22620
    public String toString() {
22621
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
22622
      boolean first = true;
22623
 
22624
      sb.append("providerId:");
22625
      sb.append(this.providerId);
22626
      first = false;
22627
      if (!first) sb.append(", ");
22628
      sb.append("deliveredOrders:");
22629
      if (this.deliveredOrders == null) {
22630
        sb.append("null");
22631
      } else {
22632
        sb.append(this.deliveredOrders);
22633
      }
22634
      first = false;
22635
      sb.append(")");
22636
      return sb.toString();
22637
    }
22638
 
22639
    public void validate() throws TException {
22640
      // check for required fields
22641
    }
22642
 
22643
  }
22644
 
22645
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
22646
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
22647
 
22648
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22649
 
22650
    private TransactionServiceException ex;
22651
 
22652
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22653
    public enum _Fields implements TFieldIdEnum {
22654
      EX((short)1, "ex");
22655
 
22656
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22657
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22658
 
22659
      static {
22660
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22661
          byId.put((int)field._thriftId, field);
22662
          byName.put(field.getFieldName(), field);
22663
        }
22664
      }
22665
 
22666
      /**
22667
       * Find the _Fields constant that matches fieldId, or null if its not found.
22668
       */
22669
      public static _Fields findByThriftId(int fieldId) {
22670
        return byId.get(fieldId);
22671
      }
22672
 
22673
      /**
22674
       * Find the _Fields constant that matches fieldId, throwing an exception
22675
       * if it is not found.
22676
       */
22677
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22678
        _Fields fields = findByThriftId(fieldId);
22679
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22680
        return fields;
22681
      }
22682
 
22683
      /**
22684
       * Find the _Fields constant that matches name, or null if its not found.
22685
       */
22686
      public static _Fields findByName(String name) {
22687
        return byName.get(name);
22688
      }
22689
 
22690
      private final short _thriftId;
22691
      private final String _fieldName;
22692
 
22693
      _Fields(short thriftId, String fieldName) {
22694
        _thriftId = thriftId;
22695
        _fieldName = fieldName;
22696
      }
22697
 
22698
      public short getThriftFieldId() {
22699
        return _thriftId;
22700
      }
22701
 
22702
      public String getFieldName() {
22703
        return _fieldName;
22704
      }
22705
    }
22706
 
22707
    // isset id assignments
22708
 
22709
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22710
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22711
          new FieldValueMetaData(TType.STRUCT)));
22712
    }});
22713
 
22714
    static {
22715
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
22716
    }
22717
 
22718
    public markOrdersAsDelivered_result() {
22719
    }
22720
 
22721
    public markOrdersAsDelivered_result(
22722
      TransactionServiceException ex)
22723
    {
22724
      this();
22725
      this.ex = ex;
22726
    }
22727
 
22728
    /**
22729
     * Performs a deep copy on <i>other</i>.
22730
     */
22731
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
22732
      if (other.isSetEx()) {
22733
        this.ex = new TransactionServiceException(other.ex);
22734
      }
22735
    }
22736
 
22737
    public markOrdersAsDelivered_result deepCopy() {
22738
      return new markOrdersAsDelivered_result(this);
22739
    }
22740
 
22741
    @Deprecated
22742
    public markOrdersAsDelivered_result clone() {
22743
      return new markOrdersAsDelivered_result(this);
22744
    }
22745
 
22746
    public TransactionServiceException getEx() {
22747
      return this.ex;
22748
    }
22749
 
22750
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
22751
      this.ex = ex;
22752
      return this;
22753
    }
22754
 
22755
    public void unsetEx() {
22756
      this.ex = null;
22757
    }
22758
 
22759
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22760
    public boolean isSetEx() {
22761
      return this.ex != null;
22762
    }
22763
 
22764
    public void setExIsSet(boolean value) {
22765
      if (!value) {
22766
        this.ex = null;
22767
      }
22768
    }
22769
 
22770
    public void setFieldValue(_Fields field, Object value) {
22771
      switch (field) {
22772
      case EX:
22773
        if (value == null) {
22774
          unsetEx();
22775
        } else {
22776
          setEx((TransactionServiceException)value);
22777
        }
22778
        break;
22779
 
22780
      }
22781
    }
22782
 
22783
    public void setFieldValue(int fieldID, Object value) {
22784
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22785
    }
22786
 
22787
    public Object getFieldValue(_Fields field) {
22788
      switch (field) {
22789
      case EX:
22790
        return getEx();
22791
 
22792
      }
22793
      throw new IllegalStateException();
22794
    }
22795
 
22796
    public Object getFieldValue(int fieldId) {
22797
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22798
    }
22799
 
22800
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22801
    public boolean isSet(_Fields field) {
22802
      switch (field) {
22803
      case EX:
22804
        return isSetEx();
22805
      }
22806
      throw new IllegalStateException();
22807
    }
22808
 
22809
    public boolean isSet(int fieldID) {
22810
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22811
    }
22812
 
22813
    @Override
22814
    public boolean equals(Object that) {
22815
      if (that == null)
22816
        return false;
22817
      if (that instanceof markOrdersAsDelivered_result)
22818
        return this.equals((markOrdersAsDelivered_result)that);
22819
      return false;
22820
    }
22821
 
22822
    public boolean equals(markOrdersAsDelivered_result that) {
22823
      if (that == null)
22824
        return false;
22825
 
22826
      boolean this_present_ex = true && this.isSetEx();
22827
      boolean that_present_ex = true && that.isSetEx();
22828
      if (this_present_ex || that_present_ex) {
22829
        if (!(this_present_ex && that_present_ex))
22830
          return false;
22831
        if (!this.ex.equals(that.ex))
22832
          return false;
22833
      }
22834
 
22835
      return true;
22836
    }
22837
 
22838
    @Override
22839
    public int hashCode() {
22840
      return 0;
22841
    }
22842
 
22843
    public int compareTo(markOrdersAsDelivered_result other) {
22844
      if (!getClass().equals(other.getClass())) {
22845
        return getClass().getName().compareTo(other.getClass().getName());
22846
      }
22847
 
22848
      int lastComparison = 0;
22849
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
22850
 
22851
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22852
      if (lastComparison != 0) {
22853
        return lastComparison;
22854
      }
22855
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22856
      if (lastComparison != 0) {
22857
        return lastComparison;
22858
      }
22859
      return 0;
22860
    }
22861
 
22862
    public void read(TProtocol iprot) throws TException {
22863
      TField field;
22864
      iprot.readStructBegin();
22865
      while (true)
22866
      {
22867
        field = iprot.readFieldBegin();
22868
        if (field.type == TType.STOP) { 
22869
          break;
22870
        }
22871
        _Fields fieldId = _Fields.findByThriftId(field.id);
22872
        if (fieldId == null) {
22873
          TProtocolUtil.skip(iprot, field.type);
22874
        } else {
22875
          switch (fieldId) {
22876
            case EX:
22877
              if (field.type == TType.STRUCT) {
22878
                this.ex = new TransactionServiceException();
22879
                this.ex.read(iprot);
22880
              } else { 
22881
                TProtocolUtil.skip(iprot, field.type);
22882
              }
22883
              break;
22884
          }
22885
          iprot.readFieldEnd();
22886
        }
22887
      }
22888
      iprot.readStructEnd();
22889
      validate();
22890
    }
22891
 
22892
    public void write(TProtocol oprot) throws TException {
22893
      oprot.writeStructBegin(STRUCT_DESC);
22894
 
22895
      if (this.isSetEx()) {
22896
        oprot.writeFieldBegin(EX_FIELD_DESC);
22897
        this.ex.write(oprot);
22898
        oprot.writeFieldEnd();
22899
      }
22900
      oprot.writeFieldStop();
22901
      oprot.writeStructEnd();
22902
    }
22903
 
22904
    @Override
22905
    public String toString() {
22906
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
22907
      boolean first = true;
22908
 
22909
      sb.append("ex:");
22910
      if (this.ex == null) {
22911
        sb.append("null");
22912
      } else {
22913
        sb.append(this.ex);
22914
      }
22915
      first = false;
22916
      sb.append(")");
22917
      return sb.toString();
22918
    }
22919
 
22920
    public void validate() throws TException {
22921
      // check for required fields
22922
    }
22923
 
22924
  }
22925
 
22926
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
22927
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
22928
 
22929
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22930
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
22931
 
22932
    private long providerId;
22933
    private Map<String,String> returnedOrders;
22934
 
22935
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22936
    public enum _Fields implements TFieldIdEnum {
22937
      PROVIDER_ID((short)1, "providerId"),
22938
      RETURNED_ORDERS((short)2, "returnedOrders");
22939
 
22940
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22941
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22942
 
22943
      static {
22944
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22945
          byId.put((int)field._thriftId, field);
22946
          byName.put(field.getFieldName(), field);
22947
        }
22948
      }
22949
 
22950
      /**
22951
       * Find the _Fields constant that matches fieldId, or null if its not found.
22952
       */
22953
      public static _Fields findByThriftId(int fieldId) {
22954
        return byId.get(fieldId);
22955
      }
22956
 
22957
      /**
22958
       * Find the _Fields constant that matches fieldId, throwing an exception
22959
       * if it is not found.
22960
       */
22961
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22962
        _Fields fields = findByThriftId(fieldId);
22963
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22964
        return fields;
22965
      }
22966
 
22967
      /**
22968
       * Find the _Fields constant that matches name, or null if its not found.
22969
       */
22970
      public static _Fields findByName(String name) {
22971
        return byName.get(name);
22972
      }
22973
 
22974
      private final short _thriftId;
22975
      private final String _fieldName;
22976
 
22977
      _Fields(short thriftId, String fieldName) {
22978
        _thriftId = thriftId;
22979
        _fieldName = fieldName;
22980
      }
22981
 
22982
      public short getThriftFieldId() {
22983
        return _thriftId;
22984
      }
22985
 
22986
      public String getFieldName() {
22987
        return _fieldName;
22988
      }
22989
    }
22990
 
22991
    // isset id assignments
22992
    private static final int __PROVIDERID_ISSET_ID = 0;
22993
    private BitSet __isset_bit_vector = new BitSet(1);
22994
 
22995
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22996
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22997
          new FieldValueMetaData(TType.I64)));
22998
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
22999
          new MapMetaData(TType.MAP, 
23000
              new FieldValueMetaData(TType.STRING), 
23001
              new FieldValueMetaData(TType.STRING))));
23002
    }});
23003
 
23004
    static {
23005
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
23006
    }
23007
 
23008
    public markOrdersAsFailed_args() {
23009
    }
23010
 
23011
    public markOrdersAsFailed_args(
23012
      long providerId,
23013
      Map<String,String> returnedOrders)
23014
    {
23015
      this();
23016
      this.providerId = providerId;
23017
      setProviderIdIsSet(true);
23018
      this.returnedOrders = returnedOrders;
23019
    }
23020
 
23021
    /**
23022
     * Performs a deep copy on <i>other</i>.
23023
     */
23024
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
23025
      __isset_bit_vector.clear();
23026
      __isset_bit_vector.or(other.__isset_bit_vector);
23027
      this.providerId = other.providerId;
23028
      if (other.isSetReturnedOrders()) {
23029
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
23030
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
23031
 
23032
          String other_element_key = other_element.getKey();
23033
          String other_element_value = other_element.getValue();
23034
 
23035
          String __this__returnedOrders_copy_key = other_element_key;
23036
 
23037
          String __this__returnedOrders_copy_value = other_element_value;
23038
 
23039
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
23040
        }
23041
        this.returnedOrders = __this__returnedOrders;
23042
      }
23043
    }
23044
 
23045
    public markOrdersAsFailed_args deepCopy() {
23046
      return new markOrdersAsFailed_args(this);
23047
    }
23048
 
23049
    @Deprecated
23050
    public markOrdersAsFailed_args clone() {
23051
      return new markOrdersAsFailed_args(this);
23052
    }
23053
 
23054
    public long getProviderId() {
23055
      return this.providerId;
23056
    }
23057
 
23058
    public markOrdersAsFailed_args setProviderId(long providerId) {
23059
      this.providerId = providerId;
23060
      setProviderIdIsSet(true);
23061
      return this;
23062
    }
23063
 
23064
    public void unsetProviderId() {
23065
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23066
    }
23067
 
23068
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23069
    public boolean isSetProviderId() {
23070
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23071
    }
23072
 
23073
    public void setProviderIdIsSet(boolean value) {
23074
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23075
    }
23076
 
23077
    public int getReturnedOrdersSize() {
23078
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
23079
    }
23080
 
23081
    public void putToReturnedOrders(String key, String val) {
23082
      if (this.returnedOrders == null) {
23083
        this.returnedOrders = new HashMap<String,String>();
23084
      }
23085
      this.returnedOrders.put(key, val);
23086
    }
23087
 
23088
    public Map<String,String> getReturnedOrders() {
23089
      return this.returnedOrders;
23090
    }
23091
 
23092
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
23093
      this.returnedOrders = returnedOrders;
23094
      return this;
23095
    }
23096
 
23097
    public void unsetReturnedOrders() {
23098
      this.returnedOrders = null;
23099
    }
23100
 
23101
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
23102
    public boolean isSetReturnedOrders() {
23103
      return this.returnedOrders != null;
23104
    }
23105
 
23106
    public void setReturnedOrdersIsSet(boolean value) {
23107
      if (!value) {
23108
        this.returnedOrders = null;
23109
      }
23110
    }
23111
 
23112
    public void setFieldValue(_Fields field, Object value) {
23113
      switch (field) {
23114
      case PROVIDER_ID:
23115
        if (value == null) {
23116
          unsetProviderId();
23117
        } else {
23118
          setProviderId((Long)value);
23119
        }
23120
        break;
23121
 
23122
      case RETURNED_ORDERS:
23123
        if (value == null) {
23124
          unsetReturnedOrders();
23125
        } else {
23126
          setReturnedOrders((Map<String,String>)value);
23127
        }
23128
        break;
23129
 
23130
      }
23131
    }
23132
 
23133
    public void setFieldValue(int fieldID, Object value) {
23134
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23135
    }
23136
 
23137
    public Object getFieldValue(_Fields field) {
23138
      switch (field) {
23139
      case PROVIDER_ID:
23140
        return new Long(getProviderId());
23141
 
23142
      case RETURNED_ORDERS:
23143
        return getReturnedOrders();
23144
 
23145
      }
23146
      throw new IllegalStateException();
23147
    }
23148
 
23149
    public Object getFieldValue(int fieldId) {
23150
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23151
    }
23152
 
23153
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23154
    public boolean isSet(_Fields field) {
23155
      switch (field) {
23156
      case PROVIDER_ID:
23157
        return isSetProviderId();
23158
      case RETURNED_ORDERS:
23159
        return isSetReturnedOrders();
23160
      }
23161
      throw new IllegalStateException();
23162
    }
23163
 
23164
    public boolean isSet(int fieldID) {
23165
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23166
    }
23167
 
23168
    @Override
23169
    public boolean equals(Object that) {
23170
      if (that == null)
23171
        return false;
23172
      if (that instanceof markOrdersAsFailed_args)
23173
        return this.equals((markOrdersAsFailed_args)that);
23174
      return false;
23175
    }
23176
 
23177
    public boolean equals(markOrdersAsFailed_args that) {
23178
      if (that == null)
23179
        return false;
23180
 
23181
      boolean this_present_providerId = true;
23182
      boolean that_present_providerId = true;
23183
      if (this_present_providerId || that_present_providerId) {
23184
        if (!(this_present_providerId && that_present_providerId))
23185
          return false;
23186
        if (this.providerId != that.providerId)
23187
          return false;
23188
      }
23189
 
23190
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
23191
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
23192
      if (this_present_returnedOrders || that_present_returnedOrders) {
23193
        if (!(this_present_returnedOrders && that_present_returnedOrders))
23194
          return false;
23195
        if (!this.returnedOrders.equals(that.returnedOrders))
23196
          return false;
23197
      }
23198
 
23199
      return true;
23200
    }
23201
 
23202
    @Override
23203
    public int hashCode() {
23204
      return 0;
23205
    }
23206
 
23207
    public void read(TProtocol iprot) throws TException {
23208
      TField field;
23209
      iprot.readStructBegin();
23210
      while (true)
23211
      {
23212
        field = iprot.readFieldBegin();
23213
        if (field.type == TType.STOP) { 
23214
          break;
23215
        }
23216
        _Fields fieldId = _Fields.findByThriftId(field.id);
23217
        if (fieldId == null) {
23218
          TProtocolUtil.skip(iprot, field.type);
23219
        } else {
23220
          switch (fieldId) {
23221
            case PROVIDER_ID:
23222
              if (field.type == TType.I64) {
23223
                this.providerId = iprot.readI64();
23224
                setProviderIdIsSet(true);
23225
              } else { 
23226
                TProtocolUtil.skip(iprot, field.type);
23227
              }
23228
              break;
23229
            case RETURNED_ORDERS:
23230
              if (field.type == TType.MAP) {
23231
                {
1382 varun.gupt 23232
                  TMap _map62 = iprot.readMapBegin();
23233
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
23234
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 23235
                  {
1382 varun.gupt 23236
                    String _key64;
23237
                    String _val65;
23238
                    _key64 = iprot.readString();
23239
                    _val65 = iprot.readString();
23240
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 23241
                  }
23242
                  iprot.readMapEnd();
23243
                }
23244
              } else { 
23245
                TProtocolUtil.skip(iprot, field.type);
23246
              }
23247
              break;
23248
          }
23249
          iprot.readFieldEnd();
23250
        }
23251
      }
23252
      iprot.readStructEnd();
23253
      validate();
23254
    }
23255
 
23256
    public void write(TProtocol oprot) throws TException {
23257
      validate();
23258
 
23259
      oprot.writeStructBegin(STRUCT_DESC);
23260
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23261
      oprot.writeI64(this.providerId);
23262
      oprot.writeFieldEnd();
23263
      if (this.returnedOrders != null) {
23264
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
23265
        {
23266
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 23267
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 23268
          {
1382 varun.gupt 23269
            oprot.writeString(_iter66.getKey());
23270
            oprot.writeString(_iter66.getValue());
1133 chandransh 23271
          }
23272
          oprot.writeMapEnd();
23273
        }
23274
        oprot.writeFieldEnd();
23275
      }
23276
      oprot.writeFieldStop();
23277
      oprot.writeStructEnd();
23278
    }
23279
 
23280
    @Override
23281
    public String toString() {
23282
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
23283
      boolean first = true;
23284
 
23285
      sb.append("providerId:");
23286
      sb.append(this.providerId);
23287
      first = false;
23288
      if (!first) sb.append(", ");
23289
      sb.append("returnedOrders:");
23290
      if (this.returnedOrders == null) {
23291
        sb.append("null");
23292
      } else {
23293
        sb.append(this.returnedOrders);
23294
      }
23295
      first = false;
23296
      sb.append(")");
23297
      return sb.toString();
23298
    }
23299
 
23300
    public void validate() throws TException {
23301
      // check for required fields
23302
    }
23303
 
23304
  }
23305
 
23306
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
23307
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
23308
 
23309
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23310
 
23311
    private TransactionServiceException ex;
23312
 
23313
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23314
    public enum _Fields implements TFieldIdEnum {
23315
      EX((short)1, "ex");
23316
 
23317
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23318
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23319
 
23320
      static {
23321
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23322
          byId.put((int)field._thriftId, field);
23323
          byName.put(field.getFieldName(), field);
23324
        }
23325
      }
23326
 
23327
      /**
23328
       * Find the _Fields constant that matches fieldId, or null if its not found.
23329
       */
23330
      public static _Fields findByThriftId(int fieldId) {
23331
        return byId.get(fieldId);
23332
      }
23333
 
23334
      /**
23335
       * Find the _Fields constant that matches fieldId, throwing an exception
23336
       * if it is not found.
23337
       */
23338
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23339
        _Fields fields = findByThriftId(fieldId);
23340
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23341
        return fields;
23342
      }
23343
 
23344
      /**
23345
       * Find the _Fields constant that matches name, or null if its not found.
23346
       */
23347
      public static _Fields findByName(String name) {
23348
        return byName.get(name);
23349
      }
23350
 
23351
      private final short _thriftId;
23352
      private final String _fieldName;
23353
 
23354
      _Fields(short thriftId, String fieldName) {
23355
        _thriftId = thriftId;
23356
        _fieldName = fieldName;
23357
      }
23358
 
23359
      public short getThriftFieldId() {
23360
        return _thriftId;
23361
      }
23362
 
23363
      public String getFieldName() {
23364
        return _fieldName;
23365
      }
23366
    }
23367
 
23368
    // isset id assignments
23369
 
23370
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23371
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23372
          new FieldValueMetaData(TType.STRUCT)));
23373
    }});
23374
 
23375
    static {
23376
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
23377
    }
23378
 
23379
    public markOrdersAsFailed_result() {
23380
    }
23381
 
23382
    public markOrdersAsFailed_result(
23383
      TransactionServiceException ex)
23384
    {
23385
      this();
23386
      this.ex = ex;
23387
    }
23388
 
23389
    /**
23390
     * Performs a deep copy on <i>other</i>.
23391
     */
23392
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
23393
      if (other.isSetEx()) {
23394
        this.ex = new TransactionServiceException(other.ex);
23395
      }
23396
    }
23397
 
23398
    public markOrdersAsFailed_result deepCopy() {
23399
      return new markOrdersAsFailed_result(this);
23400
    }
23401
 
23402
    @Deprecated
23403
    public markOrdersAsFailed_result clone() {
23404
      return new markOrdersAsFailed_result(this);
23405
    }
23406
 
23407
    public TransactionServiceException getEx() {
23408
      return this.ex;
23409
    }
23410
 
23411
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
23412
      this.ex = ex;
23413
      return this;
23414
    }
23415
 
23416
    public void unsetEx() {
23417
      this.ex = null;
23418
    }
23419
 
23420
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23421
    public boolean isSetEx() {
23422
      return this.ex != null;
23423
    }
23424
 
23425
    public void setExIsSet(boolean value) {
23426
      if (!value) {
23427
        this.ex = null;
23428
      }
23429
    }
23430
 
23431
    public void setFieldValue(_Fields field, Object value) {
23432
      switch (field) {
23433
      case EX:
23434
        if (value == null) {
23435
          unsetEx();
23436
        } else {
23437
          setEx((TransactionServiceException)value);
23438
        }
23439
        break;
23440
 
23441
      }
23442
    }
23443
 
23444
    public void setFieldValue(int fieldID, Object value) {
23445
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23446
    }
23447
 
23448
    public Object getFieldValue(_Fields field) {
23449
      switch (field) {
23450
      case EX:
23451
        return getEx();
23452
 
23453
      }
23454
      throw new IllegalStateException();
23455
    }
23456
 
23457
    public Object getFieldValue(int fieldId) {
23458
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23459
    }
23460
 
23461
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23462
    public boolean isSet(_Fields field) {
23463
      switch (field) {
23464
      case EX:
23465
        return isSetEx();
23466
      }
23467
      throw new IllegalStateException();
23468
    }
23469
 
23470
    public boolean isSet(int fieldID) {
23471
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23472
    }
23473
 
23474
    @Override
23475
    public boolean equals(Object that) {
23476
      if (that == null)
23477
        return false;
23478
      if (that instanceof markOrdersAsFailed_result)
23479
        return this.equals((markOrdersAsFailed_result)that);
23480
      return false;
23481
    }
23482
 
23483
    public boolean equals(markOrdersAsFailed_result that) {
23484
      if (that == null)
23485
        return false;
23486
 
23487
      boolean this_present_ex = true && this.isSetEx();
23488
      boolean that_present_ex = true && that.isSetEx();
23489
      if (this_present_ex || that_present_ex) {
23490
        if (!(this_present_ex && that_present_ex))
23491
          return false;
23492
        if (!this.ex.equals(that.ex))
23493
          return false;
23494
      }
23495
 
23496
      return true;
23497
    }
23498
 
23499
    @Override
23500
    public int hashCode() {
23501
      return 0;
23502
    }
23503
 
23504
    public int compareTo(markOrdersAsFailed_result other) {
23505
      if (!getClass().equals(other.getClass())) {
23506
        return getClass().getName().compareTo(other.getClass().getName());
23507
      }
23508
 
23509
      int lastComparison = 0;
23510
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
23511
 
23512
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23513
      if (lastComparison != 0) {
23514
        return lastComparison;
23515
      }
23516
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23517
      if (lastComparison != 0) {
23518
        return lastComparison;
23519
      }
23520
      return 0;
23521
    }
23522
 
23523
    public void read(TProtocol iprot) throws TException {
23524
      TField field;
23525
      iprot.readStructBegin();
23526
      while (true)
23527
      {
23528
        field = iprot.readFieldBegin();
23529
        if (field.type == TType.STOP) { 
23530
          break;
23531
        }
23532
        _Fields fieldId = _Fields.findByThriftId(field.id);
23533
        if (fieldId == null) {
23534
          TProtocolUtil.skip(iprot, field.type);
23535
        } else {
23536
          switch (fieldId) {
23537
            case EX:
23538
              if (field.type == TType.STRUCT) {
23539
                this.ex = new TransactionServiceException();
23540
                this.ex.read(iprot);
23541
              } else { 
23542
                TProtocolUtil.skip(iprot, field.type);
23543
              }
23544
              break;
23545
          }
23546
          iprot.readFieldEnd();
23547
        }
23548
      }
23549
      iprot.readStructEnd();
23550
      validate();
23551
    }
23552
 
23553
    public void write(TProtocol oprot) throws TException {
23554
      oprot.writeStructBegin(STRUCT_DESC);
23555
 
23556
      if (this.isSetEx()) {
23557
        oprot.writeFieldBegin(EX_FIELD_DESC);
23558
        this.ex.write(oprot);
23559
        oprot.writeFieldEnd();
23560
      }
23561
      oprot.writeFieldStop();
23562
      oprot.writeStructEnd();
23563
    }
23564
 
23565
    @Override
23566
    public String toString() {
23567
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
23568
      boolean first = true;
23569
 
23570
      sb.append("ex:");
23571
      if (this.ex == null) {
23572
        sb.append("null");
23573
      } else {
23574
        sb.append(this.ex);
23575
      }
23576
      first = false;
23577
      sb.append(")");
23578
      return sb.toString();
23579
    }
23580
 
23581
    public void validate() throws TException {
23582
      // check for required fields
23583
    }
23584
 
23585
  }
23586
 
1245 chandransh 23587
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
23588
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
23589
 
23590
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23591
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
23592
 
23593
    private long providerId;
23594
    private Map<String,String> undeliveredOrders;
23595
 
23596
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23597
    public enum _Fields implements TFieldIdEnum {
23598
      PROVIDER_ID((short)1, "providerId"),
23599
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
23600
 
23601
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23602
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23603
 
23604
      static {
23605
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23606
          byId.put((int)field._thriftId, field);
23607
          byName.put(field.getFieldName(), field);
23608
        }
23609
      }
23610
 
23611
      /**
23612
       * Find the _Fields constant that matches fieldId, or null if its not found.
23613
       */
23614
      public static _Fields findByThriftId(int fieldId) {
23615
        return byId.get(fieldId);
23616
      }
23617
 
23618
      /**
23619
       * Find the _Fields constant that matches fieldId, throwing an exception
23620
       * if it is not found.
23621
       */
23622
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23623
        _Fields fields = findByThriftId(fieldId);
23624
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23625
        return fields;
23626
      }
23627
 
23628
      /**
23629
       * Find the _Fields constant that matches name, or null if its not found.
23630
       */
23631
      public static _Fields findByName(String name) {
23632
        return byName.get(name);
23633
      }
23634
 
23635
      private final short _thriftId;
23636
      private final String _fieldName;
23637
 
23638
      _Fields(short thriftId, String fieldName) {
23639
        _thriftId = thriftId;
23640
        _fieldName = fieldName;
23641
      }
23642
 
23643
      public short getThriftFieldId() {
23644
        return _thriftId;
23645
      }
23646
 
23647
      public String getFieldName() {
23648
        return _fieldName;
23649
      }
23650
    }
23651
 
23652
    // isset id assignments
23653
    private static final int __PROVIDERID_ISSET_ID = 0;
23654
    private BitSet __isset_bit_vector = new BitSet(1);
23655
 
23656
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23657
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23658
          new FieldValueMetaData(TType.I64)));
23659
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
23660
          new MapMetaData(TType.MAP, 
23661
              new FieldValueMetaData(TType.STRING), 
23662
              new FieldValueMetaData(TType.STRING))));
23663
    }});
23664
 
23665
    static {
23666
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
23667
    }
23668
 
23669
    public updateNonDeliveryReason_args() {
23670
    }
23671
 
23672
    public updateNonDeliveryReason_args(
23673
      long providerId,
23674
      Map<String,String> undeliveredOrders)
23675
    {
23676
      this();
23677
      this.providerId = providerId;
23678
      setProviderIdIsSet(true);
23679
      this.undeliveredOrders = undeliveredOrders;
23680
    }
23681
 
23682
    /**
23683
     * Performs a deep copy on <i>other</i>.
23684
     */
23685
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
23686
      __isset_bit_vector.clear();
23687
      __isset_bit_vector.or(other.__isset_bit_vector);
23688
      this.providerId = other.providerId;
23689
      if (other.isSetUndeliveredOrders()) {
23690
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
23691
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
23692
 
23693
          String other_element_key = other_element.getKey();
23694
          String other_element_value = other_element.getValue();
23695
 
23696
          String __this__undeliveredOrders_copy_key = other_element_key;
23697
 
23698
          String __this__undeliveredOrders_copy_value = other_element_value;
23699
 
23700
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
23701
        }
23702
        this.undeliveredOrders = __this__undeliveredOrders;
23703
      }
23704
    }
23705
 
23706
    public updateNonDeliveryReason_args deepCopy() {
23707
      return new updateNonDeliveryReason_args(this);
23708
    }
23709
 
23710
    @Deprecated
23711
    public updateNonDeliveryReason_args clone() {
23712
      return new updateNonDeliveryReason_args(this);
23713
    }
23714
 
23715
    public long getProviderId() {
23716
      return this.providerId;
23717
    }
23718
 
23719
    public updateNonDeliveryReason_args setProviderId(long providerId) {
23720
      this.providerId = providerId;
23721
      setProviderIdIsSet(true);
23722
      return this;
23723
    }
23724
 
23725
    public void unsetProviderId() {
23726
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23727
    }
23728
 
23729
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23730
    public boolean isSetProviderId() {
23731
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23732
    }
23733
 
23734
    public void setProviderIdIsSet(boolean value) {
23735
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23736
    }
23737
 
23738
    public int getUndeliveredOrdersSize() {
23739
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
23740
    }
23741
 
23742
    public void putToUndeliveredOrders(String key, String val) {
23743
      if (this.undeliveredOrders == null) {
23744
        this.undeliveredOrders = new HashMap<String,String>();
23745
      }
23746
      this.undeliveredOrders.put(key, val);
23747
    }
23748
 
23749
    public Map<String,String> getUndeliveredOrders() {
23750
      return this.undeliveredOrders;
23751
    }
23752
 
23753
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
23754
      this.undeliveredOrders = undeliveredOrders;
23755
      return this;
23756
    }
23757
 
23758
    public void unsetUndeliveredOrders() {
23759
      this.undeliveredOrders = null;
23760
    }
23761
 
23762
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
23763
    public boolean isSetUndeliveredOrders() {
23764
      return this.undeliveredOrders != null;
23765
    }
23766
 
23767
    public void setUndeliveredOrdersIsSet(boolean value) {
23768
      if (!value) {
23769
        this.undeliveredOrders = null;
23770
      }
23771
    }
23772
 
23773
    public void setFieldValue(_Fields field, Object value) {
23774
      switch (field) {
23775
      case PROVIDER_ID:
23776
        if (value == null) {
23777
          unsetProviderId();
23778
        } else {
23779
          setProviderId((Long)value);
23780
        }
23781
        break;
23782
 
23783
      case UNDELIVERED_ORDERS:
23784
        if (value == null) {
23785
          unsetUndeliveredOrders();
23786
        } else {
23787
          setUndeliveredOrders((Map<String,String>)value);
23788
        }
23789
        break;
23790
 
23791
      }
23792
    }
23793
 
23794
    public void setFieldValue(int fieldID, Object value) {
23795
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23796
    }
23797
 
23798
    public Object getFieldValue(_Fields field) {
23799
      switch (field) {
23800
      case PROVIDER_ID:
23801
        return new Long(getProviderId());
23802
 
23803
      case UNDELIVERED_ORDERS:
23804
        return getUndeliveredOrders();
23805
 
23806
      }
23807
      throw new IllegalStateException();
23808
    }
23809
 
23810
    public Object getFieldValue(int fieldId) {
23811
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23812
    }
23813
 
23814
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23815
    public boolean isSet(_Fields field) {
23816
      switch (field) {
23817
      case PROVIDER_ID:
23818
        return isSetProviderId();
23819
      case UNDELIVERED_ORDERS:
23820
        return isSetUndeliveredOrders();
23821
      }
23822
      throw new IllegalStateException();
23823
    }
23824
 
23825
    public boolean isSet(int fieldID) {
23826
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23827
    }
23828
 
23829
    @Override
23830
    public boolean equals(Object that) {
23831
      if (that == null)
23832
        return false;
23833
      if (that instanceof updateNonDeliveryReason_args)
23834
        return this.equals((updateNonDeliveryReason_args)that);
23835
      return false;
23836
    }
23837
 
23838
    public boolean equals(updateNonDeliveryReason_args that) {
23839
      if (that == null)
23840
        return false;
23841
 
23842
      boolean this_present_providerId = true;
23843
      boolean that_present_providerId = true;
23844
      if (this_present_providerId || that_present_providerId) {
23845
        if (!(this_present_providerId && that_present_providerId))
23846
          return false;
23847
        if (this.providerId != that.providerId)
23848
          return false;
23849
      }
23850
 
23851
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
23852
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
23853
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
23854
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
23855
          return false;
23856
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
23857
          return false;
23858
      }
23859
 
23860
      return true;
23861
    }
23862
 
23863
    @Override
23864
    public int hashCode() {
23865
      return 0;
23866
    }
23867
 
23868
    public void read(TProtocol iprot) throws TException {
23869
      TField field;
23870
      iprot.readStructBegin();
23871
      while (true)
23872
      {
23873
        field = iprot.readFieldBegin();
23874
        if (field.type == TType.STOP) { 
23875
          break;
23876
        }
23877
        _Fields fieldId = _Fields.findByThriftId(field.id);
23878
        if (fieldId == null) {
23879
          TProtocolUtil.skip(iprot, field.type);
23880
        } else {
23881
          switch (fieldId) {
23882
            case PROVIDER_ID:
23883
              if (field.type == TType.I64) {
23884
                this.providerId = iprot.readI64();
23885
                setProviderIdIsSet(true);
23886
              } else { 
23887
                TProtocolUtil.skip(iprot, field.type);
23888
              }
23889
              break;
23890
            case UNDELIVERED_ORDERS:
23891
              if (field.type == TType.MAP) {
23892
                {
1382 varun.gupt 23893
                  TMap _map67 = iprot.readMapBegin();
23894
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
23895
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 23896
                  {
1382 varun.gupt 23897
                    String _key69;
23898
                    String _val70;
23899
                    _key69 = iprot.readString();
23900
                    _val70 = iprot.readString();
23901
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 23902
                  }
23903
                  iprot.readMapEnd();
23904
                }
23905
              } else { 
23906
                TProtocolUtil.skip(iprot, field.type);
23907
              }
23908
              break;
23909
          }
23910
          iprot.readFieldEnd();
23911
        }
23912
      }
23913
      iprot.readStructEnd();
23914
      validate();
23915
    }
23916
 
23917
    public void write(TProtocol oprot) throws TException {
23918
      validate();
23919
 
23920
      oprot.writeStructBegin(STRUCT_DESC);
23921
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23922
      oprot.writeI64(this.providerId);
23923
      oprot.writeFieldEnd();
23924
      if (this.undeliveredOrders != null) {
23925
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
23926
        {
23927
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 23928
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 23929
          {
1382 varun.gupt 23930
            oprot.writeString(_iter71.getKey());
23931
            oprot.writeString(_iter71.getValue());
1245 chandransh 23932
          }
23933
          oprot.writeMapEnd();
23934
        }
23935
        oprot.writeFieldEnd();
23936
      }
23937
      oprot.writeFieldStop();
23938
      oprot.writeStructEnd();
23939
    }
23940
 
23941
    @Override
23942
    public String toString() {
23943
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
23944
      boolean first = true;
23945
 
23946
      sb.append("providerId:");
23947
      sb.append(this.providerId);
23948
      first = false;
23949
      if (!first) sb.append(", ");
23950
      sb.append("undeliveredOrders:");
23951
      if (this.undeliveredOrders == null) {
23952
        sb.append("null");
23953
      } else {
23954
        sb.append(this.undeliveredOrders);
23955
      }
23956
      first = false;
23957
      sb.append(")");
23958
      return sb.toString();
23959
    }
23960
 
23961
    public void validate() throws TException {
23962
      // check for required fields
23963
    }
23964
 
23965
  }
23966
 
23967
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
23968
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
23969
 
23970
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23971
 
23972
    private TransactionServiceException ex;
23973
 
23974
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23975
    public enum _Fields implements TFieldIdEnum {
23976
      EX((short)1, "ex");
23977
 
23978
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23979
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23980
 
23981
      static {
23982
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23983
          byId.put((int)field._thriftId, field);
23984
          byName.put(field.getFieldName(), field);
23985
        }
23986
      }
23987
 
23988
      /**
23989
       * Find the _Fields constant that matches fieldId, or null if its not found.
23990
       */
23991
      public static _Fields findByThriftId(int fieldId) {
23992
        return byId.get(fieldId);
23993
      }
23994
 
23995
      /**
23996
       * Find the _Fields constant that matches fieldId, throwing an exception
23997
       * if it is not found.
23998
       */
23999
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24000
        _Fields fields = findByThriftId(fieldId);
24001
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24002
        return fields;
24003
      }
24004
 
24005
      /**
24006
       * Find the _Fields constant that matches name, or null if its not found.
24007
       */
24008
      public static _Fields findByName(String name) {
24009
        return byName.get(name);
24010
      }
24011
 
24012
      private final short _thriftId;
24013
      private final String _fieldName;
24014
 
24015
      _Fields(short thriftId, String fieldName) {
24016
        _thriftId = thriftId;
24017
        _fieldName = fieldName;
24018
      }
24019
 
24020
      public short getThriftFieldId() {
24021
        return _thriftId;
24022
      }
24023
 
24024
      public String getFieldName() {
24025
        return _fieldName;
24026
      }
24027
    }
24028
 
24029
    // isset id assignments
24030
 
24031
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24032
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
24033
          new FieldValueMetaData(TType.STRUCT)));
24034
    }});
24035
 
24036
    static {
24037
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
24038
    }
24039
 
24040
    public updateNonDeliveryReason_result() {
24041
    }
24042
 
24043
    public updateNonDeliveryReason_result(
24044
      TransactionServiceException ex)
24045
    {
24046
      this();
24047
      this.ex = ex;
24048
    }
24049
 
24050
    /**
24051
     * Performs a deep copy on <i>other</i>.
24052
     */
24053
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
24054
      if (other.isSetEx()) {
24055
        this.ex = new TransactionServiceException(other.ex);
24056
      }
24057
    }
24058
 
24059
    public updateNonDeliveryReason_result deepCopy() {
24060
      return new updateNonDeliveryReason_result(this);
24061
    }
24062
 
24063
    @Deprecated
24064
    public updateNonDeliveryReason_result clone() {
24065
      return new updateNonDeliveryReason_result(this);
24066
    }
24067
 
24068
    public TransactionServiceException getEx() {
24069
      return this.ex;
24070
    }
24071
 
24072
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
24073
      this.ex = ex;
24074
      return this;
24075
    }
24076
 
24077
    public void unsetEx() {
24078
      this.ex = null;
24079
    }
24080
 
24081
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
24082
    public boolean isSetEx() {
24083
      return this.ex != null;
24084
    }
24085
 
24086
    public void setExIsSet(boolean value) {
24087
      if (!value) {
24088
        this.ex = null;
24089
      }
24090
    }
24091
 
24092
    public void setFieldValue(_Fields field, Object value) {
24093
      switch (field) {
24094
      case EX:
24095
        if (value == null) {
24096
          unsetEx();
24097
        } else {
24098
          setEx((TransactionServiceException)value);
24099
        }
24100
        break;
24101
 
24102
      }
24103
    }
24104
 
24105
    public void setFieldValue(int fieldID, Object value) {
24106
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24107
    }
24108
 
24109
    public Object getFieldValue(_Fields field) {
24110
      switch (field) {
24111
      case EX:
24112
        return getEx();
24113
 
24114
      }
24115
      throw new IllegalStateException();
24116
    }
24117
 
24118
    public Object getFieldValue(int fieldId) {
24119
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24120
    }
24121
 
24122
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24123
    public boolean isSet(_Fields field) {
24124
      switch (field) {
24125
      case EX:
24126
        return isSetEx();
24127
      }
24128
      throw new IllegalStateException();
24129
    }
24130
 
24131
    public boolean isSet(int fieldID) {
24132
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24133
    }
24134
 
24135
    @Override
24136
    public boolean equals(Object that) {
24137
      if (that == null)
24138
        return false;
24139
      if (that instanceof updateNonDeliveryReason_result)
24140
        return this.equals((updateNonDeliveryReason_result)that);
24141
      return false;
24142
    }
24143
 
24144
    public boolean equals(updateNonDeliveryReason_result that) {
24145
      if (that == null)
24146
        return false;
24147
 
24148
      boolean this_present_ex = true && this.isSetEx();
24149
      boolean that_present_ex = true && that.isSetEx();
24150
      if (this_present_ex || that_present_ex) {
24151
        if (!(this_present_ex && that_present_ex))
24152
          return false;
24153
        if (!this.ex.equals(that.ex))
24154
          return false;
24155
      }
24156
 
24157
      return true;
24158
    }
24159
 
24160
    @Override
24161
    public int hashCode() {
24162
      return 0;
24163
    }
24164
 
24165
    public int compareTo(updateNonDeliveryReason_result other) {
24166
      if (!getClass().equals(other.getClass())) {
24167
        return getClass().getName().compareTo(other.getClass().getName());
24168
      }
24169
 
24170
      int lastComparison = 0;
24171
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
24172
 
24173
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24174
      if (lastComparison != 0) {
24175
        return lastComparison;
24176
      }
24177
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24178
      if (lastComparison != 0) {
24179
        return lastComparison;
24180
      }
24181
      return 0;
24182
    }
24183
 
24184
    public void read(TProtocol iprot) throws TException {
24185
      TField field;
24186
      iprot.readStructBegin();
24187
      while (true)
24188
      {
24189
        field = iprot.readFieldBegin();
24190
        if (field.type == TType.STOP) { 
24191
          break;
24192
        }
24193
        _Fields fieldId = _Fields.findByThriftId(field.id);
24194
        if (fieldId == null) {
24195
          TProtocolUtil.skip(iprot, field.type);
24196
        } else {
24197
          switch (fieldId) {
24198
            case EX:
24199
              if (field.type == TType.STRUCT) {
24200
                this.ex = new TransactionServiceException();
24201
                this.ex.read(iprot);
24202
              } else { 
24203
                TProtocolUtil.skip(iprot, field.type);
24204
              }
24205
              break;
24206
          }
24207
          iprot.readFieldEnd();
24208
        }
24209
      }
24210
      iprot.readStructEnd();
24211
      validate();
24212
    }
24213
 
24214
    public void write(TProtocol oprot) throws TException {
24215
      oprot.writeStructBegin(STRUCT_DESC);
24216
 
24217
      if (this.isSetEx()) {
24218
        oprot.writeFieldBegin(EX_FIELD_DESC);
24219
        this.ex.write(oprot);
24220
        oprot.writeFieldEnd();
24221
      }
24222
      oprot.writeFieldStop();
24223
      oprot.writeStructEnd();
24224
    }
24225
 
24226
    @Override
24227
    public String toString() {
24228
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
24229
      boolean first = true;
24230
 
24231
      sb.append("ex:");
24232
      if (this.ex == null) {
24233
        sb.append("null");
24234
      } else {
24235
        sb.append(this.ex);
24236
      }
24237
      first = false;
24238
      sb.append(")");
24239
      return sb.toString();
24240
    }
24241
 
24242
    public void validate() throws TException {
24243
      // check for required fields
24244
    }
24245
 
24246
  }
24247
 
1406 ankur.sing 24248
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
24249
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
24250
 
24251
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24252
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
24253
 
24254
    private long providerId;
24255
    private long warehouseId;
24256
 
24257
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24258
    public enum _Fields implements TFieldIdEnum {
24259
      PROVIDER_ID((short)1, "providerId"),
24260
      WAREHOUSE_ID((short)2, "warehouseId");
24261
 
24262
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24263
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24264
 
24265
      static {
24266
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24267
          byId.put((int)field._thriftId, field);
24268
          byName.put(field.getFieldName(), field);
24269
        }
24270
      }
24271
 
24272
      /**
24273
       * Find the _Fields constant that matches fieldId, or null if its not found.
24274
       */
24275
      public static _Fields findByThriftId(int fieldId) {
24276
        return byId.get(fieldId);
24277
      }
24278
 
24279
      /**
24280
       * Find the _Fields constant that matches fieldId, throwing an exception
24281
       * if it is not found.
24282
       */
24283
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24284
        _Fields fields = findByThriftId(fieldId);
24285
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24286
        return fields;
24287
      }
24288
 
24289
      /**
24290
       * Find the _Fields constant that matches name, or null if its not found.
24291
       */
24292
      public static _Fields findByName(String name) {
24293
        return byName.get(name);
24294
      }
24295
 
24296
      private final short _thriftId;
24297
      private final String _fieldName;
24298
 
24299
      _Fields(short thriftId, String fieldName) {
24300
        _thriftId = thriftId;
24301
        _fieldName = fieldName;
24302
      }
24303
 
24304
      public short getThriftFieldId() {
24305
        return _thriftId;
24306
      }
24307
 
24308
      public String getFieldName() {
24309
        return _fieldName;
24310
      }
24311
    }
24312
 
24313
    // isset id assignments
24314
    private static final int __PROVIDERID_ISSET_ID = 0;
24315
    private static final int __WAREHOUSEID_ISSET_ID = 1;
24316
    private BitSet __isset_bit_vector = new BitSet(2);
24317
 
24318
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24319
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24320
          new FieldValueMetaData(TType.I64)));
24321
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
24322
          new FieldValueMetaData(TType.I64)));
24323
    }});
24324
 
24325
    static {
24326
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
24327
    }
24328
 
24329
    public getUndeliveredOrders_args() {
24330
    }
24331
 
24332
    public getUndeliveredOrders_args(
24333
      long providerId,
24334
      long warehouseId)
24335
    {
24336
      this();
24337
      this.providerId = providerId;
24338
      setProviderIdIsSet(true);
24339
      this.warehouseId = warehouseId;
24340
      setWarehouseIdIsSet(true);
24341
    }
24342
 
24343
    /**
24344
     * Performs a deep copy on <i>other</i>.
24345
     */
24346
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
24347
      __isset_bit_vector.clear();
24348
      __isset_bit_vector.or(other.__isset_bit_vector);
24349
      this.providerId = other.providerId;
24350
      this.warehouseId = other.warehouseId;
24351
    }
24352
 
24353
    public getUndeliveredOrders_args deepCopy() {
24354
      return new getUndeliveredOrders_args(this);
24355
    }
24356
 
24357
    @Deprecated
24358
    public getUndeliveredOrders_args clone() {
24359
      return new getUndeliveredOrders_args(this);
24360
    }
24361
 
24362
    public long getProviderId() {
24363
      return this.providerId;
24364
    }
24365
 
24366
    public getUndeliveredOrders_args setProviderId(long providerId) {
24367
      this.providerId = providerId;
24368
      setProviderIdIsSet(true);
24369
      return this;
24370
    }
24371
 
24372
    public void unsetProviderId() {
24373
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24374
    }
24375
 
24376
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24377
    public boolean isSetProviderId() {
24378
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24379
    }
24380
 
24381
    public void setProviderIdIsSet(boolean value) {
24382
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24383
    }
24384
 
24385
    public long getWarehouseId() {
24386
      return this.warehouseId;
24387
    }
24388
 
24389
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
24390
      this.warehouseId = warehouseId;
24391
      setWarehouseIdIsSet(true);
24392
      return this;
24393
    }
24394
 
24395
    public void unsetWarehouseId() {
24396
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
24397
    }
24398
 
24399
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
24400
    public boolean isSetWarehouseId() {
24401
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
24402
    }
24403
 
24404
    public void setWarehouseIdIsSet(boolean value) {
24405
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
24406
    }
24407
 
24408
    public void setFieldValue(_Fields field, Object value) {
24409
      switch (field) {
24410
      case PROVIDER_ID:
24411
        if (value == null) {
24412
          unsetProviderId();
24413
        } else {
24414
          setProviderId((Long)value);
24415
        }
24416
        break;
24417
 
24418
      case WAREHOUSE_ID:
24419
        if (value == null) {
24420
          unsetWarehouseId();
24421
        } else {
24422
          setWarehouseId((Long)value);
24423
        }
24424
        break;
24425
 
24426
      }
24427
    }
24428
 
24429
    public void setFieldValue(int fieldID, Object value) {
24430
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24431
    }
24432
 
24433
    public Object getFieldValue(_Fields field) {
24434
      switch (field) {
24435
      case PROVIDER_ID:
24436
        return new Long(getProviderId());
24437
 
24438
      case WAREHOUSE_ID:
24439
        return new Long(getWarehouseId());
24440
 
24441
      }
24442
      throw new IllegalStateException();
24443
    }
24444
 
24445
    public Object getFieldValue(int fieldId) {
24446
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24447
    }
24448
 
24449
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24450
    public boolean isSet(_Fields field) {
24451
      switch (field) {
24452
      case PROVIDER_ID:
24453
        return isSetProviderId();
24454
      case WAREHOUSE_ID:
24455
        return isSetWarehouseId();
24456
      }
24457
      throw new IllegalStateException();
24458
    }
24459
 
24460
    public boolean isSet(int fieldID) {
24461
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24462
    }
24463
 
24464
    @Override
24465
    public boolean equals(Object that) {
24466
      if (that == null)
24467
        return false;
24468
      if (that instanceof getUndeliveredOrders_args)
24469
        return this.equals((getUndeliveredOrders_args)that);
24470
      return false;
24471
    }
24472
 
24473
    public boolean equals(getUndeliveredOrders_args that) {
24474
      if (that == null)
24475
        return false;
24476
 
24477
      boolean this_present_providerId = true;
24478
      boolean that_present_providerId = true;
24479
      if (this_present_providerId || that_present_providerId) {
24480
        if (!(this_present_providerId && that_present_providerId))
24481
          return false;
24482
        if (this.providerId != that.providerId)
24483
          return false;
24484
      }
24485
 
24486
      boolean this_present_warehouseId = true;
24487
      boolean that_present_warehouseId = true;
24488
      if (this_present_warehouseId || that_present_warehouseId) {
24489
        if (!(this_present_warehouseId && that_present_warehouseId))
24490
          return false;
24491
        if (this.warehouseId != that.warehouseId)
24492
          return false;
24493
      }
24494
 
24495
      return true;
24496
    }
24497
 
24498
    @Override
24499
    public int hashCode() {
24500
      return 0;
24501
    }
24502
 
24503
    public int compareTo(getUndeliveredOrders_args other) {
24504
      if (!getClass().equals(other.getClass())) {
24505
        return getClass().getName().compareTo(other.getClass().getName());
24506
      }
24507
 
24508
      int lastComparison = 0;
24509
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
24510
 
24511
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
24512
      if (lastComparison != 0) {
24513
        return lastComparison;
24514
      }
24515
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
24516
      if (lastComparison != 0) {
24517
        return lastComparison;
24518
      }
24519
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
24520
      if (lastComparison != 0) {
24521
        return lastComparison;
24522
      }
24523
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
24524
      if (lastComparison != 0) {
24525
        return lastComparison;
24526
      }
24527
      return 0;
24528
    }
24529
 
24530
    public void read(TProtocol iprot) throws TException {
24531
      TField field;
24532
      iprot.readStructBegin();
24533
      while (true)
24534
      {
24535
        field = iprot.readFieldBegin();
24536
        if (field.type == TType.STOP) { 
24537
          break;
24538
        }
24539
        _Fields fieldId = _Fields.findByThriftId(field.id);
24540
        if (fieldId == null) {
24541
          TProtocolUtil.skip(iprot, field.type);
24542
        } else {
24543
          switch (fieldId) {
24544
            case PROVIDER_ID:
24545
              if (field.type == TType.I64) {
24546
                this.providerId = iprot.readI64();
24547
                setProviderIdIsSet(true);
24548
              } else { 
24549
                TProtocolUtil.skip(iprot, field.type);
24550
              }
24551
              break;
24552
            case WAREHOUSE_ID:
24553
              if (field.type == TType.I64) {
24554
                this.warehouseId = iprot.readI64();
24555
                setWarehouseIdIsSet(true);
24556
              } else { 
24557
                TProtocolUtil.skip(iprot, field.type);
24558
              }
24559
              break;
24560
          }
24561
          iprot.readFieldEnd();
24562
        }
24563
      }
24564
      iprot.readStructEnd();
24565
      validate();
24566
    }
24567
 
24568
    public void write(TProtocol oprot) throws TException {
24569
      validate();
24570
 
24571
      oprot.writeStructBegin(STRUCT_DESC);
24572
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24573
      oprot.writeI64(this.providerId);
24574
      oprot.writeFieldEnd();
24575
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
24576
      oprot.writeI64(this.warehouseId);
24577
      oprot.writeFieldEnd();
24578
      oprot.writeFieldStop();
24579
      oprot.writeStructEnd();
24580
    }
24581
 
24582
    @Override
24583
    public String toString() {
24584
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
24585
      boolean first = true;
24586
 
24587
      sb.append("providerId:");
24588
      sb.append(this.providerId);
24589
      first = false;
24590
      if (!first) sb.append(", ");
24591
      sb.append("warehouseId:");
24592
      sb.append(this.warehouseId);
24593
      first = false;
24594
      sb.append(")");
24595
      return sb.toString();
24596
    }
24597
 
24598
    public void validate() throws TException {
24599
      // check for required fields
24600
    }
24601
 
24602
  }
24603
 
24604
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
24605
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
24606
 
24607
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
24608
 
24609
    private List<Order> success;
24610
 
24611
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24612
    public enum _Fields implements TFieldIdEnum {
24613
      SUCCESS((short)0, "success");
24614
 
24615
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24616
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24617
 
24618
      static {
24619
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24620
          byId.put((int)field._thriftId, field);
24621
          byName.put(field.getFieldName(), field);
24622
        }
24623
      }
24624
 
24625
      /**
24626
       * Find the _Fields constant that matches fieldId, or null if its not found.
24627
       */
24628
      public static _Fields findByThriftId(int fieldId) {
24629
        return byId.get(fieldId);
24630
      }
24631
 
24632
      /**
24633
       * Find the _Fields constant that matches fieldId, throwing an exception
24634
       * if it is not found.
24635
       */
24636
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24637
        _Fields fields = findByThriftId(fieldId);
24638
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24639
        return fields;
24640
      }
24641
 
24642
      /**
24643
       * Find the _Fields constant that matches name, or null if its not found.
24644
       */
24645
      public static _Fields findByName(String name) {
24646
        return byName.get(name);
24647
      }
24648
 
24649
      private final short _thriftId;
24650
      private final String _fieldName;
24651
 
24652
      _Fields(short thriftId, String fieldName) {
24653
        _thriftId = thriftId;
24654
        _fieldName = fieldName;
24655
      }
24656
 
24657
      public short getThriftFieldId() {
24658
        return _thriftId;
24659
      }
24660
 
24661
      public String getFieldName() {
24662
        return _fieldName;
24663
      }
24664
    }
24665
 
24666
    // isset id assignments
24667
 
24668
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24669
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24670
          new ListMetaData(TType.LIST, 
24671
              new StructMetaData(TType.STRUCT, Order.class))));
24672
    }});
24673
 
24674
    static {
24675
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
24676
    }
24677
 
24678
    public getUndeliveredOrders_result() {
24679
    }
24680
 
24681
    public getUndeliveredOrders_result(
24682
      List<Order> success)
24683
    {
24684
      this();
24685
      this.success = success;
24686
    }
24687
 
24688
    /**
24689
     * Performs a deep copy on <i>other</i>.
24690
     */
24691
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
24692
      if (other.isSetSuccess()) {
24693
        List<Order> __this__success = new ArrayList<Order>();
24694
        for (Order other_element : other.success) {
24695
          __this__success.add(new Order(other_element));
24696
        }
24697
        this.success = __this__success;
24698
      }
24699
    }
24700
 
24701
    public getUndeliveredOrders_result deepCopy() {
24702
      return new getUndeliveredOrders_result(this);
24703
    }
24704
 
24705
    @Deprecated
24706
    public getUndeliveredOrders_result clone() {
24707
      return new getUndeliveredOrders_result(this);
24708
    }
24709
 
24710
    public int getSuccessSize() {
24711
      return (this.success == null) ? 0 : this.success.size();
24712
    }
24713
 
24714
    public java.util.Iterator<Order> getSuccessIterator() {
24715
      return (this.success == null) ? null : this.success.iterator();
24716
    }
24717
 
24718
    public void addToSuccess(Order elem) {
24719
      if (this.success == null) {
24720
        this.success = new ArrayList<Order>();
24721
      }
24722
      this.success.add(elem);
24723
    }
24724
 
24725
    public List<Order> getSuccess() {
24726
      return this.success;
24727
    }
24728
 
24729
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
24730
      this.success = success;
24731
      return this;
24732
    }
24733
 
24734
    public void unsetSuccess() {
24735
      this.success = null;
24736
    }
24737
 
24738
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24739
    public boolean isSetSuccess() {
24740
      return this.success != null;
24741
    }
24742
 
24743
    public void setSuccessIsSet(boolean value) {
24744
      if (!value) {
24745
        this.success = null;
24746
      }
24747
    }
24748
 
24749
    public void setFieldValue(_Fields field, Object value) {
24750
      switch (field) {
24751
      case SUCCESS:
24752
        if (value == null) {
24753
          unsetSuccess();
24754
        } else {
24755
          setSuccess((List<Order>)value);
24756
        }
24757
        break;
24758
 
24759
      }
24760
    }
24761
 
24762
    public void setFieldValue(int fieldID, Object value) {
24763
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24764
    }
24765
 
24766
    public Object getFieldValue(_Fields field) {
24767
      switch (field) {
24768
      case SUCCESS:
24769
        return getSuccess();
24770
 
24771
      }
24772
      throw new IllegalStateException();
24773
    }
24774
 
24775
    public Object getFieldValue(int fieldId) {
24776
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24777
    }
24778
 
24779
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24780
    public boolean isSet(_Fields field) {
24781
      switch (field) {
24782
      case SUCCESS:
24783
        return isSetSuccess();
24784
      }
24785
      throw new IllegalStateException();
24786
    }
24787
 
24788
    public boolean isSet(int fieldID) {
24789
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24790
    }
24791
 
24792
    @Override
24793
    public boolean equals(Object that) {
24794
      if (that == null)
24795
        return false;
24796
      if (that instanceof getUndeliveredOrders_result)
24797
        return this.equals((getUndeliveredOrders_result)that);
24798
      return false;
24799
    }
24800
 
24801
    public boolean equals(getUndeliveredOrders_result that) {
24802
      if (that == null)
24803
        return false;
24804
 
24805
      boolean this_present_success = true && this.isSetSuccess();
24806
      boolean that_present_success = true && that.isSetSuccess();
24807
      if (this_present_success || that_present_success) {
24808
        if (!(this_present_success && that_present_success))
24809
          return false;
24810
        if (!this.success.equals(that.success))
24811
          return false;
24812
      }
24813
 
24814
      return true;
24815
    }
24816
 
24817
    @Override
24818
    public int hashCode() {
24819
      return 0;
24820
    }
24821
 
24822
    public int compareTo(getUndeliveredOrders_result other) {
24823
      if (!getClass().equals(other.getClass())) {
24824
        return getClass().getName().compareTo(other.getClass().getName());
24825
      }
24826
 
24827
      int lastComparison = 0;
24828
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
24829
 
24830
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24831
      if (lastComparison != 0) {
24832
        return lastComparison;
24833
      }
24834
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24835
      if (lastComparison != 0) {
24836
        return lastComparison;
24837
      }
24838
      return 0;
24839
    }
24840
 
24841
    public void read(TProtocol iprot) throws TException {
24842
      TField field;
24843
      iprot.readStructBegin();
24844
      while (true)
24845
      {
24846
        field = iprot.readFieldBegin();
24847
        if (field.type == TType.STOP) { 
24848
          break;
24849
        }
24850
        _Fields fieldId = _Fields.findByThriftId(field.id);
24851
        if (fieldId == null) {
24852
          TProtocolUtil.skip(iprot, field.type);
24853
        } else {
24854
          switch (fieldId) {
24855
            case SUCCESS:
24856
              if (field.type == TType.LIST) {
24857
                {
24858
                  TList _list72 = iprot.readListBegin();
24859
                  this.success = new ArrayList<Order>(_list72.size);
24860
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
24861
                  {
24862
                    Order _elem74;
24863
                    _elem74 = new Order();
24864
                    _elem74.read(iprot);
24865
                    this.success.add(_elem74);
24866
                  }
24867
                  iprot.readListEnd();
24868
                }
24869
              } else { 
24870
                TProtocolUtil.skip(iprot, field.type);
24871
              }
24872
              break;
24873
          }
24874
          iprot.readFieldEnd();
24875
        }
24876
      }
24877
      iprot.readStructEnd();
24878
      validate();
24879
    }
24880
 
24881
    public void write(TProtocol oprot) throws TException {
24882
      oprot.writeStructBegin(STRUCT_DESC);
24883
 
24884
      if (this.isSetSuccess()) {
24885
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24886
        {
24887
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
24888
          for (Order _iter75 : this.success)
24889
          {
24890
            _iter75.write(oprot);
24891
          }
24892
          oprot.writeListEnd();
24893
        }
24894
        oprot.writeFieldEnd();
24895
      }
24896
      oprot.writeFieldStop();
24897
      oprot.writeStructEnd();
24898
    }
24899
 
24900
    @Override
24901
    public String toString() {
24902
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
24903
      boolean first = true;
24904
 
24905
      sb.append("success:");
24906
      if (this.success == null) {
24907
        sb.append("null");
24908
      } else {
24909
        sb.append(this.success);
24910
      }
24911
      first = false;
24912
      sb.append(")");
24913
      return sb.toString();
24914
    }
24915
 
24916
    public void validate() throws TException {
24917
      // check for required fields
24918
    }
24919
 
24920
  }
24921
 
305 ashish 24922
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
24923
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
24924
 
483 rajveer 24925
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 24926
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
24927
 
483 rajveer 24928
    private long orderId;
305 ashish 24929
    private boolean valid;
24930
 
24931
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24932
    public enum _Fields implements TFieldIdEnum {
483 rajveer 24933
      ORDER_ID((short)1, "orderId"),
305 ashish 24934
      VALID((short)2, "valid");
24935
 
24936
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24937
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24938
 
24939
      static {
24940
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24941
          byId.put((int)field._thriftId, field);
24942
          byName.put(field.getFieldName(), field);
24943
        }
24944
      }
24945
 
24946
      /**
24947
       * Find the _Fields constant that matches fieldId, or null if its not found.
24948
       */
24949
      public static _Fields findByThriftId(int fieldId) {
24950
        return byId.get(fieldId);
24951
      }
24952
 
24953
      /**
24954
       * Find the _Fields constant that matches fieldId, throwing an exception
24955
       * if it is not found.
24956
       */
24957
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24958
        _Fields fields = findByThriftId(fieldId);
24959
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24960
        return fields;
24961
      }
24962
 
24963
      /**
24964
       * Find the _Fields constant that matches name, or null if its not found.
24965
       */
24966
      public static _Fields findByName(String name) {
24967
        return byName.get(name);
24968
      }
24969
 
24970
      private final short _thriftId;
24971
      private final String _fieldName;
24972
 
24973
      _Fields(short thriftId, String fieldName) {
24974
        _thriftId = thriftId;
24975
        _fieldName = fieldName;
24976
      }
24977
 
24978
      public short getThriftFieldId() {
24979
        return _thriftId;
24980
      }
24981
 
24982
      public String getFieldName() {
24983
        return _fieldName;
24984
      }
24985
    }
24986
 
24987
    // isset id assignments
483 rajveer 24988
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 24989
    private static final int __VALID_ISSET_ID = 1;
24990
    private BitSet __isset_bit_vector = new BitSet(2);
24991
 
24992
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 24993
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 24994
          new FieldValueMetaData(TType.I64)));
24995
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
24996
          new FieldValueMetaData(TType.BOOL)));
24997
    }});
24998
 
24999
    static {
25000
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
25001
    }
25002
 
25003
    public getAlerts_args() {
25004
    }
25005
 
25006
    public getAlerts_args(
483 rajveer 25007
      long orderId,
305 ashish 25008
      boolean valid)
25009
    {
25010
      this();
483 rajveer 25011
      this.orderId = orderId;
25012
      setOrderIdIsSet(true);
305 ashish 25013
      this.valid = valid;
25014
      setValidIsSet(true);
25015
    }
25016
 
25017
    /**
25018
     * Performs a deep copy on <i>other</i>.
25019
     */
25020
    public getAlerts_args(getAlerts_args other) {
25021
      __isset_bit_vector.clear();
25022
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25023
      this.orderId = other.orderId;
305 ashish 25024
      this.valid = other.valid;
25025
    }
25026
 
25027
    public getAlerts_args deepCopy() {
25028
      return new getAlerts_args(this);
25029
    }
25030
 
25031
    @Deprecated
25032
    public getAlerts_args clone() {
25033
      return new getAlerts_args(this);
25034
    }
25035
 
483 rajveer 25036
    public long getOrderId() {
25037
      return this.orderId;
305 ashish 25038
    }
25039
 
483 rajveer 25040
    public getAlerts_args setOrderId(long orderId) {
25041
      this.orderId = orderId;
25042
      setOrderIdIsSet(true);
305 ashish 25043
      return this;
25044
    }
25045
 
483 rajveer 25046
    public void unsetOrderId() {
25047
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25048
    }
25049
 
483 rajveer 25050
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25051
    public boolean isSetOrderId() {
25052
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25053
    }
25054
 
483 rajveer 25055
    public void setOrderIdIsSet(boolean value) {
25056
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25057
    }
25058
 
25059
    public boolean isValid() {
25060
      return this.valid;
25061
    }
25062
 
25063
    public getAlerts_args setValid(boolean valid) {
25064
      this.valid = valid;
25065
      setValidIsSet(true);
25066
      return this;
25067
    }
25068
 
25069
    public void unsetValid() {
25070
      __isset_bit_vector.clear(__VALID_ISSET_ID);
25071
    }
25072
 
25073
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
25074
    public boolean isSetValid() {
25075
      return __isset_bit_vector.get(__VALID_ISSET_ID);
25076
    }
25077
 
25078
    public void setValidIsSet(boolean value) {
25079
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
25080
    }
25081
 
25082
    public void setFieldValue(_Fields field, Object value) {
25083
      switch (field) {
483 rajveer 25084
      case ORDER_ID:
305 ashish 25085
        if (value == null) {
483 rajveer 25086
          unsetOrderId();
305 ashish 25087
        } else {
483 rajveer 25088
          setOrderId((Long)value);
305 ashish 25089
        }
25090
        break;
25091
 
25092
      case VALID:
25093
        if (value == null) {
25094
          unsetValid();
25095
        } else {
25096
          setValid((Boolean)value);
25097
        }
25098
        break;
25099
 
25100
      }
25101
    }
25102
 
25103
    public void setFieldValue(int fieldID, Object value) {
25104
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25105
    }
25106
 
25107
    public Object getFieldValue(_Fields field) {
25108
      switch (field) {
483 rajveer 25109
      case ORDER_ID:
25110
        return new Long(getOrderId());
305 ashish 25111
 
25112
      case VALID:
25113
        return new Boolean(isValid());
25114
 
25115
      }
25116
      throw new IllegalStateException();
25117
    }
25118
 
25119
    public Object getFieldValue(int fieldId) {
25120
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25121
    }
25122
 
25123
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25124
    public boolean isSet(_Fields field) {
25125
      switch (field) {
483 rajveer 25126
      case ORDER_ID:
25127
        return isSetOrderId();
305 ashish 25128
      case VALID:
25129
        return isSetValid();
25130
      }
25131
      throw new IllegalStateException();
25132
    }
25133
 
25134
    public boolean isSet(int fieldID) {
25135
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25136
    }
25137
 
25138
    @Override
25139
    public boolean equals(Object that) {
25140
      if (that == null)
25141
        return false;
25142
      if (that instanceof getAlerts_args)
25143
        return this.equals((getAlerts_args)that);
25144
      return false;
25145
    }
25146
 
25147
    public boolean equals(getAlerts_args that) {
25148
      if (that == null)
25149
        return false;
25150
 
483 rajveer 25151
      boolean this_present_orderId = true;
25152
      boolean that_present_orderId = true;
25153
      if (this_present_orderId || that_present_orderId) {
25154
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25155
          return false;
483 rajveer 25156
        if (this.orderId != that.orderId)
305 ashish 25157
          return false;
25158
      }
25159
 
25160
      boolean this_present_valid = true;
25161
      boolean that_present_valid = true;
25162
      if (this_present_valid || that_present_valid) {
25163
        if (!(this_present_valid && that_present_valid))
25164
          return false;
25165
        if (this.valid != that.valid)
25166
          return false;
25167
      }
25168
 
25169
      return true;
25170
    }
25171
 
25172
    @Override
25173
    public int hashCode() {
25174
      return 0;
25175
    }
25176
 
25177
    public int compareTo(getAlerts_args other) {
25178
      if (!getClass().equals(other.getClass())) {
25179
        return getClass().getName().compareTo(other.getClass().getName());
25180
      }
25181
 
25182
      int lastComparison = 0;
25183
      getAlerts_args typedOther = (getAlerts_args)other;
25184
 
483 rajveer 25185
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25186
      if (lastComparison != 0) {
25187
        return lastComparison;
25188
      }
483 rajveer 25189
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25190
      if (lastComparison != 0) {
25191
        return lastComparison;
25192
      }
25193
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
25194
      if (lastComparison != 0) {
25195
        return lastComparison;
25196
      }
25197
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
25198
      if (lastComparison != 0) {
25199
        return lastComparison;
25200
      }
25201
      return 0;
25202
    }
25203
 
25204
    public void read(TProtocol iprot) throws TException {
25205
      TField field;
25206
      iprot.readStructBegin();
25207
      while (true)
25208
      {
25209
        field = iprot.readFieldBegin();
25210
        if (field.type == TType.STOP) { 
25211
          break;
25212
        }
25213
        _Fields fieldId = _Fields.findByThriftId(field.id);
25214
        if (fieldId == null) {
25215
          TProtocolUtil.skip(iprot, field.type);
25216
        } else {
25217
          switch (fieldId) {
483 rajveer 25218
            case ORDER_ID:
305 ashish 25219
              if (field.type == TType.I64) {
483 rajveer 25220
                this.orderId = iprot.readI64();
25221
                setOrderIdIsSet(true);
305 ashish 25222
              } else { 
25223
                TProtocolUtil.skip(iprot, field.type);
25224
              }
25225
              break;
25226
            case VALID:
25227
              if (field.type == TType.BOOL) {
25228
                this.valid = iprot.readBool();
25229
                setValidIsSet(true);
25230
              } else { 
25231
                TProtocolUtil.skip(iprot, field.type);
25232
              }
25233
              break;
25234
          }
25235
          iprot.readFieldEnd();
25236
        }
25237
      }
25238
      iprot.readStructEnd();
25239
      validate();
25240
    }
25241
 
25242
    public void write(TProtocol oprot) throws TException {
25243
      validate();
25244
 
25245
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25246
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25247
      oprot.writeI64(this.orderId);
305 ashish 25248
      oprot.writeFieldEnd();
25249
      oprot.writeFieldBegin(VALID_FIELD_DESC);
25250
      oprot.writeBool(this.valid);
25251
      oprot.writeFieldEnd();
25252
      oprot.writeFieldStop();
25253
      oprot.writeStructEnd();
25254
    }
25255
 
25256
    @Override
25257
    public String toString() {
25258
      StringBuilder sb = new StringBuilder("getAlerts_args(");
25259
      boolean first = true;
25260
 
483 rajveer 25261
      sb.append("orderId:");
25262
      sb.append(this.orderId);
305 ashish 25263
      first = false;
25264
      if (!first) sb.append(", ");
25265
      sb.append("valid:");
25266
      sb.append(this.valid);
25267
      first = false;
25268
      sb.append(")");
25269
      return sb.toString();
25270
    }
25271
 
25272
    public void validate() throws TException {
25273
      // check for required fields
25274
    }
25275
 
25276
  }
25277
 
25278
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
25279
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
25280
 
25281
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25282
 
25283
    private List<Alert> success;
25284
 
25285
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25286
    public enum _Fields implements TFieldIdEnum {
25287
      SUCCESS((short)0, "success");
25288
 
25289
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25290
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25291
 
25292
      static {
25293
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25294
          byId.put((int)field._thriftId, field);
25295
          byName.put(field.getFieldName(), field);
25296
        }
25297
      }
25298
 
25299
      /**
25300
       * Find the _Fields constant that matches fieldId, or null if its not found.
25301
       */
25302
      public static _Fields findByThriftId(int fieldId) {
25303
        return byId.get(fieldId);
25304
      }
25305
 
25306
      /**
25307
       * Find the _Fields constant that matches fieldId, throwing an exception
25308
       * if it is not found.
25309
       */
25310
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25311
        _Fields fields = findByThriftId(fieldId);
25312
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25313
        return fields;
25314
      }
25315
 
25316
      /**
25317
       * Find the _Fields constant that matches name, or null if its not found.
25318
       */
25319
      public static _Fields findByName(String name) {
25320
        return byName.get(name);
25321
      }
25322
 
25323
      private final short _thriftId;
25324
      private final String _fieldName;
25325
 
25326
      _Fields(short thriftId, String fieldName) {
25327
        _thriftId = thriftId;
25328
        _fieldName = fieldName;
25329
      }
25330
 
25331
      public short getThriftFieldId() {
25332
        return _thriftId;
25333
      }
25334
 
25335
      public String getFieldName() {
25336
        return _fieldName;
25337
      }
25338
    }
25339
 
25340
    // isset id assignments
25341
 
25342
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25343
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25344
          new ListMetaData(TType.LIST, 
25345
              new StructMetaData(TType.STRUCT, Alert.class))));
25346
    }});
25347
 
25348
    static {
25349
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
25350
    }
25351
 
25352
    public getAlerts_result() {
25353
    }
25354
 
25355
    public getAlerts_result(
25356
      List<Alert> success)
25357
    {
25358
      this();
25359
      this.success = success;
25360
    }
25361
 
25362
    /**
25363
     * Performs a deep copy on <i>other</i>.
25364
     */
25365
    public getAlerts_result(getAlerts_result other) {
25366
      if (other.isSetSuccess()) {
25367
        List<Alert> __this__success = new ArrayList<Alert>();
25368
        for (Alert other_element : other.success) {
25369
          __this__success.add(new Alert(other_element));
25370
        }
25371
        this.success = __this__success;
25372
      }
25373
    }
25374
 
25375
    public getAlerts_result deepCopy() {
25376
      return new getAlerts_result(this);
25377
    }
25378
 
25379
    @Deprecated
25380
    public getAlerts_result clone() {
25381
      return new getAlerts_result(this);
25382
    }
25383
 
25384
    public int getSuccessSize() {
25385
      return (this.success == null) ? 0 : this.success.size();
25386
    }
25387
 
25388
    public java.util.Iterator<Alert> getSuccessIterator() {
25389
      return (this.success == null) ? null : this.success.iterator();
25390
    }
25391
 
25392
    public void addToSuccess(Alert elem) {
25393
      if (this.success == null) {
25394
        this.success = new ArrayList<Alert>();
25395
      }
25396
      this.success.add(elem);
25397
    }
25398
 
25399
    public List<Alert> getSuccess() {
25400
      return this.success;
25401
    }
25402
 
25403
    public getAlerts_result setSuccess(List<Alert> success) {
25404
      this.success = success;
25405
      return this;
25406
    }
25407
 
25408
    public void unsetSuccess() {
25409
      this.success = null;
25410
    }
25411
 
25412
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25413
    public boolean isSetSuccess() {
25414
      return this.success != null;
25415
    }
25416
 
25417
    public void setSuccessIsSet(boolean value) {
25418
      if (!value) {
25419
        this.success = null;
25420
      }
25421
    }
25422
 
25423
    public void setFieldValue(_Fields field, Object value) {
25424
      switch (field) {
25425
      case SUCCESS:
25426
        if (value == null) {
25427
          unsetSuccess();
25428
        } else {
25429
          setSuccess((List<Alert>)value);
25430
        }
25431
        break;
25432
 
25433
      }
25434
    }
25435
 
25436
    public void setFieldValue(int fieldID, Object value) {
25437
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25438
    }
25439
 
25440
    public Object getFieldValue(_Fields field) {
25441
      switch (field) {
25442
      case SUCCESS:
25443
        return getSuccess();
25444
 
25445
      }
25446
      throw new IllegalStateException();
25447
    }
25448
 
25449
    public Object getFieldValue(int fieldId) {
25450
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25451
    }
25452
 
25453
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25454
    public boolean isSet(_Fields field) {
25455
      switch (field) {
25456
      case SUCCESS:
25457
        return isSetSuccess();
25458
      }
25459
      throw new IllegalStateException();
25460
    }
25461
 
25462
    public boolean isSet(int fieldID) {
25463
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25464
    }
25465
 
25466
    @Override
25467
    public boolean equals(Object that) {
25468
      if (that == null)
25469
        return false;
25470
      if (that instanceof getAlerts_result)
25471
        return this.equals((getAlerts_result)that);
25472
      return false;
25473
    }
25474
 
25475
    public boolean equals(getAlerts_result that) {
25476
      if (that == null)
25477
        return false;
25478
 
25479
      boolean this_present_success = true && this.isSetSuccess();
25480
      boolean that_present_success = true && that.isSetSuccess();
25481
      if (this_present_success || that_present_success) {
25482
        if (!(this_present_success && that_present_success))
25483
          return false;
25484
        if (!this.success.equals(that.success))
25485
          return false;
25486
      }
25487
 
25488
      return true;
25489
    }
25490
 
25491
    @Override
25492
    public int hashCode() {
25493
      return 0;
25494
    }
25495
 
25496
    public int compareTo(getAlerts_result other) {
25497
      if (!getClass().equals(other.getClass())) {
25498
        return getClass().getName().compareTo(other.getClass().getName());
25499
      }
25500
 
25501
      int lastComparison = 0;
25502
      getAlerts_result typedOther = (getAlerts_result)other;
25503
 
25504
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25505
      if (lastComparison != 0) {
25506
        return lastComparison;
25507
      }
25508
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25509
      if (lastComparison != 0) {
25510
        return lastComparison;
25511
      }
25512
      return 0;
25513
    }
25514
 
25515
    public void read(TProtocol iprot) throws TException {
25516
      TField field;
25517
      iprot.readStructBegin();
25518
      while (true)
25519
      {
25520
        field = iprot.readFieldBegin();
25521
        if (field.type == TType.STOP) { 
25522
          break;
25523
        }
25524
        _Fields fieldId = _Fields.findByThriftId(field.id);
25525
        if (fieldId == null) {
25526
          TProtocolUtil.skip(iprot, field.type);
25527
        } else {
25528
          switch (fieldId) {
25529
            case SUCCESS:
25530
              if (field.type == TType.LIST) {
25531
                {
1406 ankur.sing 25532
                  TList _list76 = iprot.readListBegin();
25533
                  this.success = new ArrayList<Alert>(_list76.size);
25534
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 25535
                  {
1406 ankur.sing 25536
                    Alert _elem78;
25537
                    _elem78 = new Alert();
25538
                    _elem78.read(iprot);
25539
                    this.success.add(_elem78);
305 ashish 25540
                  }
25541
                  iprot.readListEnd();
25542
                }
25543
              } else { 
25544
                TProtocolUtil.skip(iprot, field.type);
25545
              }
25546
              break;
25547
          }
25548
          iprot.readFieldEnd();
25549
        }
25550
      }
25551
      iprot.readStructEnd();
25552
      validate();
25553
    }
25554
 
25555
    public void write(TProtocol oprot) throws TException {
25556
      oprot.writeStructBegin(STRUCT_DESC);
25557
 
25558
      if (this.isSetSuccess()) {
25559
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25560
        {
25561
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 25562
          for (Alert _iter79 : this.success)
305 ashish 25563
          {
1406 ankur.sing 25564
            _iter79.write(oprot);
305 ashish 25565
          }
25566
          oprot.writeListEnd();
25567
        }
25568
        oprot.writeFieldEnd();
25569
      }
25570
      oprot.writeFieldStop();
25571
      oprot.writeStructEnd();
25572
    }
25573
 
25574
    @Override
25575
    public String toString() {
25576
      StringBuilder sb = new StringBuilder("getAlerts_result(");
25577
      boolean first = true;
25578
 
25579
      sb.append("success:");
25580
      if (this.success == null) {
25581
        sb.append("null");
25582
      } else {
25583
        sb.append(this.success);
25584
      }
25585
      first = false;
25586
      sb.append(")");
25587
      return sb.toString();
25588
    }
25589
 
25590
    public void validate() throws TException {
25591
      // check for required fields
25592
    }
25593
 
25594
  }
25595
 
25596
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
25597
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
25598
 
483 rajveer 25599
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25600
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
25601
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
25602
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
25603
 
483 rajveer 25604
    private long orderId;
305 ashish 25605
    private boolean unset;
25606
    private long type;
25607
    private String comment;
25608
 
25609
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25610
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25611
      ORDER_ID((short)1, "orderId"),
305 ashish 25612
      UNSET((short)2, "unset"),
25613
      TYPE((short)3, "type"),
25614
      COMMENT((short)4, "comment");
25615
 
25616
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25617
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25618
 
25619
      static {
25620
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25621
          byId.put((int)field._thriftId, field);
25622
          byName.put(field.getFieldName(), field);
25623
        }
25624
      }
25625
 
25626
      /**
25627
       * Find the _Fields constant that matches fieldId, or null if its not found.
25628
       */
25629
      public static _Fields findByThriftId(int fieldId) {
25630
        return byId.get(fieldId);
25631
      }
25632
 
25633
      /**
25634
       * Find the _Fields constant that matches fieldId, throwing an exception
25635
       * if it is not found.
25636
       */
25637
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25638
        _Fields fields = findByThriftId(fieldId);
25639
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25640
        return fields;
25641
      }
25642
 
25643
      /**
25644
       * Find the _Fields constant that matches name, or null if its not found.
25645
       */
25646
      public static _Fields findByName(String name) {
25647
        return byName.get(name);
25648
      }
25649
 
25650
      private final short _thriftId;
25651
      private final String _fieldName;
25652
 
25653
      _Fields(short thriftId, String fieldName) {
25654
        _thriftId = thriftId;
25655
        _fieldName = fieldName;
25656
      }
25657
 
25658
      public short getThriftFieldId() {
25659
        return _thriftId;
25660
      }
25661
 
25662
      public String getFieldName() {
25663
        return _fieldName;
25664
      }
25665
    }
25666
 
25667
    // isset id assignments
483 rajveer 25668
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25669
    private static final int __UNSET_ISSET_ID = 1;
25670
    private static final int __TYPE_ISSET_ID = 2;
25671
    private BitSet __isset_bit_vector = new BitSet(3);
25672
 
25673
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25674
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25675
          new FieldValueMetaData(TType.I64)));
25676
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
25677
          new FieldValueMetaData(TType.BOOL)));
25678
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
25679
          new FieldValueMetaData(TType.I64)));
25680
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
25681
          new FieldValueMetaData(TType.STRING)));
25682
    }});
25683
 
25684
    static {
25685
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
25686
    }
25687
 
25688
    public setAlert_args() {
25689
    }
25690
 
25691
    public setAlert_args(
483 rajveer 25692
      long orderId,
305 ashish 25693
      boolean unset,
25694
      long type,
25695
      String comment)
25696
    {
25697
      this();
483 rajveer 25698
      this.orderId = orderId;
25699
      setOrderIdIsSet(true);
305 ashish 25700
      this.unset = unset;
25701
      setUnsetIsSet(true);
25702
      this.type = type;
25703
      setTypeIsSet(true);
25704
      this.comment = comment;
25705
    }
25706
 
25707
    /**
25708
     * Performs a deep copy on <i>other</i>.
25709
     */
25710
    public setAlert_args(setAlert_args other) {
25711
      __isset_bit_vector.clear();
25712
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25713
      this.orderId = other.orderId;
305 ashish 25714
      this.unset = other.unset;
25715
      this.type = other.type;
25716
      if (other.isSetComment()) {
25717
        this.comment = other.comment;
25718
      }
25719
    }
25720
 
25721
    public setAlert_args deepCopy() {
25722
      return new setAlert_args(this);
25723
    }
25724
 
25725
    @Deprecated
25726
    public setAlert_args clone() {
25727
      return new setAlert_args(this);
25728
    }
25729
 
483 rajveer 25730
    public long getOrderId() {
25731
      return this.orderId;
305 ashish 25732
    }
25733
 
483 rajveer 25734
    public setAlert_args setOrderId(long orderId) {
25735
      this.orderId = orderId;
25736
      setOrderIdIsSet(true);
305 ashish 25737
      return this;
25738
    }
25739
 
483 rajveer 25740
    public void unsetOrderId() {
25741
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25742
    }
25743
 
483 rajveer 25744
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25745
    public boolean isSetOrderId() {
25746
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25747
    }
25748
 
483 rajveer 25749
    public void setOrderIdIsSet(boolean value) {
25750
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25751
    }
25752
 
25753
    public boolean isUnset() {
25754
      return this.unset;
25755
    }
25756
 
25757
    public setAlert_args setUnset(boolean unset) {
25758
      this.unset = unset;
25759
      setUnsetIsSet(true);
25760
      return this;
25761
    }
25762
 
25763
    public void unsetUnset() {
25764
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
25765
    }
25766
 
25767
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
25768
    public boolean isSetUnset() {
25769
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
25770
    }
25771
 
25772
    public void setUnsetIsSet(boolean value) {
25773
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
25774
    }
25775
 
25776
    public long getType() {
25777
      return this.type;
25778
    }
25779
 
25780
    public setAlert_args setType(long type) {
25781
      this.type = type;
25782
      setTypeIsSet(true);
25783
      return this;
25784
    }
25785
 
25786
    public void unsetType() {
25787
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
25788
    }
25789
 
25790
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
25791
    public boolean isSetType() {
25792
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
25793
    }
25794
 
25795
    public void setTypeIsSet(boolean value) {
25796
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
25797
    }
25798
 
25799
    public String getComment() {
25800
      return this.comment;
25801
    }
25802
 
25803
    public setAlert_args setComment(String comment) {
25804
      this.comment = comment;
25805
      return this;
25806
    }
25807
 
25808
    public void unsetComment() {
25809
      this.comment = null;
25810
    }
25811
 
25812
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
25813
    public boolean isSetComment() {
25814
      return this.comment != null;
25815
    }
25816
 
25817
    public void setCommentIsSet(boolean value) {
25818
      if (!value) {
25819
        this.comment = null;
25820
      }
25821
    }
25822
 
25823
    public void setFieldValue(_Fields field, Object value) {
25824
      switch (field) {
483 rajveer 25825
      case ORDER_ID:
305 ashish 25826
        if (value == null) {
483 rajveer 25827
          unsetOrderId();
305 ashish 25828
        } else {
483 rajveer 25829
          setOrderId((Long)value);
305 ashish 25830
        }
25831
        break;
25832
 
25833
      case UNSET:
25834
        if (value == null) {
25835
          unsetUnset();
25836
        } else {
25837
          setUnset((Boolean)value);
25838
        }
25839
        break;
25840
 
25841
      case TYPE:
25842
        if (value == null) {
25843
          unsetType();
25844
        } else {
25845
          setType((Long)value);
25846
        }
25847
        break;
25848
 
25849
      case COMMENT:
25850
        if (value == null) {
25851
          unsetComment();
25852
        } else {
25853
          setComment((String)value);
25854
        }
25855
        break;
25856
 
25857
      }
25858
    }
25859
 
25860
    public void setFieldValue(int fieldID, Object value) {
25861
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25862
    }
25863
 
25864
    public Object getFieldValue(_Fields field) {
25865
      switch (field) {
483 rajveer 25866
      case ORDER_ID:
25867
        return new Long(getOrderId());
305 ashish 25868
 
25869
      case UNSET:
25870
        return new Boolean(isUnset());
25871
 
25872
      case TYPE:
25873
        return new Long(getType());
25874
 
25875
      case COMMENT:
25876
        return getComment();
25877
 
25878
      }
25879
      throw new IllegalStateException();
25880
    }
25881
 
25882
    public Object getFieldValue(int fieldId) {
25883
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25884
    }
25885
 
25886
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25887
    public boolean isSet(_Fields field) {
25888
      switch (field) {
483 rajveer 25889
      case ORDER_ID:
25890
        return isSetOrderId();
305 ashish 25891
      case UNSET:
25892
        return isSetUnset();
25893
      case TYPE:
25894
        return isSetType();
25895
      case COMMENT:
25896
        return isSetComment();
25897
      }
25898
      throw new IllegalStateException();
25899
    }
25900
 
25901
    public boolean isSet(int fieldID) {
25902
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25903
    }
25904
 
25905
    @Override
25906
    public boolean equals(Object that) {
25907
      if (that == null)
25908
        return false;
25909
      if (that instanceof setAlert_args)
25910
        return this.equals((setAlert_args)that);
25911
      return false;
25912
    }
25913
 
25914
    public boolean equals(setAlert_args that) {
25915
      if (that == null)
25916
        return false;
25917
 
483 rajveer 25918
      boolean this_present_orderId = true;
25919
      boolean that_present_orderId = true;
25920
      if (this_present_orderId || that_present_orderId) {
25921
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25922
          return false;
483 rajveer 25923
        if (this.orderId != that.orderId)
305 ashish 25924
          return false;
25925
      }
25926
 
25927
      boolean this_present_unset = true;
25928
      boolean that_present_unset = true;
25929
      if (this_present_unset || that_present_unset) {
25930
        if (!(this_present_unset && that_present_unset))
25931
          return false;
25932
        if (this.unset != that.unset)
25933
          return false;
25934
      }
25935
 
25936
      boolean this_present_type = true;
25937
      boolean that_present_type = true;
25938
      if (this_present_type || that_present_type) {
25939
        if (!(this_present_type && that_present_type))
25940
          return false;
25941
        if (this.type != that.type)
25942
          return false;
25943
      }
25944
 
25945
      boolean this_present_comment = true && this.isSetComment();
25946
      boolean that_present_comment = true && that.isSetComment();
25947
      if (this_present_comment || that_present_comment) {
25948
        if (!(this_present_comment && that_present_comment))
25949
          return false;
25950
        if (!this.comment.equals(that.comment))
25951
          return false;
25952
      }
25953
 
25954
      return true;
25955
    }
25956
 
25957
    @Override
25958
    public int hashCode() {
25959
      return 0;
25960
    }
25961
 
25962
    public int compareTo(setAlert_args other) {
25963
      if (!getClass().equals(other.getClass())) {
25964
        return getClass().getName().compareTo(other.getClass().getName());
25965
      }
25966
 
25967
      int lastComparison = 0;
25968
      setAlert_args typedOther = (setAlert_args)other;
25969
 
483 rajveer 25970
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25971
      if (lastComparison != 0) {
25972
        return lastComparison;
25973
      }
483 rajveer 25974
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25975
      if (lastComparison != 0) {
25976
        return lastComparison;
25977
      }
25978
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
25979
      if (lastComparison != 0) {
25980
        return lastComparison;
25981
      }
25982
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
25983
      if (lastComparison != 0) {
25984
        return lastComparison;
25985
      }
25986
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
25987
      if (lastComparison != 0) {
25988
        return lastComparison;
25989
      }
25990
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
25991
      if (lastComparison != 0) {
25992
        return lastComparison;
25993
      }
25994
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
25995
      if (lastComparison != 0) {
25996
        return lastComparison;
25997
      }
25998
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
25999
      if (lastComparison != 0) {
26000
        return lastComparison;
26001
      }
26002
      return 0;
26003
    }
26004
 
26005
    public void read(TProtocol iprot) throws TException {
26006
      TField field;
26007
      iprot.readStructBegin();
26008
      while (true)
26009
      {
26010
        field = iprot.readFieldBegin();
26011
        if (field.type == TType.STOP) { 
26012
          break;
26013
        }
26014
        _Fields fieldId = _Fields.findByThriftId(field.id);
26015
        if (fieldId == null) {
26016
          TProtocolUtil.skip(iprot, field.type);
26017
        } else {
26018
          switch (fieldId) {
483 rajveer 26019
            case ORDER_ID:
305 ashish 26020
              if (field.type == TType.I64) {
483 rajveer 26021
                this.orderId = iprot.readI64();
26022
                setOrderIdIsSet(true);
305 ashish 26023
              } else { 
26024
                TProtocolUtil.skip(iprot, field.type);
26025
              }
26026
              break;
26027
            case UNSET:
26028
              if (field.type == TType.BOOL) {
26029
                this.unset = iprot.readBool();
26030
                setUnsetIsSet(true);
26031
              } else { 
26032
                TProtocolUtil.skip(iprot, field.type);
26033
              }
26034
              break;
26035
            case TYPE:
26036
              if (field.type == TType.I64) {
26037
                this.type = iprot.readI64();
26038
                setTypeIsSet(true);
26039
              } else { 
26040
                TProtocolUtil.skip(iprot, field.type);
26041
              }
26042
              break;
26043
            case COMMENT:
26044
              if (field.type == TType.STRING) {
26045
                this.comment = iprot.readString();
26046
              } else { 
26047
                TProtocolUtil.skip(iprot, field.type);
26048
              }
26049
              break;
26050
          }
26051
          iprot.readFieldEnd();
26052
        }
26053
      }
26054
      iprot.readStructEnd();
26055
      validate();
26056
    }
26057
 
26058
    public void write(TProtocol oprot) throws TException {
26059
      validate();
26060
 
26061
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 26062
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
26063
      oprot.writeI64(this.orderId);
305 ashish 26064
      oprot.writeFieldEnd();
26065
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
26066
      oprot.writeBool(this.unset);
26067
      oprot.writeFieldEnd();
26068
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
26069
      oprot.writeI64(this.type);
26070
      oprot.writeFieldEnd();
26071
      if (this.comment != null) {
26072
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
26073
        oprot.writeString(this.comment);
26074
        oprot.writeFieldEnd();
26075
      }
26076
      oprot.writeFieldStop();
26077
      oprot.writeStructEnd();
26078
    }
26079
 
26080
    @Override
26081
    public String toString() {
26082
      StringBuilder sb = new StringBuilder("setAlert_args(");
26083
      boolean first = true;
26084
 
483 rajveer 26085
      sb.append("orderId:");
26086
      sb.append(this.orderId);
305 ashish 26087
      first = false;
26088
      if (!first) sb.append(", ");
26089
      sb.append("unset:");
26090
      sb.append(this.unset);
26091
      first = false;
26092
      if (!first) sb.append(", ");
26093
      sb.append("type:");
26094
      sb.append(this.type);
26095
      first = false;
26096
      if (!first) sb.append(", ");
26097
      sb.append("comment:");
26098
      if (this.comment == null) {
26099
        sb.append("null");
26100
      } else {
26101
        sb.append(this.comment);
26102
      }
26103
      first = false;
26104
      sb.append(")");
26105
      return sb.toString();
26106
    }
26107
 
26108
    public void validate() throws TException {
26109
      // check for required fields
26110
    }
26111
 
26112
  }
26113
 
26114
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
26115
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
26116
 
26117
 
26118
 
26119
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26120
    public enum _Fields implements TFieldIdEnum {
26121
;
26122
 
26123
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26124
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26125
 
26126
      static {
26127
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26128
          byId.put((int)field._thriftId, field);
26129
          byName.put(field.getFieldName(), field);
26130
        }
26131
      }
26132
 
26133
      /**
26134
       * Find the _Fields constant that matches fieldId, or null if its not found.
26135
       */
26136
      public static _Fields findByThriftId(int fieldId) {
26137
        return byId.get(fieldId);
26138
      }
26139
 
26140
      /**
26141
       * Find the _Fields constant that matches fieldId, throwing an exception
26142
       * if it is not found.
26143
       */
26144
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26145
        _Fields fields = findByThriftId(fieldId);
26146
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26147
        return fields;
26148
      }
26149
 
26150
      /**
26151
       * Find the _Fields constant that matches name, or null if its not found.
26152
       */
26153
      public static _Fields findByName(String name) {
26154
        return byName.get(name);
26155
      }
26156
 
26157
      private final short _thriftId;
26158
      private final String _fieldName;
26159
 
26160
      _Fields(short thriftId, String fieldName) {
26161
        _thriftId = thriftId;
26162
        _fieldName = fieldName;
26163
      }
26164
 
26165
      public short getThriftFieldId() {
26166
        return _thriftId;
26167
      }
26168
 
26169
      public String getFieldName() {
26170
        return _fieldName;
26171
      }
26172
    }
26173
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26174
    }});
26175
 
26176
    static {
26177
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
26178
    }
26179
 
26180
    public setAlert_result() {
26181
    }
26182
 
26183
    /**
26184
     * Performs a deep copy on <i>other</i>.
26185
     */
26186
    public setAlert_result(setAlert_result other) {
26187
    }
26188
 
26189
    public setAlert_result deepCopy() {
26190
      return new setAlert_result(this);
26191
    }
26192
 
26193
    @Deprecated
26194
    public setAlert_result clone() {
26195
      return new setAlert_result(this);
26196
    }
26197
 
26198
    public void setFieldValue(_Fields field, Object value) {
26199
      switch (field) {
26200
      }
26201
    }
26202
 
26203
    public void setFieldValue(int fieldID, Object value) {
26204
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26205
    }
26206
 
26207
    public Object getFieldValue(_Fields field) {
26208
      switch (field) {
26209
      }
26210
      throw new IllegalStateException();
26211
    }
26212
 
26213
    public Object getFieldValue(int fieldId) {
26214
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26215
    }
26216
 
26217
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26218
    public boolean isSet(_Fields field) {
26219
      switch (field) {
26220
      }
26221
      throw new IllegalStateException();
26222
    }
26223
 
26224
    public boolean isSet(int fieldID) {
26225
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26226
    }
26227
 
26228
    @Override
26229
    public boolean equals(Object that) {
26230
      if (that == null)
26231
        return false;
26232
      if (that instanceof setAlert_result)
26233
        return this.equals((setAlert_result)that);
26234
      return false;
26235
    }
26236
 
26237
    public boolean equals(setAlert_result that) {
26238
      if (that == null)
26239
        return false;
26240
 
26241
      return true;
26242
    }
26243
 
26244
    @Override
26245
    public int hashCode() {
26246
      return 0;
26247
    }
26248
 
26249
    public int compareTo(setAlert_result other) {
26250
      if (!getClass().equals(other.getClass())) {
26251
        return getClass().getName().compareTo(other.getClass().getName());
26252
      }
26253
 
26254
      int lastComparison = 0;
26255
      setAlert_result typedOther = (setAlert_result)other;
26256
 
26257
      return 0;
26258
    }
26259
 
26260
    public void read(TProtocol iprot) throws TException {
26261
      TField field;
26262
      iprot.readStructBegin();
26263
      while (true)
26264
      {
26265
        field = iprot.readFieldBegin();
26266
        if (field.type == TType.STOP) { 
26267
          break;
26268
        }
26269
        _Fields fieldId = _Fields.findByThriftId(field.id);
26270
        if (fieldId == null) {
26271
          TProtocolUtil.skip(iprot, field.type);
26272
        } else {
26273
          switch (fieldId) {
26274
          }
26275
          iprot.readFieldEnd();
26276
        }
26277
      }
26278
      iprot.readStructEnd();
26279
      validate();
26280
    }
26281
 
26282
    public void write(TProtocol oprot) throws TException {
26283
      oprot.writeStructBegin(STRUCT_DESC);
26284
 
26285
      oprot.writeFieldStop();
26286
      oprot.writeStructEnd();
26287
    }
26288
 
26289
    @Override
26290
    public String toString() {
26291
      StringBuilder sb = new StringBuilder("setAlert_result(");
26292
      boolean first = true;
26293
 
26294
      sb.append(")");
26295
      return sb.toString();
26296
    }
26297
 
26298
    public void validate() throws TException {
26299
      // check for required fields
26300
    }
26301
 
26302
  }
26303
 
1598 ankur.sing 26304
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
26305
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
26306
 
26307
 
26308
 
26309
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26310
    public enum _Fields implements TFieldIdEnum {
26311
;
26312
 
26313
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26314
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26315
 
26316
      static {
26317
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26318
          byId.put((int)field._thriftId, field);
26319
          byName.put(field.getFieldName(), field);
26320
        }
26321
      }
26322
 
26323
      /**
26324
       * Find the _Fields constant that matches fieldId, or null if its not found.
26325
       */
26326
      public static _Fields findByThriftId(int fieldId) {
26327
        return byId.get(fieldId);
26328
      }
26329
 
26330
      /**
26331
       * Find the _Fields constant that matches fieldId, throwing an exception
26332
       * if it is not found.
26333
       */
26334
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26335
        _Fields fields = findByThriftId(fieldId);
26336
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26337
        return fields;
26338
      }
26339
 
26340
      /**
26341
       * Find the _Fields constant that matches name, or null if its not found.
26342
       */
26343
      public static _Fields findByName(String name) {
26344
        return byName.get(name);
26345
      }
26346
 
26347
      private final short _thriftId;
26348
      private final String _fieldName;
26349
 
26350
      _Fields(short thriftId, String fieldName) {
26351
        _thriftId = thriftId;
26352
        _fieldName = fieldName;
26353
      }
26354
 
26355
      public short getThriftFieldId() {
26356
        return _thriftId;
26357
      }
26358
 
26359
      public String getFieldName() {
26360
        return _fieldName;
26361
      }
26362
    }
26363
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26364
    }});
26365
 
26366
    static {
26367
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
26368
    }
26369
 
26370
    public getValidOrderCount_args() {
26371
    }
26372
 
26373
    /**
26374
     * Performs a deep copy on <i>other</i>.
26375
     */
26376
    public getValidOrderCount_args(getValidOrderCount_args other) {
26377
    }
26378
 
26379
    public getValidOrderCount_args deepCopy() {
26380
      return new getValidOrderCount_args(this);
26381
    }
26382
 
26383
    @Deprecated
26384
    public getValidOrderCount_args clone() {
26385
      return new getValidOrderCount_args(this);
26386
    }
26387
 
26388
    public void setFieldValue(_Fields field, Object value) {
26389
      switch (field) {
26390
      }
26391
    }
26392
 
26393
    public void setFieldValue(int fieldID, Object value) {
26394
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26395
    }
26396
 
26397
    public Object getFieldValue(_Fields field) {
26398
      switch (field) {
26399
      }
26400
      throw new IllegalStateException();
26401
    }
26402
 
26403
    public Object getFieldValue(int fieldId) {
26404
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26405
    }
26406
 
26407
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26408
    public boolean isSet(_Fields field) {
26409
      switch (field) {
26410
      }
26411
      throw new IllegalStateException();
26412
    }
26413
 
26414
    public boolean isSet(int fieldID) {
26415
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26416
    }
26417
 
26418
    @Override
26419
    public boolean equals(Object that) {
26420
      if (that == null)
26421
        return false;
26422
      if (that instanceof getValidOrderCount_args)
26423
        return this.equals((getValidOrderCount_args)that);
26424
      return false;
26425
    }
26426
 
26427
    public boolean equals(getValidOrderCount_args that) {
26428
      if (that == null)
26429
        return false;
26430
 
26431
      return true;
26432
    }
26433
 
26434
    @Override
26435
    public int hashCode() {
26436
      return 0;
26437
    }
26438
 
26439
    public int compareTo(getValidOrderCount_args other) {
26440
      if (!getClass().equals(other.getClass())) {
26441
        return getClass().getName().compareTo(other.getClass().getName());
26442
      }
26443
 
26444
      int lastComparison = 0;
26445
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
26446
 
26447
      return 0;
26448
    }
26449
 
26450
    public void read(TProtocol iprot) throws TException {
26451
      TField field;
26452
      iprot.readStructBegin();
26453
      while (true)
26454
      {
26455
        field = iprot.readFieldBegin();
26456
        if (field.type == TType.STOP) { 
26457
          break;
26458
        }
26459
        _Fields fieldId = _Fields.findByThriftId(field.id);
26460
        if (fieldId == null) {
26461
          TProtocolUtil.skip(iprot, field.type);
26462
        } else {
26463
          switch (fieldId) {
26464
          }
26465
          iprot.readFieldEnd();
26466
        }
26467
      }
26468
      iprot.readStructEnd();
26469
      validate();
26470
    }
26471
 
26472
    public void write(TProtocol oprot) throws TException {
26473
      validate();
26474
 
26475
      oprot.writeStructBegin(STRUCT_DESC);
26476
      oprot.writeFieldStop();
26477
      oprot.writeStructEnd();
26478
    }
26479
 
26480
    @Override
26481
    public String toString() {
26482
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
26483
      boolean first = true;
26484
 
26485
      sb.append(")");
26486
      return sb.toString();
26487
    }
26488
 
26489
    public void validate() throws TException {
26490
      // check for required fields
26491
    }
26492
 
26493
  }
26494
 
26495
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
26496
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
26497
 
26498
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26499
 
26500
    private long success;
26501
 
26502
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26503
    public enum _Fields implements TFieldIdEnum {
26504
      SUCCESS((short)0, "success");
26505
 
26506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26508
 
26509
      static {
26510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26511
          byId.put((int)field._thriftId, field);
26512
          byName.put(field.getFieldName(), field);
26513
        }
26514
      }
26515
 
26516
      /**
26517
       * Find the _Fields constant that matches fieldId, or null if its not found.
26518
       */
26519
      public static _Fields findByThriftId(int fieldId) {
26520
        return byId.get(fieldId);
26521
      }
26522
 
26523
      /**
26524
       * Find the _Fields constant that matches fieldId, throwing an exception
26525
       * if it is not found.
26526
       */
26527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26528
        _Fields fields = findByThriftId(fieldId);
26529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26530
        return fields;
26531
      }
26532
 
26533
      /**
26534
       * Find the _Fields constant that matches name, or null if its not found.
26535
       */
26536
      public static _Fields findByName(String name) {
26537
        return byName.get(name);
26538
      }
26539
 
26540
      private final short _thriftId;
26541
      private final String _fieldName;
26542
 
26543
      _Fields(short thriftId, String fieldName) {
26544
        _thriftId = thriftId;
26545
        _fieldName = fieldName;
26546
      }
26547
 
26548
      public short getThriftFieldId() {
26549
        return _thriftId;
26550
      }
26551
 
26552
      public String getFieldName() {
26553
        return _fieldName;
26554
      }
26555
    }
26556
 
26557
    // isset id assignments
26558
    private static final int __SUCCESS_ISSET_ID = 0;
26559
    private BitSet __isset_bit_vector = new BitSet(1);
26560
 
26561
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26562
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26563
          new FieldValueMetaData(TType.I64)));
26564
    }});
26565
 
26566
    static {
26567
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
26568
    }
26569
 
26570
    public getValidOrderCount_result() {
26571
    }
26572
 
26573
    public getValidOrderCount_result(
26574
      long success)
26575
    {
26576
      this();
26577
      this.success = success;
26578
      setSuccessIsSet(true);
26579
    }
26580
 
26581
    /**
26582
     * Performs a deep copy on <i>other</i>.
26583
     */
26584
    public getValidOrderCount_result(getValidOrderCount_result other) {
26585
      __isset_bit_vector.clear();
26586
      __isset_bit_vector.or(other.__isset_bit_vector);
26587
      this.success = other.success;
26588
    }
26589
 
26590
    public getValidOrderCount_result deepCopy() {
26591
      return new getValidOrderCount_result(this);
26592
    }
26593
 
26594
    @Deprecated
26595
    public getValidOrderCount_result clone() {
26596
      return new getValidOrderCount_result(this);
26597
    }
26598
 
26599
    public long getSuccess() {
26600
      return this.success;
26601
    }
26602
 
26603
    public getValidOrderCount_result setSuccess(long success) {
26604
      this.success = success;
26605
      setSuccessIsSet(true);
26606
      return this;
26607
    }
26608
 
26609
    public void unsetSuccess() {
26610
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26611
    }
26612
 
26613
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26614
    public boolean isSetSuccess() {
26615
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26616
    }
26617
 
26618
    public void setSuccessIsSet(boolean value) {
26619
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26620
    }
26621
 
26622
    public void setFieldValue(_Fields field, Object value) {
26623
      switch (field) {
26624
      case SUCCESS:
26625
        if (value == null) {
26626
          unsetSuccess();
26627
        } else {
26628
          setSuccess((Long)value);
26629
        }
26630
        break;
26631
 
26632
      }
26633
    }
26634
 
26635
    public void setFieldValue(int fieldID, Object value) {
26636
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26637
    }
26638
 
26639
    public Object getFieldValue(_Fields field) {
26640
      switch (field) {
26641
      case SUCCESS:
26642
        return new Long(getSuccess());
26643
 
26644
      }
26645
      throw new IllegalStateException();
26646
    }
26647
 
26648
    public Object getFieldValue(int fieldId) {
26649
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26650
    }
26651
 
26652
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26653
    public boolean isSet(_Fields field) {
26654
      switch (field) {
26655
      case SUCCESS:
26656
        return isSetSuccess();
26657
      }
26658
      throw new IllegalStateException();
26659
    }
26660
 
26661
    public boolean isSet(int fieldID) {
26662
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26663
    }
26664
 
26665
    @Override
26666
    public boolean equals(Object that) {
26667
      if (that == null)
26668
        return false;
26669
      if (that instanceof getValidOrderCount_result)
26670
        return this.equals((getValidOrderCount_result)that);
26671
      return false;
26672
    }
26673
 
26674
    public boolean equals(getValidOrderCount_result that) {
26675
      if (that == null)
26676
        return false;
26677
 
26678
      boolean this_present_success = true;
26679
      boolean that_present_success = true;
26680
      if (this_present_success || that_present_success) {
26681
        if (!(this_present_success && that_present_success))
26682
          return false;
26683
        if (this.success != that.success)
26684
          return false;
26685
      }
26686
 
26687
      return true;
26688
    }
26689
 
26690
    @Override
26691
    public int hashCode() {
26692
      return 0;
26693
    }
26694
 
26695
    public int compareTo(getValidOrderCount_result other) {
26696
      if (!getClass().equals(other.getClass())) {
26697
        return getClass().getName().compareTo(other.getClass().getName());
26698
      }
26699
 
26700
      int lastComparison = 0;
26701
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
26702
 
26703
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26704
      if (lastComparison != 0) {
26705
        return lastComparison;
26706
      }
26707
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26708
      if (lastComparison != 0) {
26709
        return lastComparison;
26710
      }
26711
      return 0;
26712
    }
26713
 
26714
    public void read(TProtocol iprot) throws TException {
26715
      TField field;
26716
      iprot.readStructBegin();
26717
      while (true)
26718
      {
26719
        field = iprot.readFieldBegin();
26720
        if (field.type == TType.STOP) { 
26721
          break;
26722
        }
26723
        _Fields fieldId = _Fields.findByThriftId(field.id);
26724
        if (fieldId == null) {
26725
          TProtocolUtil.skip(iprot, field.type);
26726
        } else {
26727
          switch (fieldId) {
26728
            case SUCCESS:
26729
              if (field.type == TType.I64) {
26730
                this.success = iprot.readI64();
26731
                setSuccessIsSet(true);
26732
              } else { 
26733
                TProtocolUtil.skip(iprot, field.type);
26734
              }
26735
              break;
26736
          }
26737
          iprot.readFieldEnd();
26738
        }
26739
      }
26740
      iprot.readStructEnd();
26741
      validate();
26742
    }
26743
 
26744
    public void write(TProtocol oprot) throws TException {
26745
      oprot.writeStructBegin(STRUCT_DESC);
26746
 
26747
      if (this.isSetSuccess()) {
26748
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26749
        oprot.writeI64(this.success);
26750
        oprot.writeFieldEnd();
26751
      }
26752
      oprot.writeFieldStop();
26753
      oprot.writeStructEnd();
26754
    }
26755
 
26756
    @Override
26757
    public String toString() {
26758
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
26759
      boolean first = true;
26760
 
26761
      sb.append("success:");
26762
      sb.append(this.success);
26763
      first = false;
26764
      sb.append(")");
26765
      return sb.toString();
26766
    }
26767
 
26768
    public void validate() throws TException {
26769
      // check for required fields
26770
    }
26771
 
26772
  }
26773
 
1629 ankur.sing 26774
  public static class getNoOfCustomersWithSuccessfulTransaction_args implements TBase<getNoOfCustomersWithSuccessfulTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_args>   {
26775
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_args");
26776
 
26777
 
26778
 
26779
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26780
    public enum _Fields implements TFieldIdEnum {
26781
;
26782
 
26783
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26784
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26785
 
26786
      static {
26787
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26788
          byId.put((int)field._thriftId, field);
26789
          byName.put(field.getFieldName(), field);
26790
        }
26791
      }
26792
 
26793
      /**
26794
       * Find the _Fields constant that matches fieldId, or null if its not found.
26795
       */
26796
      public static _Fields findByThriftId(int fieldId) {
26797
        return byId.get(fieldId);
26798
      }
26799
 
26800
      /**
26801
       * Find the _Fields constant that matches fieldId, throwing an exception
26802
       * if it is not found.
26803
       */
26804
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26805
        _Fields fields = findByThriftId(fieldId);
26806
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26807
        return fields;
26808
      }
26809
 
26810
      /**
26811
       * Find the _Fields constant that matches name, or null if its not found.
26812
       */
26813
      public static _Fields findByName(String name) {
26814
        return byName.get(name);
26815
      }
26816
 
26817
      private final short _thriftId;
26818
      private final String _fieldName;
26819
 
26820
      _Fields(short thriftId, String fieldName) {
26821
        _thriftId = thriftId;
26822
        _fieldName = fieldName;
26823
      }
26824
 
26825
      public short getThriftFieldId() {
26826
        return _thriftId;
26827
      }
26828
 
26829
      public String getFieldName() {
26830
        return _fieldName;
26831
      }
26832
    }
26833
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26834
    }});
26835
 
26836
    static {
26837
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_args.class, metaDataMap);
26838
    }
26839
 
26840
    public getNoOfCustomersWithSuccessfulTransaction_args() {
26841
    }
26842
 
26843
    /**
26844
     * Performs a deep copy on <i>other</i>.
26845
     */
26846
    public getNoOfCustomersWithSuccessfulTransaction_args(getNoOfCustomersWithSuccessfulTransaction_args other) {
26847
    }
26848
 
26849
    public getNoOfCustomersWithSuccessfulTransaction_args deepCopy() {
26850
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
26851
    }
26852
 
26853
    @Deprecated
26854
    public getNoOfCustomersWithSuccessfulTransaction_args clone() {
26855
      return new getNoOfCustomersWithSuccessfulTransaction_args(this);
26856
    }
26857
 
26858
    public void setFieldValue(_Fields field, Object value) {
26859
      switch (field) {
26860
      }
26861
    }
26862
 
26863
    public void setFieldValue(int fieldID, Object value) {
26864
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26865
    }
26866
 
26867
    public Object getFieldValue(_Fields field) {
26868
      switch (field) {
26869
      }
26870
      throw new IllegalStateException();
26871
    }
26872
 
26873
    public Object getFieldValue(int fieldId) {
26874
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26875
    }
26876
 
26877
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26878
    public boolean isSet(_Fields field) {
26879
      switch (field) {
26880
      }
26881
      throw new IllegalStateException();
26882
    }
26883
 
26884
    public boolean isSet(int fieldID) {
26885
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26886
    }
26887
 
26888
    @Override
26889
    public boolean equals(Object that) {
26890
      if (that == null)
26891
        return false;
26892
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_args)
26893
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_args)that);
26894
      return false;
26895
    }
26896
 
26897
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_args that) {
26898
      if (that == null)
26899
        return false;
26900
 
26901
      return true;
26902
    }
26903
 
26904
    @Override
26905
    public int hashCode() {
26906
      return 0;
26907
    }
26908
 
26909
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_args other) {
26910
      if (!getClass().equals(other.getClass())) {
26911
        return getClass().getName().compareTo(other.getClass().getName());
26912
      }
26913
 
26914
      int lastComparison = 0;
26915
      getNoOfCustomersWithSuccessfulTransaction_args typedOther = (getNoOfCustomersWithSuccessfulTransaction_args)other;
26916
 
26917
      return 0;
26918
    }
26919
 
26920
    public void read(TProtocol iprot) throws TException {
26921
      TField field;
26922
      iprot.readStructBegin();
26923
      while (true)
26924
      {
26925
        field = iprot.readFieldBegin();
26926
        if (field.type == TType.STOP) { 
26927
          break;
26928
        }
26929
        _Fields fieldId = _Fields.findByThriftId(field.id);
26930
        if (fieldId == null) {
26931
          TProtocolUtil.skip(iprot, field.type);
26932
        } else {
26933
          switch (fieldId) {
26934
          }
26935
          iprot.readFieldEnd();
26936
        }
26937
      }
26938
      iprot.readStructEnd();
26939
      validate();
26940
    }
26941
 
26942
    public void write(TProtocol oprot) throws TException {
26943
      validate();
26944
 
26945
      oprot.writeStructBegin(STRUCT_DESC);
26946
      oprot.writeFieldStop();
26947
      oprot.writeStructEnd();
26948
    }
26949
 
26950
    @Override
26951
    public String toString() {
26952
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_args(");
26953
      boolean first = true;
26954
 
26955
      sb.append(")");
26956
      return sb.toString();
26957
    }
26958
 
26959
    public void validate() throws TException {
26960
      // check for required fields
26961
    }
26962
 
26963
  }
26964
 
26965
  public static class getNoOfCustomersWithSuccessfulTransaction_result implements TBase<getNoOfCustomersWithSuccessfulTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getNoOfCustomersWithSuccessfulTransaction_result>   {
26966
    private static final TStruct STRUCT_DESC = new TStruct("getNoOfCustomersWithSuccessfulTransaction_result");
26967
 
26968
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26969
 
26970
    private long success;
26971
 
26972
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26973
    public enum _Fields implements TFieldIdEnum {
26974
      SUCCESS((short)0, "success");
26975
 
26976
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26977
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26978
 
26979
      static {
26980
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26981
          byId.put((int)field._thriftId, field);
26982
          byName.put(field.getFieldName(), field);
26983
        }
26984
      }
26985
 
26986
      /**
26987
       * Find the _Fields constant that matches fieldId, or null if its not found.
26988
       */
26989
      public static _Fields findByThriftId(int fieldId) {
26990
        return byId.get(fieldId);
26991
      }
26992
 
26993
      /**
26994
       * Find the _Fields constant that matches fieldId, throwing an exception
26995
       * if it is not found.
26996
       */
26997
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26998
        _Fields fields = findByThriftId(fieldId);
26999
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27000
        return fields;
27001
      }
27002
 
27003
      /**
27004
       * Find the _Fields constant that matches name, or null if its not found.
27005
       */
27006
      public static _Fields findByName(String name) {
27007
        return byName.get(name);
27008
      }
27009
 
27010
      private final short _thriftId;
27011
      private final String _fieldName;
27012
 
27013
      _Fields(short thriftId, String fieldName) {
27014
        _thriftId = thriftId;
27015
        _fieldName = fieldName;
27016
      }
27017
 
27018
      public short getThriftFieldId() {
27019
        return _thriftId;
27020
      }
27021
 
27022
      public String getFieldName() {
27023
        return _fieldName;
27024
      }
27025
    }
27026
 
27027
    // isset id assignments
27028
    private static final int __SUCCESS_ISSET_ID = 0;
27029
    private BitSet __isset_bit_vector = new BitSet(1);
27030
 
27031
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27032
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
27033
          new FieldValueMetaData(TType.I64)));
27034
    }});
27035
 
27036
    static {
27037
      FieldMetaData.addStructMetaDataMap(getNoOfCustomersWithSuccessfulTransaction_result.class, metaDataMap);
27038
    }
27039
 
27040
    public getNoOfCustomersWithSuccessfulTransaction_result() {
27041
    }
27042
 
27043
    public getNoOfCustomersWithSuccessfulTransaction_result(
27044
      long success)
27045
    {
27046
      this();
27047
      this.success = success;
27048
      setSuccessIsSet(true);
27049
    }
27050
 
27051
    /**
27052
     * Performs a deep copy on <i>other</i>.
27053
     */
27054
    public getNoOfCustomersWithSuccessfulTransaction_result(getNoOfCustomersWithSuccessfulTransaction_result other) {
27055
      __isset_bit_vector.clear();
27056
      __isset_bit_vector.or(other.__isset_bit_vector);
27057
      this.success = other.success;
27058
    }
27059
 
27060
    public getNoOfCustomersWithSuccessfulTransaction_result deepCopy() {
27061
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27062
    }
27063
 
27064
    @Deprecated
27065
    public getNoOfCustomersWithSuccessfulTransaction_result clone() {
27066
      return new getNoOfCustomersWithSuccessfulTransaction_result(this);
27067
    }
27068
 
27069
    public long getSuccess() {
27070
      return this.success;
27071
    }
27072
 
27073
    public getNoOfCustomersWithSuccessfulTransaction_result setSuccess(long success) {
27074
      this.success = success;
27075
      setSuccessIsSet(true);
27076
      return this;
27077
    }
27078
 
27079
    public void unsetSuccess() {
27080
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
27081
    }
27082
 
27083
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27084
    public boolean isSetSuccess() {
27085
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
27086
    }
27087
 
27088
    public void setSuccessIsSet(boolean value) {
27089
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
27090
    }
27091
 
27092
    public void setFieldValue(_Fields field, Object value) {
27093
      switch (field) {
27094
      case SUCCESS:
27095
        if (value == null) {
27096
          unsetSuccess();
27097
        } else {
27098
          setSuccess((Long)value);
27099
        }
27100
        break;
27101
 
27102
      }
27103
    }
27104
 
27105
    public void setFieldValue(int fieldID, Object value) {
27106
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27107
    }
27108
 
27109
    public Object getFieldValue(_Fields field) {
27110
      switch (field) {
27111
      case SUCCESS:
27112
        return new Long(getSuccess());
27113
 
27114
      }
27115
      throw new IllegalStateException();
27116
    }
27117
 
27118
    public Object getFieldValue(int fieldId) {
27119
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27120
    }
27121
 
27122
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27123
    public boolean isSet(_Fields field) {
27124
      switch (field) {
27125
      case SUCCESS:
27126
        return isSetSuccess();
27127
      }
27128
      throw new IllegalStateException();
27129
    }
27130
 
27131
    public boolean isSet(int fieldID) {
27132
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27133
    }
27134
 
27135
    @Override
27136
    public boolean equals(Object that) {
27137
      if (that == null)
27138
        return false;
27139
      if (that instanceof getNoOfCustomersWithSuccessfulTransaction_result)
27140
        return this.equals((getNoOfCustomersWithSuccessfulTransaction_result)that);
27141
      return false;
27142
    }
27143
 
27144
    public boolean equals(getNoOfCustomersWithSuccessfulTransaction_result that) {
27145
      if (that == null)
27146
        return false;
27147
 
27148
      boolean this_present_success = true;
27149
      boolean that_present_success = true;
27150
      if (this_present_success || that_present_success) {
27151
        if (!(this_present_success && that_present_success))
27152
          return false;
27153
        if (this.success != that.success)
27154
          return false;
27155
      }
27156
 
27157
      return true;
27158
    }
27159
 
27160
    @Override
27161
    public int hashCode() {
27162
      return 0;
27163
    }
27164
 
27165
    public int compareTo(getNoOfCustomersWithSuccessfulTransaction_result other) {
27166
      if (!getClass().equals(other.getClass())) {
27167
        return getClass().getName().compareTo(other.getClass().getName());
27168
      }
27169
 
27170
      int lastComparison = 0;
27171
      getNoOfCustomersWithSuccessfulTransaction_result typedOther = (getNoOfCustomersWithSuccessfulTransaction_result)other;
27172
 
27173
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27174
      if (lastComparison != 0) {
27175
        return lastComparison;
27176
      }
27177
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27178
      if (lastComparison != 0) {
27179
        return lastComparison;
27180
      }
27181
      return 0;
27182
    }
27183
 
27184
    public void read(TProtocol iprot) throws TException {
27185
      TField field;
27186
      iprot.readStructBegin();
27187
      while (true)
27188
      {
27189
        field = iprot.readFieldBegin();
27190
        if (field.type == TType.STOP) { 
27191
          break;
27192
        }
27193
        _Fields fieldId = _Fields.findByThriftId(field.id);
27194
        if (fieldId == null) {
27195
          TProtocolUtil.skip(iprot, field.type);
27196
        } else {
27197
          switch (fieldId) {
27198
            case SUCCESS:
27199
              if (field.type == TType.I64) {
27200
                this.success = iprot.readI64();
27201
                setSuccessIsSet(true);
27202
              } else { 
27203
                TProtocolUtil.skip(iprot, field.type);
27204
              }
27205
              break;
27206
          }
27207
          iprot.readFieldEnd();
27208
        }
27209
      }
27210
      iprot.readStructEnd();
27211
      validate();
27212
    }
27213
 
27214
    public void write(TProtocol oprot) throws TException {
27215
      oprot.writeStructBegin(STRUCT_DESC);
27216
 
27217
      if (this.isSetSuccess()) {
27218
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
27219
        oprot.writeI64(this.success);
27220
        oprot.writeFieldEnd();
27221
      }
27222
      oprot.writeFieldStop();
27223
      oprot.writeStructEnd();
27224
    }
27225
 
27226
    @Override
27227
    public String toString() {
27228
      StringBuilder sb = new StringBuilder("getNoOfCustomersWithSuccessfulTransaction_result(");
27229
      boolean first = true;
27230
 
27231
      sb.append("success:");
27232
      sb.append(this.success);
27233
      first = false;
27234
      sb.append(")");
27235
      return sb.toString();
27236
    }
27237
 
27238
    public void validate() throws TException {
27239
      // check for required fields
27240
    }
27241
 
27242
  }
27243
 
1731 ankur.sing 27244
  public static class getValidOrdersAmountRange_args implements TBase<getValidOrdersAmountRange_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_args>   {
27245
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_args");
1629 ankur.sing 27246
 
27247
 
27248
 
27249
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27250
    public enum _Fields implements TFieldIdEnum {
27251
;
27252
 
27253
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27254
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27255
 
27256
      static {
27257
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27258
          byId.put((int)field._thriftId, field);
27259
          byName.put(field.getFieldName(), field);
27260
        }
27261
      }
27262
 
27263
      /**
27264
       * Find the _Fields constant that matches fieldId, or null if its not found.
27265
       */
27266
      public static _Fields findByThriftId(int fieldId) {
27267
        return byId.get(fieldId);
27268
      }
27269
 
27270
      /**
27271
       * Find the _Fields constant that matches fieldId, throwing an exception
27272
       * if it is not found.
27273
       */
27274
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27275
        _Fields fields = findByThriftId(fieldId);
27276
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27277
        return fields;
27278
      }
27279
 
27280
      /**
27281
       * Find the _Fields constant that matches name, or null if its not found.
27282
       */
27283
      public static _Fields findByName(String name) {
27284
        return byName.get(name);
27285
      }
27286
 
27287
      private final short _thriftId;
27288
      private final String _fieldName;
27289
 
27290
      _Fields(short thriftId, String fieldName) {
27291
        _thriftId = thriftId;
27292
        _fieldName = fieldName;
27293
      }
27294
 
27295
      public short getThriftFieldId() {
27296
        return _thriftId;
27297
      }
27298
 
27299
      public String getFieldName() {
27300
        return _fieldName;
27301
      }
27302
    }
27303
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27304
    }});
27305
 
27306
    static {
1731 ankur.sing 27307
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_args.class, metaDataMap);
1629 ankur.sing 27308
    }
27309
 
1731 ankur.sing 27310
    public getValidOrdersAmountRange_args() {
1629 ankur.sing 27311
    }
27312
 
27313
    /**
27314
     * Performs a deep copy on <i>other</i>.
27315
     */
1731 ankur.sing 27316
    public getValidOrdersAmountRange_args(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27317
    }
27318
 
1731 ankur.sing 27319
    public getValidOrdersAmountRange_args deepCopy() {
27320
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27321
    }
27322
 
27323
    @Deprecated
1731 ankur.sing 27324
    public getValidOrdersAmountRange_args clone() {
27325
      return new getValidOrdersAmountRange_args(this);
1629 ankur.sing 27326
    }
27327
 
27328
    public void setFieldValue(_Fields field, Object value) {
27329
      switch (field) {
27330
      }
27331
    }
27332
 
27333
    public void setFieldValue(int fieldID, Object value) {
27334
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27335
    }
27336
 
27337
    public Object getFieldValue(_Fields field) {
27338
      switch (field) {
27339
      }
27340
      throw new IllegalStateException();
27341
    }
27342
 
27343
    public Object getFieldValue(int fieldId) {
27344
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27345
    }
27346
 
27347
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27348
    public boolean isSet(_Fields field) {
27349
      switch (field) {
27350
      }
27351
      throw new IllegalStateException();
27352
    }
27353
 
27354
    public boolean isSet(int fieldID) {
27355
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27356
    }
27357
 
27358
    @Override
27359
    public boolean equals(Object that) {
27360
      if (that == null)
27361
        return false;
1731 ankur.sing 27362
      if (that instanceof getValidOrdersAmountRange_args)
27363
        return this.equals((getValidOrdersAmountRange_args)that);
1629 ankur.sing 27364
      return false;
27365
    }
27366
 
1731 ankur.sing 27367
    public boolean equals(getValidOrdersAmountRange_args that) {
1629 ankur.sing 27368
      if (that == null)
27369
        return false;
27370
 
27371
      return true;
27372
    }
27373
 
27374
    @Override
27375
    public int hashCode() {
27376
      return 0;
27377
    }
27378
 
1731 ankur.sing 27379
    public int compareTo(getValidOrdersAmountRange_args other) {
1629 ankur.sing 27380
      if (!getClass().equals(other.getClass())) {
27381
        return getClass().getName().compareTo(other.getClass().getName());
27382
      }
27383
 
27384
      int lastComparison = 0;
1731 ankur.sing 27385
      getValidOrdersAmountRange_args typedOther = (getValidOrdersAmountRange_args)other;
1629 ankur.sing 27386
 
27387
      return 0;
27388
    }
27389
 
27390
    public void read(TProtocol iprot) throws TException {
27391
      TField field;
27392
      iprot.readStructBegin();
27393
      while (true)
27394
      {
27395
        field = iprot.readFieldBegin();
27396
        if (field.type == TType.STOP) { 
27397
          break;
27398
        }
27399
        _Fields fieldId = _Fields.findByThriftId(field.id);
27400
        if (fieldId == null) {
27401
          TProtocolUtil.skip(iprot, field.type);
27402
        } else {
27403
          switch (fieldId) {
27404
          }
27405
          iprot.readFieldEnd();
27406
        }
27407
      }
27408
      iprot.readStructEnd();
27409
      validate();
27410
    }
27411
 
27412
    public void write(TProtocol oprot) throws TException {
27413
      validate();
27414
 
27415
      oprot.writeStructBegin(STRUCT_DESC);
27416
      oprot.writeFieldStop();
27417
      oprot.writeStructEnd();
27418
    }
27419
 
27420
    @Override
27421
    public String toString() {
1731 ankur.sing 27422
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_args(");
1629 ankur.sing 27423
      boolean first = true;
27424
 
27425
      sb.append(")");
27426
      return sb.toString();
27427
    }
27428
 
27429
    public void validate() throws TException {
27430
      // check for required fields
27431
    }
27432
 
27433
  }
27434
 
1731 ankur.sing 27435
  public static class getValidOrdersAmountRange_result implements TBase<getValidOrdersAmountRange_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrdersAmountRange_result>   {
27436
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrdersAmountRange_result");
1629 ankur.sing 27437
 
1731 ankur.sing 27438
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
1629 ankur.sing 27439
 
1731 ankur.sing 27440
    private List<Double> success;
1629 ankur.sing 27441
 
27442
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27443
    public enum _Fields implements TFieldIdEnum {
27444
      SUCCESS((short)0, "success");
27445
 
27446
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27447
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27448
 
27449
      static {
27450
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27451
          byId.put((int)field._thriftId, field);
27452
          byName.put(field.getFieldName(), field);
27453
        }
27454
      }
27455
 
27456
      /**
27457
       * Find the _Fields constant that matches fieldId, or null if its not found.
27458
       */
27459
      public static _Fields findByThriftId(int fieldId) {
27460
        return byId.get(fieldId);
27461
      }
27462
 
27463
      /**
27464
       * Find the _Fields constant that matches fieldId, throwing an exception
27465
       * if it is not found.
27466
       */
27467
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27468
        _Fields fields = findByThriftId(fieldId);
27469
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27470
        return fields;
27471
      }
27472
 
27473
      /**
27474
       * Find the _Fields constant that matches name, or null if its not found.
27475
       */
27476
      public static _Fields findByName(String name) {
27477
        return byName.get(name);
27478
      }
27479
 
27480
      private final short _thriftId;
27481
      private final String _fieldName;
27482
 
27483
      _Fields(short thriftId, String fieldName) {
27484
        _thriftId = thriftId;
27485
        _fieldName = fieldName;
27486
      }
27487
 
27488
      public short getThriftFieldId() {
27489
        return _thriftId;
27490
      }
27491
 
27492
      public String getFieldName() {
27493
        return _fieldName;
27494
      }
27495
    }
27496
 
27497
    // isset id assignments
27498
 
27499
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27500
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
1731 ankur.sing 27501
          new ListMetaData(TType.LIST, 
27502
              new FieldValueMetaData(TType.DOUBLE))));
1629 ankur.sing 27503
    }});
27504
 
27505
    static {
1731 ankur.sing 27506
      FieldMetaData.addStructMetaDataMap(getValidOrdersAmountRange_result.class, metaDataMap);
1629 ankur.sing 27507
    }
27508
 
1731 ankur.sing 27509
    public getValidOrdersAmountRange_result() {
1629 ankur.sing 27510
    }
27511
 
1731 ankur.sing 27512
    public getValidOrdersAmountRange_result(
27513
      List<Double> success)
1629 ankur.sing 27514
    {
27515
      this();
27516
      this.success = success;
27517
    }
27518
 
27519
    /**
27520
     * Performs a deep copy on <i>other</i>.
27521
     */
1731 ankur.sing 27522
    public getValidOrdersAmountRange_result(getValidOrdersAmountRange_result other) {
27523
      if (other.isSetSuccess()) {
27524
        List<Double> __this__success = new ArrayList<Double>();
27525
        for (Double other_element : other.success) {
27526
          __this__success.add(other_element);
1629 ankur.sing 27527
        }
1731 ankur.sing 27528
        this.success = __this__success;
1629 ankur.sing 27529
      }
27530
    }
27531
 
1731 ankur.sing 27532
    public getValidOrdersAmountRange_result deepCopy() {
27533
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27534
    }
27535
 
27536
    @Deprecated
1731 ankur.sing 27537
    public getValidOrdersAmountRange_result clone() {
27538
      return new getValidOrdersAmountRange_result(this);
1629 ankur.sing 27539
    }
27540
 
1731 ankur.sing 27541
    public int getSuccessSize() {
27542
      return (this.success == null) ? 0 : this.success.size();
1629 ankur.sing 27543
    }
27544
 
1731 ankur.sing 27545
    public java.util.Iterator<Double> getSuccessIterator() {
27546
      return (this.success == null) ? null : this.success.iterator();
1629 ankur.sing 27547
    }
27548
 
1731 ankur.sing 27549
    public void addToSuccess(double elem) {
27550
      if (this.success == null) {
27551
        this.success = new ArrayList<Double>();
1629 ankur.sing 27552
      }
1731 ankur.sing 27553
      this.success.add(elem);
1629 ankur.sing 27554
    }
27555
 
1731 ankur.sing 27556
    public List<Double> getSuccess() {
1629 ankur.sing 27557
      return this.success;
27558
    }
27559
 
1731 ankur.sing 27560
    public getValidOrdersAmountRange_result setSuccess(List<Double> success) {
1629 ankur.sing 27561
      this.success = success;
27562
      return this;
27563
    }
27564
 
27565
    public void unsetSuccess() {
1731 ankur.sing 27566
      this.success = null;
1629 ankur.sing 27567
    }
27568
 
27569
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
27570
    public boolean isSetSuccess() {
1731 ankur.sing 27571
      return this.success != null;
1629 ankur.sing 27572
    }
27573
 
27574
    public void setSuccessIsSet(boolean value) {
1731 ankur.sing 27575
      if (!value) {
27576
        this.success = null;
27577
      }
1629 ankur.sing 27578
    }
27579
 
27580
    public void setFieldValue(_Fields field, Object value) {
27581
      switch (field) {
27582
      case SUCCESS:
27583
        if (value == null) {
27584
          unsetSuccess();
27585
        } else {
1731 ankur.sing 27586
          setSuccess((List<Double>)value);
1629 ankur.sing 27587
        }
27588
        break;
27589
 
27590
      }
27591
    }
27592
 
27593
    public void setFieldValue(int fieldID, Object value) {
27594
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27595
    }
27596
 
27597
    public Object getFieldValue(_Fields field) {
27598
      switch (field) {
27599
      case SUCCESS:
1731 ankur.sing 27600
        return getSuccess();
1629 ankur.sing 27601
 
27602
      }
27603
      throw new IllegalStateException();
27604
    }
27605
 
27606
    public Object getFieldValue(int fieldId) {
27607
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27608
    }
27609
 
27610
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27611
    public boolean isSet(_Fields field) {
27612
      switch (field) {
27613
      case SUCCESS:
27614
        return isSetSuccess();
27615
      }
27616
      throw new IllegalStateException();
27617
    }
27618
 
27619
    public boolean isSet(int fieldID) {
27620
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27621
    }
27622
 
27623
    @Override
27624
    public boolean equals(Object that) {
27625
      if (that == null)
27626
        return false;
1731 ankur.sing 27627
      if (that instanceof getValidOrdersAmountRange_result)
27628
        return this.equals((getValidOrdersAmountRange_result)that);
1629 ankur.sing 27629
      return false;
27630
    }
27631
 
1731 ankur.sing 27632
    public boolean equals(getValidOrdersAmountRange_result that) {
1629 ankur.sing 27633
      if (that == null)
27634
        return false;
27635
 
1731 ankur.sing 27636
      boolean this_present_success = true && this.isSetSuccess();
27637
      boolean that_present_success = true && that.isSetSuccess();
1629 ankur.sing 27638
      if (this_present_success || that_present_success) {
27639
        if (!(this_present_success && that_present_success))
27640
          return false;
1731 ankur.sing 27641
        if (!this.success.equals(that.success))
1629 ankur.sing 27642
          return false;
27643
      }
27644
 
27645
      return true;
27646
    }
27647
 
27648
    @Override
27649
    public int hashCode() {
27650
      return 0;
27651
    }
27652
 
1731 ankur.sing 27653
    public int compareTo(getValidOrdersAmountRange_result other) {
1629 ankur.sing 27654
      if (!getClass().equals(other.getClass())) {
27655
        return getClass().getName().compareTo(other.getClass().getName());
27656
      }
27657
 
27658
      int lastComparison = 0;
1731 ankur.sing 27659
      getValidOrdersAmountRange_result typedOther = (getValidOrdersAmountRange_result)other;
1629 ankur.sing 27660
 
27661
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
27662
      if (lastComparison != 0) {
27663
        return lastComparison;
27664
      }
27665
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
27666
      if (lastComparison != 0) {
27667
        return lastComparison;
27668
      }
27669
      return 0;
27670
    }
27671
 
27672
    public void read(TProtocol iprot) throws TException {
27673
      TField field;
27674
      iprot.readStructBegin();
27675
      while (true)
27676
      {
27677
        field = iprot.readFieldBegin();
27678
        if (field.type == TType.STOP) { 
27679
          break;
27680
        }
27681
        _Fields fieldId = _Fields.findByThriftId(field.id);
27682
        if (fieldId == null) {
27683
          TProtocolUtil.skip(iprot, field.type);
27684
        } else {
27685
          switch (fieldId) {
27686
            case SUCCESS:
1731 ankur.sing 27687
              if (field.type == TType.LIST) {
27688
                {
27689
                  TList _list80 = iprot.readListBegin();
27690
                  this.success = new ArrayList<Double>(_list80.size);
27691
                  for (int _i81 = 0; _i81 < _list80.size; ++_i81)
27692
                  {
27693
                    double _elem82;
27694
                    _elem82 = iprot.readDouble();
27695
                    this.success.add(_elem82);
27696
                  }
27697
                  iprot.readListEnd();
27698
                }
1629 ankur.sing 27699
              } else { 
27700
                TProtocolUtil.skip(iprot, field.type);
27701
              }
27702
              break;
27703
          }
27704
          iprot.readFieldEnd();
27705
        }
27706
      }
27707
      iprot.readStructEnd();
27708
      validate();
27709
    }
27710
 
27711
    public void write(TProtocol oprot) throws TException {
27712
      oprot.writeStructBegin(STRUCT_DESC);
27713
 
27714
      if (this.isSetSuccess()) {
27715
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
1731 ankur.sing 27716
        {
27717
          oprot.writeListBegin(new TList(TType.DOUBLE, this.success.size()));
27718
          for (double _iter83 : this.success)
27719
          {
27720
            oprot.writeDouble(_iter83);
27721
          }
27722
          oprot.writeListEnd();
27723
        }
1629 ankur.sing 27724
        oprot.writeFieldEnd();
27725
      }
27726
      oprot.writeFieldStop();
27727
      oprot.writeStructEnd();
27728
    }
27729
 
27730
    @Override
27731
    public String toString() {
1731 ankur.sing 27732
      StringBuilder sb = new StringBuilder("getValidOrdersAmountRange_result(");
1629 ankur.sing 27733
      boolean first = true;
27734
 
27735
      sb.append("success:");
1731 ankur.sing 27736
      if (this.success == null) {
27737
        sb.append("null");
27738
      } else {
27739
        sb.append(this.success);
27740
      }
1629 ankur.sing 27741
      first = false;
27742
      sb.append(")");
27743
      return sb.toString();
27744
    }
27745
 
27746
    public void validate() throws TException {
27747
      // check for required fields
27748
    }
27749
 
27750
  }
27751
 
1886 ankur.sing 27752
  public static class getValidOrders_args implements TBase<getValidOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_args>   {
27753
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_args");
27754
 
27755
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)1);
27756
 
27757
    private long limit;
27758
 
27759
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
27760
    public enum _Fields implements TFieldIdEnum {
27761
      LIMIT((short)1, "limit");
27762
 
27763
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
27764
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
27765
 
27766
      static {
27767
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
27768
          byId.put((int)field._thriftId, field);
27769
          byName.put(field.getFieldName(), field);
27770
        }
27771
      }
27772
 
27773
      /**
27774
       * Find the _Fields constant that matches fieldId, or null if its not found.
27775
       */
27776
      public static _Fields findByThriftId(int fieldId) {
27777
        return byId.get(fieldId);
27778
      }
27779
 
27780
      /**
27781
       * Find the _Fields constant that matches fieldId, throwing an exception
27782
       * if it is not found.
27783
       */
27784
      public static _Fields findByThriftIdOrThrow(int fieldId) {
27785
        _Fields fields = findByThriftId(fieldId);
27786
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
27787
        return fields;
27788
      }
27789
 
27790
      /**
27791
       * Find the _Fields constant that matches name, or null if its not found.
27792
       */
27793
      public static _Fields findByName(String name) {
27794
        return byName.get(name);
27795
      }
27796
 
27797
      private final short _thriftId;
27798
      private final String _fieldName;
27799
 
27800
      _Fields(short thriftId, String fieldName) {
27801
        _thriftId = thriftId;
27802
        _fieldName = fieldName;
27803
      }
27804
 
27805
      public short getThriftFieldId() {
27806
        return _thriftId;
27807
      }
27808
 
27809
      public String getFieldName() {
27810
        return _fieldName;
27811
      }
27812
    }
27813
 
27814
    // isset id assignments
27815
    private static final int __LIMIT_ISSET_ID = 0;
27816
    private BitSet __isset_bit_vector = new BitSet(1);
27817
 
27818
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
27819
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
27820
          new FieldValueMetaData(TType.I64)));
27821
    }});
27822
 
27823
    static {
27824
      FieldMetaData.addStructMetaDataMap(getValidOrders_args.class, metaDataMap);
27825
    }
27826
 
27827
    public getValidOrders_args() {
27828
    }
27829
 
27830
    public getValidOrders_args(
27831
      long limit)
27832
    {
27833
      this();
27834
      this.limit = limit;
27835
      setLimitIsSet(true);
27836
    }
27837
 
27838
    /**
27839
     * Performs a deep copy on <i>other</i>.
27840
     */
27841
    public getValidOrders_args(getValidOrders_args other) {
27842
      __isset_bit_vector.clear();
27843
      __isset_bit_vector.or(other.__isset_bit_vector);
27844
      this.limit = other.limit;
27845
    }
27846
 
27847
    public getValidOrders_args deepCopy() {
27848
      return new getValidOrders_args(this);
27849
    }
27850
 
27851
    @Deprecated
27852
    public getValidOrders_args clone() {
27853
      return new getValidOrders_args(this);
27854
    }
27855
 
27856
    public long getLimit() {
27857
      return this.limit;
27858
    }
27859
 
27860
    public getValidOrders_args setLimit(long limit) {
27861
      this.limit = limit;
27862
      setLimitIsSet(true);
27863
      return this;
27864
    }
27865
 
27866
    public void unsetLimit() {
27867
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
27868
    }
27869
 
27870
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
27871
    public boolean isSetLimit() {
27872
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
27873
    }
27874
 
27875
    public void setLimitIsSet(boolean value) {
27876
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
27877
    }
27878
 
27879
    public void setFieldValue(_Fields field, Object value) {
27880
      switch (field) {
27881
      case LIMIT:
27882
        if (value == null) {
27883
          unsetLimit();
27884
        } else {
27885
          setLimit((Long)value);
27886
        }
27887
        break;
27888
 
27889
      }
27890
    }
27891
 
27892
    public void setFieldValue(int fieldID, Object value) {
27893
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
27894
    }
27895
 
27896
    public Object getFieldValue(_Fields field) {
27897
      switch (field) {
27898
      case LIMIT:
27899
        return new Long(getLimit());
27900
 
27901
      }
27902
      throw new IllegalStateException();
27903
    }
27904
 
27905
    public Object getFieldValue(int fieldId) {
27906
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
27907
    }
27908
 
27909
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
27910
    public boolean isSet(_Fields field) {
27911
      switch (field) {
27912
      case LIMIT:
27913
        return isSetLimit();
27914
      }
27915
      throw new IllegalStateException();
27916
    }
27917
 
27918
    public boolean isSet(int fieldID) {
27919
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
27920
    }
27921
 
27922
    @Override
27923
    public boolean equals(Object that) {
27924
      if (that == null)
27925
        return false;
27926
      if (that instanceof getValidOrders_args)
27927
        return this.equals((getValidOrders_args)that);
27928
      return false;
27929
    }
27930
 
27931
    public boolean equals(getValidOrders_args that) {
27932
      if (that == null)
27933
        return false;
27934
 
27935
      boolean this_present_limit = true;
27936
      boolean that_present_limit = true;
27937
      if (this_present_limit || that_present_limit) {
27938
        if (!(this_present_limit && that_present_limit))
27939
          return false;
27940
        if (this.limit != that.limit)
27941
          return false;
27942
      }
27943
 
27944
      return true;
27945
    }
27946
 
27947
    @Override
27948
    public int hashCode() {
27949
      return 0;
27950
    }
27951
 
27952
    public int compareTo(getValidOrders_args other) {
27953
      if (!getClass().equals(other.getClass())) {
27954
        return getClass().getName().compareTo(other.getClass().getName());
27955
      }
27956
 
27957
      int lastComparison = 0;
27958
      getValidOrders_args typedOther = (getValidOrders_args)other;
27959
 
27960
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
27961
      if (lastComparison != 0) {
27962
        return lastComparison;
27963
      }
27964
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
27965
      if (lastComparison != 0) {
27966
        return lastComparison;
27967
      }
27968
      return 0;
27969
    }
27970
 
27971
    public void read(TProtocol iprot) throws TException {
27972
      TField field;
27973
      iprot.readStructBegin();
27974
      while (true)
27975
      {
27976
        field = iprot.readFieldBegin();
27977
        if (field.type == TType.STOP) { 
27978
          break;
27979
        }
27980
        _Fields fieldId = _Fields.findByThriftId(field.id);
27981
        if (fieldId == null) {
27982
          TProtocolUtil.skip(iprot, field.type);
27983
        } else {
27984
          switch (fieldId) {
27985
            case LIMIT:
27986
              if (field.type == TType.I64) {
27987
                this.limit = iprot.readI64();
27988
                setLimitIsSet(true);
27989
              } else { 
27990
                TProtocolUtil.skip(iprot, field.type);
27991
              }
27992
              break;
27993
          }
27994
          iprot.readFieldEnd();
27995
        }
27996
      }
27997
      iprot.readStructEnd();
27998
      validate();
27999
    }
28000
 
28001
    public void write(TProtocol oprot) throws TException {
28002
      validate();
28003
 
28004
      oprot.writeStructBegin(STRUCT_DESC);
28005
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
28006
      oprot.writeI64(this.limit);
28007
      oprot.writeFieldEnd();
28008
      oprot.writeFieldStop();
28009
      oprot.writeStructEnd();
28010
    }
28011
 
28012
    @Override
28013
    public String toString() {
28014
      StringBuilder sb = new StringBuilder("getValidOrders_args(");
28015
      boolean first = true;
28016
 
28017
      sb.append("limit:");
28018
      sb.append(this.limit);
28019
      first = false;
28020
      sb.append(")");
28021
      return sb.toString();
28022
    }
28023
 
28024
    public void validate() throws TException {
28025
      // check for required fields
28026
    }
28027
 
28028
  }
28029
 
28030
  public static class getValidOrders_result implements TBase<getValidOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrders_result>   {
28031
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrders_result");
28032
 
28033
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
28034
 
28035
    private List<Order> success;
28036
 
28037
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
28038
    public enum _Fields implements TFieldIdEnum {
28039
      SUCCESS((short)0, "success");
28040
 
28041
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
28042
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
28043
 
28044
      static {
28045
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
28046
          byId.put((int)field._thriftId, field);
28047
          byName.put(field.getFieldName(), field);
28048
        }
28049
      }
28050
 
28051
      /**
28052
       * Find the _Fields constant that matches fieldId, or null if its not found.
28053
       */
28054
      public static _Fields findByThriftId(int fieldId) {
28055
        return byId.get(fieldId);
28056
      }
28057
 
28058
      /**
28059
       * Find the _Fields constant that matches fieldId, throwing an exception
28060
       * if it is not found.
28061
       */
28062
      public static _Fields findByThriftIdOrThrow(int fieldId) {
28063
        _Fields fields = findByThriftId(fieldId);
28064
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
28065
        return fields;
28066
      }
28067
 
28068
      /**
28069
       * Find the _Fields constant that matches name, or null if its not found.
28070
       */
28071
      public static _Fields findByName(String name) {
28072
        return byName.get(name);
28073
      }
28074
 
28075
      private final short _thriftId;
28076
      private final String _fieldName;
28077
 
28078
      _Fields(short thriftId, String fieldName) {
28079
        _thriftId = thriftId;
28080
        _fieldName = fieldName;
28081
      }
28082
 
28083
      public short getThriftFieldId() {
28084
        return _thriftId;
28085
      }
28086
 
28087
      public String getFieldName() {
28088
        return _fieldName;
28089
      }
28090
    }
28091
 
28092
    // isset id assignments
28093
 
28094
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
28095
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
28096
          new ListMetaData(TType.LIST, 
28097
              new StructMetaData(TType.STRUCT, Order.class))));
28098
    }});
28099
 
28100
    static {
28101
      FieldMetaData.addStructMetaDataMap(getValidOrders_result.class, metaDataMap);
28102
    }
28103
 
28104
    public getValidOrders_result() {
28105
    }
28106
 
28107
    public getValidOrders_result(
28108
      List<Order> success)
28109
    {
28110
      this();
28111
      this.success = success;
28112
    }
28113
 
28114
    /**
28115
     * Performs a deep copy on <i>other</i>.
28116
     */
28117
    public getValidOrders_result(getValidOrders_result other) {
28118
      if (other.isSetSuccess()) {
28119
        List<Order> __this__success = new ArrayList<Order>();
28120
        for (Order other_element : other.success) {
28121
          __this__success.add(new Order(other_element));
28122
        }
28123
        this.success = __this__success;
28124
      }
28125
    }
28126
 
28127
    public getValidOrders_result deepCopy() {
28128
      return new getValidOrders_result(this);
28129
    }
28130
 
28131
    @Deprecated
28132
    public getValidOrders_result clone() {
28133
      return new getValidOrders_result(this);
28134
    }
28135
 
28136
    public int getSuccessSize() {
28137
      return (this.success == null) ? 0 : this.success.size();
28138
    }
28139
 
28140
    public java.util.Iterator<Order> getSuccessIterator() {
28141
      return (this.success == null) ? null : this.success.iterator();
28142
    }
28143
 
28144
    public void addToSuccess(Order elem) {
28145
      if (this.success == null) {
28146
        this.success = new ArrayList<Order>();
28147
      }
28148
      this.success.add(elem);
28149
    }
28150
 
28151
    public List<Order> getSuccess() {
28152
      return this.success;
28153
    }
28154
 
28155
    public getValidOrders_result setSuccess(List<Order> success) {
28156
      this.success = success;
28157
      return this;
28158
    }
28159
 
28160
    public void unsetSuccess() {
28161
      this.success = null;
28162
    }
28163
 
28164
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
28165
    public boolean isSetSuccess() {
28166
      return this.success != null;
28167
    }
28168
 
28169
    public void setSuccessIsSet(boolean value) {
28170
      if (!value) {
28171
        this.success = null;
28172
      }
28173
    }
28174
 
28175
    public void setFieldValue(_Fields field, Object value) {
28176
      switch (field) {
28177
      case SUCCESS:
28178
        if (value == null) {
28179
          unsetSuccess();
28180
        } else {
28181
          setSuccess((List<Order>)value);
28182
        }
28183
        break;
28184
 
28185
      }
28186
    }
28187
 
28188
    public void setFieldValue(int fieldID, Object value) {
28189
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
28190
    }
28191
 
28192
    public Object getFieldValue(_Fields field) {
28193
      switch (field) {
28194
      case SUCCESS:
28195
        return getSuccess();
28196
 
28197
      }
28198
      throw new IllegalStateException();
28199
    }
28200
 
28201
    public Object getFieldValue(int fieldId) {
28202
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
28203
    }
28204
 
28205
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
28206
    public boolean isSet(_Fields field) {
28207
      switch (field) {
28208
      case SUCCESS:
28209
        return isSetSuccess();
28210
      }
28211
      throw new IllegalStateException();
28212
    }
28213
 
28214
    public boolean isSet(int fieldID) {
28215
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
28216
    }
28217
 
28218
    @Override
28219
    public boolean equals(Object that) {
28220
      if (that == null)
28221
        return false;
28222
      if (that instanceof getValidOrders_result)
28223
        return this.equals((getValidOrders_result)that);
28224
      return false;
28225
    }
28226
 
28227
    public boolean equals(getValidOrders_result that) {
28228
      if (that == null)
28229
        return false;
28230
 
28231
      boolean this_present_success = true && this.isSetSuccess();
28232
      boolean that_present_success = true && that.isSetSuccess();
28233
      if (this_present_success || that_present_success) {
28234
        if (!(this_present_success && that_present_success))
28235
          return false;
28236
        if (!this.success.equals(that.success))
28237
          return false;
28238
      }
28239
 
28240
      return true;
28241
    }
28242
 
28243
    @Override
28244
    public int hashCode() {
28245
      return 0;
28246
    }
28247
 
28248
    public int compareTo(getValidOrders_result other) {
28249
      if (!getClass().equals(other.getClass())) {
28250
        return getClass().getName().compareTo(other.getClass().getName());
28251
      }
28252
 
28253
      int lastComparison = 0;
28254
      getValidOrders_result typedOther = (getValidOrders_result)other;
28255
 
28256
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
28257
      if (lastComparison != 0) {
28258
        return lastComparison;
28259
      }
28260
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
28261
      if (lastComparison != 0) {
28262
        return lastComparison;
28263
      }
28264
      return 0;
28265
    }
28266
 
28267
    public void read(TProtocol iprot) throws TException {
28268
      TField field;
28269
      iprot.readStructBegin();
28270
      while (true)
28271
      {
28272
        field = iprot.readFieldBegin();
28273
        if (field.type == TType.STOP) { 
28274
          break;
28275
        }
28276
        _Fields fieldId = _Fields.findByThriftId(field.id);
28277
        if (fieldId == null) {
28278
          TProtocolUtil.skip(iprot, field.type);
28279
        } else {
28280
          switch (fieldId) {
28281
            case SUCCESS:
28282
              if (field.type == TType.LIST) {
28283
                {
28284
                  TList _list84 = iprot.readListBegin();
28285
                  this.success = new ArrayList<Order>(_list84.size);
28286
                  for (int _i85 = 0; _i85 < _list84.size; ++_i85)
28287
                  {
28288
                    Order _elem86;
28289
                    _elem86 = new Order();
28290
                    _elem86.read(iprot);
28291
                    this.success.add(_elem86);
28292
                  }
28293
                  iprot.readListEnd();
28294
                }
28295
              } else { 
28296
                TProtocolUtil.skip(iprot, field.type);
28297
              }
28298
              break;
28299
          }
28300
          iprot.readFieldEnd();
28301
        }
28302
      }
28303
      iprot.readStructEnd();
28304
      validate();
28305
    }
28306
 
28307
    public void write(TProtocol oprot) throws TException {
28308
      oprot.writeStructBegin(STRUCT_DESC);
28309
 
28310
      if (this.isSetSuccess()) {
28311
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
28312
        {
28313
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
28314
          for (Order _iter87 : this.success)
28315
          {
28316
            _iter87.write(oprot);
28317
          }
28318
          oprot.writeListEnd();
28319
        }
28320
        oprot.writeFieldEnd();
28321
      }
28322
      oprot.writeFieldStop();
28323
      oprot.writeStructEnd();
28324
    }
28325
 
28326
    @Override
28327
    public String toString() {
28328
      StringBuilder sb = new StringBuilder("getValidOrders_result(");
28329
      boolean first = true;
28330
 
28331
      sb.append("success:");
28332
      if (this.success == null) {
28333
        sb.append("null");
28334
      } else {
28335
        sb.append(this.success);
28336
      }
28337
      first = false;
28338
      sb.append(")");
28339
      return sb.toString();
28340
    }
28341
 
28342
    public void validate() throws TException {
28343
      // check for required fields
28344
    }
28345
 
28346
  }
28347
 
68 ashish 28348
}