Subversion Repositories SmartDukaan

Rev

Rev 1529 | Rev 1629 | 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
 
68 ashish 207
  }
208
 
209
  public static class Client implements Iface {
210
    public Client(TProtocol prot)
211
    {
212
      this(prot, prot);
213
    }
214
 
215
    public Client(TProtocol iprot, TProtocol oprot)
216
    {
217
      iprot_ = iprot;
218
      oprot_ = oprot;
219
    }
220
 
221
    protected TProtocol iprot_;
222
    protected TProtocol oprot_;
223
 
224
    protected int seqid_;
225
 
226
    public TProtocol getInputProtocol()
227
    {
228
      return this.iprot_;
229
    }
230
 
231
    public TProtocol getOutputProtocol()
232
    {
233
      return this.oprot_;
234
    }
235
 
764 rajveer 236
    public void closeSession() throws TException
237
    {
238
      send_closeSession();
239
      recv_closeSession();
240
    }
241
 
242
    public void send_closeSession() throws TException
243
    {
244
      oprot_.writeMessageBegin(new TMessage("closeSession", TMessageType.CALL, seqid_));
245
      closeSession_args args = new closeSession_args();
246
      args.write(oprot_);
247
      oprot_.writeMessageEnd();
248
      oprot_.getTransport().flush();
249
    }
250
 
251
    public void recv_closeSession() throws TException
252
    {
253
      TMessage msg = iprot_.readMessageBegin();
254
      if (msg.type == TMessageType.EXCEPTION) {
255
        TApplicationException x = TApplicationException.read(iprot_);
256
        iprot_.readMessageEnd();
257
        throw x;
258
      }
259
      closeSession_result result = new closeSession_result();
260
      result.read(iprot_);
261
      iprot_.readMessageEnd();
262
      return;
263
    }
264
 
132 ashish 265
    public long createTransaction(Transaction transaction) throws TransactionServiceException, TException
68 ashish 266
    {
267
      send_createTransaction(transaction);
132 ashish 268
      return recv_createTransaction();
68 ashish 269
    }
270
 
271
    public void send_createTransaction(Transaction transaction) throws TException
272
    {
273
      oprot_.writeMessageBegin(new TMessage("createTransaction", TMessageType.CALL, seqid_));
274
      createTransaction_args args = new createTransaction_args();
275
      args.transaction = transaction;
276
      args.write(oprot_);
277
      oprot_.writeMessageEnd();
278
      oprot_.getTransport().flush();
279
    }
280
 
132 ashish 281
    public long recv_createTransaction() throws TransactionServiceException, TException
68 ashish 282
    {
283
      TMessage msg = iprot_.readMessageBegin();
284
      if (msg.type == TMessageType.EXCEPTION) {
285
        TApplicationException x = TApplicationException.read(iprot_);
286
        iprot_.readMessageEnd();
287
        throw x;
288
      }
289
      createTransaction_result result = new createTransaction_result();
290
      result.read(iprot_);
291
      iprot_.readMessageEnd();
132 ashish 292
      if (result.isSetSuccess()) {
293
        return result.success;
294
      }
68 ashish 295
      if (result.ex != null) {
296
        throw result.ex;
297
      }
132 ashish 298
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createTransaction failed: unknown result");
68 ashish 299
    }
300
 
301
    public Transaction getTransaction(long id) throws TransactionServiceException, TException
302
    {
303
      send_getTransaction(id);
304
      return recv_getTransaction();
305
    }
306
 
307
    public void send_getTransaction(long id) throws TException
308
    {
309
      oprot_.writeMessageBegin(new TMessage("getTransaction", TMessageType.CALL, seqid_));
310
      getTransaction_args args = new getTransaction_args();
311
      args.id = id;
312
      args.write(oprot_);
313
      oprot_.writeMessageEnd();
314
      oprot_.getTransport().flush();
315
    }
316
 
317
    public Transaction recv_getTransaction() throws TransactionServiceException, TException
318
    {
319
      TMessage msg = iprot_.readMessageBegin();
320
      if (msg.type == TMessageType.EXCEPTION) {
321
        TApplicationException x = TApplicationException.read(iprot_);
322
        iprot_.readMessageEnd();
323
        throw x;
324
      }
325
      getTransaction_result result = new getTransaction_result();
326
      result.read(iprot_);
327
      iprot_.readMessageEnd();
328
      if (result.isSetSuccess()) {
329
        return result.success;
330
      }
331
      if (result.ex != null) {
332
        throw result.ex;
333
      }
334
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransaction failed: unknown result");
335
    }
336
 
132 ashish 337
    public List<Transaction> getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TransactionServiceException, TException
68 ashish 338
    {
132 ashish 339
      send_getTransactionsForCustomer(customerId, from_date, to_date, status);
68 ashish 340
      return recv_getTransactionsForCustomer();
341
    }
342
 
132 ashish 343
    public void send_getTransactionsForCustomer(long customerId, long from_date, long to_date, TransactionStatus status) throws TException
68 ashish 344
    {
345
      oprot_.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.CALL, seqid_));
346
      getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
347
      args.customerId = customerId;
132 ashish 348
      args.from_date = from_date;
349
      args.to_date = to_date;
68 ashish 350
      args.status = status;
351
      args.write(oprot_);
352
      oprot_.writeMessageEnd();
353
      oprot_.getTransport().flush();
354
    }
355
 
356
    public List<Transaction> recv_getTransactionsForCustomer() throws TransactionServiceException, TException
357
    {
358
      TMessage msg = iprot_.readMessageBegin();
359
      if (msg.type == TMessageType.EXCEPTION) {
360
        TApplicationException x = TApplicationException.read(iprot_);
361
        iprot_.readMessageEnd();
362
        throw x;
363
      }
364
      getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
365
      result.read(iprot_);
366
      iprot_.readMessageEnd();
367
      if (result.isSetSuccess()) {
368
        return result.success;
369
      }
370
      if (result.ex != null) {
371
        throw result.ex;
372
      }
373
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForCustomer failed: unknown result");
374
    }
375
 
132 ashish 376
    public List<Transaction> getTransactionsForShoppingCartId(long shoppingCartId) throws TransactionServiceException, TException
377
    {
378
      send_getTransactionsForShoppingCartId(shoppingCartId);
379
      return recv_getTransactionsForShoppingCartId();
380
    }
381
 
382
    public void send_getTransactionsForShoppingCartId(long shoppingCartId) throws TException
383
    {
384
      oprot_.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.CALL, seqid_));
385
      getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
386
      args.shoppingCartId = shoppingCartId;
387
      args.write(oprot_);
388
      oprot_.writeMessageEnd();
389
      oprot_.getTransport().flush();
390
    }
391
 
392
    public List<Transaction> recv_getTransactionsForShoppingCartId() throws TransactionServiceException, TException
393
    {
394
      TMessage msg = iprot_.readMessageBegin();
395
      if (msg.type == TMessageType.EXCEPTION) {
396
        TApplicationException x = TApplicationException.read(iprot_);
397
        iprot_.readMessageEnd();
398
        throw x;
399
      }
400
      getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
401
      result.read(iprot_);
402
      iprot_.readMessageEnd();
403
      if (result.isSetSuccess()) {
404
        return result.success;
405
      }
406
      if (result.ex != null) {
407
        throw result.ex;
408
      }
409
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionsForShoppingCartId failed: unknown result");
410
    }
411
 
68 ashish 412
    public TransactionStatus getTransactionStatus(long transactionId) throws TransactionServiceException, TException
413
    {
414
      send_getTransactionStatus(transactionId);
415
      return recv_getTransactionStatus();
416
    }
417
 
418
    public void send_getTransactionStatus(long transactionId) throws TException
419
    {
420
      oprot_.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.CALL, seqid_));
421
      getTransactionStatus_args args = new getTransactionStatus_args();
422
      args.transactionId = transactionId;
423
      args.write(oprot_);
424
      oprot_.writeMessageEnd();
425
      oprot_.getTransport().flush();
426
    }
427
 
428
    public TransactionStatus recv_getTransactionStatus() throws TransactionServiceException, TException
429
    {
430
      TMessage msg = iprot_.readMessageBegin();
431
      if (msg.type == TMessageType.EXCEPTION) {
432
        TApplicationException x = TApplicationException.read(iprot_);
433
        iprot_.readMessageEnd();
434
        throw x;
435
      }
436
      getTransactionStatus_result result = new getTransactionStatus_result();
437
      result.read(iprot_);
438
      iprot_.readMessageEnd();
439
      if (result.isSetSuccess()) {
440
        return result.success;
441
      }
442
      if (result.ex != null) {
443
        throw result.ex;
444
      }
445
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getTransactionStatus failed: unknown result");
446
    }
447
 
448
    public boolean changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TransactionServiceException, TException
449
    {
450
      send_changeTransactionStatus(transactionId, status, description);
451
      return recv_changeTransactionStatus();
452
    }
453
 
454
    public void send_changeTransactionStatus(long transactionId, TransactionStatus status, String description) throws TException
455
    {
456
      oprot_.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.CALL, seqid_));
457
      changeTransactionStatus_args args = new changeTransactionStatus_args();
458
      args.transactionId = transactionId;
459
      args.status = status;
460
      args.description = description;
461
      args.write(oprot_);
462
      oprot_.writeMessageEnd();
463
      oprot_.getTransport().flush();
464
    }
465
 
466
    public boolean recv_changeTransactionStatus() throws TransactionServiceException, TException
467
    {
468
      TMessage msg = iprot_.readMessageBegin();
469
      if (msg.type == TMessageType.EXCEPTION) {
470
        TApplicationException x = TApplicationException.read(iprot_);
471
        iprot_.readMessageEnd();
472
        throw x;
473
      }
474
      changeTransactionStatus_result result = new changeTransactionStatus_result();
475
      result.read(iprot_);
476
      iprot_.readMessageEnd();
477
      if (result.isSetSuccess()) {
478
        return result.success;
479
      }
480
      if (result.ex != null) {
481
        throw result.ex;
482
      }
483
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeTransactionStatus failed: unknown result");
484
    }
485
 
1398 varun.gupt 486
    public boolean enqueueTransactionInfoEmail(long transactionId) throws TransactionServiceException, TException
1382 varun.gupt 487
    {
1398 varun.gupt 488
      send_enqueueTransactionInfoEmail(transactionId);
489
      return recv_enqueueTransactionInfoEmail();
1382 varun.gupt 490
    }
491
 
1398 varun.gupt 492
    public void send_enqueueTransactionInfoEmail(long transactionId) throws TException
1382 varun.gupt 493
    {
1398 varun.gupt 494
      oprot_.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.CALL, seqid_));
495
      enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 496
      args.transactionId = transactionId;
497
      args.write(oprot_);
498
      oprot_.writeMessageEnd();
499
      oprot_.getTransport().flush();
500
    }
501
 
1398 varun.gupt 502
    public boolean recv_enqueueTransactionInfoEmail() throws TransactionServiceException, TException
1382 varun.gupt 503
    {
504
      TMessage msg = iprot_.readMessageBegin();
505
      if (msg.type == TMessageType.EXCEPTION) {
506
        TApplicationException x = TApplicationException.read(iprot_);
507
        iprot_.readMessageEnd();
508
        throw x;
509
      }
1398 varun.gupt 510
      enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 511
      result.read(iprot_);
512
      iprot_.readMessageEnd();
513
      if (result.isSetSuccess()) {
514
        return result.success;
515
      }
516
      if (result.ex != null) {
517
        throw result.ex;
518
      }
1398 varun.gupt 519
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "enqueueTransactionInfoEmail failed: unknown result");
1382 varun.gupt 520
    }
521
 
483 rajveer 522
    public List<Order> getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TransactionServiceException, TException
68 ashish 523
    {
483 rajveer 524
      send_getAllOrders(status, from_date, to_date, warehouse_id);
525
      return recv_getAllOrders();
68 ashish 526
    }
527
 
483 rajveer 528
    public void send_getAllOrders(OrderStatus status, long from_date, long to_date, long warehouse_id) throws TException
68 ashish 529
    {
483 rajveer 530
      oprot_.writeMessageBegin(new TMessage("getAllOrders", TMessageType.CALL, seqid_));
531
      getAllOrders_args args = new getAllOrders_args();
532
      args.status = status;
533
      args.from_date = from_date;
534
      args.to_date = to_date;
535
      args.warehouse_id = warehouse_id;
68 ashish 536
      args.write(oprot_);
537
      oprot_.writeMessageEnd();
538
      oprot_.getTransport().flush();
539
    }
540
 
483 rajveer 541
    public List<Order> recv_getAllOrders() throws TransactionServiceException, TException
68 ashish 542
    {
543
      TMessage msg = iprot_.readMessageBegin();
544
      if (msg.type == TMessageType.EXCEPTION) {
545
        TApplicationException x = TApplicationException.read(iprot_);
546
        iprot_.readMessageEnd();
547
        throw x;
548
      }
483 rajveer 549
      getAllOrders_result result = new getAllOrders_result();
68 ashish 550
      result.read(iprot_);
551
      iprot_.readMessageEnd();
552
      if (result.isSetSuccess()) {
553
        return result.success;
554
      }
555
      if (result.ex != null) {
556
        throw result.ex;
557
      }
483 rajveer 558
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAllOrders failed: unknown result");
68 ashish 559
    }
560
 
1022 varun.gupt 561
    public List<Order> getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TransactionServiceException, TException
562
    {
563
      send_getOrdersByBillingDate(status, start_billing_date, end_billing_date, warehouse_id);
564
      return recv_getOrdersByBillingDate();
565
    }
566
 
567
    public void send_getOrdersByBillingDate(OrderStatus status, long start_billing_date, long end_billing_date, long warehouse_id) throws TException
568
    {
569
      oprot_.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.CALL, seqid_));
570
      getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
571
      args.status = status;
572
      args.start_billing_date = start_billing_date;
573
      args.end_billing_date = end_billing_date;
574
      args.warehouse_id = warehouse_id;
575
      args.write(oprot_);
576
      oprot_.writeMessageEnd();
577
      oprot_.getTransport().flush();
578
    }
579
 
580
    public List<Order> recv_getOrdersByBillingDate() throws TransactionServiceException, TException
581
    {
582
      TMessage msg = iprot_.readMessageBegin();
583
      if (msg.type == TMessageType.EXCEPTION) {
584
        TApplicationException x = TApplicationException.read(iprot_);
585
        iprot_.readMessageEnd();
586
        throw x;
587
      }
588
      getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
589
      result.read(iprot_);
590
      iprot_.readMessageEnd();
591
      if (result.isSetSuccess()) {
592
        return result.success;
593
      }
594
      if (result.ex != null) {
595
        throw result.ex;
596
      }
597
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersByBillingDate failed: unknown result");
598
    }
599
 
1382 varun.gupt 600
    public List<Long> getReturnableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
601
    {
602
      send_getReturnableOrdersForCustomer(customer_id, limit);
603
      return recv_getReturnableOrdersForCustomer();
604
    }
605
 
606
    public void send_getReturnableOrdersForCustomer(long customer_id, long limit) throws TException
607
    {
608
      oprot_.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.CALL, seqid_));
609
      getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
610
      args.customer_id = customer_id;
611
      args.limit = limit;
612
      args.write(oprot_);
613
      oprot_.writeMessageEnd();
614
      oprot_.getTransport().flush();
615
    }
616
 
617
    public List<Long> recv_getReturnableOrdersForCustomer() throws TransactionServiceException, TException
618
    {
619
      TMessage msg = iprot_.readMessageBegin();
620
      if (msg.type == TMessageType.EXCEPTION) {
621
        TApplicationException x = TApplicationException.read(iprot_);
622
        iprot_.readMessageEnd();
623
        throw x;
624
      }
625
      getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
626
      result.read(iprot_);
627
      iprot_.readMessageEnd();
628
      if (result.isSetSuccess()) {
629
        return result.success;
630
      }
631
      if (result.ex != null) {
632
        throw result.ex;
633
      }
634
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getReturnableOrdersForCustomer failed: unknown result");
635
    }
636
 
637
    public List<Long> getCancellableOrdersForCustomer(long customer_id, long limit) throws TransactionServiceException, TException
638
    {
639
      send_getCancellableOrdersForCustomer(customer_id, limit);
640
      return recv_getCancellableOrdersForCustomer();
641
    }
642
 
643
    public void send_getCancellableOrdersForCustomer(long customer_id, long limit) throws TException
644
    {
645
      oprot_.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.CALL, seqid_));
646
      getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
647
      args.customer_id = customer_id;
648
      args.limit = limit;
649
      args.write(oprot_);
650
      oprot_.writeMessageEnd();
651
      oprot_.getTransport().flush();
652
    }
653
 
654
    public List<Long> recv_getCancellableOrdersForCustomer() throws TransactionServiceException, TException
655
    {
656
      TMessage msg = iprot_.readMessageBegin();
657
      if (msg.type == TMessageType.EXCEPTION) {
658
        TApplicationException x = TApplicationException.read(iprot_);
659
        iprot_.readMessageEnd();
660
        throw x;
661
      }
662
      getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
663
      result.read(iprot_);
664
      iprot_.readMessageEnd();
665
      if (result.isSetSuccess()) {
666
        return result.success;
667
      }
668
      if (result.ex != null) {
669
        throw result.ex;
670
      }
671
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getCancellableOrdersForCustomer failed: unknown result");
672
    }
673
 
483 rajveer 674
    public boolean changeOrderStatus(long orderId, OrderStatus status, String description) throws TransactionServiceException, TException
68 ashish 675
    {
483 rajveer 676
      send_changeOrderStatus(orderId, status, description);
677
      return recv_changeOrderStatus();
68 ashish 678
    }
679
 
483 rajveer 680
    public void send_changeOrderStatus(long orderId, OrderStatus status, String description) throws TException
68 ashish 681
    {
483 rajveer 682
      oprot_.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.CALL, seqid_));
683
      changeOrderStatus_args args = new changeOrderStatus_args();
684
      args.orderId = orderId;
685
      args.status = status;
686
      args.description = description;
68 ashish 687
      args.write(oprot_);
688
      oprot_.writeMessageEnd();
689
      oprot_.getTransport().flush();
690
    }
691
 
483 rajveer 692
    public boolean recv_changeOrderStatus() throws TransactionServiceException, TException
68 ashish 693
    {
694
      TMessage msg = iprot_.readMessageBegin();
695
      if (msg.type == TMessageType.EXCEPTION) {
696
        TApplicationException x = TApplicationException.read(iprot_);
697
        iprot_.readMessageEnd();
698
        throw x;
699
      }
483 rajveer 700
      changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 701
      result.read(iprot_);
702
      iprot_.readMessageEnd();
703
      if (result.isSetSuccess()) {
704
        return result.success;
705
      }
706
      if (result.ex != null) {
707
        throw result.ex;
708
      }
483 rajveer 709
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "changeOrderStatus failed: unknown result");
68 ashish 710
    }
711
 
1148 chandransh 712
    public boolean addBillingDetails(long orderId, String invoice_number, String billed_by) throws TransactionServiceException, TException
495 rajveer 713
    {
1148 chandransh 714
      send_addBillingDetails(orderId, invoice_number, billed_by);
495 rajveer 715
      return recv_addBillingDetails();
716
    }
717
 
1148 chandransh 718
    public void send_addBillingDetails(long orderId, String invoice_number, String billed_by) throws TException
495 rajveer 719
    {
720
      oprot_.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.CALL, seqid_));
721
      addBillingDetails_args args = new addBillingDetails_args();
722
      args.orderId = orderId;
723
      args.invoice_number = invoice_number;
724
      args.billed_by = billed_by;
725
      args.write(oprot_);
726
      oprot_.writeMessageEnd();
727
      oprot_.getTransport().flush();
728
    }
729
 
730
    public boolean recv_addBillingDetails() throws TransactionServiceException, TException
731
    {
732
      TMessage msg = iprot_.readMessageBegin();
733
      if (msg.type == TMessageType.EXCEPTION) {
734
        TApplicationException x = TApplicationException.read(iprot_);
735
        iprot_.readMessageEnd();
736
        throw x;
737
      }
738
      addBillingDetails_result result = new addBillingDetails_result();
739
      result.read(iprot_);
740
      iprot_.readMessageEnd();
741
      if (result.isSetSuccess()) {
742
        return result.success;
743
      }
744
      if (result.ex != null) {
745
        throw result.ex;
746
      }
747
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addBillingDetails failed: unknown result");
748
    }
749
 
1148 chandransh 750
    public boolean addJacketNumber(long orderId, long jacketNumber) throws TransactionServiceException, TException
751
    {
752
      send_addJacketNumber(orderId, jacketNumber);
753
      return recv_addJacketNumber();
754
    }
755
 
756
    public void send_addJacketNumber(long orderId, long jacketNumber) throws TException
757
    {
758
      oprot_.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.CALL, seqid_));
759
      addJacketNumber_args args = new addJacketNumber_args();
760
      args.orderId = orderId;
761
      args.jacketNumber = jacketNumber;
762
      args.write(oprot_);
763
      oprot_.writeMessageEnd();
764
      oprot_.getTransport().flush();
765
    }
766
 
767
    public boolean recv_addJacketNumber() throws TransactionServiceException, TException
768
    {
769
      TMessage msg = iprot_.readMessageBegin();
770
      if (msg.type == TMessageType.EXCEPTION) {
771
        TApplicationException x = TApplicationException.read(iprot_);
772
        iprot_.readMessageEnd();
773
        throw x;
774
      }
775
      addJacketNumber_result result = new addJacketNumber_result();
776
      result.read(iprot_);
777
      iprot_.readMessageEnd();
778
      if (result.isSetSuccess()) {
779
        return result.success;
780
      }
781
      if (result.ex != null) {
782
        throw result.ex;
783
      }
784
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "addJacketNumber failed: unknown result");
785
    }
786
 
923 rajveer 787
    public boolean acceptOrder(long orderId) throws TransactionServiceException, TException
788
    {
789
      send_acceptOrder(orderId);
790
      return recv_acceptOrder();
791
    }
792
 
793
    public void send_acceptOrder(long orderId) throws TException
794
    {
795
      oprot_.writeMessageBegin(new TMessage("acceptOrder", TMessageType.CALL, seqid_));
796
      acceptOrder_args args = new acceptOrder_args();
797
      args.orderId = orderId;
798
      args.write(oprot_);
799
      oprot_.writeMessageEnd();
800
      oprot_.getTransport().flush();
801
    }
802
 
803
    public boolean recv_acceptOrder() throws TransactionServiceException, TException
804
    {
805
      TMessage msg = iprot_.readMessageBegin();
806
      if (msg.type == TMessageType.EXCEPTION) {
807
        TApplicationException x = TApplicationException.read(iprot_);
808
        iprot_.readMessageEnd();
809
        throw x;
810
      }
811
      acceptOrder_result result = new acceptOrder_result();
812
      result.read(iprot_);
813
      iprot_.readMessageEnd();
814
      if (result.isSetSuccess()) {
815
        return result.success;
816
      }
817
      if (result.ex != null) {
818
        throw result.ex;
819
      }
820
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "acceptOrder failed: unknown result");
821
    }
822
 
823
    public boolean billOrder(long orderId) throws TransactionServiceException, TException
824
    {
825
      send_billOrder(orderId);
826
      return recv_billOrder();
827
    }
828
 
829
    public void send_billOrder(long orderId) throws TException
830
    {
831
      oprot_.writeMessageBegin(new TMessage("billOrder", TMessageType.CALL, seqid_));
832
      billOrder_args args = new billOrder_args();
833
      args.orderId = orderId;
834
      args.write(oprot_);
835
      oprot_.writeMessageEnd();
836
      oprot_.getTransport().flush();
837
    }
838
 
839
    public boolean recv_billOrder() throws TransactionServiceException, TException
840
    {
841
      TMessage msg = iprot_.readMessageBegin();
842
      if (msg.type == TMessageType.EXCEPTION) {
843
        TApplicationException x = TApplicationException.read(iprot_);
844
        iprot_.readMessageEnd();
845
        throw x;
846
      }
847
      billOrder_result result = new billOrder_result();
848
      result.read(iprot_);
849
      iprot_.readMessageEnd();
850
      if (result.isSetSuccess()) {
851
        return result.success;
852
      }
853
      if (result.ex != null) {
854
        throw result.ex;
855
      }
856
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "billOrder failed: unknown result");
857
    }
858
 
1529 ankur.sing 859
    public List<Order> getOrdersForTransaction(long transactionId, long customerId) throws TransactionServiceException, TException
68 ashish 860
    {
1529 ankur.sing 861
      send_getOrdersForTransaction(transactionId, customerId);
483 rajveer 862
      return recv_getOrdersForTransaction();
68 ashish 863
    }
864
 
1529 ankur.sing 865
    public void send_getOrdersForTransaction(long transactionId, long customerId) throws TException
68 ashish 866
    {
483 rajveer 867
      oprot_.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.CALL, seqid_));
868
      getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 869
      args.transactionId = transactionId;
1529 ankur.sing 870
      args.customerId = customerId;
68 ashish 871
      args.write(oprot_);
872
      oprot_.writeMessageEnd();
873
      oprot_.getTransport().flush();
874
    }
875
 
483 rajveer 876
    public List<Order> recv_getOrdersForTransaction() throws TransactionServiceException, TException
68 ashish 877
    {
878
      TMessage msg = iprot_.readMessageBegin();
879
      if (msg.type == TMessageType.EXCEPTION) {
880
        TApplicationException x = TApplicationException.read(iprot_);
881
        iprot_.readMessageEnd();
882
        throw x;
883
      }
483 rajveer 884
      getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 885
      result.read(iprot_);
886
      iprot_.readMessageEnd();
887
      if (result.isSetSuccess()) {
888
        return result.success;
889
      }
890
      if (result.ex != null) {
891
        throw result.ex;
892
      }
483 rajveer 893
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForTransaction failed: unknown result");
68 ashish 894
    }
895
 
483 rajveer 896
    public List<Order> getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TransactionServiceException, TException
68 ashish 897
    {
483 rajveer 898
      send_getOrdersForCustomer(customerId, from_date, to_date, status);
899
      return recv_getOrdersForCustomer();
68 ashish 900
    }
901
 
483 rajveer 902
    public void send_getOrdersForCustomer(long customerId, long from_date, long to_date, OrderStatus status) throws TException
68 ashish 903
    {
483 rajveer 904
      oprot_.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.CALL, seqid_));
905
      getOrdersForCustomer_args args = new getOrdersForCustomer_args();
906
      args.customerId = customerId;
907
      args.from_date = from_date;
908
      args.to_date = to_date;
909
      args.status = status;
68 ashish 910
      args.write(oprot_);
911
      oprot_.writeMessageEnd();
912
      oprot_.getTransport().flush();
913
    }
914
 
483 rajveer 915
    public List<Order> recv_getOrdersForCustomer() throws TransactionServiceException, TException
68 ashish 916
    {
917
      TMessage msg = iprot_.readMessageBegin();
918
      if (msg.type == TMessageType.EXCEPTION) {
919
        TApplicationException x = TApplicationException.read(iprot_);
920
        iprot_.readMessageEnd();
921
        throw x;
922
      }
483 rajveer 923
      getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 924
      result.read(iprot_);
925
      iprot_.readMessageEnd();
926
      if (result.isSetSuccess()) {
927
        return result.success;
928
      }
929
      if (result.ex != null) {
930
        throw result.ex;
931
      }
483 rajveer 932
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrdersForCustomer failed: unknown result");
68 ashish 933
    }
934
 
483 rajveer 935
    public long createOrder(Order order) throws TransactionServiceException, TException
68 ashish 936
    {
483 rajveer 937
      send_createOrder(order);
938
      return recv_createOrder();
68 ashish 939
    }
940
 
483 rajveer 941
    public void send_createOrder(Order order) throws TException
68 ashish 942
    {
483 rajveer 943
      oprot_.writeMessageBegin(new TMessage("createOrder", TMessageType.CALL, seqid_));
944
      createOrder_args args = new createOrder_args();
945
      args.order = order;
68 ashish 946
      args.write(oprot_);
947
      oprot_.writeMessageEnd();
948
      oprot_.getTransport().flush();
949
    }
950
 
483 rajveer 951
    public long recv_createOrder() throws TransactionServiceException, TException
68 ashish 952
    {
953
      TMessage msg = iprot_.readMessageBegin();
954
      if (msg.type == TMessageType.EXCEPTION) {
955
        TApplicationException x = TApplicationException.read(iprot_);
956
        iprot_.readMessageEnd();
957
        throw x;
958
      }
483 rajveer 959
      createOrder_result result = new createOrder_result();
68 ashish 960
      result.read(iprot_);
961
      iprot_.readMessageEnd();
962
      if (result.isSetSuccess()) {
963
        return result.success;
964
      }
965
      if (result.ex != null) {
966
        throw result.ex;
967
      }
483 rajveer 968
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "createOrder failed: unknown result");
68 ashish 969
    }
970
 
483 rajveer 971
    public Order getOrder(long id) throws TransactionServiceException, TException
68 ashish 972
    {
483 rajveer 973
      send_getOrder(id);
974
      return recv_getOrder();
68 ashish 975
    }
976
 
483 rajveer 977
    public void send_getOrder(long id) throws TException
68 ashish 978
    {
483 rajveer 979
      oprot_.writeMessageBegin(new TMessage("getOrder", TMessageType.CALL, seqid_));
980
      getOrder_args args = new getOrder_args();
981
      args.id = id;
68 ashish 982
      args.write(oprot_);
983
      oprot_.writeMessageEnd();
984
      oprot_.getTransport().flush();
985
    }
986
 
483 rajveer 987
    public Order recv_getOrder() throws TransactionServiceException, TException
68 ashish 988
    {
989
      TMessage msg = iprot_.readMessageBegin();
990
      if (msg.type == TMessageType.EXCEPTION) {
991
        TApplicationException x = TApplicationException.read(iprot_);
992
        iprot_.readMessageEnd();
993
        throw x;
994
      }
483 rajveer 995
      getOrder_result result = new getOrder_result();
68 ashish 996
      result.read(iprot_);
997
      iprot_.readMessageEnd();
998
      if (result.isSetSuccess()) {
999
        return result.success;
1000
      }
1001
      if (result.ex != null) {
1002
        throw result.ex;
1003
      }
483 rajveer 1004
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrder failed: unknown result");
68 ashish 1005
    }
1006
 
483 rajveer 1007
    public List<LineItem> getLineItemsForOrder(long orderId) throws TransactionServiceException, TException
68 ashish 1008
    {
483 rajveer 1009
      send_getLineItemsForOrder(orderId);
1010
      return recv_getLineItemsForOrder();
68 ashish 1011
    }
1012
 
483 rajveer 1013
    public void send_getLineItemsForOrder(long orderId) throws TException
68 ashish 1014
    {
483 rajveer 1015
      oprot_.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.CALL, seqid_));
1016
      getLineItemsForOrder_args args = new getLineItemsForOrder_args();
1017
      args.orderId = orderId;
68 ashish 1018
      args.write(oprot_);
1019
      oprot_.writeMessageEnd();
1020
      oprot_.getTransport().flush();
1021
    }
1022
 
483 rajveer 1023
    public List<LineItem> recv_getLineItemsForOrder() throws TransactionServiceException, TException
68 ashish 1024
    {
1025
      TMessage msg = iprot_.readMessageBegin();
1026
      if (msg.type == TMessageType.EXCEPTION) {
1027
        TApplicationException x = TApplicationException.read(iprot_);
1028
        iprot_.readMessageEnd();
1029
        throw x;
1030
      }
483 rajveer 1031
      getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 1032
      result.read(iprot_);
1033
      iprot_.readMessageEnd();
1034
      if (result.isSetSuccess()) {
1035
        return result.success;
1036
      }
1037
      if (result.ex != null) {
1038
        throw result.ex;
1039
      }
483 rajveer 1040
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getLineItemsForOrder failed: unknown result");
68 ashish 1041
    }
1042
 
1529 ankur.sing 1043
    public Order getOrderForCustomer(long orderId, long customerId) throws TransactionServiceException, TException
1044
    {
1045
      send_getOrderForCustomer(orderId, customerId);
1046
      return recv_getOrderForCustomer();
1047
    }
1048
 
1049
    public void send_getOrderForCustomer(long orderId, long customerId) throws TException
1050
    {
1051
      oprot_.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.CALL, seqid_));
1052
      getOrderForCustomer_args args = new getOrderForCustomer_args();
1053
      args.orderId = orderId;
1054
      args.customerId = customerId;
1055
      args.write(oprot_);
1056
      oprot_.writeMessageEnd();
1057
      oprot_.getTransport().flush();
1058
    }
1059
 
1060
    public Order recv_getOrderForCustomer() throws TransactionServiceException, TException
1061
    {
1062
      TMessage msg = iprot_.readMessageBegin();
1063
      if (msg.type == TMessageType.EXCEPTION) {
1064
        TApplicationException x = TApplicationException.read(iprot_);
1065
        iprot_.readMessageEnd();
1066
        throw x;
1067
      }
1068
      getOrderForCustomer_result result = new getOrderForCustomer_result();
1069
      result.read(iprot_);
1070
      iprot_.readMessageEnd();
1071
      if (result.isSetSuccess()) {
1072
        return result.success;
1073
      }
1074
      if (result.ex != null) {
1075
        throw result.ex;
1076
      }
1077
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getOrderForCustomer failed: unknown result");
1078
    }
1079
 
1221 chandransh 1080
    public List<Order> batchOrders(long warehouseId) throws TransactionServiceException, TException
1081
    {
1082
      send_batchOrders(warehouseId);
1083
      return recv_batchOrders();
1084
    }
1085
 
1086
    public void send_batchOrders(long warehouseId) throws TException
1087
    {
1088
      oprot_.writeMessageBegin(new TMessage("batchOrders", TMessageType.CALL, seqid_));
1089
      batchOrders_args args = new batchOrders_args();
1090
      args.warehouseId = warehouseId;
1091
      args.write(oprot_);
1092
      oprot_.writeMessageEnd();
1093
      oprot_.getTransport().flush();
1094
    }
1095
 
1096
    public List<Order> recv_batchOrders() throws TransactionServiceException, TException
1097
    {
1098
      TMessage msg = iprot_.readMessageBegin();
1099
      if (msg.type == TMessageType.EXCEPTION) {
1100
        TApplicationException x = TApplicationException.read(iprot_);
1101
        iprot_.readMessageEnd();
1102
        throw x;
1103
      }
1104
      batchOrders_result result = new batchOrders_result();
1105
      result.read(iprot_);
1106
      iprot_.readMessageEnd();
1107
      if (result.isSetSuccess()) {
1108
        return result.success;
1109
      }
1110
      if (result.ex != null) {
1111
        throw result.ex;
1112
      }
1113
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "batchOrders failed: unknown result");
1114
    }
1115
 
1209 chandransh 1116
    public boolean markOrderAsOutOfStock(long orderId) throws TransactionServiceException, TException
1117
    {
1118
      send_markOrderAsOutOfStock(orderId);
1119
      return recv_markOrderAsOutOfStock();
1120
    }
1121
 
1122
    public void send_markOrderAsOutOfStock(long orderId) throws TException
1123
    {
1124
      oprot_.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.CALL, seqid_));
1125
      markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
1126
      args.orderId = orderId;
1127
      args.write(oprot_);
1128
      oprot_.writeMessageEnd();
1129
      oprot_.getTransport().flush();
1130
    }
1131
 
1132
    public boolean recv_markOrderAsOutOfStock() throws TransactionServiceException, TException
1133
    {
1134
      TMessage msg = iprot_.readMessageBegin();
1135
      if (msg.type == TMessageType.EXCEPTION) {
1136
        TApplicationException x = TApplicationException.read(iprot_);
1137
        iprot_.readMessageEnd();
1138
        throw x;
1139
      }
1140
      markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
1141
      result.read(iprot_);
1142
      iprot_.readMessageEnd();
1143
      if (result.isSetSuccess()) {
1144
        return result.success;
1145
      }
1146
      if (result.ex != null) {
1147
        throw result.ex;
1148
      }
1149
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrderAsOutOfStock failed: unknown result");
1150
    }
1151
 
758 chandransh 1152
    public boolean markOrdersAsManifested(long warehouseId, long providerId) throws TransactionServiceException, TException
1153
    {
1154
      send_markOrdersAsManifested(warehouseId, providerId);
1155
      return recv_markOrdersAsManifested();
1156
    }
1157
 
1158
    public void send_markOrdersAsManifested(long warehouseId, long providerId) throws TException
1159
    {
1160
      oprot_.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.CALL, seqid_));
1161
      markOrdersAsManifested_args args = new markOrdersAsManifested_args();
1162
      args.warehouseId = warehouseId;
1163
      args.providerId = providerId;
1164
      args.write(oprot_);
1165
      oprot_.writeMessageEnd();
1166
      oprot_.getTransport().flush();
1167
    }
1168
 
1169
    public boolean recv_markOrdersAsManifested() throws TransactionServiceException, TException
1170
    {
1171
      TMessage msg = iprot_.readMessageBegin();
1172
      if (msg.type == TMessageType.EXCEPTION) {
1173
        TApplicationException x = TApplicationException.read(iprot_);
1174
        iprot_.readMessageEnd();
1175
        throw x;
1176
      }
1177
      markOrdersAsManifested_result result = new markOrdersAsManifested_result();
1178
      result.read(iprot_);
1179
      iprot_.readMessageEnd();
1180
      if (result.isSetSuccess()) {
1181
        return result.success;
1182
      }
1183
      if (result.ex != null) {
1184
        throw result.ex;
1185
      }
1186
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsManifested failed: unknown result");
1187
    }
1188
 
1245 chandransh 1189
    public List<Order> markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TransactionServiceException, TException
1114 chandransh 1190
    {
1191
      send_markOrdersAsPickedUp(providerId, pickupDetails);
1192
      return recv_markOrdersAsPickedUp();
1193
    }
1194
 
1245 chandransh 1195
    public void send_markOrdersAsPickedUp(long providerId, Map<String,String> pickupDetails) throws TException
1114 chandransh 1196
    {
1197
      oprot_.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.CALL, seqid_));
1198
      markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
1199
      args.providerId = providerId;
1200
      args.pickupDetails = pickupDetails;
1201
      args.write(oprot_);
1202
      oprot_.writeMessageEnd();
1203
      oprot_.getTransport().flush();
1204
    }
1205
 
1206
    public List<Order> recv_markOrdersAsPickedUp() throws TransactionServiceException, TException
1207
    {
1208
      TMessage msg = iprot_.readMessageBegin();
1209
      if (msg.type == TMessageType.EXCEPTION) {
1210
        TApplicationException x = TApplicationException.read(iprot_);
1211
        iprot_.readMessageEnd();
1212
        throw x;
1213
      }
1214
      markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
1215
      result.read(iprot_);
1216
      iprot_.readMessageEnd();
1217
      if (result.isSetSuccess()) {
1218
        return result.success;
1219
      }
1220
      if (result.ex != null) {
1221
        throw result.ex;
1222
      }
1223
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "markOrdersAsPickedUp failed: unknown result");
1224
    }
1225
 
1133 chandransh 1226
    public void markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TransactionServiceException, TException
1227
    {
1228
      send_markOrdersAsDelivered(providerId, deliveredOrders);
1229
      recv_markOrdersAsDelivered();
1230
    }
1231
 
1232
    public void send_markOrdersAsDelivered(long providerId, Map<String,String> deliveredOrders) throws TException
1233
    {
1234
      oprot_.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.CALL, seqid_));
1235
      markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
1236
      args.providerId = providerId;
1237
      args.deliveredOrders = deliveredOrders;
1238
      args.write(oprot_);
1239
      oprot_.writeMessageEnd();
1240
      oprot_.getTransport().flush();
1241
    }
1242
 
1243
    public void recv_markOrdersAsDelivered() throws TransactionServiceException, TException
1244
    {
1245
      TMessage msg = iprot_.readMessageBegin();
1246
      if (msg.type == TMessageType.EXCEPTION) {
1247
        TApplicationException x = TApplicationException.read(iprot_);
1248
        iprot_.readMessageEnd();
1249
        throw x;
1250
      }
1251
      markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
1252
      result.read(iprot_);
1253
      iprot_.readMessageEnd();
1254
      if (result.ex != null) {
1255
        throw result.ex;
1256
      }
1257
      return;
1258
    }
1259
 
1260
    public void markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TransactionServiceException, TException
1261
    {
1262
      send_markOrdersAsFailed(providerId, returnedOrders);
1263
      recv_markOrdersAsFailed();
1264
    }
1265
 
1266
    public void send_markOrdersAsFailed(long providerId, Map<String,String> returnedOrders) throws TException
1267
    {
1268
      oprot_.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.CALL, seqid_));
1269
      markOrdersAsFailed_args args = new markOrdersAsFailed_args();
1270
      args.providerId = providerId;
1271
      args.returnedOrders = returnedOrders;
1272
      args.write(oprot_);
1273
      oprot_.writeMessageEnd();
1274
      oprot_.getTransport().flush();
1275
    }
1276
 
1277
    public void recv_markOrdersAsFailed() throws TransactionServiceException, TException
1278
    {
1279
      TMessage msg = iprot_.readMessageBegin();
1280
      if (msg.type == TMessageType.EXCEPTION) {
1281
        TApplicationException x = TApplicationException.read(iprot_);
1282
        iprot_.readMessageEnd();
1283
        throw x;
1284
      }
1285
      markOrdersAsFailed_result result = new markOrdersAsFailed_result();
1286
      result.read(iprot_);
1287
      iprot_.readMessageEnd();
1288
      if (result.ex != null) {
1289
        throw result.ex;
1290
      }
1291
      return;
1292
    }
1293
 
1245 chandransh 1294
    public void updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TransactionServiceException, TException
1295
    {
1296
      send_updateNonDeliveryReason(providerId, undeliveredOrders);
1297
      recv_updateNonDeliveryReason();
1298
    }
1299
 
1300
    public void send_updateNonDeliveryReason(long providerId, Map<String,String> undeliveredOrders) throws TException
1301
    {
1302
      oprot_.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.CALL, seqid_));
1303
      updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
1304
      args.providerId = providerId;
1305
      args.undeliveredOrders = undeliveredOrders;
1306
      args.write(oprot_);
1307
      oprot_.writeMessageEnd();
1308
      oprot_.getTransport().flush();
1309
    }
1310
 
1311
    public void recv_updateNonDeliveryReason() throws TransactionServiceException, TException
1312
    {
1313
      TMessage msg = iprot_.readMessageBegin();
1314
      if (msg.type == TMessageType.EXCEPTION) {
1315
        TApplicationException x = TApplicationException.read(iprot_);
1316
        iprot_.readMessageEnd();
1317
        throw x;
1318
      }
1319
      updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
1320
      result.read(iprot_);
1321
      iprot_.readMessageEnd();
1322
      if (result.ex != null) {
1323
        throw result.ex;
1324
      }
1325
      return;
1326
    }
1327
 
1406 ankur.sing 1328
    public List<Order> getUndeliveredOrders(long providerId, long warehouseId) throws TException
1329
    {
1330
      send_getUndeliveredOrders(providerId, warehouseId);
1331
      return recv_getUndeliveredOrders();
1332
    }
1333
 
1334
    public void send_getUndeliveredOrders(long providerId, long warehouseId) throws TException
1335
    {
1336
      oprot_.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.CALL, seqid_));
1337
      getUndeliveredOrders_args args = new getUndeliveredOrders_args();
1338
      args.providerId = providerId;
1339
      args.warehouseId = warehouseId;
1340
      args.write(oprot_);
1341
      oprot_.writeMessageEnd();
1342
      oprot_.getTransport().flush();
1343
    }
1344
 
1345
    public List<Order> recv_getUndeliveredOrders() throws TException
1346
    {
1347
      TMessage msg = iprot_.readMessageBegin();
1348
      if (msg.type == TMessageType.EXCEPTION) {
1349
        TApplicationException x = TApplicationException.read(iprot_);
1350
        iprot_.readMessageEnd();
1351
        throw x;
1352
      }
1353
      getUndeliveredOrders_result result = new getUndeliveredOrders_result();
1354
      result.read(iprot_);
1355
      iprot_.readMessageEnd();
1356
      if (result.isSetSuccess()) {
1357
        return result.success;
1358
      }
1359
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getUndeliveredOrders failed: unknown result");
1360
    }
1361
 
483 rajveer 1362
    public List<Alert> getAlerts(long orderId, boolean valid) throws TException
68 ashish 1363
    {
483 rajveer 1364
      send_getAlerts(orderId, valid);
305 ashish 1365
      return recv_getAlerts();
1366
    }
1367
 
483 rajveer 1368
    public void send_getAlerts(long orderId, boolean valid) throws TException
305 ashish 1369
    {
1370
      oprot_.writeMessageBegin(new TMessage("getAlerts", TMessageType.CALL, seqid_));
1371
      getAlerts_args args = new getAlerts_args();
483 rajveer 1372
      args.orderId = orderId;
305 ashish 1373
      args.valid = valid;
1374
      args.write(oprot_);
1375
      oprot_.writeMessageEnd();
1376
      oprot_.getTransport().flush();
1377
    }
1378
 
1379
    public List<Alert> recv_getAlerts() throws TException
1380
    {
1381
      TMessage msg = iprot_.readMessageBegin();
1382
      if (msg.type == TMessageType.EXCEPTION) {
1383
        TApplicationException x = TApplicationException.read(iprot_);
1384
        iprot_.readMessageEnd();
1385
        throw x;
1386
      }
1387
      getAlerts_result result = new getAlerts_result();
1388
      result.read(iprot_);
1389
      iprot_.readMessageEnd();
1390
      if (result.isSetSuccess()) {
1391
        return result.success;
1392
      }
1393
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getAlerts failed: unknown result");
1394
    }
1395
 
483 rajveer 1396
    public void setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1397
    {
483 rajveer 1398
      send_setAlert(orderId, unset, type, comment);
305 ashish 1399
      recv_setAlert();
1400
    }
1401
 
483 rajveer 1402
    public void send_setAlert(long orderId, boolean unset, long type, String comment) throws TException
305 ashish 1403
    {
1404
      oprot_.writeMessageBegin(new TMessage("setAlert", TMessageType.CALL, seqid_));
1405
      setAlert_args args = new setAlert_args();
483 rajveer 1406
      args.orderId = orderId;
305 ashish 1407
      args.unset = unset;
1408
      args.type = type;
1409
      args.comment = comment;
1410
      args.write(oprot_);
1411
      oprot_.writeMessageEnd();
1412
      oprot_.getTransport().flush();
1413
    }
1414
 
1415
    public void recv_setAlert() throws TException
1416
    {
1417
      TMessage msg = iprot_.readMessageBegin();
1418
      if (msg.type == TMessageType.EXCEPTION) {
1419
        TApplicationException x = TApplicationException.read(iprot_);
1420
        iprot_.readMessageEnd();
1421
        throw x;
1422
      }
1423
      setAlert_result result = new setAlert_result();
1424
      result.read(iprot_);
1425
      iprot_.readMessageEnd();
1426
      return;
1427
    }
1428
 
1598 ankur.sing 1429
    public long getValidOrderCount() throws TException
1430
    {
1431
      send_getValidOrderCount();
1432
      return recv_getValidOrderCount();
1433
    }
1434
 
1435
    public void send_getValidOrderCount() throws TException
1436
    {
1437
      oprot_.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.CALL, seqid_));
1438
      getValidOrderCount_args args = new getValidOrderCount_args();
1439
      args.write(oprot_);
1440
      oprot_.writeMessageEnd();
1441
      oprot_.getTransport().flush();
1442
    }
1443
 
1444
    public long recv_getValidOrderCount() throws TException
1445
    {
1446
      TMessage msg = iprot_.readMessageBegin();
1447
      if (msg.type == TMessageType.EXCEPTION) {
1448
        TApplicationException x = TApplicationException.read(iprot_);
1449
        iprot_.readMessageEnd();
1450
        throw x;
1451
      }
1452
      getValidOrderCount_result result = new getValidOrderCount_result();
1453
      result.read(iprot_);
1454
      iprot_.readMessageEnd();
1455
      if (result.isSetSuccess()) {
1456
        return result.success;
1457
      }
1458
      throw new TApplicationException(TApplicationException.MISSING_RESULT, "getValidOrderCount failed: unknown result");
1459
    }
1460
 
68 ashish 1461
  }
1462
  public static class Processor implements TProcessor {
1463
    private static final Logger LOGGER = LoggerFactory.getLogger(Processor.class.getName());
1464
    public Processor(Iface iface)
1465
    {
1466
      iface_ = iface;
764 rajveer 1467
      processMap_.put("closeSession", new closeSession());
68 ashish 1468
      processMap_.put("createTransaction", new createTransaction());
1469
      processMap_.put("getTransaction", new getTransaction());
1470
      processMap_.put("getTransactionsForCustomer", new getTransactionsForCustomer());
132 ashish 1471
      processMap_.put("getTransactionsForShoppingCartId", new getTransactionsForShoppingCartId());
68 ashish 1472
      processMap_.put("getTransactionStatus", new getTransactionStatus());
1473
      processMap_.put("changeTransactionStatus", new changeTransactionStatus());
1398 varun.gupt 1474
      processMap_.put("enqueueTransactionInfoEmail", new enqueueTransactionInfoEmail());
483 rajveer 1475
      processMap_.put("getAllOrders", new getAllOrders());
1022 varun.gupt 1476
      processMap_.put("getOrdersByBillingDate", new getOrdersByBillingDate());
1382 varun.gupt 1477
      processMap_.put("getReturnableOrdersForCustomer", new getReturnableOrdersForCustomer());
1478
      processMap_.put("getCancellableOrdersForCustomer", new getCancellableOrdersForCustomer());
483 rajveer 1479
      processMap_.put("changeOrderStatus", new changeOrderStatus());
495 rajveer 1480
      processMap_.put("addBillingDetails", new addBillingDetails());
1148 chandransh 1481
      processMap_.put("addJacketNumber", new addJacketNumber());
923 rajveer 1482
      processMap_.put("acceptOrder", new acceptOrder());
1483
      processMap_.put("billOrder", new billOrder());
483 rajveer 1484
      processMap_.put("getOrdersForTransaction", new getOrdersForTransaction());
1485
      processMap_.put("getOrdersForCustomer", new getOrdersForCustomer());
1486
      processMap_.put("createOrder", new createOrder());
1487
      processMap_.put("getOrder", new getOrder());
1488
      processMap_.put("getLineItemsForOrder", new getLineItemsForOrder());
1529 ankur.sing 1489
      processMap_.put("getOrderForCustomer", new getOrderForCustomer());
1221 chandransh 1490
      processMap_.put("batchOrders", new batchOrders());
1209 chandransh 1491
      processMap_.put("markOrderAsOutOfStock", new markOrderAsOutOfStock());
758 chandransh 1492
      processMap_.put("markOrdersAsManifested", new markOrdersAsManifested());
1114 chandransh 1493
      processMap_.put("markOrdersAsPickedUp", new markOrdersAsPickedUp());
1133 chandransh 1494
      processMap_.put("markOrdersAsDelivered", new markOrdersAsDelivered());
1495
      processMap_.put("markOrdersAsFailed", new markOrdersAsFailed());
1245 chandransh 1496
      processMap_.put("updateNonDeliveryReason", new updateNonDeliveryReason());
1406 ankur.sing 1497
      processMap_.put("getUndeliveredOrders", new getUndeliveredOrders());
305 ashish 1498
      processMap_.put("getAlerts", new getAlerts());
1499
      processMap_.put("setAlert", new setAlert());
1598 ankur.sing 1500
      processMap_.put("getValidOrderCount", new getValidOrderCount());
68 ashish 1501
    }
1502
 
1503
    protected static interface ProcessFunction {
1504
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException;
1505
    }
1506
 
1507
    private Iface iface_;
1508
    protected final HashMap<String,ProcessFunction> processMap_ = new HashMap<String,ProcessFunction>();
1509
 
1510
    public boolean process(TProtocol iprot, TProtocol oprot) throws TException
1511
    {
1512
      TMessage msg = iprot.readMessageBegin();
1513
      ProcessFunction fn = processMap_.get(msg.name);
1514
      if (fn == null) {
1515
        TProtocolUtil.skip(iprot, TType.STRUCT);
1516
        iprot.readMessageEnd();
1517
        TApplicationException x = new TApplicationException(TApplicationException.UNKNOWN_METHOD, "Invalid method name: '"+msg.name+"'");
1518
        oprot.writeMessageBegin(new TMessage(msg.name, TMessageType.EXCEPTION, msg.seqid));
1519
        x.write(oprot);
1520
        oprot.writeMessageEnd();
1521
        oprot.getTransport().flush();
1522
        return true;
1523
      }
1524
      fn.process(msg.seqid, iprot, oprot);
1525
      return true;
1526
    }
1527
 
764 rajveer 1528
    private class closeSession implements ProcessFunction {
1529
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1530
      {
1531
        closeSession_args args = new closeSession_args();
1532
        args.read(iprot);
1533
        iprot.readMessageEnd();
1534
        closeSession_result result = new closeSession_result();
1535
        iface_.closeSession();
1536
        oprot.writeMessageBegin(new TMessage("closeSession", TMessageType.REPLY, seqid));
1537
        result.write(oprot);
1538
        oprot.writeMessageEnd();
1539
        oprot.getTransport().flush();
1540
      }
1541
 
1542
    }
1543
 
68 ashish 1544
    private class createTransaction implements ProcessFunction {
1545
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1546
      {
1547
        createTransaction_args args = new createTransaction_args();
1548
        args.read(iprot);
1549
        iprot.readMessageEnd();
1550
        createTransaction_result result = new createTransaction_result();
1551
        try {
132 ashish 1552
          result.success = iface_.createTransaction(args.transaction);
1553
          result.setSuccessIsSet(true);
68 ashish 1554
        } catch (TransactionServiceException ex) {
1555
          result.ex = ex;
1556
        } catch (Throwable th) {
1557
          LOGGER.error("Internal error processing createTransaction", th);
1558
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createTransaction");
1559
          oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.EXCEPTION, seqid));
1560
          x.write(oprot);
1561
          oprot.writeMessageEnd();
1562
          oprot.getTransport().flush();
1563
          return;
1564
        }
1565
        oprot.writeMessageBegin(new TMessage("createTransaction", TMessageType.REPLY, seqid));
1566
        result.write(oprot);
1567
        oprot.writeMessageEnd();
1568
        oprot.getTransport().flush();
1569
      }
1570
 
1571
    }
1572
 
1573
    private class getTransaction implements ProcessFunction {
1574
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1575
      {
1576
        getTransaction_args args = new getTransaction_args();
1577
        args.read(iprot);
1578
        iprot.readMessageEnd();
1579
        getTransaction_result result = new getTransaction_result();
1580
        try {
1581
          result.success = iface_.getTransaction(args.id);
1582
        } catch (TransactionServiceException ex) {
1583
          result.ex = ex;
1584
        } catch (Throwable th) {
1585
          LOGGER.error("Internal error processing getTransaction", th);
1586
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransaction");
1587
          oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.EXCEPTION, seqid));
1588
          x.write(oprot);
1589
          oprot.writeMessageEnd();
1590
          oprot.getTransport().flush();
1591
          return;
1592
        }
1593
        oprot.writeMessageBegin(new TMessage("getTransaction", TMessageType.REPLY, seqid));
1594
        result.write(oprot);
1595
        oprot.writeMessageEnd();
1596
        oprot.getTransport().flush();
1597
      }
1598
 
1599
    }
1600
 
1601
    private class getTransactionsForCustomer implements ProcessFunction {
1602
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1603
      {
1604
        getTransactionsForCustomer_args args = new getTransactionsForCustomer_args();
1605
        args.read(iprot);
1606
        iprot.readMessageEnd();
1607
        getTransactionsForCustomer_result result = new getTransactionsForCustomer_result();
1608
        try {
132 ashish 1609
          result.success = iface_.getTransactionsForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 1610
        } catch (TransactionServiceException ex) {
1611
          result.ex = ex;
1612
        } catch (Throwable th) {
1613
          LOGGER.error("Internal error processing getTransactionsForCustomer", th);
1614
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForCustomer");
1615
          oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.EXCEPTION, seqid));
1616
          x.write(oprot);
1617
          oprot.writeMessageEnd();
1618
          oprot.getTransport().flush();
1619
          return;
1620
        }
1621
        oprot.writeMessageBegin(new TMessage("getTransactionsForCustomer", TMessageType.REPLY, seqid));
1622
        result.write(oprot);
1623
        oprot.writeMessageEnd();
1624
        oprot.getTransport().flush();
1625
      }
1626
 
1627
    }
1628
 
132 ashish 1629
    private class getTransactionsForShoppingCartId implements ProcessFunction {
1630
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1631
      {
1632
        getTransactionsForShoppingCartId_args args = new getTransactionsForShoppingCartId_args();
1633
        args.read(iprot);
1634
        iprot.readMessageEnd();
1635
        getTransactionsForShoppingCartId_result result = new getTransactionsForShoppingCartId_result();
1636
        try {
1637
          result.success = iface_.getTransactionsForShoppingCartId(args.shoppingCartId);
1638
        } catch (TransactionServiceException ex) {
1639
          result.ex = ex;
1640
        } catch (Throwable th) {
1641
          LOGGER.error("Internal error processing getTransactionsForShoppingCartId", th);
1642
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionsForShoppingCartId");
1643
          oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.EXCEPTION, seqid));
1644
          x.write(oprot);
1645
          oprot.writeMessageEnd();
1646
          oprot.getTransport().flush();
1647
          return;
1648
        }
1649
        oprot.writeMessageBegin(new TMessage("getTransactionsForShoppingCartId", TMessageType.REPLY, seqid));
1650
        result.write(oprot);
1651
        oprot.writeMessageEnd();
1652
        oprot.getTransport().flush();
1653
      }
1654
 
1655
    }
1656
 
68 ashish 1657
    private class getTransactionStatus implements ProcessFunction {
1658
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1659
      {
1660
        getTransactionStatus_args args = new getTransactionStatus_args();
1661
        args.read(iprot);
1662
        iprot.readMessageEnd();
1663
        getTransactionStatus_result result = new getTransactionStatus_result();
1664
        try {
1665
          result.success = iface_.getTransactionStatus(args.transactionId);
1666
        } catch (TransactionServiceException ex) {
1667
          result.ex = ex;
1668
        } catch (Throwable th) {
1669
          LOGGER.error("Internal error processing getTransactionStatus", th);
1670
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getTransactionStatus");
1671
          oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.EXCEPTION, seqid));
1672
          x.write(oprot);
1673
          oprot.writeMessageEnd();
1674
          oprot.getTransport().flush();
1675
          return;
1676
        }
1677
        oprot.writeMessageBegin(new TMessage("getTransactionStatus", TMessageType.REPLY, seqid));
1678
        result.write(oprot);
1679
        oprot.writeMessageEnd();
1680
        oprot.getTransport().flush();
1681
      }
1682
 
1683
    }
1684
 
1685
    private class changeTransactionStatus implements ProcessFunction {
1686
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1687
      {
1688
        changeTransactionStatus_args args = new changeTransactionStatus_args();
1689
        args.read(iprot);
1690
        iprot.readMessageEnd();
1691
        changeTransactionStatus_result result = new changeTransactionStatus_result();
1692
        try {
1693
          result.success = iface_.changeTransactionStatus(args.transactionId, args.status, args.description);
1694
          result.setSuccessIsSet(true);
1695
        } catch (TransactionServiceException ex) {
1696
          result.ex = ex;
1697
        } catch (Throwable th) {
1698
          LOGGER.error("Internal error processing changeTransactionStatus", th);
1699
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeTransactionStatus");
1700
          oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.EXCEPTION, seqid));
1701
          x.write(oprot);
1702
          oprot.writeMessageEnd();
1703
          oprot.getTransport().flush();
1704
          return;
1705
        }
1706
        oprot.writeMessageBegin(new TMessage("changeTransactionStatus", TMessageType.REPLY, seqid));
1707
        result.write(oprot);
1708
        oprot.writeMessageEnd();
1709
        oprot.getTransport().flush();
1710
      }
1711
 
1712
    }
1713
 
1398 varun.gupt 1714
    private class enqueueTransactionInfoEmail implements ProcessFunction {
1382 varun.gupt 1715
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1716
      {
1398 varun.gupt 1717
        enqueueTransactionInfoEmail_args args = new enqueueTransactionInfoEmail_args();
1382 varun.gupt 1718
        args.read(iprot);
1719
        iprot.readMessageEnd();
1398 varun.gupt 1720
        enqueueTransactionInfoEmail_result result = new enqueueTransactionInfoEmail_result();
1382 varun.gupt 1721
        try {
1398 varun.gupt 1722
          result.success = iface_.enqueueTransactionInfoEmail(args.transactionId);
1382 varun.gupt 1723
          result.setSuccessIsSet(true);
1724
        } catch (TransactionServiceException ex) {
1725
          result.ex = ex;
1726
        } catch (Throwable th) {
1398 varun.gupt 1727
          LOGGER.error("Internal error processing enqueueTransactionInfoEmail", th);
1728
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing enqueueTransactionInfoEmail");
1729
          oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.EXCEPTION, seqid));
1382 varun.gupt 1730
          x.write(oprot);
1731
          oprot.writeMessageEnd();
1732
          oprot.getTransport().flush();
1733
          return;
1734
        }
1398 varun.gupt 1735
        oprot.writeMessageBegin(new TMessage("enqueueTransactionInfoEmail", TMessageType.REPLY, seqid));
1382 varun.gupt 1736
        result.write(oprot);
1737
        oprot.writeMessageEnd();
1738
        oprot.getTransport().flush();
1739
      }
1740
 
1741
    }
1742
 
483 rajveer 1743
    private class getAllOrders implements ProcessFunction {
68 ashish 1744
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1745
      {
483 rajveer 1746
        getAllOrders_args args = new getAllOrders_args();
68 ashish 1747
        args.read(iprot);
1748
        iprot.readMessageEnd();
483 rajveer 1749
        getAllOrders_result result = new getAllOrders_result();
68 ashish 1750
        try {
483 rajveer 1751
          result.success = iface_.getAllOrders(args.status, args.from_date, args.to_date, args.warehouse_id);
68 ashish 1752
        } catch (TransactionServiceException ex) {
1753
          result.ex = ex;
1754
        } catch (Throwable th) {
483 rajveer 1755
          LOGGER.error("Internal error processing getAllOrders", th);
1756
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getAllOrders");
1757
          oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.EXCEPTION, seqid));
68 ashish 1758
          x.write(oprot);
1759
          oprot.writeMessageEnd();
1760
          oprot.getTransport().flush();
1761
          return;
1762
        }
483 rajveer 1763
        oprot.writeMessageBegin(new TMessage("getAllOrders", TMessageType.REPLY, seqid));
68 ashish 1764
        result.write(oprot);
1765
        oprot.writeMessageEnd();
1766
        oprot.getTransport().flush();
1767
      }
1768
 
1769
    }
1770
 
1022 varun.gupt 1771
    private class getOrdersByBillingDate implements ProcessFunction {
1772
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1773
      {
1774
        getOrdersByBillingDate_args args = new getOrdersByBillingDate_args();
1775
        args.read(iprot);
1776
        iprot.readMessageEnd();
1777
        getOrdersByBillingDate_result result = new getOrdersByBillingDate_result();
1778
        try {
1779
          result.success = iface_.getOrdersByBillingDate(args.status, args.start_billing_date, args.end_billing_date, args.warehouse_id);
1780
        } catch (TransactionServiceException ex) {
1781
          result.ex = ex;
1782
        } catch (Throwable th) {
1783
          LOGGER.error("Internal error processing getOrdersByBillingDate", th);
1784
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersByBillingDate");
1785
          oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.EXCEPTION, seqid));
1786
          x.write(oprot);
1787
          oprot.writeMessageEnd();
1788
          oprot.getTransport().flush();
1789
          return;
1790
        }
1791
        oprot.writeMessageBegin(new TMessage("getOrdersByBillingDate", TMessageType.REPLY, seqid));
1792
        result.write(oprot);
1793
        oprot.writeMessageEnd();
1794
        oprot.getTransport().flush();
1795
      }
1796
 
1797
    }
1798
 
1382 varun.gupt 1799
    private class getReturnableOrdersForCustomer implements ProcessFunction {
1800
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1801
      {
1802
        getReturnableOrdersForCustomer_args args = new getReturnableOrdersForCustomer_args();
1803
        args.read(iprot);
1804
        iprot.readMessageEnd();
1805
        getReturnableOrdersForCustomer_result result = new getReturnableOrdersForCustomer_result();
1806
        try {
1807
          result.success = iface_.getReturnableOrdersForCustomer(args.customer_id, args.limit);
1808
        } catch (TransactionServiceException ex) {
1809
          result.ex = ex;
1810
        } catch (Throwable th) {
1811
          LOGGER.error("Internal error processing getReturnableOrdersForCustomer", th);
1812
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getReturnableOrdersForCustomer");
1813
          oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1814
          x.write(oprot);
1815
          oprot.writeMessageEnd();
1816
          oprot.getTransport().flush();
1817
          return;
1818
        }
1819
        oprot.writeMessageBegin(new TMessage("getReturnableOrdersForCustomer", TMessageType.REPLY, seqid));
1820
        result.write(oprot);
1821
        oprot.writeMessageEnd();
1822
        oprot.getTransport().flush();
1823
      }
1824
 
1825
    }
1826
 
1827
    private class getCancellableOrdersForCustomer implements ProcessFunction {
1828
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1829
      {
1830
        getCancellableOrdersForCustomer_args args = new getCancellableOrdersForCustomer_args();
1831
        args.read(iprot);
1832
        iprot.readMessageEnd();
1833
        getCancellableOrdersForCustomer_result result = new getCancellableOrdersForCustomer_result();
1834
        try {
1835
          result.success = iface_.getCancellableOrdersForCustomer(args.customer_id, args.limit);
1836
        } catch (TransactionServiceException ex) {
1837
          result.ex = ex;
1838
        } catch (Throwable th) {
1839
          LOGGER.error("Internal error processing getCancellableOrdersForCustomer", th);
1840
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getCancellableOrdersForCustomer");
1841
          oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.EXCEPTION, seqid));
1842
          x.write(oprot);
1843
          oprot.writeMessageEnd();
1844
          oprot.getTransport().flush();
1845
          return;
1846
        }
1847
        oprot.writeMessageBegin(new TMessage("getCancellableOrdersForCustomer", TMessageType.REPLY, seqid));
1848
        result.write(oprot);
1849
        oprot.writeMessageEnd();
1850
        oprot.getTransport().flush();
1851
      }
1852
 
1853
    }
1854
 
483 rajveer 1855
    private class changeOrderStatus implements ProcessFunction {
68 ashish 1856
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1857
      {
483 rajveer 1858
        changeOrderStatus_args args = new changeOrderStatus_args();
68 ashish 1859
        args.read(iprot);
1860
        iprot.readMessageEnd();
483 rajveer 1861
        changeOrderStatus_result result = new changeOrderStatus_result();
68 ashish 1862
        try {
483 rajveer 1863
          result.success = iface_.changeOrderStatus(args.orderId, args.status, args.description);
68 ashish 1864
          result.setSuccessIsSet(true);
1865
        } catch (TransactionServiceException ex) {
1866
          result.ex = ex;
1867
        } catch (Throwable th) {
483 rajveer 1868
          LOGGER.error("Internal error processing changeOrderStatus", th);
1869
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing changeOrderStatus");
1870
          oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.EXCEPTION, seqid));
68 ashish 1871
          x.write(oprot);
1872
          oprot.writeMessageEnd();
1873
          oprot.getTransport().flush();
1874
          return;
1875
        }
483 rajveer 1876
        oprot.writeMessageBegin(new TMessage("changeOrderStatus", TMessageType.REPLY, seqid));
68 ashish 1877
        result.write(oprot);
1878
        oprot.writeMessageEnd();
1879
        oprot.getTransport().flush();
1880
      }
1881
 
1882
    }
1883
 
495 rajveer 1884
    private class addBillingDetails implements ProcessFunction {
1885
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1886
      {
1887
        addBillingDetails_args args = new addBillingDetails_args();
1888
        args.read(iprot);
1889
        iprot.readMessageEnd();
1890
        addBillingDetails_result result = new addBillingDetails_result();
1891
        try {
1148 chandransh 1892
          result.success = iface_.addBillingDetails(args.orderId, args.invoice_number, args.billed_by);
495 rajveer 1893
          result.setSuccessIsSet(true);
1894
        } catch (TransactionServiceException ex) {
1895
          result.ex = ex;
1896
        } catch (Throwable th) {
1897
          LOGGER.error("Internal error processing addBillingDetails", th);
1898
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addBillingDetails");
1899
          oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.EXCEPTION, seqid));
1900
          x.write(oprot);
1901
          oprot.writeMessageEnd();
1902
          oprot.getTransport().flush();
1903
          return;
1904
        }
1905
        oprot.writeMessageBegin(new TMessage("addBillingDetails", TMessageType.REPLY, seqid));
1906
        result.write(oprot);
1907
        oprot.writeMessageEnd();
1908
        oprot.getTransport().flush();
1909
      }
1910
 
1911
    }
1912
 
1148 chandransh 1913
    private class addJacketNumber implements ProcessFunction {
1914
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1915
      {
1916
        addJacketNumber_args args = new addJacketNumber_args();
1917
        args.read(iprot);
1918
        iprot.readMessageEnd();
1919
        addJacketNumber_result result = new addJacketNumber_result();
1920
        try {
1921
          result.success = iface_.addJacketNumber(args.orderId, args.jacketNumber);
1922
          result.setSuccessIsSet(true);
1923
        } catch (TransactionServiceException ex) {
1924
          result.ex = ex;
1925
        } catch (Throwable th) {
1926
          LOGGER.error("Internal error processing addJacketNumber", th);
1927
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing addJacketNumber");
1928
          oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.EXCEPTION, seqid));
1929
          x.write(oprot);
1930
          oprot.writeMessageEnd();
1931
          oprot.getTransport().flush();
1932
          return;
1933
        }
1934
        oprot.writeMessageBegin(new TMessage("addJacketNumber", TMessageType.REPLY, seqid));
1935
        result.write(oprot);
1936
        oprot.writeMessageEnd();
1937
        oprot.getTransport().flush();
1938
      }
1939
 
1940
    }
1941
 
923 rajveer 1942
    private class acceptOrder implements ProcessFunction {
1943
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1944
      {
1945
        acceptOrder_args args = new acceptOrder_args();
1946
        args.read(iprot);
1947
        iprot.readMessageEnd();
1948
        acceptOrder_result result = new acceptOrder_result();
1949
        try {
1950
          result.success = iface_.acceptOrder(args.orderId);
1951
          result.setSuccessIsSet(true);
1952
        } catch (TransactionServiceException ex) {
1953
          result.ex = ex;
1954
        } catch (Throwable th) {
1955
          LOGGER.error("Internal error processing acceptOrder", th);
1956
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing acceptOrder");
1957
          oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.EXCEPTION, seqid));
1958
          x.write(oprot);
1959
          oprot.writeMessageEnd();
1960
          oprot.getTransport().flush();
1961
          return;
1962
        }
1963
        oprot.writeMessageBegin(new TMessage("acceptOrder", TMessageType.REPLY, seqid));
1964
        result.write(oprot);
1965
        oprot.writeMessageEnd();
1966
        oprot.getTransport().flush();
1967
      }
1968
 
1969
    }
1970
 
1971
    private class billOrder implements ProcessFunction {
1972
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
1973
      {
1974
        billOrder_args args = new billOrder_args();
1975
        args.read(iprot);
1976
        iprot.readMessageEnd();
1977
        billOrder_result result = new billOrder_result();
1978
        try {
1979
          result.success = iface_.billOrder(args.orderId);
1980
          result.setSuccessIsSet(true);
1981
        } catch (TransactionServiceException ex) {
1982
          result.ex = ex;
1983
        } catch (Throwable th) {
1984
          LOGGER.error("Internal error processing billOrder", th);
1985
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing billOrder");
1986
          oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.EXCEPTION, seqid));
1987
          x.write(oprot);
1988
          oprot.writeMessageEnd();
1989
          oprot.getTransport().flush();
1990
          return;
1991
        }
1992
        oprot.writeMessageBegin(new TMessage("billOrder", TMessageType.REPLY, seqid));
1993
        result.write(oprot);
1994
        oprot.writeMessageEnd();
1995
        oprot.getTransport().flush();
1996
      }
1997
 
1998
    }
1999
 
483 rajveer 2000
    private class getOrdersForTransaction implements ProcessFunction {
68 ashish 2001
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2002
      {
483 rajveer 2003
        getOrdersForTransaction_args args = new getOrdersForTransaction_args();
68 ashish 2004
        args.read(iprot);
2005
        iprot.readMessageEnd();
483 rajveer 2006
        getOrdersForTransaction_result result = new getOrdersForTransaction_result();
68 ashish 2007
        try {
1529 ankur.sing 2008
          result.success = iface_.getOrdersForTransaction(args.transactionId, args.customerId);
68 ashish 2009
        } catch (TransactionServiceException ex) {
2010
          result.ex = ex;
2011
        } catch (Throwable th) {
483 rajveer 2012
          LOGGER.error("Internal error processing getOrdersForTransaction", th);
2013
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForTransaction");
2014
          oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.EXCEPTION, seqid));
68 ashish 2015
          x.write(oprot);
2016
          oprot.writeMessageEnd();
2017
          oprot.getTransport().flush();
2018
          return;
2019
        }
483 rajveer 2020
        oprot.writeMessageBegin(new TMessage("getOrdersForTransaction", TMessageType.REPLY, seqid));
68 ashish 2021
        result.write(oprot);
2022
        oprot.writeMessageEnd();
2023
        oprot.getTransport().flush();
2024
      }
2025
 
2026
    }
2027
 
483 rajveer 2028
    private class getOrdersForCustomer implements ProcessFunction {
68 ashish 2029
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2030
      {
483 rajveer 2031
        getOrdersForCustomer_args args = new getOrdersForCustomer_args();
68 ashish 2032
        args.read(iprot);
2033
        iprot.readMessageEnd();
483 rajveer 2034
        getOrdersForCustomer_result result = new getOrdersForCustomer_result();
68 ashish 2035
        try {
483 rajveer 2036
          result.success = iface_.getOrdersForCustomer(args.customerId, args.from_date, args.to_date, args.status);
68 ashish 2037
        } catch (TransactionServiceException ex) {
2038
          result.ex = ex;
2039
        } catch (Throwable th) {
483 rajveer 2040
          LOGGER.error("Internal error processing getOrdersForCustomer", th);
2041
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrdersForCustomer");
2042
          oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.EXCEPTION, seqid));
68 ashish 2043
          x.write(oprot);
2044
          oprot.writeMessageEnd();
2045
          oprot.getTransport().flush();
2046
          return;
2047
        }
483 rajveer 2048
        oprot.writeMessageBegin(new TMessage("getOrdersForCustomer", TMessageType.REPLY, seqid));
68 ashish 2049
        result.write(oprot);
2050
        oprot.writeMessageEnd();
2051
        oprot.getTransport().flush();
2052
      }
2053
 
2054
    }
2055
 
483 rajveer 2056
    private class createOrder implements ProcessFunction {
68 ashish 2057
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2058
      {
483 rajveer 2059
        createOrder_args args = new createOrder_args();
68 ashish 2060
        args.read(iprot);
2061
        iprot.readMessageEnd();
483 rajveer 2062
        createOrder_result result = new createOrder_result();
68 ashish 2063
        try {
483 rajveer 2064
          result.success = iface_.createOrder(args.order);
68 ashish 2065
          result.setSuccessIsSet(true);
2066
        } catch (TransactionServiceException ex) {
2067
          result.ex = ex;
2068
        } catch (Throwable th) {
483 rajveer 2069
          LOGGER.error("Internal error processing createOrder", th);
2070
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing createOrder");
2071
          oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2072
          x.write(oprot);
2073
          oprot.writeMessageEnd();
2074
          oprot.getTransport().flush();
2075
          return;
2076
        }
483 rajveer 2077
        oprot.writeMessageBegin(new TMessage("createOrder", TMessageType.REPLY, seqid));
68 ashish 2078
        result.write(oprot);
2079
        oprot.writeMessageEnd();
2080
        oprot.getTransport().flush();
2081
      }
2082
 
2083
    }
2084
 
483 rajveer 2085
    private class getOrder implements ProcessFunction {
68 ashish 2086
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2087
      {
483 rajveer 2088
        getOrder_args args = new getOrder_args();
68 ashish 2089
        args.read(iprot);
2090
        iprot.readMessageEnd();
483 rajveer 2091
        getOrder_result result = new getOrder_result();
68 ashish 2092
        try {
483 rajveer 2093
          result.success = iface_.getOrder(args.id);
68 ashish 2094
        } catch (TransactionServiceException ex) {
2095
          result.ex = ex;
2096
        } catch (Throwable th) {
483 rajveer 2097
          LOGGER.error("Internal error processing getOrder", th);
2098
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrder");
2099
          oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2100
          x.write(oprot);
2101
          oprot.writeMessageEnd();
2102
          oprot.getTransport().flush();
2103
          return;
2104
        }
483 rajveer 2105
        oprot.writeMessageBegin(new TMessage("getOrder", TMessageType.REPLY, seqid));
68 ashish 2106
        result.write(oprot);
2107
        oprot.writeMessageEnd();
2108
        oprot.getTransport().flush();
2109
      }
2110
 
2111
    }
2112
 
483 rajveer 2113
    private class getLineItemsForOrder implements ProcessFunction {
68 ashish 2114
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2115
      {
483 rajveer 2116
        getLineItemsForOrder_args args = new getLineItemsForOrder_args();
68 ashish 2117
        args.read(iprot);
2118
        iprot.readMessageEnd();
483 rajveer 2119
        getLineItemsForOrder_result result = new getLineItemsForOrder_result();
68 ashish 2120
        try {
483 rajveer 2121
          result.success = iface_.getLineItemsForOrder(args.orderId);
68 ashish 2122
        } catch (TransactionServiceException ex) {
2123
          result.ex = ex;
2124
        } catch (Throwable th) {
483 rajveer 2125
          LOGGER.error("Internal error processing getLineItemsForOrder", th);
2126
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getLineItemsForOrder");
2127
          oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.EXCEPTION, seqid));
68 ashish 2128
          x.write(oprot);
2129
          oprot.writeMessageEnd();
2130
          oprot.getTransport().flush();
2131
          return;
2132
        }
483 rajveer 2133
        oprot.writeMessageBegin(new TMessage("getLineItemsForOrder", TMessageType.REPLY, seqid));
68 ashish 2134
        result.write(oprot);
2135
        oprot.writeMessageEnd();
2136
        oprot.getTransport().flush();
2137
      }
2138
 
2139
    }
2140
 
1529 ankur.sing 2141
    private class getOrderForCustomer implements ProcessFunction {
2142
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2143
      {
2144
        getOrderForCustomer_args args = new getOrderForCustomer_args();
2145
        args.read(iprot);
2146
        iprot.readMessageEnd();
2147
        getOrderForCustomer_result result = new getOrderForCustomer_result();
2148
        try {
2149
          result.success = iface_.getOrderForCustomer(args.orderId, args.customerId);
2150
        } catch (TransactionServiceException ex) {
2151
          result.ex = ex;
2152
        } catch (Throwable th) {
2153
          LOGGER.error("Internal error processing getOrderForCustomer", th);
2154
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing getOrderForCustomer");
2155
          oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.EXCEPTION, seqid));
2156
          x.write(oprot);
2157
          oprot.writeMessageEnd();
2158
          oprot.getTransport().flush();
2159
          return;
2160
        }
2161
        oprot.writeMessageBegin(new TMessage("getOrderForCustomer", TMessageType.REPLY, seqid));
2162
        result.write(oprot);
2163
        oprot.writeMessageEnd();
2164
        oprot.getTransport().flush();
2165
      }
2166
 
2167
    }
2168
 
1221 chandransh 2169
    private class batchOrders implements ProcessFunction {
2170
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2171
      {
2172
        batchOrders_args args = new batchOrders_args();
2173
        args.read(iprot);
2174
        iprot.readMessageEnd();
2175
        batchOrders_result result = new batchOrders_result();
2176
        try {
2177
          result.success = iface_.batchOrders(args.warehouseId);
2178
        } catch (TransactionServiceException ex) {
2179
          result.ex = ex;
2180
        } catch (Throwable th) {
2181
          LOGGER.error("Internal error processing batchOrders", th);
2182
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing batchOrders");
2183
          oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.EXCEPTION, seqid));
2184
          x.write(oprot);
2185
          oprot.writeMessageEnd();
2186
          oprot.getTransport().flush();
2187
          return;
2188
        }
2189
        oprot.writeMessageBegin(new TMessage("batchOrders", TMessageType.REPLY, seqid));
2190
        result.write(oprot);
2191
        oprot.writeMessageEnd();
2192
        oprot.getTransport().flush();
2193
      }
2194
 
2195
    }
2196
 
1209 chandransh 2197
    private class markOrderAsOutOfStock implements ProcessFunction {
2198
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2199
      {
2200
        markOrderAsOutOfStock_args args = new markOrderAsOutOfStock_args();
2201
        args.read(iprot);
2202
        iprot.readMessageEnd();
2203
        markOrderAsOutOfStock_result result = new markOrderAsOutOfStock_result();
2204
        try {
2205
          result.success = iface_.markOrderAsOutOfStock(args.orderId);
2206
          result.setSuccessIsSet(true);
2207
        } catch (TransactionServiceException ex) {
2208
          result.ex = ex;
2209
        } catch (Throwable th) {
2210
          LOGGER.error("Internal error processing markOrderAsOutOfStock", th);
2211
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrderAsOutOfStock");
2212
          oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.EXCEPTION, seqid));
2213
          x.write(oprot);
2214
          oprot.writeMessageEnd();
2215
          oprot.getTransport().flush();
2216
          return;
2217
        }
2218
        oprot.writeMessageBegin(new TMessage("markOrderAsOutOfStock", TMessageType.REPLY, seqid));
2219
        result.write(oprot);
2220
        oprot.writeMessageEnd();
2221
        oprot.getTransport().flush();
2222
      }
2223
 
2224
    }
2225
 
758 chandransh 2226
    private class markOrdersAsManifested implements ProcessFunction {
2227
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2228
      {
2229
        markOrdersAsManifested_args args = new markOrdersAsManifested_args();
2230
        args.read(iprot);
2231
        iprot.readMessageEnd();
2232
        markOrdersAsManifested_result result = new markOrdersAsManifested_result();
2233
        try {
2234
          result.success = iface_.markOrdersAsManifested(args.warehouseId, args.providerId);
2235
          result.setSuccessIsSet(true);
2236
        } catch (TransactionServiceException ex) {
2237
          result.ex = ex;
2238
        } catch (Throwable th) {
2239
          LOGGER.error("Internal error processing markOrdersAsManifested", th);
2240
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsManifested");
2241
          oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.EXCEPTION, seqid));
2242
          x.write(oprot);
2243
          oprot.writeMessageEnd();
2244
          oprot.getTransport().flush();
2245
          return;
2246
        }
2247
        oprot.writeMessageBegin(new TMessage("markOrdersAsManifested", TMessageType.REPLY, seqid));
2248
        result.write(oprot);
2249
        oprot.writeMessageEnd();
2250
        oprot.getTransport().flush();
2251
      }
2252
 
2253
    }
2254
 
1114 chandransh 2255
    private class markOrdersAsPickedUp implements ProcessFunction {
2256
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2257
      {
2258
        markOrdersAsPickedUp_args args = new markOrdersAsPickedUp_args();
2259
        args.read(iprot);
2260
        iprot.readMessageEnd();
2261
        markOrdersAsPickedUp_result result = new markOrdersAsPickedUp_result();
2262
        try {
2263
          result.success = iface_.markOrdersAsPickedUp(args.providerId, args.pickupDetails);
2264
        } catch (TransactionServiceException ex) {
2265
          result.ex = ex;
2266
        } catch (Throwable th) {
2267
          LOGGER.error("Internal error processing markOrdersAsPickedUp", th);
2268
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsPickedUp");
2269
          oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.EXCEPTION, seqid));
2270
          x.write(oprot);
2271
          oprot.writeMessageEnd();
2272
          oprot.getTransport().flush();
2273
          return;
2274
        }
2275
        oprot.writeMessageBegin(new TMessage("markOrdersAsPickedUp", TMessageType.REPLY, seqid));
2276
        result.write(oprot);
2277
        oprot.writeMessageEnd();
2278
        oprot.getTransport().flush();
2279
      }
2280
 
2281
    }
2282
 
1133 chandransh 2283
    private class markOrdersAsDelivered implements ProcessFunction {
2284
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2285
      {
2286
        markOrdersAsDelivered_args args = new markOrdersAsDelivered_args();
2287
        args.read(iprot);
2288
        iprot.readMessageEnd();
2289
        markOrdersAsDelivered_result result = new markOrdersAsDelivered_result();
2290
        try {
2291
          iface_.markOrdersAsDelivered(args.providerId, args.deliveredOrders);
2292
        } catch (TransactionServiceException ex) {
2293
          result.ex = ex;
2294
        } catch (Throwable th) {
2295
          LOGGER.error("Internal error processing markOrdersAsDelivered", th);
2296
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsDelivered");
2297
          oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.EXCEPTION, seqid));
2298
          x.write(oprot);
2299
          oprot.writeMessageEnd();
2300
          oprot.getTransport().flush();
2301
          return;
2302
        }
2303
        oprot.writeMessageBegin(new TMessage("markOrdersAsDelivered", TMessageType.REPLY, seqid));
2304
        result.write(oprot);
2305
        oprot.writeMessageEnd();
2306
        oprot.getTransport().flush();
2307
      }
2308
 
2309
    }
2310
 
2311
    private class markOrdersAsFailed implements ProcessFunction {
2312
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2313
      {
2314
        markOrdersAsFailed_args args = new markOrdersAsFailed_args();
2315
        args.read(iprot);
2316
        iprot.readMessageEnd();
2317
        markOrdersAsFailed_result result = new markOrdersAsFailed_result();
2318
        try {
2319
          iface_.markOrdersAsFailed(args.providerId, args.returnedOrders);
2320
        } catch (TransactionServiceException ex) {
2321
          result.ex = ex;
2322
        } catch (Throwable th) {
2323
          LOGGER.error("Internal error processing markOrdersAsFailed", th);
2324
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing markOrdersAsFailed");
2325
          oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.EXCEPTION, seqid));
2326
          x.write(oprot);
2327
          oprot.writeMessageEnd();
2328
          oprot.getTransport().flush();
2329
          return;
2330
        }
2331
        oprot.writeMessageBegin(new TMessage("markOrdersAsFailed", TMessageType.REPLY, seqid));
2332
        result.write(oprot);
2333
        oprot.writeMessageEnd();
2334
        oprot.getTransport().flush();
2335
      }
2336
 
2337
    }
2338
 
1245 chandransh 2339
    private class updateNonDeliveryReason implements ProcessFunction {
2340
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2341
      {
2342
        updateNonDeliveryReason_args args = new updateNonDeliveryReason_args();
2343
        args.read(iprot);
2344
        iprot.readMessageEnd();
2345
        updateNonDeliveryReason_result result = new updateNonDeliveryReason_result();
2346
        try {
2347
          iface_.updateNonDeliveryReason(args.providerId, args.undeliveredOrders);
2348
        } catch (TransactionServiceException ex) {
2349
          result.ex = ex;
2350
        } catch (Throwable th) {
2351
          LOGGER.error("Internal error processing updateNonDeliveryReason", th);
2352
          TApplicationException x = new TApplicationException(TApplicationException.INTERNAL_ERROR, "Internal error processing updateNonDeliveryReason");
2353
          oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.EXCEPTION, seqid));
2354
          x.write(oprot);
2355
          oprot.writeMessageEnd();
2356
          oprot.getTransport().flush();
2357
          return;
2358
        }
2359
        oprot.writeMessageBegin(new TMessage("updateNonDeliveryReason", TMessageType.REPLY, seqid));
2360
        result.write(oprot);
2361
        oprot.writeMessageEnd();
2362
        oprot.getTransport().flush();
2363
      }
2364
 
2365
    }
2366
 
1406 ankur.sing 2367
    private class getUndeliveredOrders implements ProcessFunction {
2368
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2369
      {
2370
        getUndeliveredOrders_args args = new getUndeliveredOrders_args();
2371
        args.read(iprot);
2372
        iprot.readMessageEnd();
2373
        getUndeliveredOrders_result result = new getUndeliveredOrders_result();
2374
        result.success = iface_.getUndeliveredOrders(args.providerId, args.warehouseId);
2375
        oprot.writeMessageBegin(new TMessage("getUndeliveredOrders", TMessageType.REPLY, seqid));
2376
        result.write(oprot);
2377
        oprot.writeMessageEnd();
2378
        oprot.getTransport().flush();
2379
      }
2380
 
2381
    }
2382
 
305 ashish 2383
    private class getAlerts implements ProcessFunction {
2384
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2385
      {
2386
        getAlerts_args args = new getAlerts_args();
2387
        args.read(iprot);
2388
        iprot.readMessageEnd();
2389
        getAlerts_result result = new getAlerts_result();
483 rajveer 2390
        result.success = iface_.getAlerts(args.orderId, args.valid);
305 ashish 2391
        oprot.writeMessageBegin(new TMessage("getAlerts", TMessageType.REPLY, seqid));
2392
        result.write(oprot);
2393
        oprot.writeMessageEnd();
2394
        oprot.getTransport().flush();
2395
      }
2396
 
2397
    }
2398
 
2399
    private class setAlert implements ProcessFunction {
2400
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2401
      {
2402
        setAlert_args args = new setAlert_args();
2403
        args.read(iprot);
2404
        iprot.readMessageEnd();
2405
        setAlert_result result = new setAlert_result();
483 rajveer 2406
        iface_.setAlert(args.orderId, args.unset, args.type, args.comment);
305 ashish 2407
        oprot.writeMessageBegin(new TMessage("setAlert", TMessageType.REPLY, seqid));
2408
        result.write(oprot);
2409
        oprot.writeMessageEnd();
2410
        oprot.getTransport().flush();
2411
      }
2412
 
2413
    }
2414
 
1598 ankur.sing 2415
    private class getValidOrderCount implements ProcessFunction {
2416
      public void process(int seqid, TProtocol iprot, TProtocol oprot) throws TException
2417
      {
2418
        getValidOrderCount_args args = new getValidOrderCount_args();
2419
        args.read(iprot);
2420
        iprot.readMessageEnd();
2421
        getValidOrderCount_result result = new getValidOrderCount_result();
2422
        result.success = iface_.getValidOrderCount();
2423
        result.setSuccessIsSet(true);
2424
        oprot.writeMessageBegin(new TMessage("getValidOrderCount", TMessageType.REPLY, seqid));
2425
        result.write(oprot);
2426
        oprot.writeMessageEnd();
2427
        oprot.getTransport().flush();
2428
      }
2429
 
2430
    }
2431
 
68 ashish 2432
  }
2433
 
764 rajveer 2434
  public static class closeSession_args implements TBase<closeSession_args._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_args>   {
2435
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_args");
2436
 
2437
 
2438
 
2439
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2440
    public enum _Fields implements TFieldIdEnum {
2441
;
2442
 
2443
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2444
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2445
 
2446
      static {
2447
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2448
          byId.put((int)field._thriftId, field);
2449
          byName.put(field.getFieldName(), field);
2450
        }
2451
      }
2452
 
2453
      /**
2454
       * Find the _Fields constant that matches fieldId, or null if its not found.
2455
       */
2456
      public static _Fields findByThriftId(int fieldId) {
2457
        return byId.get(fieldId);
2458
      }
2459
 
2460
      /**
2461
       * Find the _Fields constant that matches fieldId, throwing an exception
2462
       * if it is not found.
2463
       */
2464
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2465
        _Fields fields = findByThriftId(fieldId);
2466
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2467
        return fields;
2468
      }
2469
 
2470
      /**
2471
       * Find the _Fields constant that matches name, or null if its not found.
2472
       */
2473
      public static _Fields findByName(String name) {
2474
        return byName.get(name);
2475
      }
2476
 
2477
      private final short _thriftId;
2478
      private final String _fieldName;
2479
 
2480
      _Fields(short thriftId, String fieldName) {
2481
        _thriftId = thriftId;
2482
        _fieldName = fieldName;
2483
      }
2484
 
2485
      public short getThriftFieldId() {
2486
        return _thriftId;
2487
      }
2488
 
2489
      public String getFieldName() {
2490
        return _fieldName;
2491
      }
2492
    }
2493
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2494
    }});
2495
 
2496
    static {
2497
      FieldMetaData.addStructMetaDataMap(closeSession_args.class, metaDataMap);
2498
    }
2499
 
2500
    public closeSession_args() {
2501
    }
2502
 
2503
    /**
2504
     * Performs a deep copy on <i>other</i>.
2505
     */
2506
    public closeSession_args(closeSession_args other) {
2507
    }
2508
 
2509
    public closeSession_args deepCopy() {
2510
      return new closeSession_args(this);
2511
    }
2512
 
2513
    @Deprecated
2514
    public closeSession_args clone() {
2515
      return new closeSession_args(this);
2516
    }
2517
 
2518
    public void setFieldValue(_Fields field, Object value) {
2519
      switch (field) {
2520
      }
2521
    }
2522
 
2523
    public void setFieldValue(int fieldID, Object value) {
2524
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2525
    }
2526
 
2527
    public Object getFieldValue(_Fields field) {
2528
      switch (field) {
2529
      }
2530
      throw new IllegalStateException();
2531
    }
2532
 
2533
    public Object getFieldValue(int fieldId) {
2534
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2535
    }
2536
 
2537
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2538
    public boolean isSet(_Fields field) {
2539
      switch (field) {
2540
      }
2541
      throw new IllegalStateException();
2542
    }
2543
 
2544
    public boolean isSet(int fieldID) {
2545
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2546
    }
2547
 
2548
    @Override
2549
    public boolean equals(Object that) {
2550
      if (that == null)
2551
        return false;
2552
      if (that instanceof closeSession_args)
2553
        return this.equals((closeSession_args)that);
2554
      return false;
2555
    }
2556
 
2557
    public boolean equals(closeSession_args that) {
2558
      if (that == null)
2559
        return false;
2560
 
2561
      return true;
2562
    }
2563
 
2564
    @Override
2565
    public int hashCode() {
2566
      return 0;
2567
    }
2568
 
2569
    public int compareTo(closeSession_args other) {
2570
      if (!getClass().equals(other.getClass())) {
2571
        return getClass().getName().compareTo(other.getClass().getName());
2572
      }
2573
 
2574
      int lastComparison = 0;
2575
      closeSession_args typedOther = (closeSession_args)other;
2576
 
2577
      return 0;
2578
    }
2579
 
2580
    public void read(TProtocol iprot) throws TException {
2581
      TField field;
2582
      iprot.readStructBegin();
2583
      while (true)
2584
      {
2585
        field = iprot.readFieldBegin();
2586
        if (field.type == TType.STOP) { 
2587
          break;
2588
        }
2589
        _Fields fieldId = _Fields.findByThriftId(field.id);
2590
        if (fieldId == null) {
2591
          TProtocolUtil.skip(iprot, field.type);
2592
        } else {
2593
          switch (fieldId) {
2594
          }
2595
          iprot.readFieldEnd();
2596
        }
2597
      }
2598
      iprot.readStructEnd();
2599
      validate();
2600
    }
2601
 
2602
    public void write(TProtocol oprot) throws TException {
2603
      validate();
2604
 
2605
      oprot.writeStructBegin(STRUCT_DESC);
2606
      oprot.writeFieldStop();
2607
      oprot.writeStructEnd();
2608
    }
2609
 
2610
    @Override
2611
    public String toString() {
2612
      StringBuilder sb = new StringBuilder("closeSession_args(");
2613
      boolean first = true;
2614
 
2615
      sb.append(")");
2616
      return sb.toString();
2617
    }
2618
 
2619
    public void validate() throws TException {
2620
      // check for required fields
2621
    }
2622
 
2623
  }
2624
 
2625
  public static class closeSession_result implements TBase<closeSession_result._Fields>, java.io.Serializable, Cloneable, Comparable<closeSession_result>   {
2626
    private static final TStruct STRUCT_DESC = new TStruct("closeSession_result");
2627
 
2628
 
2629
 
2630
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2631
    public enum _Fields implements TFieldIdEnum {
2632
;
2633
 
2634
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2635
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2636
 
2637
      static {
2638
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2639
          byId.put((int)field._thriftId, field);
2640
          byName.put(field.getFieldName(), field);
2641
        }
2642
      }
2643
 
2644
      /**
2645
       * Find the _Fields constant that matches fieldId, or null if its not found.
2646
       */
2647
      public static _Fields findByThriftId(int fieldId) {
2648
        return byId.get(fieldId);
2649
      }
2650
 
2651
      /**
2652
       * Find the _Fields constant that matches fieldId, throwing an exception
2653
       * if it is not found.
2654
       */
2655
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2656
        _Fields fields = findByThriftId(fieldId);
2657
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2658
        return fields;
2659
      }
2660
 
2661
      /**
2662
       * Find the _Fields constant that matches name, or null if its not found.
2663
       */
2664
      public static _Fields findByName(String name) {
2665
        return byName.get(name);
2666
      }
2667
 
2668
      private final short _thriftId;
2669
      private final String _fieldName;
2670
 
2671
      _Fields(short thriftId, String fieldName) {
2672
        _thriftId = thriftId;
2673
        _fieldName = fieldName;
2674
      }
2675
 
2676
      public short getThriftFieldId() {
2677
        return _thriftId;
2678
      }
2679
 
2680
      public String getFieldName() {
2681
        return _fieldName;
2682
      }
2683
    }
2684
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2685
    }});
2686
 
2687
    static {
2688
      FieldMetaData.addStructMetaDataMap(closeSession_result.class, metaDataMap);
2689
    }
2690
 
2691
    public closeSession_result() {
2692
    }
2693
 
2694
    /**
2695
     * Performs a deep copy on <i>other</i>.
2696
     */
2697
    public closeSession_result(closeSession_result other) {
2698
    }
2699
 
2700
    public closeSession_result deepCopy() {
2701
      return new closeSession_result(this);
2702
    }
2703
 
2704
    @Deprecated
2705
    public closeSession_result clone() {
2706
      return new closeSession_result(this);
2707
    }
2708
 
2709
    public void setFieldValue(_Fields field, Object value) {
2710
      switch (field) {
2711
      }
2712
    }
2713
 
2714
    public void setFieldValue(int fieldID, Object value) {
2715
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2716
    }
2717
 
2718
    public Object getFieldValue(_Fields field) {
2719
      switch (field) {
2720
      }
2721
      throw new IllegalStateException();
2722
    }
2723
 
2724
    public Object getFieldValue(int fieldId) {
2725
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2726
    }
2727
 
2728
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2729
    public boolean isSet(_Fields field) {
2730
      switch (field) {
2731
      }
2732
      throw new IllegalStateException();
2733
    }
2734
 
2735
    public boolean isSet(int fieldID) {
2736
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2737
    }
2738
 
2739
    @Override
2740
    public boolean equals(Object that) {
2741
      if (that == null)
2742
        return false;
2743
      if (that instanceof closeSession_result)
2744
        return this.equals((closeSession_result)that);
2745
      return false;
2746
    }
2747
 
2748
    public boolean equals(closeSession_result that) {
2749
      if (that == null)
2750
        return false;
2751
 
2752
      return true;
2753
    }
2754
 
2755
    @Override
2756
    public int hashCode() {
2757
      return 0;
2758
    }
2759
 
2760
    public int compareTo(closeSession_result other) {
2761
      if (!getClass().equals(other.getClass())) {
2762
        return getClass().getName().compareTo(other.getClass().getName());
2763
      }
2764
 
2765
      int lastComparison = 0;
2766
      closeSession_result typedOther = (closeSession_result)other;
2767
 
2768
      return 0;
2769
    }
2770
 
2771
    public void read(TProtocol iprot) throws TException {
2772
      TField field;
2773
      iprot.readStructBegin();
2774
      while (true)
2775
      {
2776
        field = iprot.readFieldBegin();
2777
        if (field.type == TType.STOP) { 
2778
          break;
2779
        }
2780
        _Fields fieldId = _Fields.findByThriftId(field.id);
2781
        if (fieldId == null) {
2782
          TProtocolUtil.skip(iprot, field.type);
2783
        } else {
2784
          switch (fieldId) {
2785
          }
2786
          iprot.readFieldEnd();
2787
        }
2788
      }
2789
      iprot.readStructEnd();
2790
      validate();
2791
    }
2792
 
2793
    public void write(TProtocol oprot) throws TException {
2794
      oprot.writeStructBegin(STRUCT_DESC);
2795
 
2796
      oprot.writeFieldStop();
2797
      oprot.writeStructEnd();
2798
    }
2799
 
2800
    @Override
2801
    public String toString() {
2802
      StringBuilder sb = new StringBuilder("closeSession_result(");
2803
      boolean first = true;
2804
 
2805
      sb.append(")");
2806
      return sb.toString();
2807
    }
2808
 
2809
    public void validate() throws TException {
2810
      // check for required fields
2811
    }
2812
 
2813
  }
2814
 
684 chandransh 2815
  public static class createTransaction_args implements TBase<createTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_args>   {
68 ashish 2816
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_args");
2817
 
2818
    private static final TField TRANSACTION_FIELD_DESC = new TField("transaction", TType.STRUCT, (short)1);
2819
 
2820
    private Transaction transaction;
2821
 
2822
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
2823
    public enum _Fields implements TFieldIdEnum {
2824
      TRANSACTION((short)1, "transaction");
2825
 
2826
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
2827
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
2828
 
2829
      static {
2830
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
2831
          byId.put((int)field._thriftId, field);
2832
          byName.put(field.getFieldName(), field);
2833
        }
2834
      }
2835
 
2836
      /**
2837
       * Find the _Fields constant that matches fieldId, or null if its not found.
2838
       */
2839
      public static _Fields findByThriftId(int fieldId) {
2840
        return byId.get(fieldId);
2841
      }
2842
 
2843
      /**
2844
       * Find the _Fields constant that matches fieldId, throwing an exception
2845
       * if it is not found.
2846
       */
2847
      public static _Fields findByThriftIdOrThrow(int fieldId) {
2848
        _Fields fields = findByThriftId(fieldId);
2849
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
2850
        return fields;
2851
      }
2852
 
2853
      /**
2854
       * Find the _Fields constant that matches name, or null if its not found.
2855
       */
2856
      public static _Fields findByName(String name) {
2857
        return byName.get(name);
2858
      }
2859
 
2860
      private final short _thriftId;
2861
      private final String _fieldName;
2862
 
2863
      _Fields(short thriftId, String fieldName) {
2864
        _thriftId = thriftId;
2865
        _fieldName = fieldName;
2866
      }
2867
 
2868
      public short getThriftFieldId() {
2869
        return _thriftId;
2870
      }
2871
 
2872
      public String getFieldName() {
2873
        return _fieldName;
2874
      }
2875
    }
2876
 
2877
    // isset id assignments
2878
 
2879
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
2880
      put(_Fields.TRANSACTION, new FieldMetaData("transaction", TFieldRequirementType.DEFAULT, 
2881
          new StructMetaData(TType.STRUCT, Transaction.class)));
2882
    }});
2883
 
2884
    static {
2885
      FieldMetaData.addStructMetaDataMap(createTransaction_args.class, metaDataMap);
2886
    }
2887
 
2888
    public createTransaction_args() {
2889
    }
2890
 
2891
    public createTransaction_args(
2892
      Transaction transaction)
2893
    {
2894
      this();
2895
      this.transaction = transaction;
2896
    }
2897
 
2898
    /**
2899
     * Performs a deep copy on <i>other</i>.
2900
     */
2901
    public createTransaction_args(createTransaction_args other) {
2902
      if (other.isSetTransaction()) {
2903
        this.transaction = new Transaction(other.transaction);
2904
      }
2905
    }
2906
 
2907
    public createTransaction_args deepCopy() {
2908
      return new createTransaction_args(this);
2909
    }
2910
 
2911
    @Deprecated
2912
    public createTransaction_args clone() {
2913
      return new createTransaction_args(this);
2914
    }
2915
 
2916
    public Transaction getTransaction() {
2917
      return this.transaction;
2918
    }
2919
 
2920
    public createTransaction_args setTransaction(Transaction transaction) {
2921
      this.transaction = transaction;
2922
      return this;
2923
    }
2924
 
2925
    public void unsetTransaction() {
2926
      this.transaction = null;
2927
    }
2928
 
2929
    /** Returns true if field transaction is set (has been asigned a value) and false otherwise */
2930
    public boolean isSetTransaction() {
2931
      return this.transaction != null;
2932
    }
2933
 
2934
    public void setTransactionIsSet(boolean value) {
2935
      if (!value) {
2936
        this.transaction = null;
2937
      }
2938
    }
2939
 
2940
    public void setFieldValue(_Fields field, Object value) {
2941
      switch (field) {
2942
      case TRANSACTION:
2943
        if (value == null) {
2944
          unsetTransaction();
2945
        } else {
2946
          setTransaction((Transaction)value);
2947
        }
2948
        break;
2949
 
2950
      }
2951
    }
2952
 
2953
    public void setFieldValue(int fieldID, Object value) {
2954
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
2955
    }
2956
 
2957
    public Object getFieldValue(_Fields field) {
2958
      switch (field) {
2959
      case TRANSACTION:
2960
        return getTransaction();
2961
 
2962
      }
2963
      throw new IllegalStateException();
2964
    }
2965
 
2966
    public Object getFieldValue(int fieldId) {
2967
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
2968
    }
2969
 
2970
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
2971
    public boolean isSet(_Fields field) {
2972
      switch (field) {
2973
      case TRANSACTION:
2974
        return isSetTransaction();
2975
      }
2976
      throw new IllegalStateException();
2977
    }
2978
 
2979
    public boolean isSet(int fieldID) {
2980
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
2981
    }
2982
 
2983
    @Override
2984
    public boolean equals(Object that) {
2985
      if (that == null)
2986
        return false;
2987
      if (that instanceof createTransaction_args)
2988
        return this.equals((createTransaction_args)that);
2989
      return false;
2990
    }
2991
 
2992
    public boolean equals(createTransaction_args that) {
2993
      if (that == null)
2994
        return false;
2995
 
2996
      boolean this_present_transaction = true && this.isSetTransaction();
2997
      boolean that_present_transaction = true && that.isSetTransaction();
2998
      if (this_present_transaction || that_present_transaction) {
2999
        if (!(this_present_transaction && that_present_transaction))
3000
          return false;
3001
        if (!this.transaction.equals(that.transaction))
3002
          return false;
3003
      }
3004
 
3005
      return true;
3006
    }
3007
 
3008
    @Override
3009
    public int hashCode() {
3010
      return 0;
3011
    }
3012
 
684 chandransh 3013
    public int compareTo(createTransaction_args other) {
3014
      if (!getClass().equals(other.getClass())) {
3015
        return getClass().getName().compareTo(other.getClass().getName());
3016
      }
3017
 
3018
      int lastComparison = 0;
3019
      createTransaction_args typedOther = (createTransaction_args)other;
3020
 
3021
      lastComparison = Boolean.valueOf(isSetTransaction()).compareTo(isSetTransaction());
3022
      if (lastComparison != 0) {
3023
        return lastComparison;
3024
      }
3025
      lastComparison = TBaseHelper.compareTo(transaction, typedOther.transaction);
3026
      if (lastComparison != 0) {
3027
        return lastComparison;
3028
      }
3029
      return 0;
3030
    }
3031
 
68 ashish 3032
    public void read(TProtocol iprot) throws TException {
3033
      TField field;
3034
      iprot.readStructBegin();
3035
      while (true)
3036
      {
3037
        field = iprot.readFieldBegin();
3038
        if (field.type == TType.STOP) { 
3039
          break;
3040
        }
3041
        _Fields fieldId = _Fields.findByThriftId(field.id);
3042
        if (fieldId == null) {
3043
          TProtocolUtil.skip(iprot, field.type);
3044
        } else {
3045
          switch (fieldId) {
3046
            case TRANSACTION:
3047
              if (field.type == TType.STRUCT) {
3048
                this.transaction = new Transaction();
3049
                this.transaction.read(iprot);
3050
              } else { 
3051
                TProtocolUtil.skip(iprot, field.type);
3052
              }
3053
              break;
3054
          }
3055
          iprot.readFieldEnd();
3056
        }
3057
      }
3058
      iprot.readStructEnd();
3059
      validate();
3060
    }
3061
 
3062
    public void write(TProtocol oprot) throws TException {
3063
      validate();
3064
 
3065
      oprot.writeStructBegin(STRUCT_DESC);
3066
      if (this.transaction != null) {
3067
        oprot.writeFieldBegin(TRANSACTION_FIELD_DESC);
3068
        this.transaction.write(oprot);
3069
        oprot.writeFieldEnd();
3070
      }
3071
      oprot.writeFieldStop();
3072
      oprot.writeStructEnd();
3073
    }
3074
 
3075
    @Override
3076
    public String toString() {
3077
      StringBuilder sb = new StringBuilder("createTransaction_args(");
3078
      boolean first = true;
3079
 
3080
      sb.append("transaction:");
3081
      if (this.transaction == null) {
3082
        sb.append("null");
3083
      } else {
3084
        sb.append(this.transaction);
3085
      }
3086
      first = false;
3087
      sb.append(")");
3088
      return sb.toString();
3089
    }
3090
 
3091
    public void validate() throws TException {
3092
      // check for required fields
3093
    }
3094
 
3095
  }
3096
 
3097
  public static class createTransaction_result implements TBase<createTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<createTransaction_result>   {
3098
    private static final TStruct STRUCT_DESC = new TStruct("createTransaction_result");
3099
 
132 ashish 3100
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 3101
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3102
 
132 ashish 3103
    private long success;
68 ashish 3104
    private TransactionServiceException ex;
3105
 
3106
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3107
    public enum _Fields implements TFieldIdEnum {
132 ashish 3108
      SUCCESS((short)0, "success"),
68 ashish 3109
      EX((short)1, "ex");
3110
 
3111
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3112
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3113
 
3114
      static {
3115
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3116
          byId.put((int)field._thriftId, field);
3117
          byName.put(field.getFieldName(), field);
3118
        }
3119
      }
3120
 
3121
      /**
3122
       * Find the _Fields constant that matches fieldId, or null if its not found.
3123
       */
3124
      public static _Fields findByThriftId(int fieldId) {
3125
        return byId.get(fieldId);
3126
      }
3127
 
3128
      /**
3129
       * Find the _Fields constant that matches fieldId, throwing an exception
3130
       * if it is not found.
3131
       */
3132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3133
        _Fields fields = findByThriftId(fieldId);
3134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3135
        return fields;
3136
      }
3137
 
3138
      /**
3139
       * Find the _Fields constant that matches name, or null if its not found.
3140
       */
3141
      public static _Fields findByName(String name) {
3142
        return byName.get(name);
3143
      }
3144
 
3145
      private final short _thriftId;
3146
      private final String _fieldName;
3147
 
3148
      _Fields(short thriftId, String fieldName) {
3149
        _thriftId = thriftId;
3150
        _fieldName = fieldName;
3151
      }
3152
 
3153
      public short getThriftFieldId() {
3154
        return _thriftId;
3155
      }
3156
 
3157
      public String getFieldName() {
3158
        return _fieldName;
3159
      }
3160
    }
3161
 
3162
    // isset id assignments
132 ashish 3163
    private static final int __SUCCESS_ISSET_ID = 0;
3164
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 3165
 
3166
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
132 ashish 3167
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3168
          new FieldValueMetaData(TType.I64)));
68 ashish 3169
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3170
          new FieldValueMetaData(TType.STRUCT)));
3171
    }});
3172
 
3173
    static {
3174
      FieldMetaData.addStructMetaDataMap(createTransaction_result.class, metaDataMap);
3175
    }
3176
 
3177
    public createTransaction_result() {
3178
    }
3179
 
3180
    public createTransaction_result(
132 ashish 3181
      long success,
68 ashish 3182
      TransactionServiceException ex)
3183
    {
3184
      this();
132 ashish 3185
      this.success = success;
3186
      setSuccessIsSet(true);
68 ashish 3187
      this.ex = ex;
3188
    }
3189
 
3190
    /**
3191
     * Performs a deep copy on <i>other</i>.
3192
     */
3193
    public createTransaction_result(createTransaction_result other) {
132 ashish 3194
      __isset_bit_vector.clear();
3195
      __isset_bit_vector.or(other.__isset_bit_vector);
3196
      this.success = other.success;
68 ashish 3197
      if (other.isSetEx()) {
3198
        this.ex = new TransactionServiceException(other.ex);
3199
      }
3200
    }
3201
 
3202
    public createTransaction_result deepCopy() {
3203
      return new createTransaction_result(this);
3204
    }
3205
 
3206
    @Deprecated
3207
    public createTransaction_result clone() {
3208
      return new createTransaction_result(this);
3209
    }
3210
 
132 ashish 3211
    public long getSuccess() {
3212
      return this.success;
3213
    }
3214
 
3215
    public createTransaction_result setSuccess(long success) {
3216
      this.success = success;
3217
      setSuccessIsSet(true);
3218
      return this;
3219
    }
3220
 
3221
    public void unsetSuccess() {
3222
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
3223
    }
3224
 
3225
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3226
    public boolean isSetSuccess() {
3227
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
3228
    }
3229
 
3230
    public void setSuccessIsSet(boolean value) {
3231
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
3232
    }
3233
 
68 ashish 3234
    public TransactionServiceException getEx() {
3235
      return this.ex;
3236
    }
3237
 
3238
    public createTransaction_result setEx(TransactionServiceException ex) {
3239
      this.ex = ex;
3240
      return this;
3241
    }
3242
 
3243
    public void unsetEx() {
3244
      this.ex = null;
3245
    }
3246
 
3247
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3248
    public boolean isSetEx() {
3249
      return this.ex != null;
3250
    }
3251
 
3252
    public void setExIsSet(boolean value) {
3253
      if (!value) {
3254
        this.ex = null;
3255
      }
3256
    }
3257
 
3258
    public void setFieldValue(_Fields field, Object value) {
3259
      switch (field) {
132 ashish 3260
      case SUCCESS:
3261
        if (value == null) {
3262
          unsetSuccess();
3263
        } else {
3264
          setSuccess((Long)value);
3265
        }
3266
        break;
3267
 
68 ashish 3268
      case EX:
3269
        if (value == null) {
3270
          unsetEx();
3271
        } else {
3272
          setEx((TransactionServiceException)value);
3273
        }
3274
        break;
3275
 
3276
      }
3277
    }
3278
 
3279
    public void setFieldValue(int fieldID, Object value) {
3280
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3281
    }
3282
 
3283
    public Object getFieldValue(_Fields field) {
3284
      switch (field) {
132 ashish 3285
      case SUCCESS:
3286
        return new Long(getSuccess());
3287
 
68 ashish 3288
      case EX:
3289
        return getEx();
3290
 
3291
      }
3292
      throw new IllegalStateException();
3293
    }
3294
 
3295
    public Object getFieldValue(int fieldId) {
3296
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3297
    }
3298
 
3299
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3300
    public boolean isSet(_Fields field) {
3301
      switch (field) {
132 ashish 3302
      case SUCCESS:
3303
        return isSetSuccess();
68 ashish 3304
      case EX:
3305
        return isSetEx();
3306
      }
3307
      throw new IllegalStateException();
3308
    }
3309
 
3310
    public boolean isSet(int fieldID) {
3311
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3312
    }
3313
 
3314
    @Override
3315
    public boolean equals(Object that) {
3316
      if (that == null)
3317
        return false;
3318
      if (that instanceof createTransaction_result)
3319
        return this.equals((createTransaction_result)that);
3320
      return false;
3321
    }
3322
 
3323
    public boolean equals(createTransaction_result that) {
3324
      if (that == null)
3325
        return false;
3326
 
132 ashish 3327
      boolean this_present_success = true;
3328
      boolean that_present_success = true;
3329
      if (this_present_success || that_present_success) {
3330
        if (!(this_present_success && that_present_success))
3331
          return false;
3332
        if (this.success != that.success)
3333
          return false;
3334
      }
3335
 
68 ashish 3336
      boolean this_present_ex = true && this.isSetEx();
3337
      boolean that_present_ex = true && that.isSetEx();
3338
      if (this_present_ex || that_present_ex) {
3339
        if (!(this_present_ex && that_present_ex))
3340
          return false;
3341
        if (!this.ex.equals(that.ex))
3342
          return false;
3343
      }
3344
 
3345
      return true;
3346
    }
3347
 
3348
    @Override
3349
    public int hashCode() {
3350
      return 0;
3351
    }
3352
 
3353
    public int compareTo(createTransaction_result other) {
3354
      if (!getClass().equals(other.getClass())) {
3355
        return getClass().getName().compareTo(other.getClass().getName());
3356
      }
3357
 
3358
      int lastComparison = 0;
3359
      createTransaction_result typedOther = (createTransaction_result)other;
3360
 
132 ashish 3361
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
3362
      if (lastComparison != 0) {
3363
        return lastComparison;
3364
      }
3365
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
3366
      if (lastComparison != 0) {
3367
        return lastComparison;
3368
      }
68 ashish 3369
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
3370
      if (lastComparison != 0) {
3371
        return lastComparison;
3372
      }
3373
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
3374
      if (lastComparison != 0) {
3375
        return lastComparison;
3376
      }
3377
      return 0;
3378
    }
3379
 
3380
    public void read(TProtocol iprot) throws TException {
3381
      TField field;
3382
      iprot.readStructBegin();
3383
      while (true)
3384
      {
3385
        field = iprot.readFieldBegin();
3386
        if (field.type == TType.STOP) { 
3387
          break;
3388
        }
3389
        _Fields fieldId = _Fields.findByThriftId(field.id);
3390
        if (fieldId == null) {
3391
          TProtocolUtil.skip(iprot, field.type);
3392
        } else {
3393
          switch (fieldId) {
132 ashish 3394
            case SUCCESS:
3395
              if (field.type == TType.I64) {
3396
                this.success = iprot.readI64();
3397
                setSuccessIsSet(true);
3398
              } else { 
3399
                TProtocolUtil.skip(iprot, field.type);
3400
              }
3401
              break;
68 ashish 3402
            case EX:
3403
              if (field.type == TType.STRUCT) {
3404
                this.ex = new TransactionServiceException();
3405
                this.ex.read(iprot);
3406
              } else { 
3407
                TProtocolUtil.skip(iprot, field.type);
3408
              }
3409
              break;
3410
          }
3411
          iprot.readFieldEnd();
3412
        }
3413
      }
3414
      iprot.readStructEnd();
3415
      validate();
3416
    }
3417
 
3418
    public void write(TProtocol oprot) throws TException {
3419
      oprot.writeStructBegin(STRUCT_DESC);
3420
 
132 ashish 3421
      if (this.isSetSuccess()) {
3422
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
3423
        oprot.writeI64(this.success);
3424
        oprot.writeFieldEnd();
3425
      } else if (this.isSetEx()) {
68 ashish 3426
        oprot.writeFieldBegin(EX_FIELD_DESC);
3427
        this.ex.write(oprot);
3428
        oprot.writeFieldEnd();
3429
      }
3430
      oprot.writeFieldStop();
3431
      oprot.writeStructEnd();
3432
    }
3433
 
3434
    @Override
3435
    public String toString() {
3436
      StringBuilder sb = new StringBuilder("createTransaction_result(");
3437
      boolean first = true;
3438
 
132 ashish 3439
      sb.append("success:");
3440
      sb.append(this.success);
3441
      first = false;
3442
      if (!first) sb.append(", ");
68 ashish 3443
      sb.append("ex:");
3444
      if (this.ex == null) {
3445
        sb.append("null");
3446
      } else {
3447
        sb.append(this.ex);
3448
      }
3449
      first = false;
3450
      sb.append(")");
3451
      return sb.toString();
3452
    }
3453
 
3454
    public void validate() throws TException {
3455
      // check for required fields
3456
    }
3457
 
3458
  }
3459
 
3460
  public static class getTransaction_args implements TBase<getTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_args>   {
3461
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_args");
3462
 
3463
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
3464
 
3465
    private long id;
3466
 
3467
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3468
    public enum _Fields implements TFieldIdEnum {
3469
      ID((short)1, "id");
3470
 
3471
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3472
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3473
 
3474
      static {
3475
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3476
          byId.put((int)field._thriftId, field);
3477
          byName.put(field.getFieldName(), field);
3478
        }
3479
      }
3480
 
3481
      /**
3482
       * Find the _Fields constant that matches fieldId, or null if its not found.
3483
       */
3484
      public static _Fields findByThriftId(int fieldId) {
3485
        return byId.get(fieldId);
3486
      }
3487
 
3488
      /**
3489
       * Find the _Fields constant that matches fieldId, throwing an exception
3490
       * if it is not found.
3491
       */
3492
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3493
        _Fields fields = findByThriftId(fieldId);
3494
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3495
        return fields;
3496
      }
3497
 
3498
      /**
3499
       * Find the _Fields constant that matches name, or null if its not found.
3500
       */
3501
      public static _Fields findByName(String name) {
3502
        return byName.get(name);
3503
      }
3504
 
3505
      private final short _thriftId;
3506
      private final String _fieldName;
3507
 
3508
      _Fields(short thriftId, String fieldName) {
3509
        _thriftId = thriftId;
3510
        _fieldName = fieldName;
3511
      }
3512
 
3513
      public short getThriftFieldId() {
3514
        return _thriftId;
3515
      }
3516
 
3517
      public String getFieldName() {
3518
        return _fieldName;
3519
      }
3520
    }
3521
 
3522
    // isset id assignments
3523
    private static final int __ID_ISSET_ID = 0;
3524
    private BitSet __isset_bit_vector = new BitSet(1);
3525
 
3526
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3527
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
3528
          new FieldValueMetaData(TType.I64)));
3529
    }});
3530
 
3531
    static {
3532
      FieldMetaData.addStructMetaDataMap(getTransaction_args.class, metaDataMap);
3533
    }
3534
 
3535
    public getTransaction_args() {
3536
    }
3537
 
3538
    public getTransaction_args(
3539
      long id)
3540
    {
3541
      this();
3542
      this.id = id;
3543
      setIdIsSet(true);
3544
    }
3545
 
3546
    /**
3547
     * Performs a deep copy on <i>other</i>.
3548
     */
3549
    public getTransaction_args(getTransaction_args other) {
3550
      __isset_bit_vector.clear();
3551
      __isset_bit_vector.or(other.__isset_bit_vector);
3552
      this.id = other.id;
3553
    }
3554
 
3555
    public getTransaction_args deepCopy() {
3556
      return new getTransaction_args(this);
3557
    }
3558
 
3559
    @Deprecated
3560
    public getTransaction_args clone() {
3561
      return new getTransaction_args(this);
3562
    }
3563
 
3564
    public long getId() {
3565
      return this.id;
3566
    }
3567
 
3568
    public getTransaction_args setId(long id) {
3569
      this.id = id;
3570
      setIdIsSet(true);
3571
      return this;
3572
    }
3573
 
3574
    public void unsetId() {
3575
      __isset_bit_vector.clear(__ID_ISSET_ID);
3576
    }
3577
 
3578
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
3579
    public boolean isSetId() {
3580
      return __isset_bit_vector.get(__ID_ISSET_ID);
3581
    }
3582
 
3583
    public void setIdIsSet(boolean value) {
3584
      __isset_bit_vector.set(__ID_ISSET_ID, value);
3585
    }
3586
 
3587
    public void setFieldValue(_Fields field, Object value) {
3588
      switch (field) {
3589
      case ID:
3590
        if (value == null) {
3591
          unsetId();
3592
        } else {
3593
          setId((Long)value);
3594
        }
3595
        break;
3596
 
3597
      }
3598
    }
3599
 
3600
    public void setFieldValue(int fieldID, Object value) {
3601
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3602
    }
3603
 
3604
    public Object getFieldValue(_Fields field) {
3605
      switch (field) {
3606
      case ID:
3607
        return new Long(getId());
3608
 
3609
      }
3610
      throw new IllegalStateException();
3611
    }
3612
 
3613
    public Object getFieldValue(int fieldId) {
3614
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3615
    }
3616
 
3617
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3618
    public boolean isSet(_Fields field) {
3619
      switch (field) {
3620
      case ID:
3621
        return isSetId();
3622
      }
3623
      throw new IllegalStateException();
3624
    }
3625
 
3626
    public boolean isSet(int fieldID) {
3627
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3628
    }
3629
 
3630
    @Override
3631
    public boolean equals(Object that) {
3632
      if (that == null)
3633
        return false;
3634
      if (that instanceof getTransaction_args)
3635
        return this.equals((getTransaction_args)that);
3636
      return false;
3637
    }
3638
 
3639
    public boolean equals(getTransaction_args that) {
3640
      if (that == null)
3641
        return false;
3642
 
3643
      boolean this_present_id = true;
3644
      boolean that_present_id = true;
3645
      if (this_present_id || that_present_id) {
3646
        if (!(this_present_id && that_present_id))
3647
          return false;
3648
        if (this.id != that.id)
3649
          return false;
3650
      }
3651
 
3652
      return true;
3653
    }
3654
 
3655
    @Override
3656
    public int hashCode() {
3657
      return 0;
3658
    }
3659
 
3660
    public int compareTo(getTransaction_args other) {
3661
      if (!getClass().equals(other.getClass())) {
3662
        return getClass().getName().compareTo(other.getClass().getName());
3663
      }
3664
 
3665
      int lastComparison = 0;
3666
      getTransaction_args typedOther = (getTransaction_args)other;
3667
 
3668
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
3669
      if (lastComparison != 0) {
3670
        return lastComparison;
3671
      }
3672
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
3673
      if (lastComparison != 0) {
3674
        return lastComparison;
3675
      }
3676
      return 0;
3677
    }
3678
 
3679
    public void read(TProtocol iprot) throws TException {
3680
      TField field;
3681
      iprot.readStructBegin();
3682
      while (true)
3683
      {
3684
        field = iprot.readFieldBegin();
3685
        if (field.type == TType.STOP) { 
3686
          break;
3687
        }
3688
        _Fields fieldId = _Fields.findByThriftId(field.id);
3689
        if (fieldId == null) {
3690
          TProtocolUtil.skip(iprot, field.type);
3691
        } else {
3692
          switch (fieldId) {
3693
            case ID:
3694
              if (field.type == TType.I64) {
3695
                this.id = iprot.readI64();
3696
                setIdIsSet(true);
3697
              } else { 
3698
                TProtocolUtil.skip(iprot, field.type);
3699
              }
3700
              break;
3701
          }
3702
          iprot.readFieldEnd();
3703
        }
3704
      }
3705
      iprot.readStructEnd();
3706
      validate();
3707
    }
3708
 
3709
    public void write(TProtocol oprot) throws TException {
3710
      validate();
3711
 
3712
      oprot.writeStructBegin(STRUCT_DESC);
3713
      oprot.writeFieldBegin(ID_FIELD_DESC);
3714
      oprot.writeI64(this.id);
3715
      oprot.writeFieldEnd();
3716
      oprot.writeFieldStop();
3717
      oprot.writeStructEnd();
3718
    }
3719
 
3720
    @Override
3721
    public String toString() {
3722
      StringBuilder sb = new StringBuilder("getTransaction_args(");
3723
      boolean first = true;
3724
 
3725
      sb.append("id:");
3726
      sb.append(this.id);
3727
      first = false;
3728
      sb.append(")");
3729
      return sb.toString();
3730
    }
3731
 
3732
    public void validate() throws TException {
3733
      // check for required fields
3734
    }
3735
 
3736
  }
3737
 
684 chandransh 3738
  public static class getTransaction_result implements TBase<getTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransaction_result>   {
68 ashish 3739
    private static final TStruct STRUCT_DESC = new TStruct("getTransaction_result");
3740
 
3741
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
3742
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
3743
 
3744
    private Transaction success;
3745
    private TransactionServiceException ex;
3746
 
3747
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
3748
    public enum _Fields implements TFieldIdEnum {
3749
      SUCCESS((short)0, "success"),
3750
      EX((short)1, "ex");
3751
 
3752
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
3753
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
3754
 
3755
      static {
3756
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
3757
          byId.put((int)field._thriftId, field);
3758
          byName.put(field.getFieldName(), field);
3759
        }
3760
      }
3761
 
3762
      /**
3763
       * Find the _Fields constant that matches fieldId, or null if its not found.
3764
       */
3765
      public static _Fields findByThriftId(int fieldId) {
3766
        return byId.get(fieldId);
3767
      }
3768
 
3769
      /**
3770
       * Find the _Fields constant that matches fieldId, throwing an exception
3771
       * if it is not found.
3772
       */
3773
      public static _Fields findByThriftIdOrThrow(int fieldId) {
3774
        _Fields fields = findByThriftId(fieldId);
3775
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
3776
        return fields;
3777
      }
3778
 
3779
      /**
3780
       * Find the _Fields constant that matches name, or null if its not found.
3781
       */
3782
      public static _Fields findByName(String name) {
3783
        return byName.get(name);
3784
      }
3785
 
3786
      private final short _thriftId;
3787
      private final String _fieldName;
3788
 
3789
      _Fields(short thriftId, String fieldName) {
3790
        _thriftId = thriftId;
3791
        _fieldName = fieldName;
3792
      }
3793
 
3794
      public short getThriftFieldId() {
3795
        return _thriftId;
3796
      }
3797
 
3798
      public String getFieldName() {
3799
        return _fieldName;
3800
      }
3801
    }
3802
 
3803
    // isset id assignments
3804
 
3805
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
3806
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
3807
          new StructMetaData(TType.STRUCT, Transaction.class)));
3808
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
3809
          new FieldValueMetaData(TType.STRUCT)));
3810
    }});
3811
 
3812
    static {
3813
      FieldMetaData.addStructMetaDataMap(getTransaction_result.class, metaDataMap);
3814
    }
3815
 
3816
    public getTransaction_result() {
3817
    }
3818
 
3819
    public getTransaction_result(
3820
      Transaction success,
3821
      TransactionServiceException ex)
3822
    {
3823
      this();
3824
      this.success = success;
3825
      this.ex = ex;
3826
    }
3827
 
3828
    /**
3829
     * Performs a deep copy on <i>other</i>.
3830
     */
3831
    public getTransaction_result(getTransaction_result other) {
3832
      if (other.isSetSuccess()) {
3833
        this.success = new Transaction(other.success);
3834
      }
3835
      if (other.isSetEx()) {
3836
        this.ex = new TransactionServiceException(other.ex);
3837
      }
3838
    }
3839
 
3840
    public getTransaction_result deepCopy() {
3841
      return new getTransaction_result(this);
3842
    }
3843
 
3844
    @Deprecated
3845
    public getTransaction_result clone() {
3846
      return new getTransaction_result(this);
3847
    }
3848
 
3849
    public Transaction getSuccess() {
3850
      return this.success;
3851
    }
3852
 
3853
    public getTransaction_result setSuccess(Transaction success) {
3854
      this.success = success;
3855
      return this;
3856
    }
3857
 
3858
    public void unsetSuccess() {
3859
      this.success = null;
3860
    }
3861
 
3862
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
3863
    public boolean isSetSuccess() {
3864
      return this.success != null;
3865
    }
3866
 
3867
    public void setSuccessIsSet(boolean value) {
3868
      if (!value) {
3869
        this.success = null;
3870
      }
3871
    }
3872
 
3873
    public TransactionServiceException getEx() {
3874
      return this.ex;
3875
    }
3876
 
3877
    public getTransaction_result setEx(TransactionServiceException ex) {
3878
      this.ex = ex;
3879
      return this;
3880
    }
3881
 
3882
    public void unsetEx() {
3883
      this.ex = null;
3884
    }
3885
 
3886
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
3887
    public boolean isSetEx() {
3888
      return this.ex != null;
3889
    }
3890
 
3891
    public void setExIsSet(boolean value) {
3892
      if (!value) {
3893
        this.ex = null;
3894
      }
3895
    }
3896
 
3897
    public void setFieldValue(_Fields field, Object value) {
3898
      switch (field) {
3899
      case SUCCESS:
3900
        if (value == null) {
3901
          unsetSuccess();
3902
        } else {
3903
          setSuccess((Transaction)value);
3904
        }
3905
        break;
3906
 
3907
      case EX:
3908
        if (value == null) {
3909
          unsetEx();
3910
        } else {
3911
          setEx((TransactionServiceException)value);
3912
        }
3913
        break;
3914
 
3915
      }
3916
    }
3917
 
3918
    public void setFieldValue(int fieldID, Object value) {
3919
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
3920
    }
3921
 
3922
    public Object getFieldValue(_Fields field) {
3923
      switch (field) {
3924
      case SUCCESS:
3925
        return getSuccess();
3926
 
3927
      case EX:
3928
        return getEx();
3929
 
3930
      }
3931
      throw new IllegalStateException();
3932
    }
3933
 
3934
    public Object getFieldValue(int fieldId) {
3935
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
3936
    }
3937
 
3938
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
3939
    public boolean isSet(_Fields field) {
3940
      switch (field) {
3941
      case SUCCESS:
3942
        return isSetSuccess();
3943
      case EX:
3944
        return isSetEx();
3945
      }
3946
      throw new IllegalStateException();
3947
    }
3948
 
3949
    public boolean isSet(int fieldID) {
3950
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
3951
    }
3952
 
3953
    @Override
3954
    public boolean equals(Object that) {
3955
      if (that == null)
3956
        return false;
3957
      if (that instanceof getTransaction_result)
3958
        return this.equals((getTransaction_result)that);
3959
      return false;
3960
    }
3961
 
3962
    public boolean equals(getTransaction_result that) {
3963
      if (that == null)
3964
        return false;
3965
 
3966
      boolean this_present_success = true && this.isSetSuccess();
3967
      boolean that_present_success = true && that.isSetSuccess();
3968
      if (this_present_success || that_present_success) {
3969
        if (!(this_present_success && that_present_success))
3970
          return false;
3971
        if (!this.success.equals(that.success))
3972
          return false;
3973
      }
3974
 
3975
      boolean this_present_ex = true && this.isSetEx();
3976
      boolean that_present_ex = true && that.isSetEx();
3977
      if (this_present_ex || that_present_ex) {
3978
        if (!(this_present_ex && that_present_ex))
3979
          return false;
3980
        if (!this.ex.equals(that.ex))
3981
          return false;
3982
      }
3983
 
3984
      return true;
3985
    }
3986
 
3987
    @Override
3988
    public int hashCode() {
3989
      return 0;
3990
    }
3991
 
684 chandransh 3992
    public int compareTo(getTransaction_result other) {
3993
      if (!getClass().equals(other.getClass())) {
3994
        return getClass().getName().compareTo(other.getClass().getName());
3995
      }
3996
 
3997
      int lastComparison = 0;
3998
      getTransaction_result typedOther = (getTransaction_result)other;
3999
 
4000
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4001
      if (lastComparison != 0) {
4002
        return lastComparison;
4003
      }
4004
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4005
      if (lastComparison != 0) {
4006
        return lastComparison;
4007
      }
4008
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4009
      if (lastComparison != 0) {
4010
        return lastComparison;
4011
      }
4012
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4013
      if (lastComparison != 0) {
4014
        return lastComparison;
4015
      }
4016
      return 0;
4017
    }
4018
 
68 ashish 4019
    public void read(TProtocol iprot) throws TException {
4020
      TField field;
4021
      iprot.readStructBegin();
4022
      while (true)
4023
      {
4024
        field = iprot.readFieldBegin();
4025
        if (field.type == TType.STOP) { 
4026
          break;
4027
        }
4028
        _Fields fieldId = _Fields.findByThriftId(field.id);
4029
        if (fieldId == null) {
4030
          TProtocolUtil.skip(iprot, field.type);
4031
        } else {
4032
          switch (fieldId) {
4033
            case SUCCESS:
4034
              if (field.type == TType.STRUCT) {
4035
                this.success = new Transaction();
4036
                this.success.read(iprot);
4037
              } else { 
4038
                TProtocolUtil.skip(iprot, field.type);
4039
              }
4040
              break;
4041
            case EX:
4042
              if (field.type == TType.STRUCT) {
4043
                this.ex = new TransactionServiceException();
4044
                this.ex.read(iprot);
4045
              } else { 
4046
                TProtocolUtil.skip(iprot, field.type);
4047
              }
4048
              break;
4049
          }
4050
          iprot.readFieldEnd();
4051
        }
4052
      }
4053
      iprot.readStructEnd();
4054
      validate();
4055
    }
4056
 
4057
    public void write(TProtocol oprot) throws TException {
4058
      oprot.writeStructBegin(STRUCT_DESC);
4059
 
4060
      if (this.isSetSuccess()) {
4061
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4062
        this.success.write(oprot);
4063
        oprot.writeFieldEnd();
4064
      } else if (this.isSetEx()) {
4065
        oprot.writeFieldBegin(EX_FIELD_DESC);
4066
        this.ex.write(oprot);
4067
        oprot.writeFieldEnd();
4068
      }
4069
      oprot.writeFieldStop();
4070
      oprot.writeStructEnd();
4071
    }
4072
 
4073
    @Override
4074
    public String toString() {
4075
      StringBuilder sb = new StringBuilder("getTransaction_result(");
4076
      boolean first = true;
4077
 
4078
      sb.append("success:");
4079
      if (this.success == null) {
4080
        sb.append("null");
4081
      } else {
4082
        sb.append(this.success);
4083
      }
4084
      first = false;
4085
      if (!first) sb.append(", ");
4086
      sb.append("ex:");
4087
      if (this.ex == null) {
4088
        sb.append("null");
4089
      } else {
4090
        sb.append(this.ex);
4091
      }
4092
      first = false;
4093
      sb.append(")");
4094
      return sb.toString();
4095
    }
4096
 
4097
    public void validate() throws TException {
4098
      // check for required fields
4099
    }
4100
 
4101
  }
4102
 
4103
  public static class getTransactionsForCustomer_args implements TBase<getTransactionsForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_args>   {
4104
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_args");
4105
 
4106
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
132 ashish 4107
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
4108
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
68 ashish 4109
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
4110
 
4111
    private long customerId;
132 ashish 4112
    private long from_date;
4113
    private long to_date;
68 ashish 4114
    private TransactionStatus status;
4115
 
4116
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4117
    public enum _Fields implements TFieldIdEnum {
4118
      CUSTOMER_ID((short)1, "customerId"),
132 ashish 4119
      FROM_DATE((short)2, "from_date"),
4120
      TO_DATE((short)3, "to_date"),
68 ashish 4121
      /**
4122
       * 
4123
       * @see TransactionStatus
4124
       */
4125
      STATUS((short)4, "status");
4126
 
4127
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4128
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4129
 
4130
      static {
4131
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4132
          byId.put((int)field._thriftId, field);
4133
          byName.put(field.getFieldName(), field);
4134
        }
4135
      }
4136
 
4137
      /**
4138
       * Find the _Fields constant that matches fieldId, or null if its not found.
4139
       */
4140
      public static _Fields findByThriftId(int fieldId) {
4141
        return byId.get(fieldId);
4142
      }
4143
 
4144
      /**
4145
       * Find the _Fields constant that matches fieldId, throwing an exception
4146
       * if it is not found.
4147
       */
4148
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4149
        _Fields fields = findByThriftId(fieldId);
4150
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4151
        return fields;
4152
      }
4153
 
4154
      /**
4155
       * Find the _Fields constant that matches name, or null if its not found.
4156
       */
4157
      public static _Fields findByName(String name) {
4158
        return byName.get(name);
4159
      }
4160
 
4161
      private final short _thriftId;
4162
      private final String _fieldName;
4163
 
4164
      _Fields(short thriftId, String fieldName) {
4165
        _thriftId = thriftId;
4166
        _fieldName = fieldName;
4167
      }
4168
 
4169
      public short getThriftFieldId() {
4170
        return _thriftId;
4171
      }
4172
 
4173
      public String getFieldName() {
4174
        return _fieldName;
4175
      }
4176
    }
4177
 
4178
    // isset id assignments
4179
    private static final int __CUSTOMERID_ISSET_ID = 0;
132 ashish 4180
    private static final int __FROM_DATE_ISSET_ID = 1;
4181
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 4182
    private BitSet __isset_bit_vector = new BitSet(3);
4183
 
4184
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4185
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
4186
          new FieldValueMetaData(TType.I64)));
132 ashish 4187
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 4188
          new FieldValueMetaData(TType.I64)));
132 ashish 4189
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 4190
          new FieldValueMetaData(TType.I64)));
4191
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
4192
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
4193
    }});
4194
 
4195
    static {
4196
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_args.class, metaDataMap);
4197
    }
4198
 
4199
    public getTransactionsForCustomer_args() {
4200
    }
4201
 
4202
    public getTransactionsForCustomer_args(
4203
      long customerId,
132 ashish 4204
      long from_date,
4205
      long to_date,
68 ashish 4206
      TransactionStatus status)
4207
    {
4208
      this();
4209
      this.customerId = customerId;
4210
      setCustomerIdIsSet(true);
132 ashish 4211
      this.from_date = from_date;
4212
      setFrom_dateIsSet(true);
4213
      this.to_date = to_date;
4214
      setTo_dateIsSet(true);
68 ashish 4215
      this.status = status;
4216
    }
4217
 
4218
    /**
4219
     * Performs a deep copy on <i>other</i>.
4220
     */
4221
    public getTransactionsForCustomer_args(getTransactionsForCustomer_args other) {
4222
      __isset_bit_vector.clear();
4223
      __isset_bit_vector.or(other.__isset_bit_vector);
4224
      this.customerId = other.customerId;
132 ashish 4225
      this.from_date = other.from_date;
4226
      this.to_date = other.to_date;
68 ashish 4227
      if (other.isSetStatus()) {
4228
        this.status = other.status;
4229
      }
4230
    }
4231
 
4232
    public getTransactionsForCustomer_args deepCopy() {
4233
      return new getTransactionsForCustomer_args(this);
4234
    }
4235
 
4236
    @Deprecated
4237
    public getTransactionsForCustomer_args clone() {
4238
      return new getTransactionsForCustomer_args(this);
4239
    }
4240
 
4241
    public long getCustomerId() {
4242
      return this.customerId;
4243
    }
4244
 
4245
    public getTransactionsForCustomer_args setCustomerId(long customerId) {
4246
      this.customerId = customerId;
4247
      setCustomerIdIsSet(true);
4248
      return this;
4249
    }
4250
 
4251
    public void unsetCustomerId() {
4252
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
4253
    }
4254
 
4255
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
4256
    public boolean isSetCustomerId() {
4257
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
4258
    }
4259
 
4260
    public void setCustomerIdIsSet(boolean value) {
4261
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
4262
    }
4263
 
132 ashish 4264
    public long getFrom_date() {
4265
      return this.from_date;
68 ashish 4266
    }
4267
 
132 ashish 4268
    public getTransactionsForCustomer_args setFrom_date(long from_date) {
4269
      this.from_date = from_date;
4270
      setFrom_dateIsSet(true);
68 ashish 4271
      return this;
4272
    }
4273
 
132 ashish 4274
    public void unsetFrom_date() {
4275
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 4276
    }
4277
 
132 ashish 4278
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
4279
    public boolean isSetFrom_date() {
4280
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 4281
    }
4282
 
132 ashish 4283
    public void setFrom_dateIsSet(boolean value) {
4284
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 4285
    }
4286
 
132 ashish 4287
    public long getTo_date() {
4288
      return this.to_date;
68 ashish 4289
    }
4290
 
132 ashish 4291
    public getTransactionsForCustomer_args setTo_date(long to_date) {
4292
      this.to_date = to_date;
4293
      setTo_dateIsSet(true);
68 ashish 4294
      return this;
4295
    }
4296
 
132 ashish 4297
    public void unsetTo_date() {
4298
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 4299
    }
4300
 
132 ashish 4301
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
4302
    public boolean isSetTo_date() {
4303
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 4304
    }
4305
 
132 ashish 4306
    public void setTo_dateIsSet(boolean value) {
4307
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 4308
    }
4309
 
4310
    /**
4311
     * 
4312
     * @see TransactionStatus
4313
     */
4314
    public TransactionStatus getStatus() {
4315
      return this.status;
4316
    }
4317
 
4318
    /**
4319
     * 
4320
     * @see TransactionStatus
4321
     */
4322
    public getTransactionsForCustomer_args setStatus(TransactionStatus status) {
4323
      this.status = status;
4324
      return this;
4325
    }
4326
 
4327
    public void unsetStatus() {
4328
      this.status = null;
4329
    }
4330
 
4331
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
4332
    public boolean isSetStatus() {
4333
      return this.status != null;
4334
    }
4335
 
4336
    public void setStatusIsSet(boolean value) {
4337
      if (!value) {
4338
        this.status = null;
4339
      }
4340
    }
4341
 
4342
    public void setFieldValue(_Fields field, Object value) {
4343
      switch (field) {
4344
      case CUSTOMER_ID:
4345
        if (value == null) {
4346
          unsetCustomerId();
4347
        } else {
4348
          setCustomerId((Long)value);
4349
        }
4350
        break;
4351
 
132 ashish 4352
      case FROM_DATE:
68 ashish 4353
        if (value == null) {
132 ashish 4354
          unsetFrom_date();
68 ashish 4355
        } else {
132 ashish 4356
          setFrom_date((Long)value);
68 ashish 4357
        }
4358
        break;
4359
 
132 ashish 4360
      case TO_DATE:
68 ashish 4361
        if (value == null) {
132 ashish 4362
          unsetTo_date();
68 ashish 4363
        } else {
132 ashish 4364
          setTo_date((Long)value);
68 ashish 4365
        }
4366
        break;
4367
 
4368
      case STATUS:
4369
        if (value == null) {
4370
          unsetStatus();
4371
        } else {
4372
          setStatus((TransactionStatus)value);
4373
        }
4374
        break;
4375
 
4376
      }
4377
    }
4378
 
4379
    public void setFieldValue(int fieldID, Object value) {
4380
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4381
    }
4382
 
4383
    public Object getFieldValue(_Fields field) {
4384
      switch (field) {
4385
      case CUSTOMER_ID:
4386
        return new Long(getCustomerId());
4387
 
132 ashish 4388
      case FROM_DATE:
4389
        return new Long(getFrom_date());
68 ashish 4390
 
132 ashish 4391
      case TO_DATE:
4392
        return new Long(getTo_date());
68 ashish 4393
 
4394
      case STATUS:
4395
        return getStatus();
4396
 
4397
      }
4398
      throw new IllegalStateException();
4399
    }
4400
 
4401
    public Object getFieldValue(int fieldId) {
4402
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4403
    }
4404
 
4405
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4406
    public boolean isSet(_Fields field) {
4407
      switch (field) {
4408
      case CUSTOMER_ID:
4409
        return isSetCustomerId();
132 ashish 4410
      case FROM_DATE:
4411
        return isSetFrom_date();
4412
      case TO_DATE:
4413
        return isSetTo_date();
68 ashish 4414
      case STATUS:
4415
        return isSetStatus();
4416
      }
4417
      throw new IllegalStateException();
4418
    }
4419
 
4420
    public boolean isSet(int fieldID) {
4421
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4422
    }
4423
 
4424
    @Override
4425
    public boolean equals(Object that) {
4426
      if (that == null)
4427
        return false;
4428
      if (that instanceof getTransactionsForCustomer_args)
4429
        return this.equals((getTransactionsForCustomer_args)that);
4430
      return false;
4431
    }
4432
 
4433
    public boolean equals(getTransactionsForCustomer_args that) {
4434
      if (that == null)
4435
        return false;
4436
 
4437
      boolean this_present_customerId = true;
4438
      boolean that_present_customerId = true;
4439
      if (this_present_customerId || that_present_customerId) {
4440
        if (!(this_present_customerId && that_present_customerId))
4441
          return false;
4442
        if (this.customerId != that.customerId)
4443
          return false;
4444
      }
4445
 
132 ashish 4446
      boolean this_present_from_date = true;
4447
      boolean that_present_from_date = true;
4448
      if (this_present_from_date || that_present_from_date) {
4449
        if (!(this_present_from_date && that_present_from_date))
68 ashish 4450
          return false;
132 ashish 4451
        if (this.from_date != that.from_date)
68 ashish 4452
          return false;
4453
      }
4454
 
132 ashish 4455
      boolean this_present_to_date = true;
4456
      boolean that_present_to_date = true;
4457
      if (this_present_to_date || that_present_to_date) {
4458
        if (!(this_present_to_date && that_present_to_date))
68 ashish 4459
          return false;
132 ashish 4460
        if (this.to_date != that.to_date)
68 ashish 4461
          return false;
4462
      }
4463
 
4464
      boolean this_present_status = true && this.isSetStatus();
4465
      boolean that_present_status = true && that.isSetStatus();
4466
      if (this_present_status || that_present_status) {
4467
        if (!(this_present_status && that_present_status))
4468
          return false;
4469
        if (!this.status.equals(that.status))
4470
          return false;
4471
      }
4472
 
4473
      return true;
4474
    }
4475
 
4476
    @Override
4477
    public int hashCode() {
4478
      return 0;
4479
    }
4480
 
4481
    public int compareTo(getTransactionsForCustomer_args other) {
4482
      if (!getClass().equals(other.getClass())) {
4483
        return getClass().getName().compareTo(other.getClass().getName());
4484
      }
4485
 
4486
      int lastComparison = 0;
4487
      getTransactionsForCustomer_args typedOther = (getTransactionsForCustomer_args)other;
4488
 
4489
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
4490
      if (lastComparison != 0) {
4491
        return lastComparison;
4492
      }
4493
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
4494
      if (lastComparison != 0) {
4495
        return lastComparison;
4496
      }
132 ashish 4497
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 4498
      if (lastComparison != 0) {
4499
        return lastComparison;
4500
      }
132 ashish 4501
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 4502
      if (lastComparison != 0) {
4503
        return lastComparison;
4504
      }
132 ashish 4505
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 4506
      if (lastComparison != 0) {
4507
        return lastComparison;
4508
      }
132 ashish 4509
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 4510
      if (lastComparison != 0) {
4511
        return lastComparison;
4512
      }
4513
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
4514
      if (lastComparison != 0) {
4515
        return lastComparison;
4516
      }
4517
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
4518
      if (lastComparison != 0) {
4519
        return lastComparison;
4520
      }
4521
      return 0;
4522
    }
4523
 
4524
    public void read(TProtocol iprot) throws TException {
4525
      TField field;
4526
      iprot.readStructBegin();
4527
      while (true)
4528
      {
4529
        field = iprot.readFieldBegin();
4530
        if (field.type == TType.STOP) { 
4531
          break;
4532
        }
4533
        _Fields fieldId = _Fields.findByThriftId(field.id);
4534
        if (fieldId == null) {
4535
          TProtocolUtil.skip(iprot, field.type);
4536
        } else {
4537
          switch (fieldId) {
4538
            case CUSTOMER_ID:
4539
              if (field.type == TType.I64) {
4540
                this.customerId = iprot.readI64();
4541
                setCustomerIdIsSet(true);
4542
              } else { 
4543
                TProtocolUtil.skip(iprot, field.type);
4544
              }
4545
              break;
132 ashish 4546
            case FROM_DATE:
68 ashish 4547
              if (field.type == TType.I64) {
132 ashish 4548
                this.from_date = iprot.readI64();
4549
                setFrom_dateIsSet(true);
68 ashish 4550
              } else { 
4551
                TProtocolUtil.skip(iprot, field.type);
4552
              }
4553
              break;
132 ashish 4554
            case TO_DATE:
68 ashish 4555
              if (field.type == TType.I64) {
132 ashish 4556
                this.to_date = iprot.readI64();
4557
                setTo_dateIsSet(true);
68 ashish 4558
              } else { 
4559
                TProtocolUtil.skip(iprot, field.type);
4560
              }
4561
              break;
4562
            case STATUS:
4563
              if (field.type == TType.I32) {
4564
                this.status = TransactionStatus.findByValue(iprot.readI32());
4565
              } else { 
4566
                TProtocolUtil.skip(iprot, field.type);
4567
              }
4568
              break;
4569
          }
4570
          iprot.readFieldEnd();
4571
        }
4572
      }
4573
      iprot.readStructEnd();
4574
      validate();
4575
    }
4576
 
4577
    public void write(TProtocol oprot) throws TException {
4578
      validate();
4579
 
4580
      oprot.writeStructBegin(STRUCT_DESC);
4581
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
4582
      oprot.writeI64(this.customerId);
4583
      oprot.writeFieldEnd();
132 ashish 4584
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
4585
      oprot.writeI64(this.from_date);
68 ashish 4586
      oprot.writeFieldEnd();
132 ashish 4587
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
4588
      oprot.writeI64(this.to_date);
68 ashish 4589
      oprot.writeFieldEnd();
4590
      if (this.status != null) {
4591
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
4592
        oprot.writeI32(this.status.getValue());
4593
        oprot.writeFieldEnd();
4594
      }
4595
      oprot.writeFieldStop();
4596
      oprot.writeStructEnd();
4597
    }
4598
 
4599
    @Override
4600
    public String toString() {
4601
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_args(");
4602
      boolean first = true;
4603
 
4604
      sb.append("customerId:");
4605
      sb.append(this.customerId);
4606
      first = false;
4607
      if (!first) sb.append(", ");
132 ashish 4608
      sb.append("from_date:");
4609
      sb.append(this.from_date);
68 ashish 4610
      first = false;
4611
      if (!first) sb.append(", ");
132 ashish 4612
      sb.append("to_date:");
4613
      sb.append(this.to_date);
68 ashish 4614
      first = false;
4615
      if (!first) sb.append(", ");
4616
      sb.append("status:");
4617
      if (this.status == null) {
4618
        sb.append("null");
4619
      } else {
4620
        String status_name = status.name();
4621
        if (status_name != null) {
4622
          sb.append(status_name);
4623
          sb.append(" (");
4624
        }
4625
        sb.append(this.status);
4626
        if (status_name != null) {
4627
          sb.append(")");
4628
        }
4629
      }
4630
      first = false;
4631
      sb.append(")");
4632
      return sb.toString();
4633
    }
4634
 
4635
    public void validate() throws TException {
4636
      // check for required fields
4637
    }
4638
 
4639
  }
4640
 
684 chandransh 4641
  public static class getTransactionsForCustomer_result implements TBase<getTransactionsForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForCustomer_result>   {
68 ashish 4642
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForCustomer_result");
4643
 
4644
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
4645
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
4646
 
4647
    private List<Transaction> success;
4648
    private TransactionServiceException ex;
4649
 
4650
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
4651
    public enum _Fields implements TFieldIdEnum {
4652
      SUCCESS((short)0, "success"),
4653
      EX((short)1, "ex");
4654
 
4655
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
4656
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
4657
 
4658
      static {
4659
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
4660
          byId.put((int)field._thriftId, field);
4661
          byName.put(field.getFieldName(), field);
4662
        }
4663
      }
4664
 
4665
      /**
4666
       * Find the _Fields constant that matches fieldId, or null if its not found.
4667
       */
4668
      public static _Fields findByThriftId(int fieldId) {
4669
        return byId.get(fieldId);
4670
      }
4671
 
4672
      /**
4673
       * Find the _Fields constant that matches fieldId, throwing an exception
4674
       * if it is not found.
4675
       */
4676
      public static _Fields findByThriftIdOrThrow(int fieldId) {
4677
        _Fields fields = findByThriftId(fieldId);
4678
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
4679
        return fields;
4680
      }
4681
 
4682
      /**
4683
       * Find the _Fields constant that matches name, or null if its not found.
4684
       */
4685
      public static _Fields findByName(String name) {
4686
        return byName.get(name);
4687
      }
4688
 
4689
      private final short _thriftId;
4690
      private final String _fieldName;
4691
 
4692
      _Fields(short thriftId, String fieldName) {
4693
        _thriftId = thriftId;
4694
        _fieldName = fieldName;
4695
      }
4696
 
4697
      public short getThriftFieldId() {
4698
        return _thriftId;
4699
      }
4700
 
4701
      public String getFieldName() {
4702
        return _fieldName;
4703
      }
4704
    }
4705
 
4706
    // isset id assignments
4707
 
4708
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
4709
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
4710
          new ListMetaData(TType.LIST, 
4711
              new StructMetaData(TType.STRUCT, Transaction.class))));
4712
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
4713
          new FieldValueMetaData(TType.STRUCT)));
4714
    }});
4715
 
4716
    static {
4717
      FieldMetaData.addStructMetaDataMap(getTransactionsForCustomer_result.class, metaDataMap);
4718
    }
4719
 
4720
    public getTransactionsForCustomer_result() {
4721
    }
4722
 
4723
    public getTransactionsForCustomer_result(
4724
      List<Transaction> success,
4725
      TransactionServiceException ex)
4726
    {
4727
      this();
4728
      this.success = success;
4729
      this.ex = ex;
4730
    }
4731
 
4732
    /**
4733
     * Performs a deep copy on <i>other</i>.
4734
     */
4735
    public getTransactionsForCustomer_result(getTransactionsForCustomer_result other) {
4736
      if (other.isSetSuccess()) {
4737
        List<Transaction> __this__success = new ArrayList<Transaction>();
4738
        for (Transaction other_element : other.success) {
4739
          __this__success.add(new Transaction(other_element));
4740
        }
4741
        this.success = __this__success;
4742
      }
4743
      if (other.isSetEx()) {
4744
        this.ex = new TransactionServiceException(other.ex);
4745
      }
4746
    }
4747
 
4748
    public getTransactionsForCustomer_result deepCopy() {
4749
      return new getTransactionsForCustomer_result(this);
4750
    }
4751
 
4752
    @Deprecated
4753
    public getTransactionsForCustomer_result clone() {
4754
      return new getTransactionsForCustomer_result(this);
4755
    }
4756
 
4757
    public int getSuccessSize() {
4758
      return (this.success == null) ? 0 : this.success.size();
4759
    }
4760
 
4761
    public java.util.Iterator<Transaction> getSuccessIterator() {
4762
      return (this.success == null) ? null : this.success.iterator();
4763
    }
4764
 
4765
    public void addToSuccess(Transaction elem) {
4766
      if (this.success == null) {
4767
        this.success = new ArrayList<Transaction>();
4768
      }
4769
      this.success.add(elem);
4770
    }
4771
 
4772
    public List<Transaction> getSuccess() {
4773
      return this.success;
4774
    }
4775
 
4776
    public getTransactionsForCustomer_result setSuccess(List<Transaction> success) {
4777
      this.success = success;
4778
      return this;
4779
    }
4780
 
4781
    public void unsetSuccess() {
4782
      this.success = null;
4783
    }
4784
 
4785
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
4786
    public boolean isSetSuccess() {
4787
      return this.success != null;
4788
    }
4789
 
4790
    public void setSuccessIsSet(boolean value) {
4791
      if (!value) {
4792
        this.success = null;
4793
      }
4794
    }
4795
 
4796
    public TransactionServiceException getEx() {
4797
      return this.ex;
4798
    }
4799
 
4800
    public getTransactionsForCustomer_result setEx(TransactionServiceException ex) {
4801
      this.ex = ex;
4802
      return this;
4803
    }
4804
 
4805
    public void unsetEx() {
4806
      this.ex = null;
4807
    }
4808
 
4809
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
4810
    public boolean isSetEx() {
4811
      return this.ex != null;
4812
    }
4813
 
4814
    public void setExIsSet(boolean value) {
4815
      if (!value) {
4816
        this.ex = null;
4817
      }
4818
    }
4819
 
4820
    public void setFieldValue(_Fields field, Object value) {
4821
      switch (field) {
4822
      case SUCCESS:
4823
        if (value == null) {
4824
          unsetSuccess();
4825
        } else {
4826
          setSuccess((List<Transaction>)value);
4827
        }
4828
        break;
4829
 
4830
      case EX:
4831
        if (value == null) {
4832
          unsetEx();
4833
        } else {
4834
          setEx((TransactionServiceException)value);
4835
        }
4836
        break;
4837
 
4838
      }
4839
    }
4840
 
4841
    public void setFieldValue(int fieldID, Object value) {
4842
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
4843
    }
4844
 
4845
    public Object getFieldValue(_Fields field) {
4846
      switch (field) {
4847
      case SUCCESS:
4848
        return getSuccess();
4849
 
4850
      case EX:
4851
        return getEx();
4852
 
4853
      }
4854
      throw new IllegalStateException();
4855
    }
4856
 
4857
    public Object getFieldValue(int fieldId) {
4858
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
4859
    }
4860
 
4861
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
4862
    public boolean isSet(_Fields field) {
4863
      switch (field) {
4864
      case SUCCESS:
4865
        return isSetSuccess();
4866
      case EX:
4867
        return isSetEx();
4868
      }
4869
      throw new IllegalStateException();
4870
    }
4871
 
4872
    public boolean isSet(int fieldID) {
4873
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
4874
    }
4875
 
4876
    @Override
4877
    public boolean equals(Object that) {
4878
      if (that == null)
4879
        return false;
4880
      if (that instanceof getTransactionsForCustomer_result)
4881
        return this.equals((getTransactionsForCustomer_result)that);
4882
      return false;
4883
    }
4884
 
4885
    public boolean equals(getTransactionsForCustomer_result that) {
4886
      if (that == null)
4887
        return false;
4888
 
4889
      boolean this_present_success = true && this.isSetSuccess();
4890
      boolean that_present_success = true && that.isSetSuccess();
4891
      if (this_present_success || that_present_success) {
4892
        if (!(this_present_success && that_present_success))
4893
          return false;
4894
        if (!this.success.equals(that.success))
4895
          return false;
4896
      }
4897
 
4898
      boolean this_present_ex = true && this.isSetEx();
4899
      boolean that_present_ex = true && that.isSetEx();
4900
      if (this_present_ex || that_present_ex) {
4901
        if (!(this_present_ex && that_present_ex))
4902
          return false;
4903
        if (!this.ex.equals(that.ex))
4904
          return false;
4905
      }
4906
 
4907
      return true;
4908
    }
4909
 
4910
    @Override
4911
    public int hashCode() {
4912
      return 0;
4913
    }
4914
 
684 chandransh 4915
    public int compareTo(getTransactionsForCustomer_result other) {
4916
      if (!getClass().equals(other.getClass())) {
4917
        return getClass().getName().compareTo(other.getClass().getName());
4918
      }
4919
 
4920
      int lastComparison = 0;
4921
      getTransactionsForCustomer_result typedOther = (getTransactionsForCustomer_result)other;
4922
 
4923
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
4924
      if (lastComparison != 0) {
4925
        return lastComparison;
4926
      }
4927
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
4928
      if (lastComparison != 0) {
4929
        return lastComparison;
4930
      }
4931
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
4932
      if (lastComparison != 0) {
4933
        return lastComparison;
4934
      }
4935
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
4936
      if (lastComparison != 0) {
4937
        return lastComparison;
4938
      }
4939
      return 0;
4940
    }
4941
 
68 ashish 4942
    public void read(TProtocol iprot) throws TException {
4943
      TField field;
4944
      iprot.readStructBegin();
4945
      while (true)
4946
      {
4947
        field = iprot.readFieldBegin();
4948
        if (field.type == TType.STOP) { 
4949
          break;
4950
        }
4951
        _Fields fieldId = _Fields.findByThriftId(field.id);
4952
        if (fieldId == null) {
4953
          TProtocolUtil.skip(iprot, field.type);
4954
        } else {
4955
          switch (fieldId) {
4956
            case SUCCESS:
4957
              if (field.type == TType.LIST) {
4958
                {
684 chandransh 4959
                  TList _list8 = iprot.readListBegin();
4960
                  this.success = new ArrayList<Transaction>(_list8.size);
4961
                  for (int _i9 = 0; _i9 < _list8.size; ++_i9)
68 ashish 4962
                  {
684 chandransh 4963
                    Transaction _elem10;
4964
                    _elem10 = new Transaction();
4965
                    _elem10.read(iprot);
4966
                    this.success.add(_elem10);
68 ashish 4967
                  }
4968
                  iprot.readListEnd();
4969
                }
4970
              } else { 
4971
                TProtocolUtil.skip(iprot, field.type);
4972
              }
4973
              break;
4974
            case EX:
4975
              if (field.type == TType.STRUCT) {
4976
                this.ex = new TransactionServiceException();
4977
                this.ex.read(iprot);
4978
              } else { 
4979
                TProtocolUtil.skip(iprot, field.type);
4980
              }
4981
              break;
4982
          }
4983
          iprot.readFieldEnd();
4984
        }
4985
      }
4986
      iprot.readStructEnd();
4987
      validate();
4988
    }
4989
 
4990
    public void write(TProtocol oprot) throws TException {
4991
      oprot.writeStructBegin(STRUCT_DESC);
4992
 
4993
      if (this.isSetSuccess()) {
4994
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
4995
        {
4996
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 4997
          for (Transaction _iter11 : this.success)
68 ashish 4998
          {
684 chandransh 4999
            _iter11.write(oprot);
68 ashish 5000
          }
5001
          oprot.writeListEnd();
5002
        }
5003
        oprot.writeFieldEnd();
5004
      } else if (this.isSetEx()) {
5005
        oprot.writeFieldBegin(EX_FIELD_DESC);
5006
        this.ex.write(oprot);
5007
        oprot.writeFieldEnd();
5008
      }
5009
      oprot.writeFieldStop();
5010
      oprot.writeStructEnd();
5011
    }
5012
 
5013
    @Override
5014
    public String toString() {
5015
      StringBuilder sb = new StringBuilder("getTransactionsForCustomer_result(");
5016
      boolean first = true;
5017
 
5018
      sb.append("success:");
5019
      if (this.success == null) {
5020
        sb.append("null");
5021
      } else {
5022
        sb.append(this.success);
5023
      }
5024
      first = false;
5025
      if (!first) sb.append(", ");
5026
      sb.append("ex:");
5027
      if (this.ex == null) {
5028
        sb.append("null");
5029
      } else {
5030
        sb.append(this.ex);
5031
      }
5032
      first = false;
5033
      sb.append(")");
5034
      return sb.toString();
5035
    }
5036
 
5037
    public void validate() throws TException {
5038
      // check for required fields
5039
    }
5040
 
5041
  }
5042
 
132 ashish 5043
  public static class getTransactionsForShoppingCartId_args implements TBase<getTransactionsForShoppingCartId_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_args>   {
5044
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_args");
5045
 
5046
    private static final TField SHOPPING_CART_ID_FIELD_DESC = new TField("shoppingCartId", TType.I64, (short)1);
5047
 
5048
    private long shoppingCartId;
5049
 
5050
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5051
    public enum _Fields implements TFieldIdEnum {
5052
      SHOPPING_CART_ID((short)1, "shoppingCartId");
5053
 
5054
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5055
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5056
 
5057
      static {
5058
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5059
          byId.put((int)field._thriftId, field);
5060
          byName.put(field.getFieldName(), field);
5061
        }
5062
      }
5063
 
5064
      /**
5065
       * Find the _Fields constant that matches fieldId, or null if its not found.
5066
       */
5067
      public static _Fields findByThriftId(int fieldId) {
5068
        return byId.get(fieldId);
5069
      }
5070
 
5071
      /**
5072
       * Find the _Fields constant that matches fieldId, throwing an exception
5073
       * if it is not found.
5074
       */
5075
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5076
        _Fields fields = findByThriftId(fieldId);
5077
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5078
        return fields;
5079
      }
5080
 
5081
      /**
5082
       * Find the _Fields constant that matches name, or null if its not found.
5083
       */
5084
      public static _Fields findByName(String name) {
5085
        return byName.get(name);
5086
      }
5087
 
5088
      private final short _thriftId;
5089
      private final String _fieldName;
5090
 
5091
      _Fields(short thriftId, String fieldName) {
5092
        _thriftId = thriftId;
5093
        _fieldName = fieldName;
5094
      }
5095
 
5096
      public short getThriftFieldId() {
5097
        return _thriftId;
5098
      }
5099
 
5100
      public String getFieldName() {
5101
        return _fieldName;
5102
      }
5103
    }
5104
 
5105
    // isset id assignments
5106
    private static final int __SHOPPINGCARTID_ISSET_ID = 0;
5107
    private BitSet __isset_bit_vector = new BitSet(1);
5108
 
5109
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5110
      put(_Fields.SHOPPING_CART_ID, new FieldMetaData("shoppingCartId", TFieldRequirementType.DEFAULT, 
5111
          new FieldValueMetaData(TType.I64)));
5112
    }});
5113
 
5114
    static {
5115
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_args.class, metaDataMap);
5116
    }
5117
 
5118
    public getTransactionsForShoppingCartId_args() {
5119
    }
5120
 
5121
    public getTransactionsForShoppingCartId_args(
5122
      long shoppingCartId)
5123
    {
5124
      this();
5125
      this.shoppingCartId = shoppingCartId;
5126
      setShoppingCartIdIsSet(true);
5127
    }
5128
 
5129
    /**
5130
     * Performs a deep copy on <i>other</i>.
5131
     */
5132
    public getTransactionsForShoppingCartId_args(getTransactionsForShoppingCartId_args other) {
5133
      __isset_bit_vector.clear();
5134
      __isset_bit_vector.or(other.__isset_bit_vector);
5135
      this.shoppingCartId = other.shoppingCartId;
5136
    }
5137
 
5138
    public getTransactionsForShoppingCartId_args deepCopy() {
5139
      return new getTransactionsForShoppingCartId_args(this);
5140
    }
5141
 
5142
    @Deprecated
5143
    public getTransactionsForShoppingCartId_args clone() {
5144
      return new getTransactionsForShoppingCartId_args(this);
5145
    }
5146
 
5147
    public long getShoppingCartId() {
5148
      return this.shoppingCartId;
5149
    }
5150
 
5151
    public getTransactionsForShoppingCartId_args setShoppingCartId(long shoppingCartId) {
5152
      this.shoppingCartId = shoppingCartId;
5153
      setShoppingCartIdIsSet(true);
5154
      return this;
5155
    }
5156
 
5157
    public void unsetShoppingCartId() {
5158
      __isset_bit_vector.clear(__SHOPPINGCARTID_ISSET_ID);
5159
    }
5160
 
5161
    /** Returns true if field shoppingCartId is set (has been asigned a value) and false otherwise */
5162
    public boolean isSetShoppingCartId() {
5163
      return __isset_bit_vector.get(__SHOPPINGCARTID_ISSET_ID);
5164
    }
5165
 
5166
    public void setShoppingCartIdIsSet(boolean value) {
5167
      __isset_bit_vector.set(__SHOPPINGCARTID_ISSET_ID, value);
5168
    }
5169
 
5170
    public void setFieldValue(_Fields field, Object value) {
5171
      switch (field) {
5172
      case SHOPPING_CART_ID:
5173
        if (value == null) {
5174
          unsetShoppingCartId();
5175
        } else {
5176
          setShoppingCartId((Long)value);
5177
        }
5178
        break;
5179
 
5180
      }
5181
    }
5182
 
5183
    public void setFieldValue(int fieldID, Object value) {
5184
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5185
    }
5186
 
5187
    public Object getFieldValue(_Fields field) {
5188
      switch (field) {
5189
      case SHOPPING_CART_ID:
5190
        return new Long(getShoppingCartId());
5191
 
5192
      }
5193
      throw new IllegalStateException();
5194
    }
5195
 
5196
    public Object getFieldValue(int fieldId) {
5197
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5198
    }
5199
 
5200
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5201
    public boolean isSet(_Fields field) {
5202
      switch (field) {
5203
      case SHOPPING_CART_ID:
5204
        return isSetShoppingCartId();
5205
      }
5206
      throw new IllegalStateException();
5207
    }
5208
 
5209
    public boolean isSet(int fieldID) {
5210
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5211
    }
5212
 
5213
    @Override
5214
    public boolean equals(Object that) {
5215
      if (that == null)
5216
        return false;
5217
      if (that instanceof getTransactionsForShoppingCartId_args)
5218
        return this.equals((getTransactionsForShoppingCartId_args)that);
5219
      return false;
5220
    }
5221
 
5222
    public boolean equals(getTransactionsForShoppingCartId_args that) {
5223
      if (that == null)
5224
        return false;
5225
 
5226
      boolean this_present_shoppingCartId = true;
5227
      boolean that_present_shoppingCartId = true;
5228
      if (this_present_shoppingCartId || that_present_shoppingCartId) {
5229
        if (!(this_present_shoppingCartId && that_present_shoppingCartId))
5230
          return false;
5231
        if (this.shoppingCartId != that.shoppingCartId)
5232
          return false;
5233
      }
5234
 
5235
      return true;
5236
    }
5237
 
5238
    @Override
5239
    public int hashCode() {
5240
      return 0;
5241
    }
5242
 
5243
    public int compareTo(getTransactionsForShoppingCartId_args other) {
5244
      if (!getClass().equals(other.getClass())) {
5245
        return getClass().getName().compareTo(other.getClass().getName());
5246
      }
5247
 
5248
      int lastComparison = 0;
5249
      getTransactionsForShoppingCartId_args typedOther = (getTransactionsForShoppingCartId_args)other;
5250
 
5251
      lastComparison = Boolean.valueOf(isSetShoppingCartId()).compareTo(isSetShoppingCartId());
5252
      if (lastComparison != 0) {
5253
        return lastComparison;
5254
      }
5255
      lastComparison = TBaseHelper.compareTo(shoppingCartId, typedOther.shoppingCartId);
5256
      if (lastComparison != 0) {
5257
        return lastComparison;
5258
      }
5259
      return 0;
5260
    }
5261
 
5262
    public void read(TProtocol iprot) throws TException {
5263
      TField field;
5264
      iprot.readStructBegin();
5265
      while (true)
5266
      {
5267
        field = iprot.readFieldBegin();
5268
        if (field.type == TType.STOP) { 
5269
          break;
5270
        }
5271
        _Fields fieldId = _Fields.findByThriftId(field.id);
5272
        if (fieldId == null) {
5273
          TProtocolUtil.skip(iprot, field.type);
5274
        } else {
5275
          switch (fieldId) {
5276
            case SHOPPING_CART_ID:
5277
              if (field.type == TType.I64) {
5278
                this.shoppingCartId = iprot.readI64();
5279
                setShoppingCartIdIsSet(true);
5280
              } else { 
5281
                TProtocolUtil.skip(iprot, field.type);
5282
              }
5283
              break;
5284
          }
5285
          iprot.readFieldEnd();
5286
        }
5287
      }
5288
      iprot.readStructEnd();
5289
      validate();
5290
    }
5291
 
5292
    public void write(TProtocol oprot) throws TException {
5293
      validate();
5294
 
5295
      oprot.writeStructBegin(STRUCT_DESC);
5296
      oprot.writeFieldBegin(SHOPPING_CART_ID_FIELD_DESC);
5297
      oprot.writeI64(this.shoppingCartId);
5298
      oprot.writeFieldEnd();
5299
      oprot.writeFieldStop();
5300
      oprot.writeStructEnd();
5301
    }
5302
 
5303
    @Override
5304
    public String toString() {
5305
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_args(");
5306
      boolean first = true;
5307
 
5308
      sb.append("shoppingCartId:");
5309
      sb.append(this.shoppingCartId);
5310
      first = false;
5311
      sb.append(")");
5312
      return sb.toString();
5313
    }
5314
 
5315
    public void validate() throws TException {
5316
      // check for required fields
5317
    }
5318
 
5319
  }
5320
 
684 chandransh 5321
  public static class getTransactionsForShoppingCartId_result implements TBase<getTransactionsForShoppingCartId_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionsForShoppingCartId_result>   {
132 ashish 5322
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionsForShoppingCartId_result");
5323
 
5324
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
5325
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
5326
 
5327
    private List<Transaction> success;
5328
    private TransactionServiceException ex;
5329
 
5330
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5331
    public enum _Fields implements TFieldIdEnum {
5332
      SUCCESS((short)0, "success"),
5333
      EX((short)1, "ex");
5334
 
5335
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5336
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5337
 
5338
      static {
5339
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5340
          byId.put((int)field._thriftId, field);
5341
          byName.put(field.getFieldName(), field);
5342
        }
5343
      }
5344
 
5345
      /**
5346
       * Find the _Fields constant that matches fieldId, or null if its not found.
5347
       */
5348
      public static _Fields findByThriftId(int fieldId) {
5349
        return byId.get(fieldId);
5350
      }
5351
 
5352
      /**
5353
       * Find the _Fields constant that matches fieldId, throwing an exception
5354
       * if it is not found.
5355
       */
5356
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5357
        _Fields fields = findByThriftId(fieldId);
5358
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5359
        return fields;
5360
      }
5361
 
5362
      /**
5363
       * Find the _Fields constant that matches name, or null if its not found.
5364
       */
5365
      public static _Fields findByName(String name) {
5366
        return byName.get(name);
5367
      }
5368
 
5369
      private final short _thriftId;
5370
      private final String _fieldName;
5371
 
5372
      _Fields(short thriftId, String fieldName) {
5373
        _thriftId = thriftId;
5374
        _fieldName = fieldName;
5375
      }
5376
 
5377
      public short getThriftFieldId() {
5378
        return _thriftId;
5379
      }
5380
 
5381
      public String getFieldName() {
5382
        return _fieldName;
5383
      }
5384
    }
5385
 
5386
    // isset id assignments
5387
 
5388
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5389
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
5390
          new ListMetaData(TType.LIST, 
5391
              new StructMetaData(TType.STRUCT, Transaction.class))));
5392
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
5393
          new FieldValueMetaData(TType.STRUCT)));
5394
    }});
5395
 
5396
    static {
5397
      FieldMetaData.addStructMetaDataMap(getTransactionsForShoppingCartId_result.class, metaDataMap);
5398
    }
5399
 
5400
    public getTransactionsForShoppingCartId_result() {
5401
    }
5402
 
5403
    public getTransactionsForShoppingCartId_result(
5404
      List<Transaction> success,
5405
      TransactionServiceException ex)
5406
    {
5407
      this();
5408
      this.success = success;
5409
      this.ex = ex;
5410
    }
5411
 
5412
    /**
5413
     * Performs a deep copy on <i>other</i>.
5414
     */
5415
    public getTransactionsForShoppingCartId_result(getTransactionsForShoppingCartId_result other) {
5416
      if (other.isSetSuccess()) {
5417
        List<Transaction> __this__success = new ArrayList<Transaction>();
5418
        for (Transaction other_element : other.success) {
5419
          __this__success.add(new Transaction(other_element));
5420
        }
5421
        this.success = __this__success;
5422
      }
5423
      if (other.isSetEx()) {
5424
        this.ex = new TransactionServiceException(other.ex);
5425
      }
5426
    }
5427
 
5428
    public getTransactionsForShoppingCartId_result deepCopy() {
5429
      return new getTransactionsForShoppingCartId_result(this);
5430
    }
5431
 
5432
    @Deprecated
5433
    public getTransactionsForShoppingCartId_result clone() {
5434
      return new getTransactionsForShoppingCartId_result(this);
5435
    }
5436
 
5437
    public int getSuccessSize() {
5438
      return (this.success == null) ? 0 : this.success.size();
5439
    }
5440
 
5441
    public java.util.Iterator<Transaction> getSuccessIterator() {
5442
      return (this.success == null) ? null : this.success.iterator();
5443
    }
5444
 
5445
    public void addToSuccess(Transaction elem) {
5446
      if (this.success == null) {
5447
        this.success = new ArrayList<Transaction>();
5448
      }
5449
      this.success.add(elem);
5450
    }
5451
 
5452
    public List<Transaction> getSuccess() {
5453
      return this.success;
5454
    }
5455
 
5456
    public getTransactionsForShoppingCartId_result setSuccess(List<Transaction> success) {
5457
      this.success = success;
5458
      return this;
5459
    }
5460
 
5461
    public void unsetSuccess() {
5462
      this.success = null;
5463
    }
5464
 
5465
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
5466
    public boolean isSetSuccess() {
5467
      return this.success != null;
5468
    }
5469
 
5470
    public void setSuccessIsSet(boolean value) {
5471
      if (!value) {
5472
        this.success = null;
5473
      }
5474
    }
5475
 
5476
    public TransactionServiceException getEx() {
5477
      return this.ex;
5478
    }
5479
 
5480
    public getTransactionsForShoppingCartId_result setEx(TransactionServiceException ex) {
5481
      this.ex = ex;
5482
      return this;
5483
    }
5484
 
5485
    public void unsetEx() {
5486
      this.ex = null;
5487
    }
5488
 
5489
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
5490
    public boolean isSetEx() {
5491
      return this.ex != null;
5492
    }
5493
 
5494
    public void setExIsSet(boolean value) {
5495
      if (!value) {
5496
        this.ex = null;
5497
      }
5498
    }
5499
 
5500
    public void setFieldValue(_Fields field, Object value) {
5501
      switch (field) {
5502
      case SUCCESS:
5503
        if (value == null) {
5504
          unsetSuccess();
5505
        } else {
5506
          setSuccess((List<Transaction>)value);
5507
        }
5508
        break;
5509
 
5510
      case EX:
5511
        if (value == null) {
5512
          unsetEx();
5513
        } else {
5514
          setEx((TransactionServiceException)value);
5515
        }
5516
        break;
5517
 
5518
      }
5519
    }
5520
 
5521
    public void setFieldValue(int fieldID, Object value) {
5522
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5523
    }
5524
 
5525
    public Object getFieldValue(_Fields field) {
5526
      switch (field) {
5527
      case SUCCESS:
5528
        return getSuccess();
5529
 
5530
      case EX:
5531
        return getEx();
5532
 
5533
      }
5534
      throw new IllegalStateException();
5535
    }
5536
 
5537
    public Object getFieldValue(int fieldId) {
5538
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5539
    }
5540
 
5541
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5542
    public boolean isSet(_Fields field) {
5543
      switch (field) {
5544
      case SUCCESS:
5545
        return isSetSuccess();
5546
      case EX:
5547
        return isSetEx();
5548
      }
5549
      throw new IllegalStateException();
5550
    }
5551
 
5552
    public boolean isSet(int fieldID) {
5553
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5554
    }
5555
 
5556
    @Override
5557
    public boolean equals(Object that) {
5558
      if (that == null)
5559
        return false;
5560
      if (that instanceof getTransactionsForShoppingCartId_result)
5561
        return this.equals((getTransactionsForShoppingCartId_result)that);
5562
      return false;
5563
    }
5564
 
5565
    public boolean equals(getTransactionsForShoppingCartId_result that) {
5566
      if (that == null)
5567
        return false;
5568
 
5569
      boolean this_present_success = true && this.isSetSuccess();
5570
      boolean that_present_success = true && that.isSetSuccess();
5571
      if (this_present_success || that_present_success) {
5572
        if (!(this_present_success && that_present_success))
5573
          return false;
5574
        if (!this.success.equals(that.success))
5575
          return false;
5576
      }
5577
 
5578
      boolean this_present_ex = true && this.isSetEx();
5579
      boolean that_present_ex = true && that.isSetEx();
5580
      if (this_present_ex || that_present_ex) {
5581
        if (!(this_present_ex && that_present_ex))
5582
          return false;
5583
        if (!this.ex.equals(that.ex))
5584
          return false;
5585
      }
5586
 
5587
      return true;
5588
    }
5589
 
5590
    @Override
5591
    public int hashCode() {
5592
      return 0;
5593
    }
5594
 
684 chandransh 5595
    public int compareTo(getTransactionsForShoppingCartId_result other) {
5596
      if (!getClass().equals(other.getClass())) {
5597
        return getClass().getName().compareTo(other.getClass().getName());
5598
      }
5599
 
5600
      int lastComparison = 0;
5601
      getTransactionsForShoppingCartId_result typedOther = (getTransactionsForShoppingCartId_result)other;
5602
 
5603
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
5604
      if (lastComparison != 0) {
5605
        return lastComparison;
5606
      }
5607
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
5608
      if (lastComparison != 0) {
5609
        return lastComparison;
5610
      }
5611
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
5612
      if (lastComparison != 0) {
5613
        return lastComparison;
5614
      }
5615
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
5616
      if (lastComparison != 0) {
5617
        return lastComparison;
5618
      }
5619
      return 0;
5620
    }
5621
 
132 ashish 5622
    public void read(TProtocol iprot) throws TException {
5623
      TField field;
5624
      iprot.readStructBegin();
5625
      while (true)
5626
      {
5627
        field = iprot.readFieldBegin();
5628
        if (field.type == TType.STOP) { 
5629
          break;
5630
        }
5631
        _Fields fieldId = _Fields.findByThriftId(field.id);
5632
        if (fieldId == null) {
5633
          TProtocolUtil.skip(iprot, field.type);
5634
        } else {
5635
          switch (fieldId) {
5636
            case SUCCESS:
5637
              if (field.type == TType.LIST) {
5638
                {
684 chandransh 5639
                  TList _list12 = iprot.readListBegin();
5640
                  this.success = new ArrayList<Transaction>(_list12.size);
5641
                  for (int _i13 = 0; _i13 < _list12.size; ++_i13)
132 ashish 5642
                  {
684 chandransh 5643
                    Transaction _elem14;
5644
                    _elem14 = new Transaction();
5645
                    _elem14.read(iprot);
5646
                    this.success.add(_elem14);
132 ashish 5647
                  }
5648
                  iprot.readListEnd();
5649
                }
5650
              } else { 
5651
                TProtocolUtil.skip(iprot, field.type);
5652
              }
5653
              break;
5654
            case EX:
5655
              if (field.type == TType.STRUCT) {
5656
                this.ex = new TransactionServiceException();
5657
                this.ex.read(iprot);
5658
              } else { 
5659
                TProtocolUtil.skip(iprot, field.type);
5660
              }
5661
              break;
5662
          }
5663
          iprot.readFieldEnd();
5664
        }
5665
      }
5666
      iprot.readStructEnd();
5667
      validate();
5668
    }
5669
 
5670
    public void write(TProtocol oprot) throws TException {
5671
      oprot.writeStructBegin(STRUCT_DESC);
5672
 
5673
      if (this.isSetSuccess()) {
5674
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
5675
        {
5676
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 5677
          for (Transaction _iter15 : this.success)
132 ashish 5678
          {
684 chandransh 5679
            _iter15.write(oprot);
132 ashish 5680
          }
5681
          oprot.writeListEnd();
5682
        }
5683
        oprot.writeFieldEnd();
5684
      } else if (this.isSetEx()) {
5685
        oprot.writeFieldBegin(EX_FIELD_DESC);
5686
        this.ex.write(oprot);
5687
        oprot.writeFieldEnd();
5688
      }
5689
      oprot.writeFieldStop();
5690
      oprot.writeStructEnd();
5691
    }
5692
 
5693
    @Override
5694
    public String toString() {
5695
      StringBuilder sb = new StringBuilder("getTransactionsForShoppingCartId_result(");
5696
      boolean first = true;
5697
 
5698
      sb.append("success:");
5699
      if (this.success == null) {
5700
        sb.append("null");
5701
      } else {
5702
        sb.append(this.success);
5703
      }
5704
      first = false;
5705
      if (!first) sb.append(", ");
5706
      sb.append("ex:");
5707
      if (this.ex == null) {
5708
        sb.append("null");
5709
      } else {
5710
        sb.append(this.ex);
5711
      }
5712
      first = false;
5713
      sb.append(")");
5714
      return sb.toString();
5715
    }
5716
 
5717
    public void validate() throws TException {
5718
      // check for required fields
5719
    }
5720
 
5721
  }
5722
 
68 ashish 5723
  public static class getTransactionStatus_args implements TBase<getTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_args>   {
5724
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_args");
5725
 
5726
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
5727
 
5728
    private long transactionId;
5729
 
5730
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
5731
    public enum _Fields implements TFieldIdEnum {
5732
      TRANSACTION_ID((short)1, "transactionId");
5733
 
5734
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
5735
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
5736
 
5737
      static {
5738
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
5739
          byId.put((int)field._thriftId, field);
5740
          byName.put(field.getFieldName(), field);
5741
        }
5742
      }
5743
 
5744
      /**
5745
       * Find the _Fields constant that matches fieldId, or null if its not found.
5746
       */
5747
      public static _Fields findByThriftId(int fieldId) {
5748
        return byId.get(fieldId);
5749
      }
5750
 
5751
      /**
5752
       * Find the _Fields constant that matches fieldId, throwing an exception
5753
       * if it is not found.
5754
       */
5755
      public static _Fields findByThriftIdOrThrow(int fieldId) {
5756
        _Fields fields = findByThriftId(fieldId);
5757
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
5758
        return fields;
5759
      }
5760
 
5761
      /**
5762
       * Find the _Fields constant that matches name, or null if its not found.
5763
       */
5764
      public static _Fields findByName(String name) {
5765
        return byName.get(name);
5766
      }
5767
 
5768
      private final short _thriftId;
5769
      private final String _fieldName;
5770
 
5771
      _Fields(short thriftId, String fieldName) {
5772
        _thriftId = thriftId;
5773
        _fieldName = fieldName;
5774
      }
5775
 
5776
      public short getThriftFieldId() {
5777
        return _thriftId;
5778
      }
5779
 
5780
      public String getFieldName() {
5781
        return _fieldName;
5782
      }
5783
    }
5784
 
5785
    // isset id assignments
5786
    private static final int __TRANSACTIONID_ISSET_ID = 0;
5787
    private BitSet __isset_bit_vector = new BitSet(1);
5788
 
5789
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
5790
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
5791
          new FieldValueMetaData(TType.I64)));
5792
    }});
5793
 
5794
    static {
5795
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_args.class, metaDataMap);
5796
    }
5797
 
5798
    public getTransactionStatus_args() {
5799
    }
5800
 
5801
    public getTransactionStatus_args(
5802
      long transactionId)
5803
    {
5804
      this();
5805
      this.transactionId = transactionId;
5806
      setTransactionIdIsSet(true);
5807
    }
5808
 
5809
    /**
5810
     * Performs a deep copy on <i>other</i>.
5811
     */
5812
    public getTransactionStatus_args(getTransactionStatus_args other) {
5813
      __isset_bit_vector.clear();
5814
      __isset_bit_vector.or(other.__isset_bit_vector);
5815
      this.transactionId = other.transactionId;
5816
    }
5817
 
5818
    public getTransactionStatus_args deepCopy() {
5819
      return new getTransactionStatus_args(this);
5820
    }
5821
 
5822
    @Deprecated
5823
    public getTransactionStatus_args clone() {
5824
      return new getTransactionStatus_args(this);
5825
    }
5826
 
5827
    public long getTransactionId() {
5828
      return this.transactionId;
5829
    }
5830
 
5831
    public getTransactionStatus_args setTransactionId(long transactionId) {
5832
      this.transactionId = transactionId;
5833
      setTransactionIdIsSet(true);
5834
      return this;
5835
    }
5836
 
5837
    public void unsetTransactionId() {
5838
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
5839
    }
5840
 
5841
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
5842
    public boolean isSetTransactionId() {
5843
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
5844
    }
5845
 
5846
    public void setTransactionIdIsSet(boolean value) {
5847
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
5848
    }
5849
 
5850
    public void setFieldValue(_Fields field, Object value) {
5851
      switch (field) {
5852
      case TRANSACTION_ID:
5853
        if (value == null) {
5854
          unsetTransactionId();
5855
        } else {
5856
          setTransactionId((Long)value);
5857
        }
5858
        break;
5859
 
5860
      }
5861
    }
5862
 
5863
    public void setFieldValue(int fieldID, Object value) {
5864
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
5865
    }
5866
 
5867
    public Object getFieldValue(_Fields field) {
5868
      switch (field) {
5869
      case TRANSACTION_ID:
5870
        return new Long(getTransactionId());
5871
 
5872
      }
5873
      throw new IllegalStateException();
5874
    }
5875
 
5876
    public Object getFieldValue(int fieldId) {
5877
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
5878
    }
5879
 
5880
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
5881
    public boolean isSet(_Fields field) {
5882
      switch (field) {
5883
      case TRANSACTION_ID:
5884
        return isSetTransactionId();
5885
      }
5886
      throw new IllegalStateException();
5887
    }
5888
 
5889
    public boolean isSet(int fieldID) {
5890
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
5891
    }
5892
 
5893
    @Override
5894
    public boolean equals(Object that) {
5895
      if (that == null)
5896
        return false;
5897
      if (that instanceof getTransactionStatus_args)
5898
        return this.equals((getTransactionStatus_args)that);
5899
      return false;
5900
    }
5901
 
5902
    public boolean equals(getTransactionStatus_args that) {
5903
      if (that == null)
5904
        return false;
5905
 
5906
      boolean this_present_transactionId = true;
5907
      boolean that_present_transactionId = true;
5908
      if (this_present_transactionId || that_present_transactionId) {
5909
        if (!(this_present_transactionId && that_present_transactionId))
5910
          return false;
5911
        if (this.transactionId != that.transactionId)
5912
          return false;
5913
      }
5914
 
5915
      return true;
5916
    }
5917
 
5918
    @Override
5919
    public int hashCode() {
5920
      return 0;
5921
    }
5922
 
5923
    public int compareTo(getTransactionStatus_args other) {
5924
      if (!getClass().equals(other.getClass())) {
5925
        return getClass().getName().compareTo(other.getClass().getName());
5926
      }
5927
 
5928
      int lastComparison = 0;
5929
      getTransactionStatus_args typedOther = (getTransactionStatus_args)other;
5930
 
5931
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
5932
      if (lastComparison != 0) {
5933
        return lastComparison;
5934
      }
5935
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
5936
      if (lastComparison != 0) {
5937
        return lastComparison;
5938
      }
5939
      return 0;
5940
    }
5941
 
5942
    public void read(TProtocol iprot) throws TException {
5943
      TField field;
5944
      iprot.readStructBegin();
5945
      while (true)
5946
      {
5947
        field = iprot.readFieldBegin();
5948
        if (field.type == TType.STOP) { 
5949
          break;
5950
        }
5951
        _Fields fieldId = _Fields.findByThriftId(field.id);
5952
        if (fieldId == null) {
5953
          TProtocolUtil.skip(iprot, field.type);
5954
        } else {
5955
          switch (fieldId) {
5956
            case TRANSACTION_ID:
5957
              if (field.type == TType.I64) {
5958
                this.transactionId = iprot.readI64();
5959
                setTransactionIdIsSet(true);
5960
              } else { 
5961
                TProtocolUtil.skip(iprot, field.type);
5962
              }
5963
              break;
5964
          }
5965
          iprot.readFieldEnd();
5966
        }
5967
      }
5968
      iprot.readStructEnd();
5969
      validate();
5970
    }
5971
 
5972
    public void write(TProtocol oprot) throws TException {
5973
      validate();
5974
 
5975
      oprot.writeStructBegin(STRUCT_DESC);
5976
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
5977
      oprot.writeI64(this.transactionId);
5978
      oprot.writeFieldEnd();
5979
      oprot.writeFieldStop();
5980
      oprot.writeStructEnd();
5981
    }
5982
 
5983
    @Override
5984
    public String toString() {
5985
      StringBuilder sb = new StringBuilder("getTransactionStatus_args(");
5986
      boolean first = true;
5987
 
5988
      sb.append("transactionId:");
5989
      sb.append(this.transactionId);
5990
      first = false;
5991
      sb.append(")");
5992
      return sb.toString();
5993
    }
5994
 
5995
    public void validate() throws TException {
5996
      // check for required fields
5997
    }
5998
 
5999
  }
6000
 
6001
  public static class getTransactionStatus_result implements TBase<getTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<getTransactionStatus_result>   {
6002
    private static final TStruct STRUCT_DESC = new TStruct("getTransactionStatus_result");
6003
 
6004
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I32, (short)0);
6005
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6006
 
6007
    private TransactionStatus success;
6008
    private TransactionServiceException ex;
6009
 
6010
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6011
    public enum _Fields implements TFieldIdEnum {
6012
      /**
6013
       * 
6014
       * @see TransactionStatus
6015
       */
6016
      SUCCESS((short)0, "success"),
6017
      EX((short)1, "ex");
6018
 
6019
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6020
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6021
 
6022
      static {
6023
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6024
          byId.put((int)field._thriftId, field);
6025
          byName.put(field.getFieldName(), field);
6026
        }
6027
      }
6028
 
6029
      /**
6030
       * Find the _Fields constant that matches fieldId, or null if its not found.
6031
       */
6032
      public static _Fields findByThriftId(int fieldId) {
6033
        return byId.get(fieldId);
6034
      }
6035
 
6036
      /**
6037
       * Find the _Fields constant that matches fieldId, throwing an exception
6038
       * if it is not found.
6039
       */
6040
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6041
        _Fields fields = findByThriftId(fieldId);
6042
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6043
        return fields;
6044
      }
6045
 
6046
      /**
6047
       * Find the _Fields constant that matches name, or null if its not found.
6048
       */
6049
      public static _Fields findByName(String name) {
6050
        return byName.get(name);
6051
      }
6052
 
6053
      private final short _thriftId;
6054
      private final String _fieldName;
6055
 
6056
      _Fields(short thriftId, String fieldName) {
6057
        _thriftId = thriftId;
6058
        _fieldName = fieldName;
6059
      }
6060
 
6061
      public short getThriftFieldId() {
6062
        return _thriftId;
6063
      }
6064
 
6065
      public String getFieldName() {
6066
        return _fieldName;
6067
      }
6068
    }
6069
 
6070
    // isset id assignments
6071
 
6072
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6073
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6074
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6075
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6076
          new FieldValueMetaData(TType.STRUCT)));
6077
    }});
6078
 
6079
    static {
6080
      FieldMetaData.addStructMetaDataMap(getTransactionStatus_result.class, metaDataMap);
6081
    }
6082
 
6083
    public getTransactionStatus_result() {
6084
    }
6085
 
6086
    public getTransactionStatus_result(
6087
      TransactionStatus success,
6088
      TransactionServiceException ex)
6089
    {
6090
      this();
6091
      this.success = success;
6092
      this.ex = ex;
6093
    }
6094
 
6095
    /**
6096
     * Performs a deep copy on <i>other</i>.
6097
     */
6098
    public getTransactionStatus_result(getTransactionStatus_result other) {
6099
      if (other.isSetSuccess()) {
6100
        this.success = other.success;
6101
      }
6102
      if (other.isSetEx()) {
6103
        this.ex = new TransactionServiceException(other.ex);
6104
      }
6105
    }
6106
 
6107
    public getTransactionStatus_result deepCopy() {
6108
      return new getTransactionStatus_result(this);
6109
    }
6110
 
6111
    @Deprecated
6112
    public getTransactionStatus_result clone() {
6113
      return new getTransactionStatus_result(this);
6114
    }
6115
 
6116
    /**
6117
     * 
6118
     * @see TransactionStatus
6119
     */
6120
    public TransactionStatus getSuccess() {
6121
      return this.success;
6122
    }
6123
 
6124
    /**
6125
     * 
6126
     * @see TransactionStatus
6127
     */
6128
    public getTransactionStatus_result setSuccess(TransactionStatus success) {
6129
      this.success = success;
6130
      return this;
6131
    }
6132
 
6133
    public void unsetSuccess() {
6134
      this.success = null;
6135
    }
6136
 
6137
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6138
    public boolean isSetSuccess() {
6139
      return this.success != null;
6140
    }
6141
 
6142
    public void setSuccessIsSet(boolean value) {
6143
      if (!value) {
6144
        this.success = null;
6145
      }
6146
    }
6147
 
6148
    public TransactionServiceException getEx() {
6149
      return this.ex;
6150
    }
6151
 
6152
    public getTransactionStatus_result setEx(TransactionServiceException ex) {
6153
      this.ex = ex;
6154
      return this;
6155
    }
6156
 
6157
    public void unsetEx() {
6158
      this.ex = null;
6159
    }
6160
 
6161
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
6162
    public boolean isSetEx() {
6163
      return this.ex != null;
6164
    }
6165
 
6166
    public void setExIsSet(boolean value) {
6167
      if (!value) {
6168
        this.ex = null;
6169
      }
6170
    }
6171
 
6172
    public void setFieldValue(_Fields field, Object value) {
6173
      switch (field) {
6174
      case SUCCESS:
6175
        if (value == null) {
6176
          unsetSuccess();
6177
        } else {
6178
          setSuccess((TransactionStatus)value);
6179
        }
6180
        break;
6181
 
6182
      case EX:
6183
        if (value == null) {
6184
          unsetEx();
6185
        } else {
6186
          setEx((TransactionServiceException)value);
6187
        }
6188
        break;
6189
 
6190
      }
6191
    }
6192
 
6193
    public void setFieldValue(int fieldID, Object value) {
6194
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6195
    }
6196
 
6197
    public Object getFieldValue(_Fields field) {
6198
      switch (field) {
6199
      case SUCCESS:
6200
        return getSuccess();
6201
 
6202
      case EX:
6203
        return getEx();
6204
 
6205
      }
6206
      throw new IllegalStateException();
6207
    }
6208
 
6209
    public Object getFieldValue(int fieldId) {
6210
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6211
    }
6212
 
6213
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6214
    public boolean isSet(_Fields field) {
6215
      switch (field) {
6216
      case SUCCESS:
6217
        return isSetSuccess();
6218
      case EX:
6219
        return isSetEx();
6220
      }
6221
      throw new IllegalStateException();
6222
    }
6223
 
6224
    public boolean isSet(int fieldID) {
6225
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6226
    }
6227
 
6228
    @Override
6229
    public boolean equals(Object that) {
6230
      if (that == null)
6231
        return false;
6232
      if (that instanceof getTransactionStatus_result)
6233
        return this.equals((getTransactionStatus_result)that);
6234
      return false;
6235
    }
6236
 
6237
    public boolean equals(getTransactionStatus_result that) {
6238
      if (that == null)
6239
        return false;
6240
 
6241
      boolean this_present_success = true && this.isSetSuccess();
6242
      boolean that_present_success = true && that.isSetSuccess();
6243
      if (this_present_success || that_present_success) {
6244
        if (!(this_present_success && that_present_success))
6245
          return false;
6246
        if (!this.success.equals(that.success))
6247
          return false;
6248
      }
6249
 
6250
      boolean this_present_ex = true && this.isSetEx();
6251
      boolean that_present_ex = true && that.isSetEx();
6252
      if (this_present_ex || that_present_ex) {
6253
        if (!(this_present_ex && that_present_ex))
6254
          return false;
6255
        if (!this.ex.equals(that.ex))
6256
          return false;
6257
      }
6258
 
6259
      return true;
6260
    }
6261
 
6262
    @Override
6263
    public int hashCode() {
6264
      return 0;
6265
    }
6266
 
6267
    public int compareTo(getTransactionStatus_result other) {
6268
      if (!getClass().equals(other.getClass())) {
6269
        return getClass().getName().compareTo(other.getClass().getName());
6270
      }
6271
 
6272
      int lastComparison = 0;
6273
      getTransactionStatus_result typedOther = (getTransactionStatus_result)other;
6274
 
6275
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
6276
      if (lastComparison != 0) {
6277
        return lastComparison;
6278
      }
6279
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
6280
      if (lastComparison != 0) {
6281
        return lastComparison;
6282
      }
6283
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
6284
      if (lastComparison != 0) {
6285
        return lastComparison;
6286
      }
6287
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
6288
      if (lastComparison != 0) {
6289
        return lastComparison;
6290
      }
6291
      return 0;
6292
    }
6293
 
6294
    public void read(TProtocol iprot) throws TException {
6295
      TField field;
6296
      iprot.readStructBegin();
6297
      while (true)
6298
      {
6299
        field = iprot.readFieldBegin();
6300
        if (field.type == TType.STOP) { 
6301
          break;
6302
        }
6303
        _Fields fieldId = _Fields.findByThriftId(field.id);
6304
        if (fieldId == null) {
6305
          TProtocolUtil.skip(iprot, field.type);
6306
        } else {
6307
          switch (fieldId) {
6308
            case SUCCESS:
6309
              if (field.type == TType.I32) {
6310
                this.success = TransactionStatus.findByValue(iprot.readI32());
6311
              } else { 
6312
                TProtocolUtil.skip(iprot, field.type);
6313
              }
6314
              break;
6315
            case EX:
6316
              if (field.type == TType.STRUCT) {
6317
                this.ex = new TransactionServiceException();
6318
                this.ex.read(iprot);
6319
              } else { 
6320
                TProtocolUtil.skip(iprot, field.type);
6321
              }
6322
              break;
6323
          }
6324
          iprot.readFieldEnd();
6325
        }
6326
      }
6327
      iprot.readStructEnd();
6328
      validate();
6329
    }
6330
 
6331
    public void write(TProtocol oprot) throws TException {
6332
      oprot.writeStructBegin(STRUCT_DESC);
6333
 
6334
      if (this.isSetSuccess()) {
6335
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
6336
        oprot.writeI32(this.success.getValue());
6337
        oprot.writeFieldEnd();
6338
      } else if (this.isSetEx()) {
6339
        oprot.writeFieldBegin(EX_FIELD_DESC);
6340
        this.ex.write(oprot);
6341
        oprot.writeFieldEnd();
6342
      }
6343
      oprot.writeFieldStop();
6344
      oprot.writeStructEnd();
6345
    }
6346
 
6347
    @Override
6348
    public String toString() {
6349
      StringBuilder sb = new StringBuilder("getTransactionStatus_result(");
6350
      boolean first = true;
6351
 
6352
      sb.append("success:");
6353
      if (this.success == null) {
6354
        sb.append("null");
6355
      } else {
6356
        String success_name = success.name();
6357
        if (success_name != null) {
6358
          sb.append(success_name);
6359
          sb.append(" (");
6360
        }
6361
        sb.append(this.success);
6362
        if (success_name != null) {
6363
          sb.append(")");
6364
        }
6365
      }
6366
      first = false;
6367
      if (!first) sb.append(", ");
6368
      sb.append("ex:");
6369
      if (this.ex == null) {
6370
        sb.append("null");
6371
      } else {
6372
        sb.append(this.ex);
6373
      }
6374
      first = false;
6375
      sb.append(")");
6376
      return sb.toString();
6377
    }
6378
 
6379
    public void validate() throws TException {
6380
      // check for required fields
6381
    }
6382
 
6383
  }
6384
 
6385
  public static class changeTransactionStatus_args implements TBase<changeTransactionStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_args>   {
6386
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_args");
6387
 
6388
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
6389
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
6390
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
6391
 
6392
    private long transactionId;
6393
    private TransactionStatus status;
6394
    private String description;
6395
 
6396
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6397
    public enum _Fields implements TFieldIdEnum {
6398
      TRANSACTION_ID((short)1, "transactionId"),
6399
      /**
6400
       * 
6401
       * @see TransactionStatus
6402
       */
6403
      STATUS((short)2, "status"),
6404
      DESCRIPTION((short)3, "description");
6405
 
6406
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6407
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6408
 
6409
      static {
6410
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6411
          byId.put((int)field._thriftId, field);
6412
          byName.put(field.getFieldName(), field);
6413
        }
6414
      }
6415
 
6416
      /**
6417
       * Find the _Fields constant that matches fieldId, or null if its not found.
6418
       */
6419
      public static _Fields findByThriftId(int fieldId) {
6420
        return byId.get(fieldId);
6421
      }
6422
 
6423
      /**
6424
       * Find the _Fields constant that matches fieldId, throwing an exception
6425
       * if it is not found.
6426
       */
6427
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6428
        _Fields fields = findByThriftId(fieldId);
6429
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6430
        return fields;
6431
      }
6432
 
6433
      /**
6434
       * Find the _Fields constant that matches name, or null if its not found.
6435
       */
6436
      public static _Fields findByName(String name) {
6437
        return byName.get(name);
6438
      }
6439
 
6440
      private final short _thriftId;
6441
      private final String _fieldName;
6442
 
6443
      _Fields(short thriftId, String fieldName) {
6444
        _thriftId = thriftId;
6445
        _fieldName = fieldName;
6446
      }
6447
 
6448
      public short getThriftFieldId() {
6449
        return _thriftId;
6450
      }
6451
 
6452
      public String getFieldName() {
6453
        return _fieldName;
6454
      }
6455
    }
6456
 
6457
    // isset id assignments
6458
    private static final int __TRANSACTIONID_ISSET_ID = 0;
6459
    private BitSet __isset_bit_vector = new BitSet(1);
6460
 
6461
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6462
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
6463
          new FieldValueMetaData(TType.I64)));
6464
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
6465
          new EnumMetaData(TType.ENUM, TransactionStatus.class)));
6466
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
6467
          new FieldValueMetaData(TType.STRING)));
6468
    }});
6469
 
6470
    static {
6471
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_args.class, metaDataMap);
6472
    }
6473
 
6474
    public changeTransactionStatus_args() {
6475
    }
6476
 
6477
    public changeTransactionStatus_args(
6478
      long transactionId,
6479
      TransactionStatus status,
6480
      String description)
6481
    {
6482
      this();
6483
      this.transactionId = transactionId;
6484
      setTransactionIdIsSet(true);
6485
      this.status = status;
6486
      this.description = description;
6487
    }
6488
 
6489
    /**
6490
     * Performs a deep copy on <i>other</i>.
6491
     */
6492
    public changeTransactionStatus_args(changeTransactionStatus_args other) {
6493
      __isset_bit_vector.clear();
6494
      __isset_bit_vector.or(other.__isset_bit_vector);
6495
      this.transactionId = other.transactionId;
6496
      if (other.isSetStatus()) {
6497
        this.status = other.status;
6498
      }
6499
      if (other.isSetDescription()) {
6500
        this.description = other.description;
6501
      }
6502
    }
6503
 
6504
    public changeTransactionStatus_args deepCopy() {
6505
      return new changeTransactionStatus_args(this);
6506
    }
6507
 
6508
    @Deprecated
6509
    public changeTransactionStatus_args clone() {
6510
      return new changeTransactionStatus_args(this);
6511
    }
6512
 
6513
    public long getTransactionId() {
6514
      return this.transactionId;
6515
    }
6516
 
6517
    public changeTransactionStatus_args setTransactionId(long transactionId) {
6518
      this.transactionId = transactionId;
6519
      setTransactionIdIsSet(true);
6520
      return this;
6521
    }
6522
 
6523
    public void unsetTransactionId() {
6524
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
6525
    }
6526
 
6527
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
6528
    public boolean isSetTransactionId() {
6529
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
6530
    }
6531
 
6532
    public void setTransactionIdIsSet(boolean value) {
6533
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
6534
    }
6535
 
6536
    /**
6537
     * 
6538
     * @see TransactionStatus
6539
     */
6540
    public TransactionStatus getStatus() {
6541
      return this.status;
6542
    }
6543
 
6544
    /**
6545
     * 
6546
     * @see TransactionStatus
6547
     */
6548
    public changeTransactionStatus_args setStatus(TransactionStatus status) {
6549
      this.status = status;
6550
      return this;
6551
    }
6552
 
6553
    public void unsetStatus() {
6554
      this.status = null;
6555
    }
6556
 
6557
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
6558
    public boolean isSetStatus() {
6559
      return this.status != null;
6560
    }
6561
 
6562
    public void setStatusIsSet(boolean value) {
6563
      if (!value) {
6564
        this.status = null;
6565
      }
6566
    }
6567
 
6568
    public String getDescription() {
6569
      return this.description;
6570
    }
6571
 
6572
    public changeTransactionStatus_args setDescription(String description) {
6573
      this.description = description;
6574
      return this;
6575
    }
6576
 
6577
    public void unsetDescription() {
6578
      this.description = null;
6579
    }
6580
 
6581
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
6582
    public boolean isSetDescription() {
6583
      return this.description != null;
6584
    }
6585
 
6586
    public void setDescriptionIsSet(boolean value) {
6587
      if (!value) {
6588
        this.description = null;
6589
      }
6590
    }
6591
 
6592
    public void setFieldValue(_Fields field, Object value) {
6593
      switch (field) {
6594
      case TRANSACTION_ID:
6595
        if (value == null) {
6596
          unsetTransactionId();
6597
        } else {
6598
          setTransactionId((Long)value);
6599
        }
6600
        break;
6601
 
6602
      case STATUS:
6603
        if (value == null) {
6604
          unsetStatus();
6605
        } else {
6606
          setStatus((TransactionStatus)value);
6607
        }
6608
        break;
6609
 
6610
      case DESCRIPTION:
6611
        if (value == null) {
6612
          unsetDescription();
6613
        } else {
6614
          setDescription((String)value);
6615
        }
6616
        break;
6617
 
6618
      }
6619
    }
6620
 
6621
    public void setFieldValue(int fieldID, Object value) {
6622
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
6623
    }
6624
 
6625
    public Object getFieldValue(_Fields field) {
6626
      switch (field) {
6627
      case TRANSACTION_ID:
6628
        return new Long(getTransactionId());
6629
 
6630
      case STATUS:
6631
        return getStatus();
6632
 
6633
      case DESCRIPTION:
6634
        return getDescription();
6635
 
6636
      }
6637
      throw new IllegalStateException();
6638
    }
6639
 
6640
    public Object getFieldValue(int fieldId) {
6641
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
6642
    }
6643
 
6644
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
6645
    public boolean isSet(_Fields field) {
6646
      switch (field) {
6647
      case TRANSACTION_ID:
6648
        return isSetTransactionId();
6649
      case STATUS:
6650
        return isSetStatus();
6651
      case DESCRIPTION:
6652
        return isSetDescription();
6653
      }
6654
      throw new IllegalStateException();
6655
    }
6656
 
6657
    public boolean isSet(int fieldID) {
6658
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
6659
    }
6660
 
6661
    @Override
6662
    public boolean equals(Object that) {
6663
      if (that == null)
6664
        return false;
6665
      if (that instanceof changeTransactionStatus_args)
6666
        return this.equals((changeTransactionStatus_args)that);
6667
      return false;
6668
    }
6669
 
6670
    public boolean equals(changeTransactionStatus_args that) {
6671
      if (that == null)
6672
        return false;
6673
 
6674
      boolean this_present_transactionId = true;
6675
      boolean that_present_transactionId = true;
6676
      if (this_present_transactionId || that_present_transactionId) {
6677
        if (!(this_present_transactionId && that_present_transactionId))
6678
          return false;
6679
        if (this.transactionId != that.transactionId)
6680
          return false;
6681
      }
6682
 
6683
      boolean this_present_status = true && this.isSetStatus();
6684
      boolean that_present_status = true && that.isSetStatus();
6685
      if (this_present_status || that_present_status) {
6686
        if (!(this_present_status && that_present_status))
6687
          return false;
6688
        if (!this.status.equals(that.status))
6689
          return false;
6690
      }
6691
 
6692
      boolean this_present_description = true && this.isSetDescription();
6693
      boolean that_present_description = true && that.isSetDescription();
6694
      if (this_present_description || that_present_description) {
6695
        if (!(this_present_description && that_present_description))
6696
          return false;
6697
        if (!this.description.equals(that.description))
6698
          return false;
6699
      }
6700
 
6701
      return true;
6702
    }
6703
 
6704
    @Override
6705
    public int hashCode() {
6706
      return 0;
6707
    }
6708
 
6709
    public int compareTo(changeTransactionStatus_args other) {
6710
      if (!getClass().equals(other.getClass())) {
6711
        return getClass().getName().compareTo(other.getClass().getName());
6712
      }
6713
 
6714
      int lastComparison = 0;
6715
      changeTransactionStatus_args typedOther = (changeTransactionStatus_args)other;
6716
 
6717
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
6718
      if (lastComparison != 0) {
6719
        return lastComparison;
6720
      }
6721
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
6722
      if (lastComparison != 0) {
6723
        return lastComparison;
6724
      }
6725
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
6726
      if (lastComparison != 0) {
6727
        return lastComparison;
6728
      }
6729
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
6730
      if (lastComparison != 0) {
6731
        return lastComparison;
6732
      }
6733
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
6734
      if (lastComparison != 0) {
6735
        return lastComparison;
6736
      }
6737
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
6738
      if (lastComparison != 0) {
6739
        return lastComparison;
6740
      }
6741
      return 0;
6742
    }
6743
 
6744
    public void read(TProtocol iprot) throws TException {
6745
      TField field;
6746
      iprot.readStructBegin();
6747
      while (true)
6748
      {
6749
        field = iprot.readFieldBegin();
6750
        if (field.type == TType.STOP) { 
6751
          break;
6752
        }
6753
        _Fields fieldId = _Fields.findByThriftId(field.id);
6754
        if (fieldId == null) {
6755
          TProtocolUtil.skip(iprot, field.type);
6756
        } else {
6757
          switch (fieldId) {
6758
            case TRANSACTION_ID:
6759
              if (field.type == TType.I64) {
6760
                this.transactionId = iprot.readI64();
6761
                setTransactionIdIsSet(true);
6762
              } else { 
6763
                TProtocolUtil.skip(iprot, field.type);
6764
              }
6765
              break;
6766
            case STATUS:
6767
              if (field.type == TType.I32) {
6768
                this.status = TransactionStatus.findByValue(iprot.readI32());
6769
              } else { 
6770
                TProtocolUtil.skip(iprot, field.type);
6771
              }
6772
              break;
6773
            case DESCRIPTION:
6774
              if (field.type == TType.STRING) {
6775
                this.description = iprot.readString();
6776
              } else { 
6777
                TProtocolUtil.skip(iprot, field.type);
6778
              }
6779
              break;
6780
          }
6781
          iprot.readFieldEnd();
6782
        }
6783
      }
6784
      iprot.readStructEnd();
6785
      validate();
6786
    }
6787
 
6788
    public void write(TProtocol oprot) throws TException {
6789
      validate();
6790
 
6791
      oprot.writeStructBegin(STRUCT_DESC);
6792
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
6793
      oprot.writeI64(this.transactionId);
6794
      oprot.writeFieldEnd();
6795
      if (this.status != null) {
6796
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
6797
        oprot.writeI32(this.status.getValue());
6798
        oprot.writeFieldEnd();
6799
      }
6800
      if (this.description != null) {
6801
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
6802
        oprot.writeString(this.description);
6803
        oprot.writeFieldEnd();
6804
      }
6805
      oprot.writeFieldStop();
6806
      oprot.writeStructEnd();
6807
    }
6808
 
6809
    @Override
6810
    public String toString() {
6811
      StringBuilder sb = new StringBuilder("changeTransactionStatus_args(");
6812
      boolean first = true;
6813
 
6814
      sb.append("transactionId:");
6815
      sb.append(this.transactionId);
6816
      first = false;
6817
      if (!first) sb.append(", ");
6818
      sb.append("status:");
6819
      if (this.status == null) {
6820
        sb.append("null");
6821
      } else {
6822
        String status_name = status.name();
6823
        if (status_name != null) {
6824
          sb.append(status_name);
6825
          sb.append(" (");
6826
        }
6827
        sb.append(this.status);
6828
        if (status_name != null) {
6829
          sb.append(")");
6830
        }
6831
      }
6832
      first = false;
6833
      if (!first) sb.append(", ");
6834
      sb.append("description:");
6835
      if (this.description == null) {
6836
        sb.append("null");
6837
      } else {
6838
        sb.append(this.description);
6839
      }
6840
      first = false;
6841
      sb.append(")");
6842
      return sb.toString();
6843
    }
6844
 
6845
    public void validate() throws TException {
6846
      // check for required fields
6847
    }
6848
 
6849
  }
6850
 
6851
  public static class changeTransactionStatus_result implements TBase<changeTransactionStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeTransactionStatus_result>   {
6852
    private static final TStruct STRUCT_DESC = new TStruct("changeTransactionStatus_result");
6853
 
6854
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
6855
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
6856
 
6857
    private boolean success;
6858
    private TransactionServiceException ex;
6859
 
6860
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
6861
    public enum _Fields implements TFieldIdEnum {
6862
      SUCCESS((short)0, "success"),
6863
      EX((short)1, "ex");
6864
 
6865
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
6866
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
6867
 
6868
      static {
6869
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
6870
          byId.put((int)field._thriftId, field);
6871
          byName.put(field.getFieldName(), field);
6872
        }
6873
      }
6874
 
6875
      /**
6876
       * Find the _Fields constant that matches fieldId, or null if its not found.
6877
       */
6878
      public static _Fields findByThriftId(int fieldId) {
6879
        return byId.get(fieldId);
6880
      }
6881
 
6882
      /**
6883
       * Find the _Fields constant that matches fieldId, throwing an exception
6884
       * if it is not found.
6885
       */
6886
      public static _Fields findByThriftIdOrThrow(int fieldId) {
6887
        _Fields fields = findByThriftId(fieldId);
6888
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
6889
        return fields;
6890
      }
6891
 
6892
      /**
6893
       * Find the _Fields constant that matches name, or null if its not found.
6894
       */
6895
      public static _Fields findByName(String name) {
6896
        return byName.get(name);
6897
      }
6898
 
6899
      private final short _thriftId;
6900
      private final String _fieldName;
6901
 
6902
      _Fields(short thriftId, String fieldName) {
6903
        _thriftId = thriftId;
6904
        _fieldName = fieldName;
6905
      }
6906
 
6907
      public short getThriftFieldId() {
6908
        return _thriftId;
6909
      }
6910
 
6911
      public String getFieldName() {
6912
        return _fieldName;
6913
      }
6914
    }
6915
 
6916
    // isset id assignments
6917
    private static final int __SUCCESS_ISSET_ID = 0;
6918
    private BitSet __isset_bit_vector = new BitSet(1);
6919
 
6920
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
6921
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
6922
          new FieldValueMetaData(TType.BOOL)));
6923
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
6924
          new FieldValueMetaData(TType.STRUCT)));
6925
    }});
6926
 
6927
    static {
6928
      FieldMetaData.addStructMetaDataMap(changeTransactionStatus_result.class, metaDataMap);
6929
    }
6930
 
6931
    public changeTransactionStatus_result() {
6932
    }
6933
 
6934
    public changeTransactionStatus_result(
6935
      boolean success,
6936
      TransactionServiceException ex)
6937
    {
6938
      this();
6939
      this.success = success;
6940
      setSuccessIsSet(true);
6941
      this.ex = ex;
6942
    }
6943
 
6944
    /**
6945
     * Performs a deep copy on <i>other</i>.
6946
     */
6947
    public changeTransactionStatus_result(changeTransactionStatus_result other) {
6948
      __isset_bit_vector.clear();
6949
      __isset_bit_vector.or(other.__isset_bit_vector);
6950
      this.success = other.success;
6951
      if (other.isSetEx()) {
6952
        this.ex = new TransactionServiceException(other.ex);
6953
      }
6954
    }
6955
 
6956
    public changeTransactionStatus_result deepCopy() {
6957
      return new changeTransactionStatus_result(this);
6958
    }
6959
 
6960
    @Deprecated
6961
    public changeTransactionStatus_result clone() {
6962
      return new changeTransactionStatus_result(this);
6963
    }
6964
 
6965
    public boolean isSuccess() {
6966
      return this.success;
6967
    }
6968
 
6969
    public changeTransactionStatus_result setSuccess(boolean success) {
6970
      this.success = success;
6971
      setSuccessIsSet(true);
6972
      return this;
6973
    }
6974
 
6975
    public void unsetSuccess() {
6976
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
6977
    }
6978
 
6979
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
6980
    public boolean isSetSuccess() {
6981
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
6982
    }
6983
 
6984
    public void setSuccessIsSet(boolean value) {
6985
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
6986
    }
6987
 
6988
    public TransactionServiceException getEx() {
6989
      return this.ex;
6990
    }
6991
 
6992
    public changeTransactionStatus_result setEx(TransactionServiceException ex) {
6993
      this.ex = ex;
6994
      return this;
6995
    }
6996
 
6997
    public void unsetEx() {
6998
      this.ex = null;
6999
    }
7000
 
7001
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7002
    public boolean isSetEx() {
7003
      return this.ex != null;
7004
    }
7005
 
7006
    public void setExIsSet(boolean value) {
7007
      if (!value) {
7008
        this.ex = null;
7009
      }
7010
    }
7011
 
7012
    public void setFieldValue(_Fields field, Object value) {
7013
      switch (field) {
7014
      case SUCCESS:
7015
        if (value == null) {
7016
          unsetSuccess();
7017
        } else {
7018
          setSuccess((Boolean)value);
7019
        }
7020
        break;
7021
 
7022
      case EX:
7023
        if (value == null) {
7024
          unsetEx();
7025
        } else {
7026
          setEx((TransactionServiceException)value);
7027
        }
7028
        break;
7029
 
7030
      }
7031
    }
7032
 
7033
    public void setFieldValue(int fieldID, Object value) {
7034
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7035
    }
7036
 
7037
    public Object getFieldValue(_Fields field) {
7038
      switch (field) {
7039
      case SUCCESS:
7040
        return new Boolean(isSuccess());
7041
 
7042
      case EX:
7043
        return getEx();
7044
 
7045
      }
7046
      throw new IllegalStateException();
7047
    }
7048
 
7049
    public Object getFieldValue(int fieldId) {
7050
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7051
    }
7052
 
7053
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7054
    public boolean isSet(_Fields field) {
7055
      switch (field) {
7056
      case SUCCESS:
7057
        return isSetSuccess();
7058
      case EX:
7059
        return isSetEx();
7060
      }
7061
      throw new IllegalStateException();
7062
    }
7063
 
7064
    public boolean isSet(int fieldID) {
7065
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7066
    }
7067
 
7068
    @Override
7069
    public boolean equals(Object that) {
7070
      if (that == null)
7071
        return false;
7072
      if (that instanceof changeTransactionStatus_result)
7073
        return this.equals((changeTransactionStatus_result)that);
7074
      return false;
7075
    }
7076
 
7077
    public boolean equals(changeTransactionStatus_result that) {
7078
      if (that == null)
7079
        return false;
7080
 
7081
      boolean this_present_success = true;
7082
      boolean that_present_success = true;
7083
      if (this_present_success || that_present_success) {
7084
        if (!(this_present_success && that_present_success))
7085
          return false;
7086
        if (this.success != that.success)
7087
          return false;
7088
      }
7089
 
7090
      boolean this_present_ex = true && this.isSetEx();
7091
      boolean that_present_ex = true && that.isSetEx();
7092
      if (this_present_ex || that_present_ex) {
7093
        if (!(this_present_ex && that_present_ex))
7094
          return false;
7095
        if (!this.ex.equals(that.ex))
7096
          return false;
7097
      }
7098
 
7099
      return true;
7100
    }
7101
 
7102
    @Override
7103
    public int hashCode() {
7104
      return 0;
7105
    }
7106
 
7107
    public int compareTo(changeTransactionStatus_result other) {
7108
      if (!getClass().equals(other.getClass())) {
7109
        return getClass().getName().compareTo(other.getClass().getName());
7110
      }
7111
 
7112
      int lastComparison = 0;
7113
      changeTransactionStatus_result typedOther = (changeTransactionStatus_result)other;
7114
 
7115
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7116
      if (lastComparison != 0) {
7117
        return lastComparison;
7118
      }
7119
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7120
      if (lastComparison != 0) {
7121
        return lastComparison;
7122
      }
7123
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7124
      if (lastComparison != 0) {
7125
        return lastComparison;
7126
      }
7127
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7128
      if (lastComparison != 0) {
7129
        return lastComparison;
7130
      }
7131
      return 0;
7132
    }
7133
 
7134
    public void read(TProtocol iprot) throws TException {
7135
      TField field;
7136
      iprot.readStructBegin();
7137
      while (true)
7138
      {
7139
        field = iprot.readFieldBegin();
7140
        if (field.type == TType.STOP) { 
7141
          break;
7142
        }
7143
        _Fields fieldId = _Fields.findByThriftId(field.id);
7144
        if (fieldId == null) {
7145
          TProtocolUtil.skip(iprot, field.type);
7146
        } else {
7147
          switch (fieldId) {
7148
            case SUCCESS:
7149
              if (field.type == TType.BOOL) {
7150
                this.success = iprot.readBool();
7151
                setSuccessIsSet(true);
7152
              } else { 
7153
                TProtocolUtil.skip(iprot, field.type);
7154
              }
7155
              break;
7156
            case EX:
7157
              if (field.type == TType.STRUCT) {
7158
                this.ex = new TransactionServiceException();
7159
                this.ex.read(iprot);
7160
              } else { 
7161
                TProtocolUtil.skip(iprot, field.type);
7162
              }
7163
              break;
7164
          }
7165
          iprot.readFieldEnd();
7166
        }
7167
      }
7168
      iprot.readStructEnd();
7169
      validate();
7170
    }
7171
 
7172
    public void write(TProtocol oprot) throws TException {
7173
      oprot.writeStructBegin(STRUCT_DESC);
7174
 
7175
      if (this.isSetSuccess()) {
7176
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7177
        oprot.writeBool(this.success);
7178
        oprot.writeFieldEnd();
7179
      } else if (this.isSetEx()) {
7180
        oprot.writeFieldBegin(EX_FIELD_DESC);
7181
        this.ex.write(oprot);
7182
        oprot.writeFieldEnd();
7183
      }
7184
      oprot.writeFieldStop();
7185
      oprot.writeStructEnd();
7186
    }
7187
 
7188
    @Override
7189
    public String toString() {
7190
      StringBuilder sb = new StringBuilder("changeTransactionStatus_result(");
7191
      boolean first = true;
7192
 
7193
      sb.append("success:");
7194
      sb.append(this.success);
7195
      first = false;
7196
      if (!first) sb.append(", ");
7197
      sb.append("ex:");
7198
      if (this.ex == null) {
7199
        sb.append("null");
7200
      } else {
7201
        sb.append(this.ex);
7202
      }
7203
      first = false;
7204
      sb.append(")");
7205
      return sb.toString();
7206
    }
7207
 
7208
    public void validate() throws TException {
7209
      // check for required fields
7210
    }
7211
 
7212
  }
7213
 
1398 varun.gupt 7214
  public static class enqueueTransactionInfoEmail_args implements TBase<enqueueTransactionInfoEmail_args._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_args>   {
7215
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_args");
1382 varun.gupt 7216
 
7217
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
7218
 
7219
    private long transactionId;
7220
 
7221
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7222
    public enum _Fields implements TFieldIdEnum {
7223
      TRANSACTION_ID((short)1, "transactionId");
7224
 
7225
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7226
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7227
 
7228
      static {
7229
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7230
          byId.put((int)field._thriftId, field);
7231
          byName.put(field.getFieldName(), field);
7232
        }
7233
      }
7234
 
7235
      /**
7236
       * Find the _Fields constant that matches fieldId, or null if its not found.
7237
       */
7238
      public static _Fields findByThriftId(int fieldId) {
7239
        return byId.get(fieldId);
7240
      }
7241
 
7242
      /**
7243
       * Find the _Fields constant that matches fieldId, throwing an exception
7244
       * if it is not found.
7245
       */
7246
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7247
        _Fields fields = findByThriftId(fieldId);
7248
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7249
        return fields;
7250
      }
7251
 
7252
      /**
7253
       * Find the _Fields constant that matches name, or null if its not found.
7254
       */
7255
      public static _Fields findByName(String name) {
7256
        return byName.get(name);
7257
      }
7258
 
7259
      private final short _thriftId;
7260
      private final String _fieldName;
7261
 
7262
      _Fields(short thriftId, String fieldName) {
7263
        _thriftId = thriftId;
7264
        _fieldName = fieldName;
7265
      }
7266
 
7267
      public short getThriftFieldId() {
7268
        return _thriftId;
7269
      }
7270
 
7271
      public String getFieldName() {
7272
        return _fieldName;
7273
      }
7274
    }
7275
 
7276
    // isset id assignments
7277
    private static final int __TRANSACTIONID_ISSET_ID = 0;
7278
    private BitSet __isset_bit_vector = new BitSet(1);
7279
 
7280
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7281
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
7282
          new FieldValueMetaData(TType.I64)));
7283
    }});
7284
 
7285
    static {
1398 varun.gupt 7286
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_args.class, metaDataMap);
1382 varun.gupt 7287
    }
7288
 
1398 varun.gupt 7289
    public enqueueTransactionInfoEmail_args() {
1382 varun.gupt 7290
    }
7291
 
1398 varun.gupt 7292
    public enqueueTransactionInfoEmail_args(
1382 varun.gupt 7293
      long transactionId)
7294
    {
7295
      this();
7296
      this.transactionId = transactionId;
7297
      setTransactionIdIsSet(true);
7298
    }
7299
 
7300
    /**
7301
     * Performs a deep copy on <i>other</i>.
7302
     */
1398 varun.gupt 7303
    public enqueueTransactionInfoEmail_args(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7304
      __isset_bit_vector.clear();
7305
      __isset_bit_vector.or(other.__isset_bit_vector);
7306
      this.transactionId = other.transactionId;
7307
    }
7308
 
1398 varun.gupt 7309
    public enqueueTransactionInfoEmail_args deepCopy() {
7310
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7311
    }
7312
 
7313
    @Deprecated
1398 varun.gupt 7314
    public enqueueTransactionInfoEmail_args clone() {
7315
      return new enqueueTransactionInfoEmail_args(this);
1382 varun.gupt 7316
    }
7317
 
7318
    public long getTransactionId() {
7319
      return this.transactionId;
7320
    }
7321
 
1398 varun.gupt 7322
    public enqueueTransactionInfoEmail_args setTransactionId(long transactionId) {
1382 varun.gupt 7323
      this.transactionId = transactionId;
7324
      setTransactionIdIsSet(true);
7325
      return this;
7326
    }
7327
 
7328
    public void unsetTransactionId() {
7329
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
7330
    }
7331
 
7332
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
7333
    public boolean isSetTransactionId() {
7334
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
7335
    }
7336
 
7337
    public void setTransactionIdIsSet(boolean value) {
7338
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
7339
    }
7340
 
7341
    public void setFieldValue(_Fields field, Object value) {
7342
      switch (field) {
7343
      case TRANSACTION_ID:
7344
        if (value == null) {
7345
          unsetTransactionId();
7346
        } else {
7347
          setTransactionId((Long)value);
7348
        }
7349
        break;
7350
 
7351
      }
7352
    }
7353
 
7354
    public void setFieldValue(int fieldID, Object value) {
7355
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7356
    }
7357
 
7358
    public Object getFieldValue(_Fields field) {
7359
      switch (field) {
7360
      case TRANSACTION_ID:
7361
        return new Long(getTransactionId());
7362
 
7363
      }
7364
      throw new IllegalStateException();
7365
    }
7366
 
7367
    public Object getFieldValue(int fieldId) {
7368
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7369
    }
7370
 
7371
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7372
    public boolean isSet(_Fields field) {
7373
      switch (field) {
7374
      case TRANSACTION_ID:
7375
        return isSetTransactionId();
7376
      }
7377
      throw new IllegalStateException();
7378
    }
7379
 
7380
    public boolean isSet(int fieldID) {
7381
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7382
    }
7383
 
7384
    @Override
7385
    public boolean equals(Object that) {
7386
      if (that == null)
7387
        return false;
1398 varun.gupt 7388
      if (that instanceof enqueueTransactionInfoEmail_args)
7389
        return this.equals((enqueueTransactionInfoEmail_args)that);
1382 varun.gupt 7390
      return false;
7391
    }
7392
 
1398 varun.gupt 7393
    public boolean equals(enqueueTransactionInfoEmail_args that) {
1382 varun.gupt 7394
      if (that == null)
7395
        return false;
7396
 
7397
      boolean this_present_transactionId = true;
7398
      boolean that_present_transactionId = true;
7399
      if (this_present_transactionId || that_present_transactionId) {
7400
        if (!(this_present_transactionId && that_present_transactionId))
7401
          return false;
7402
        if (this.transactionId != that.transactionId)
7403
          return false;
7404
      }
7405
 
7406
      return true;
7407
    }
7408
 
7409
    @Override
7410
    public int hashCode() {
7411
      return 0;
7412
    }
7413
 
1398 varun.gupt 7414
    public int compareTo(enqueueTransactionInfoEmail_args other) {
1382 varun.gupt 7415
      if (!getClass().equals(other.getClass())) {
7416
        return getClass().getName().compareTo(other.getClass().getName());
7417
      }
7418
 
7419
      int lastComparison = 0;
1398 varun.gupt 7420
      enqueueTransactionInfoEmail_args typedOther = (enqueueTransactionInfoEmail_args)other;
1382 varun.gupt 7421
 
7422
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
7423
      if (lastComparison != 0) {
7424
        return lastComparison;
7425
      }
7426
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
7427
      if (lastComparison != 0) {
7428
        return lastComparison;
7429
      }
7430
      return 0;
7431
    }
7432
 
7433
    public void read(TProtocol iprot) throws TException {
7434
      TField field;
7435
      iprot.readStructBegin();
7436
      while (true)
7437
      {
7438
        field = iprot.readFieldBegin();
7439
        if (field.type == TType.STOP) { 
7440
          break;
7441
        }
7442
        _Fields fieldId = _Fields.findByThriftId(field.id);
7443
        if (fieldId == null) {
7444
          TProtocolUtil.skip(iprot, field.type);
7445
        } else {
7446
          switch (fieldId) {
7447
            case TRANSACTION_ID:
7448
              if (field.type == TType.I64) {
7449
                this.transactionId = iprot.readI64();
7450
                setTransactionIdIsSet(true);
7451
              } else { 
7452
                TProtocolUtil.skip(iprot, field.type);
7453
              }
7454
              break;
7455
          }
7456
          iprot.readFieldEnd();
7457
        }
7458
      }
7459
      iprot.readStructEnd();
7460
      validate();
7461
    }
7462
 
7463
    public void write(TProtocol oprot) throws TException {
7464
      validate();
7465
 
7466
      oprot.writeStructBegin(STRUCT_DESC);
7467
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
7468
      oprot.writeI64(this.transactionId);
7469
      oprot.writeFieldEnd();
7470
      oprot.writeFieldStop();
7471
      oprot.writeStructEnd();
7472
    }
7473
 
7474
    @Override
7475
    public String toString() {
1398 varun.gupt 7476
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_args(");
1382 varun.gupt 7477
      boolean first = true;
7478
 
7479
      sb.append("transactionId:");
7480
      sb.append(this.transactionId);
7481
      first = false;
7482
      sb.append(")");
7483
      return sb.toString();
7484
    }
7485
 
7486
    public void validate() throws TException {
7487
      // check for required fields
7488
    }
7489
 
7490
  }
7491
 
1398 varun.gupt 7492
  public static class enqueueTransactionInfoEmail_result implements TBase<enqueueTransactionInfoEmail_result._Fields>, java.io.Serializable, Cloneable, Comparable<enqueueTransactionInfoEmail_result>   {
7493
    private static final TStruct STRUCT_DESC = new TStruct("enqueueTransactionInfoEmail_result");
1382 varun.gupt 7494
 
7495
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
7496
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
7497
 
7498
    private boolean success;
7499
    private TransactionServiceException ex;
7500
 
7501
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7502
    public enum _Fields implements TFieldIdEnum {
7503
      SUCCESS((short)0, "success"),
7504
      EX((short)1, "ex");
7505
 
7506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7508
 
7509
      static {
7510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7511
          byId.put((int)field._thriftId, field);
7512
          byName.put(field.getFieldName(), field);
7513
        }
7514
      }
7515
 
7516
      /**
7517
       * Find the _Fields constant that matches fieldId, or null if its not found.
7518
       */
7519
      public static _Fields findByThriftId(int fieldId) {
7520
        return byId.get(fieldId);
7521
      }
7522
 
7523
      /**
7524
       * Find the _Fields constant that matches fieldId, throwing an exception
7525
       * if it is not found.
7526
       */
7527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7528
        _Fields fields = findByThriftId(fieldId);
7529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7530
        return fields;
7531
      }
7532
 
7533
      /**
7534
       * Find the _Fields constant that matches name, or null if its not found.
7535
       */
7536
      public static _Fields findByName(String name) {
7537
        return byName.get(name);
7538
      }
7539
 
7540
      private final short _thriftId;
7541
      private final String _fieldName;
7542
 
7543
      _Fields(short thriftId, String fieldName) {
7544
        _thriftId = thriftId;
7545
        _fieldName = fieldName;
7546
      }
7547
 
7548
      public short getThriftFieldId() {
7549
        return _thriftId;
7550
      }
7551
 
7552
      public String getFieldName() {
7553
        return _fieldName;
7554
      }
7555
    }
7556
 
7557
    // isset id assignments
7558
    private static final int __SUCCESS_ISSET_ID = 0;
7559
    private BitSet __isset_bit_vector = new BitSet(1);
7560
 
7561
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
7562
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
7563
          new FieldValueMetaData(TType.BOOL)));
7564
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
7565
          new FieldValueMetaData(TType.STRUCT)));
7566
    }});
7567
 
7568
    static {
1398 varun.gupt 7569
      FieldMetaData.addStructMetaDataMap(enqueueTransactionInfoEmail_result.class, metaDataMap);
1382 varun.gupt 7570
    }
7571
 
1398 varun.gupt 7572
    public enqueueTransactionInfoEmail_result() {
1382 varun.gupt 7573
    }
7574
 
1398 varun.gupt 7575
    public enqueueTransactionInfoEmail_result(
1382 varun.gupt 7576
      boolean success,
7577
      TransactionServiceException ex)
7578
    {
7579
      this();
7580
      this.success = success;
7581
      setSuccessIsSet(true);
7582
      this.ex = ex;
7583
    }
7584
 
7585
    /**
7586
     * Performs a deep copy on <i>other</i>.
7587
     */
1398 varun.gupt 7588
    public enqueueTransactionInfoEmail_result(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7589
      __isset_bit_vector.clear();
7590
      __isset_bit_vector.or(other.__isset_bit_vector);
7591
      this.success = other.success;
7592
      if (other.isSetEx()) {
7593
        this.ex = new TransactionServiceException(other.ex);
7594
      }
7595
    }
7596
 
1398 varun.gupt 7597
    public enqueueTransactionInfoEmail_result deepCopy() {
7598
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7599
    }
7600
 
7601
    @Deprecated
1398 varun.gupt 7602
    public enqueueTransactionInfoEmail_result clone() {
7603
      return new enqueueTransactionInfoEmail_result(this);
1382 varun.gupt 7604
    }
7605
 
7606
    public boolean isSuccess() {
7607
      return this.success;
7608
    }
7609
 
1398 varun.gupt 7610
    public enqueueTransactionInfoEmail_result setSuccess(boolean success) {
1382 varun.gupt 7611
      this.success = success;
7612
      setSuccessIsSet(true);
7613
      return this;
7614
    }
7615
 
7616
    public void unsetSuccess() {
7617
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
7618
    }
7619
 
7620
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
7621
    public boolean isSetSuccess() {
7622
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
7623
    }
7624
 
7625
    public void setSuccessIsSet(boolean value) {
7626
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
7627
    }
7628
 
7629
    public TransactionServiceException getEx() {
7630
      return this.ex;
7631
    }
7632
 
1398 varun.gupt 7633
    public enqueueTransactionInfoEmail_result setEx(TransactionServiceException ex) {
1382 varun.gupt 7634
      this.ex = ex;
7635
      return this;
7636
    }
7637
 
7638
    public void unsetEx() {
7639
      this.ex = null;
7640
    }
7641
 
7642
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
7643
    public boolean isSetEx() {
7644
      return this.ex != null;
7645
    }
7646
 
7647
    public void setExIsSet(boolean value) {
7648
      if (!value) {
7649
        this.ex = null;
7650
      }
7651
    }
7652
 
7653
    public void setFieldValue(_Fields field, Object value) {
7654
      switch (field) {
7655
      case SUCCESS:
7656
        if (value == null) {
7657
          unsetSuccess();
7658
        } else {
7659
          setSuccess((Boolean)value);
7660
        }
7661
        break;
7662
 
7663
      case EX:
7664
        if (value == null) {
7665
          unsetEx();
7666
        } else {
7667
          setEx((TransactionServiceException)value);
7668
        }
7669
        break;
7670
 
7671
      }
7672
    }
7673
 
7674
    public void setFieldValue(int fieldID, Object value) {
7675
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
7676
    }
7677
 
7678
    public Object getFieldValue(_Fields field) {
7679
      switch (field) {
7680
      case SUCCESS:
7681
        return new Boolean(isSuccess());
7682
 
7683
      case EX:
7684
        return getEx();
7685
 
7686
      }
7687
      throw new IllegalStateException();
7688
    }
7689
 
7690
    public Object getFieldValue(int fieldId) {
7691
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
7692
    }
7693
 
7694
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
7695
    public boolean isSet(_Fields field) {
7696
      switch (field) {
7697
      case SUCCESS:
7698
        return isSetSuccess();
7699
      case EX:
7700
        return isSetEx();
7701
      }
7702
      throw new IllegalStateException();
7703
    }
7704
 
7705
    public boolean isSet(int fieldID) {
7706
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
7707
    }
7708
 
7709
    @Override
7710
    public boolean equals(Object that) {
7711
      if (that == null)
7712
        return false;
1398 varun.gupt 7713
      if (that instanceof enqueueTransactionInfoEmail_result)
7714
        return this.equals((enqueueTransactionInfoEmail_result)that);
1382 varun.gupt 7715
      return false;
7716
    }
7717
 
1398 varun.gupt 7718
    public boolean equals(enqueueTransactionInfoEmail_result that) {
1382 varun.gupt 7719
      if (that == null)
7720
        return false;
7721
 
7722
      boolean this_present_success = true;
7723
      boolean that_present_success = true;
7724
      if (this_present_success || that_present_success) {
7725
        if (!(this_present_success && that_present_success))
7726
          return false;
7727
        if (this.success != that.success)
7728
          return false;
7729
      }
7730
 
7731
      boolean this_present_ex = true && this.isSetEx();
7732
      boolean that_present_ex = true && that.isSetEx();
7733
      if (this_present_ex || that_present_ex) {
7734
        if (!(this_present_ex && that_present_ex))
7735
          return false;
7736
        if (!this.ex.equals(that.ex))
7737
          return false;
7738
      }
7739
 
7740
      return true;
7741
    }
7742
 
7743
    @Override
7744
    public int hashCode() {
7745
      return 0;
7746
    }
7747
 
1398 varun.gupt 7748
    public int compareTo(enqueueTransactionInfoEmail_result other) {
1382 varun.gupt 7749
      if (!getClass().equals(other.getClass())) {
7750
        return getClass().getName().compareTo(other.getClass().getName());
7751
      }
7752
 
7753
      int lastComparison = 0;
1398 varun.gupt 7754
      enqueueTransactionInfoEmail_result typedOther = (enqueueTransactionInfoEmail_result)other;
1382 varun.gupt 7755
 
7756
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
7757
      if (lastComparison != 0) {
7758
        return lastComparison;
7759
      }
7760
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
7761
      if (lastComparison != 0) {
7762
        return lastComparison;
7763
      }
7764
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
7765
      if (lastComparison != 0) {
7766
        return lastComparison;
7767
      }
7768
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
7769
      if (lastComparison != 0) {
7770
        return lastComparison;
7771
      }
7772
      return 0;
7773
    }
7774
 
7775
    public void read(TProtocol iprot) throws TException {
7776
      TField field;
7777
      iprot.readStructBegin();
7778
      while (true)
7779
      {
7780
        field = iprot.readFieldBegin();
7781
        if (field.type == TType.STOP) { 
7782
          break;
7783
        }
7784
        _Fields fieldId = _Fields.findByThriftId(field.id);
7785
        if (fieldId == null) {
7786
          TProtocolUtil.skip(iprot, field.type);
7787
        } else {
7788
          switch (fieldId) {
7789
            case SUCCESS:
7790
              if (field.type == TType.BOOL) {
7791
                this.success = iprot.readBool();
7792
                setSuccessIsSet(true);
7793
              } else { 
7794
                TProtocolUtil.skip(iprot, field.type);
7795
              }
7796
              break;
7797
            case EX:
7798
              if (field.type == TType.STRUCT) {
7799
                this.ex = new TransactionServiceException();
7800
                this.ex.read(iprot);
7801
              } else { 
7802
                TProtocolUtil.skip(iprot, field.type);
7803
              }
7804
              break;
7805
          }
7806
          iprot.readFieldEnd();
7807
        }
7808
      }
7809
      iprot.readStructEnd();
7810
      validate();
7811
    }
7812
 
7813
    public void write(TProtocol oprot) throws TException {
7814
      oprot.writeStructBegin(STRUCT_DESC);
7815
 
7816
      if (this.isSetSuccess()) {
7817
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
7818
        oprot.writeBool(this.success);
7819
        oprot.writeFieldEnd();
7820
      } else if (this.isSetEx()) {
7821
        oprot.writeFieldBegin(EX_FIELD_DESC);
7822
        this.ex.write(oprot);
7823
        oprot.writeFieldEnd();
7824
      }
7825
      oprot.writeFieldStop();
7826
      oprot.writeStructEnd();
7827
    }
7828
 
7829
    @Override
7830
    public String toString() {
1398 varun.gupt 7831
      StringBuilder sb = new StringBuilder("enqueueTransactionInfoEmail_result(");
1382 varun.gupt 7832
      boolean first = true;
7833
 
7834
      sb.append("success:");
7835
      sb.append(this.success);
7836
      first = false;
7837
      if (!first) sb.append(", ");
7838
      sb.append("ex:");
7839
      if (this.ex == null) {
7840
        sb.append("null");
7841
      } else {
7842
        sb.append(this.ex);
7843
      }
7844
      first = false;
7845
      sb.append(")");
7846
      return sb.toString();
7847
    }
7848
 
7849
    public void validate() throws TException {
7850
      // check for required fields
7851
    }
7852
 
7853
  }
7854
 
483 rajveer 7855
  public static class getAllOrders_args implements TBase<getAllOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_args>   {
7856
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_args");
68 ashish 7857
 
483 rajveer 7858
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
7859
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
7860
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
7861
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
68 ashish 7862
 
483 rajveer 7863
    private OrderStatus status;
7864
    private long from_date;
7865
    private long to_date;
7866
    private long warehouse_id;
68 ashish 7867
 
7868
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
7869
    public enum _Fields implements TFieldIdEnum {
483 rajveer 7870
      /**
7871
       * 
7872
       * @see OrderStatus
7873
       */
7874
      STATUS((short)1, "status"),
7875
      FROM_DATE((short)2, "from_date"),
7876
      TO_DATE((short)3, "to_date"),
7877
      WAREHOUSE_ID((short)4, "warehouse_id");
68 ashish 7878
 
7879
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
7880
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
7881
 
7882
      static {
7883
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
7884
          byId.put((int)field._thriftId, field);
7885
          byName.put(field.getFieldName(), field);
7886
        }
7887
      }
7888
 
7889
      /**
7890
       * Find the _Fields constant that matches fieldId, or null if its not found.
7891
       */
7892
      public static _Fields findByThriftId(int fieldId) {
7893
        return byId.get(fieldId);
7894
      }
7895
 
7896
      /**
7897
       * Find the _Fields constant that matches fieldId, throwing an exception
7898
       * if it is not found.
7899
       */
7900
      public static _Fields findByThriftIdOrThrow(int fieldId) {
7901
        _Fields fields = findByThriftId(fieldId);
7902
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
7903
        return fields;
7904
      }
7905
 
7906
      /**
7907
       * Find the _Fields constant that matches name, or null if its not found.
7908
       */
7909
      public static _Fields findByName(String name) {
7910
        return byName.get(name);
7911
      }
7912
 
7913
      private final short _thriftId;
7914
      private final String _fieldName;
7915
 
7916
      _Fields(short thriftId, String fieldName) {
7917
        _thriftId = thriftId;
7918
        _fieldName = fieldName;
7919
      }
7920
 
7921
      public short getThriftFieldId() {
7922
        return _thriftId;
7923
      }
7924
 
7925
      public String getFieldName() {
7926
        return _fieldName;
7927
      }
7928
    }
7929
 
7930
    // isset id assignments
483 rajveer 7931
    private static final int __FROM_DATE_ISSET_ID = 0;
7932
    private static final int __TO_DATE_ISSET_ID = 1;
7933
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
7934
    private BitSet __isset_bit_vector = new BitSet(3);
68 ashish 7935
 
7936
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 7937
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
7938
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
7939
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 7940
          new FieldValueMetaData(TType.I64)));
483 rajveer 7941
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
7942
          new FieldValueMetaData(TType.I64)));
7943
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
7944
          new FieldValueMetaData(TType.I64)));
68 ashish 7945
    }});
7946
 
7947
    static {
483 rajveer 7948
      FieldMetaData.addStructMetaDataMap(getAllOrders_args.class, metaDataMap);
68 ashish 7949
    }
7950
 
483 rajveer 7951
    public getAllOrders_args() {
68 ashish 7952
    }
7953
 
483 rajveer 7954
    public getAllOrders_args(
7955
      OrderStatus status,
7956
      long from_date,
7957
      long to_date,
7958
      long warehouse_id)
68 ashish 7959
    {
7960
      this();
483 rajveer 7961
      this.status = status;
7962
      this.from_date = from_date;
7963
      setFrom_dateIsSet(true);
7964
      this.to_date = to_date;
7965
      setTo_dateIsSet(true);
7966
      this.warehouse_id = warehouse_id;
7967
      setWarehouse_idIsSet(true);
68 ashish 7968
    }
7969
 
7970
    /**
7971
     * Performs a deep copy on <i>other</i>.
7972
     */
483 rajveer 7973
    public getAllOrders_args(getAllOrders_args other) {
68 ashish 7974
      __isset_bit_vector.clear();
7975
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 7976
      if (other.isSetStatus()) {
7977
        this.status = other.status;
7978
      }
7979
      this.from_date = other.from_date;
7980
      this.to_date = other.to_date;
7981
      this.warehouse_id = other.warehouse_id;
68 ashish 7982
    }
7983
 
483 rajveer 7984
    public getAllOrders_args deepCopy() {
7985
      return new getAllOrders_args(this);
68 ashish 7986
    }
7987
 
7988
    @Deprecated
483 rajveer 7989
    public getAllOrders_args clone() {
7990
      return new getAllOrders_args(this);
68 ashish 7991
    }
7992
 
483 rajveer 7993
    /**
7994
     * 
7995
     * @see OrderStatus
7996
     */
7997
    public OrderStatus getStatus() {
7998
      return this.status;
68 ashish 7999
    }
8000
 
483 rajveer 8001
    /**
8002
     * 
8003
     * @see OrderStatus
8004
     */
8005
    public getAllOrders_args setStatus(OrderStatus status) {
8006
      this.status = status;
68 ashish 8007
      return this;
8008
    }
8009
 
483 rajveer 8010
    public void unsetStatus() {
8011
      this.status = null;
68 ashish 8012
    }
8013
 
483 rajveer 8014
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8015
    public boolean isSetStatus() {
8016
      return this.status != null;
68 ashish 8017
    }
8018
 
483 rajveer 8019
    public void setStatusIsSet(boolean value) {
8020
      if (!value) {
8021
        this.status = null;
68 ashish 8022
      }
8023
    }
8024
 
483 rajveer 8025
    public long getFrom_date() {
8026
      return this.from_date;
68 ashish 8027
    }
8028
 
483 rajveer 8029
    public getAllOrders_args setFrom_date(long from_date) {
8030
      this.from_date = from_date;
8031
      setFrom_dateIsSet(true);
8032
      return this;
68 ashish 8033
    }
8034
 
483 rajveer 8035
    public void unsetFrom_date() {
8036
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 8037
    }
8038
 
483 rajveer 8039
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
8040
    public boolean isSetFrom_date() {
8041
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 8042
    }
8043
 
483 rajveer 8044
    public void setFrom_dateIsSet(boolean value) {
8045
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 8046
    }
8047
 
483 rajveer 8048
    public long getTo_date() {
8049
      return this.to_date;
68 ashish 8050
    }
8051
 
483 rajveer 8052
    public getAllOrders_args setTo_date(long to_date) {
8053
      this.to_date = to_date;
8054
      setTo_dateIsSet(true);
68 ashish 8055
      return this;
8056
    }
8057
 
483 rajveer 8058
    public void unsetTo_date() {
8059
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 8060
    }
8061
 
483 rajveer 8062
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
8063
    public boolean isSetTo_date() {
8064
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 8065
    }
8066
 
483 rajveer 8067
    public void setTo_dateIsSet(boolean value) {
8068
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 8069
    }
8070
 
483 rajveer 8071
    public long getWarehouse_id() {
8072
      return this.warehouse_id;
68 ashish 8073
    }
8074
 
483 rajveer 8075
    public getAllOrders_args setWarehouse_id(long warehouse_id) {
8076
      this.warehouse_id = warehouse_id;
8077
      setWarehouse_idIsSet(true);
68 ashish 8078
      return this;
8079
    }
8080
 
483 rajveer 8081
    public void unsetWarehouse_id() {
8082
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8083
    }
8084
 
483 rajveer 8085
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
8086
    public boolean isSetWarehouse_id() {
8087
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
68 ashish 8088
    }
8089
 
483 rajveer 8090
    public void setWarehouse_idIsSet(boolean value) {
8091
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
68 ashish 8092
    }
8093
 
8094
    public void setFieldValue(_Fields field, Object value) {
8095
      switch (field) {
483 rajveer 8096
      case STATUS:
68 ashish 8097
        if (value == null) {
483 rajveer 8098
          unsetStatus();
68 ashish 8099
        } else {
483 rajveer 8100
          setStatus((OrderStatus)value);
68 ashish 8101
        }
8102
        break;
8103
 
483 rajveer 8104
      case FROM_DATE:
68 ashish 8105
        if (value == null) {
483 rajveer 8106
          unsetFrom_date();
68 ashish 8107
        } else {
483 rajveer 8108
          setFrom_date((Long)value);
68 ashish 8109
        }
8110
        break;
8111
 
483 rajveer 8112
      case TO_DATE:
8113
        if (value == null) {
8114
          unsetTo_date();
8115
        } else {
8116
          setTo_date((Long)value);
8117
        }
8118
        break;
8119
 
8120
      case WAREHOUSE_ID:
8121
        if (value == null) {
8122
          unsetWarehouse_id();
8123
        } else {
8124
          setWarehouse_id((Long)value);
8125
        }
8126
        break;
8127
 
68 ashish 8128
      }
8129
    }
8130
 
8131
    public void setFieldValue(int fieldID, Object value) {
8132
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8133
    }
8134
 
8135
    public Object getFieldValue(_Fields field) {
8136
      switch (field) {
483 rajveer 8137
      case STATUS:
8138
        return getStatus();
68 ashish 8139
 
483 rajveer 8140
      case FROM_DATE:
8141
        return new Long(getFrom_date());
68 ashish 8142
 
483 rajveer 8143
      case TO_DATE:
8144
        return new Long(getTo_date());
8145
 
8146
      case WAREHOUSE_ID:
8147
        return new Long(getWarehouse_id());
8148
 
68 ashish 8149
      }
8150
      throw new IllegalStateException();
8151
    }
8152
 
8153
    public Object getFieldValue(int fieldId) {
8154
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8155
    }
8156
 
8157
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8158
    public boolean isSet(_Fields field) {
8159
      switch (field) {
483 rajveer 8160
      case STATUS:
8161
        return isSetStatus();
8162
      case FROM_DATE:
8163
        return isSetFrom_date();
8164
      case TO_DATE:
8165
        return isSetTo_date();
8166
      case WAREHOUSE_ID:
8167
        return isSetWarehouse_id();
68 ashish 8168
      }
8169
      throw new IllegalStateException();
8170
    }
8171
 
8172
    public boolean isSet(int fieldID) {
8173
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8174
    }
8175
 
8176
    @Override
8177
    public boolean equals(Object that) {
8178
      if (that == null)
8179
        return false;
483 rajveer 8180
      if (that instanceof getAllOrders_args)
8181
        return this.equals((getAllOrders_args)that);
68 ashish 8182
      return false;
8183
    }
8184
 
483 rajveer 8185
    public boolean equals(getAllOrders_args that) {
68 ashish 8186
      if (that == null)
8187
        return false;
8188
 
483 rajveer 8189
      boolean this_present_status = true && this.isSetStatus();
8190
      boolean that_present_status = true && that.isSetStatus();
8191
      if (this_present_status || that_present_status) {
8192
        if (!(this_present_status && that_present_status))
68 ashish 8193
          return false;
483 rajveer 8194
        if (!this.status.equals(that.status))
68 ashish 8195
          return false;
8196
      }
8197
 
483 rajveer 8198
      boolean this_present_from_date = true;
8199
      boolean that_present_from_date = true;
8200
      if (this_present_from_date || that_present_from_date) {
8201
        if (!(this_present_from_date && that_present_from_date))
68 ashish 8202
          return false;
483 rajveer 8203
        if (this.from_date != that.from_date)
68 ashish 8204
          return false;
8205
      }
8206
 
483 rajveer 8207
      boolean this_present_to_date = true;
8208
      boolean that_present_to_date = true;
8209
      if (this_present_to_date || that_present_to_date) {
8210
        if (!(this_present_to_date && that_present_to_date))
8211
          return false;
8212
        if (this.to_date != that.to_date)
8213
          return false;
68 ashish 8214
      }
8215
 
483 rajveer 8216
      boolean this_present_warehouse_id = true;
8217
      boolean that_present_warehouse_id = true;
8218
      if (this_present_warehouse_id || that_present_warehouse_id) {
8219
        if (!(this_present_warehouse_id && that_present_warehouse_id))
68 ashish 8220
          return false;
483 rajveer 8221
        if (this.warehouse_id != that.warehouse_id)
68 ashish 8222
          return false;
8223
      }
8224
 
8225
      return true;
8226
    }
8227
 
8228
    @Override
8229
    public int hashCode() {
8230
      return 0;
8231
    }
8232
 
483 rajveer 8233
    public int compareTo(getAllOrders_args other) {
68 ashish 8234
      if (!getClass().equals(other.getClass())) {
8235
        return getClass().getName().compareTo(other.getClass().getName());
8236
      }
8237
 
8238
      int lastComparison = 0;
483 rajveer 8239
      getAllOrders_args typedOther = (getAllOrders_args)other;
68 ashish 8240
 
483 rajveer 8241
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
68 ashish 8242
      if (lastComparison != 0) {
8243
        return lastComparison;
8244
      }
483 rajveer 8245
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
68 ashish 8246
      if (lastComparison != 0) {
8247
        return lastComparison;
8248
      }
483 rajveer 8249
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
8250
      if (lastComparison != 0) {
8251
        return lastComparison;
8252
      }
8253
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
8254
      if (lastComparison != 0) {
8255
        return lastComparison;
8256
      }
8257
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
8258
      if (lastComparison != 0) {
8259
        return lastComparison;
8260
      }
8261
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
8262
      if (lastComparison != 0) {
8263
        return lastComparison;
8264
      }
8265
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
8266
      if (lastComparison != 0) {
8267
        return lastComparison;
8268
      }
8269
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
8270
      if (lastComparison != 0) {
8271
        return lastComparison;
8272
      }
68 ashish 8273
      return 0;
8274
    }
8275
 
8276
    public void read(TProtocol iprot) throws TException {
8277
      TField field;
8278
      iprot.readStructBegin();
8279
      while (true)
8280
      {
8281
        field = iprot.readFieldBegin();
8282
        if (field.type == TType.STOP) { 
8283
          break;
8284
        }
8285
        _Fields fieldId = _Fields.findByThriftId(field.id);
8286
        if (fieldId == null) {
8287
          TProtocolUtil.skip(iprot, field.type);
8288
        } else {
8289
          switch (fieldId) {
483 rajveer 8290
            case STATUS:
8291
              if (field.type == TType.I32) {
8292
                this.status = OrderStatus.findByValue(iprot.readI32());
8293
              } else { 
8294
                TProtocolUtil.skip(iprot, field.type);
8295
              }
8296
              break;
8297
            case FROM_DATE:
68 ashish 8298
              if (field.type == TType.I64) {
483 rajveer 8299
                this.from_date = iprot.readI64();
8300
                setFrom_dateIsSet(true);
68 ashish 8301
              } else { 
8302
                TProtocolUtil.skip(iprot, field.type);
8303
              }
8304
              break;
483 rajveer 8305
            case TO_DATE:
8306
              if (field.type == TType.I64) {
8307
                this.to_date = iprot.readI64();
8308
                setTo_dateIsSet(true);
8309
              } else { 
8310
                TProtocolUtil.skip(iprot, field.type);
8311
              }
8312
              break;
8313
            case WAREHOUSE_ID:
8314
              if (field.type == TType.I64) {
8315
                this.warehouse_id = iprot.readI64();
8316
                setWarehouse_idIsSet(true);
8317
              } else { 
8318
                TProtocolUtil.skip(iprot, field.type);
8319
              }
8320
              break;
68 ashish 8321
          }
8322
          iprot.readFieldEnd();
8323
        }
8324
      }
8325
      iprot.readStructEnd();
8326
      validate();
8327
    }
8328
 
8329
    public void write(TProtocol oprot) throws TException {
8330
      validate();
8331
 
8332
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 8333
      if (this.status != null) {
8334
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
8335
        oprot.writeI32(this.status.getValue());
8336
        oprot.writeFieldEnd();
8337
      }
8338
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
8339
      oprot.writeI64(this.from_date);
68 ashish 8340
      oprot.writeFieldEnd();
483 rajveer 8341
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
8342
      oprot.writeI64(this.to_date);
8343
      oprot.writeFieldEnd();
8344
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
8345
      oprot.writeI64(this.warehouse_id);
8346
      oprot.writeFieldEnd();
68 ashish 8347
      oprot.writeFieldStop();
8348
      oprot.writeStructEnd();
8349
    }
8350
 
8351
    @Override
8352
    public String toString() {
483 rajveer 8353
      StringBuilder sb = new StringBuilder("getAllOrders_args(");
68 ashish 8354
      boolean first = true;
8355
 
483 rajveer 8356
      sb.append("status:");
8357
      if (this.status == null) {
8358
        sb.append("null");
8359
      } else {
8360
        String status_name = status.name();
8361
        if (status_name != null) {
8362
          sb.append(status_name);
8363
          sb.append(" (");
8364
        }
8365
        sb.append(this.status);
8366
        if (status_name != null) {
8367
          sb.append(")");
8368
        }
8369
      }
68 ashish 8370
      first = false;
483 rajveer 8371
      if (!first) sb.append(", ");
8372
      sb.append("from_date:");
8373
      sb.append(this.from_date);
8374
      first = false;
8375
      if (!first) sb.append(", ");
8376
      sb.append("to_date:");
8377
      sb.append(this.to_date);
8378
      first = false;
8379
      if (!first) sb.append(", ");
8380
      sb.append("warehouse_id:");
8381
      sb.append(this.warehouse_id);
8382
      first = false;
68 ashish 8383
      sb.append(")");
8384
      return sb.toString();
8385
    }
8386
 
8387
    public void validate() throws TException {
8388
      // check for required fields
8389
    }
8390
 
8391
  }
8392
 
483 rajveer 8393
  public static class getAllOrders_result implements TBase<getAllOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAllOrders_result>   {
8394
    private static final TStruct STRUCT_DESC = new TStruct("getAllOrders_result");
68 ashish 8395
 
483 rajveer 8396
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 8397
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
8398
 
483 rajveer 8399
    private List<Order> success;
68 ashish 8400
    private TransactionServiceException ex;
8401
 
8402
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8403
    public enum _Fields implements TFieldIdEnum {
8404
      SUCCESS((short)0, "success"),
8405
      EX((short)1, "ex");
8406
 
8407
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8408
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8409
 
8410
      static {
8411
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8412
          byId.put((int)field._thriftId, field);
8413
          byName.put(field.getFieldName(), field);
8414
        }
8415
      }
8416
 
8417
      /**
8418
       * Find the _Fields constant that matches fieldId, or null if its not found.
8419
       */
8420
      public static _Fields findByThriftId(int fieldId) {
8421
        return byId.get(fieldId);
8422
      }
8423
 
8424
      /**
8425
       * Find the _Fields constant that matches fieldId, throwing an exception
8426
       * if it is not found.
8427
       */
8428
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8429
        _Fields fields = findByThriftId(fieldId);
8430
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8431
        return fields;
8432
      }
8433
 
8434
      /**
8435
       * Find the _Fields constant that matches name, or null if its not found.
8436
       */
8437
      public static _Fields findByName(String name) {
8438
        return byName.get(name);
8439
      }
8440
 
8441
      private final short _thriftId;
8442
      private final String _fieldName;
8443
 
8444
      _Fields(short thriftId, String fieldName) {
8445
        _thriftId = thriftId;
8446
        _fieldName = fieldName;
8447
      }
8448
 
8449
      public short getThriftFieldId() {
8450
        return _thriftId;
8451
      }
8452
 
8453
      public String getFieldName() {
8454
        return _fieldName;
8455
      }
8456
    }
8457
 
8458
    // isset id assignments
8459
 
8460
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8461
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 8462
          new ListMetaData(TType.LIST, 
8463
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 8464
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
8465
          new FieldValueMetaData(TType.STRUCT)));
8466
    }});
8467
 
8468
    static {
483 rajveer 8469
      FieldMetaData.addStructMetaDataMap(getAllOrders_result.class, metaDataMap);
68 ashish 8470
    }
8471
 
483 rajveer 8472
    public getAllOrders_result() {
68 ashish 8473
    }
8474
 
483 rajveer 8475
    public getAllOrders_result(
8476
      List<Order> success,
68 ashish 8477
      TransactionServiceException ex)
8478
    {
8479
      this();
8480
      this.success = success;
8481
      this.ex = ex;
8482
    }
8483
 
8484
    /**
8485
     * Performs a deep copy on <i>other</i>.
8486
     */
483 rajveer 8487
    public getAllOrders_result(getAllOrders_result other) {
68 ashish 8488
      if (other.isSetSuccess()) {
483 rajveer 8489
        List<Order> __this__success = new ArrayList<Order>();
8490
        for (Order other_element : other.success) {
8491
          __this__success.add(new Order(other_element));
8492
        }
8493
        this.success = __this__success;
68 ashish 8494
      }
8495
      if (other.isSetEx()) {
8496
        this.ex = new TransactionServiceException(other.ex);
8497
      }
8498
    }
8499
 
483 rajveer 8500
    public getAllOrders_result deepCopy() {
8501
      return new getAllOrders_result(this);
68 ashish 8502
    }
8503
 
8504
    @Deprecated
483 rajveer 8505
    public getAllOrders_result clone() {
8506
      return new getAllOrders_result(this);
68 ashish 8507
    }
8508
 
483 rajveer 8509
    public int getSuccessSize() {
8510
      return (this.success == null) ? 0 : this.success.size();
8511
    }
8512
 
8513
    public java.util.Iterator<Order> getSuccessIterator() {
8514
      return (this.success == null) ? null : this.success.iterator();
8515
    }
8516
 
8517
    public void addToSuccess(Order elem) {
8518
      if (this.success == null) {
8519
        this.success = new ArrayList<Order>();
8520
      }
8521
      this.success.add(elem);
8522
    }
8523
 
8524
    public List<Order> getSuccess() {
68 ashish 8525
      return this.success;
8526
    }
8527
 
483 rajveer 8528
    public getAllOrders_result setSuccess(List<Order> success) {
68 ashish 8529
      this.success = success;
8530
      return this;
8531
    }
8532
 
8533
    public void unsetSuccess() {
8534
      this.success = null;
8535
    }
8536
 
8537
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
8538
    public boolean isSetSuccess() {
8539
      return this.success != null;
8540
    }
8541
 
8542
    public void setSuccessIsSet(boolean value) {
8543
      if (!value) {
8544
        this.success = null;
8545
      }
8546
    }
8547
 
8548
    public TransactionServiceException getEx() {
8549
      return this.ex;
8550
    }
8551
 
483 rajveer 8552
    public getAllOrders_result setEx(TransactionServiceException ex) {
68 ashish 8553
      this.ex = ex;
8554
      return this;
8555
    }
8556
 
8557
    public void unsetEx() {
8558
      this.ex = null;
8559
    }
8560
 
8561
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
8562
    public boolean isSetEx() {
8563
      return this.ex != null;
8564
    }
8565
 
8566
    public void setExIsSet(boolean value) {
8567
      if (!value) {
8568
        this.ex = null;
8569
      }
8570
    }
8571
 
8572
    public void setFieldValue(_Fields field, Object value) {
8573
      switch (field) {
8574
      case SUCCESS:
8575
        if (value == null) {
8576
          unsetSuccess();
8577
        } else {
483 rajveer 8578
          setSuccess((List<Order>)value);
68 ashish 8579
        }
8580
        break;
8581
 
8582
      case EX:
8583
        if (value == null) {
8584
          unsetEx();
8585
        } else {
8586
          setEx((TransactionServiceException)value);
8587
        }
8588
        break;
8589
 
8590
      }
8591
    }
8592
 
8593
    public void setFieldValue(int fieldID, Object value) {
8594
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
8595
    }
8596
 
8597
    public Object getFieldValue(_Fields field) {
8598
      switch (field) {
8599
      case SUCCESS:
8600
        return getSuccess();
8601
 
8602
      case EX:
8603
        return getEx();
8604
 
8605
      }
8606
      throw new IllegalStateException();
8607
    }
8608
 
8609
    public Object getFieldValue(int fieldId) {
8610
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
8611
    }
8612
 
8613
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
8614
    public boolean isSet(_Fields field) {
8615
      switch (field) {
8616
      case SUCCESS:
8617
        return isSetSuccess();
8618
      case EX:
8619
        return isSetEx();
8620
      }
8621
      throw new IllegalStateException();
8622
    }
8623
 
8624
    public boolean isSet(int fieldID) {
8625
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
8626
    }
8627
 
8628
    @Override
8629
    public boolean equals(Object that) {
8630
      if (that == null)
8631
        return false;
483 rajveer 8632
      if (that instanceof getAllOrders_result)
8633
        return this.equals((getAllOrders_result)that);
68 ashish 8634
      return false;
8635
    }
8636
 
483 rajveer 8637
    public boolean equals(getAllOrders_result that) {
68 ashish 8638
      if (that == null)
8639
        return false;
8640
 
8641
      boolean this_present_success = true && this.isSetSuccess();
8642
      boolean that_present_success = true && that.isSetSuccess();
8643
      if (this_present_success || that_present_success) {
8644
        if (!(this_present_success && that_present_success))
8645
          return false;
8646
        if (!this.success.equals(that.success))
8647
          return false;
8648
      }
8649
 
8650
      boolean this_present_ex = true && this.isSetEx();
8651
      boolean that_present_ex = true && that.isSetEx();
8652
      if (this_present_ex || that_present_ex) {
8653
        if (!(this_present_ex && that_present_ex))
8654
          return false;
8655
        if (!this.ex.equals(that.ex))
8656
          return false;
8657
      }
8658
 
8659
      return true;
8660
    }
8661
 
8662
    @Override
8663
    public int hashCode() {
8664
      return 0;
8665
    }
8666
 
483 rajveer 8667
    public int compareTo(getAllOrders_result other) {
8668
      if (!getClass().equals(other.getClass())) {
8669
        return getClass().getName().compareTo(other.getClass().getName());
8670
      }
8671
 
8672
      int lastComparison = 0;
8673
      getAllOrders_result typedOther = (getAllOrders_result)other;
8674
 
8675
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
8676
      if (lastComparison != 0) {
8677
        return lastComparison;
8678
      }
8679
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
8680
      if (lastComparison != 0) {
8681
        return lastComparison;
8682
      }
8683
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
8684
      if (lastComparison != 0) {
8685
        return lastComparison;
8686
      }
8687
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
8688
      if (lastComparison != 0) {
8689
        return lastComparison;
8690
      }
8691
      return 0;
8692
    }
8693
 
68 ashish 8694
    public void read(TProtocol iprot) throws TException {
8695
      TField field;
8696
      iprot.readStructBegin();
8697
      while (true)
8698
      {
8699
        field = iprot.readFieldBegin();
8700
        if (field.type == TType.STOP) { 
8701
          break;
8702
        }
8703
        _Fields fieldId = _Fields.findByThriftId(field.id);
8704
        if (fieldId == null) {
8705
          TProtocolUtil.skip(iprot, field.type);
8706
        } else {
8707
          switch (fieldId) {
8708
            case SUCCESS:
483 rajveer 8709
              if (field.type == TType.LIST) {
8710
                {
684 chandransh 8711
                  TList _list16 = iprot.readListBegin();
8712
                  this.success = new ArrayList<Order>(_list16.size);
8713
                  for (int _i17 = 0; _i17 < _list16.size; ++_i17)
483 rajveer 8714
                  {
684 chandransh 8715
                    Order _elem18;
8716
                    _elem18 = new Order();
8717
                    _elem18.read(iprot);
8718
                    this.success.add(_elem18);
483 rajveer 8719
                  }
8720
                  iprot.readListEnd();
8721
                }
68 ashish 8722
              } else { 
8723
                TProtocolUtil.skip(iprot, field.type);
8724
              }
8725
              break;
8726
            case EX:
8727
              if (field.type == TType.STRUCT) {
8728
                this.ex = new TransactionServiceException();
8729
                this.ex.read(iprot);
8730
              } else { 
8731
                TProtocolUtil.skip(iprot, field.type);
8732
              }
8733
              break;
8734
          }
8735
          iprot.readFieldEnd();
8736
        }
8737
      }
8738
      iprot.readStructEnd();
8739
      validate();
8740
    }
8741
 
8742
    public void write(TProtocol oprot) throws TException {
8743
      oprot.writeStructBegin(STRUCT_DESC);
8744
 
8745
      if (this.isSetSuccess()) {
8746
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 8747
        {
8748
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
684 chandransh 8749
          for (Order _iter19 : this.success)
483 rajveer 8750
          {
684 chandransh 8751
            _iter19.write(oprot);
483 rajveer 8752
          }
8753
          oprot.writeListEnd();
8754
        }
68 ashish 8755
        oprot.writeFieldEnd();
8756
      } else if (this.isSetEx()) {
8757
        oprot.writeFieldBegin(EX_FIELD_DESC);
8758
        this.ex.write(oprot);
8759
        oprot.writeFieldEnd();
8760
      }
8761
      oprot.writeFieldStop();
8762
      oprot.writeStructEnd();
8763
    }
8764
 
8765
    @Override
8766
    public String toString() {
483 rajveer 8767
      StringBuilder sb = new StringBuilder("getAllOrders_result(");
68 ashish 8768
      boolean first = true;
8769
 
8770
      sb.append("success:");
8771
      if (this.success == null) {
8772
        sb.append("null");
8773
      } else {
8774
        sb.append(this.success);
8775
      }
8776
      first = false;
8777
      if (!first) sb.append(", ");
8778
      sb.append("ex:");
8779
      if (this.ex == null) {
8780
        sb.append("null");
8781
      } else {
8782
        sb.append(this.ex);
8783
      }
8784
      first = false;
8785
      sb.append(")");
8786
      return sb.toString();
8787
    }
8788
 
8789
    public void validate() throws TException {
8790
      // check for required fields
8791
    }
8792
 
8793
  }
8794
 
1022 varun.gupt 8795
  public static class getOrdersByBillingDate_args implements TBase<getOrdersByBillingDate_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_args>   {
8796
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_args");
8797
 
8798
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)1);
8799
    private static final TField START_BILLING_DATE_FIELD_DESC = new TField("start_billing_date", TType.I64, (short)2);
8800
    private static final TField END_BILLING_DATE_FIELD_DESC = new TField("end_billing_date", TType.I64, (short)3);
8801
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouse_id", TType.I64, (short)4);
8802
 
8803
    private OrderStatus status;
8804
    private long start_billing_date;
8805
    private long end_billing_date;
8806
    private long warehouse_id;
8807
 
8808
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
8809
    public enum _Fields implements TFieldIdEnum {
8810
      /**
8811
       * 
8812
       * @see OrderStatus
8813
       */
8814
      STATUS((short)1, "status"),
8815
      START_BILLING_DATE((short)2, "start_billing_date"),
8816
      END_BILLING_DATE((short)3, "end_billing_date"),
8817
      WAREHOUSE_ID((short)4, "warehouse_id");
8818
 
8819
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
8820
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
8821
 
8822
      static {
8823
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
8824
          byId.put((int)field._thriftId, field);
8825
          byName.put(field.getFieldName(), field);
8826
        }
8827
      }
8828
 
8829
      /**
8830
       * Find the _Fields constant that matches fieldId, or null if its not found.
8831
       */
8832
      public static _Fields findByThriftId(int fieldId) {
8833
        return byId.get(fieldId);
8834
      }
8835
 
8836
      /**
8837
       * Find the _Fields constant that matches fieldId, throwing an exception
8838
       * if it is not found.
8839
       */
8840
      public static _Fields findByThriftIdOrThrow(int fieldId) {
8841
        _Fields fields = findByThriftId(fieldId);
8842
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
8843
        return fields;
8844
      }
8845
 
8846
      /**
8847
       * Find the _Fields constant that matches name, or null if its not found.
8848
       */
8849
      public static _Fields findByName(String name) {
8850
        return byName.get(name);
8851
      }
8852
 
8853
      private final short _thriftId;
8854
      private final String _fieldName;
8855
 
8856
      _Fields(short thriftId, String fieldName) {
8857
        _thriftId = thriftId;
8858
        _fieldName = fieldName;
8859
      }
8860
 
8861
      public short getThriftFieldId() {
8862
        return _thriftId;
8863
      }
8864
 
8865
      public String getFieldName() {
8866
        return _fieldName;
8867
      }
8868
    }
8869
 
8870
    // isset id assignments
8871
    private static final int __START_BILLING_DATE_ISSET_ID = 0;
8872
    private static final int __END_BILLING_DATE_ISSET_ID = 1;
8873
    private static final int __WAREHOUSE_ID_ISSET_ID = 2;
8874
    private BitSet __isset_bit_vector = new BitSet(3);
8875
 
8876
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
8877
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
8878
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
8879
      put(_Fields.START_BILLING_DATE, new FieldMetaData("start_billing_date", TFieldRequirementType.DEFAULT, 
8880
          new FieldValueMetaData(TType.I64)));
8881
      put(_Fields.END_BILLING_DATE, new FieldMetaData("end_billing_date", TFieldRequirementType.DEFAULT, 
8882
          new FieldValueMetaData(TType.I64)));
8883
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouse_id", TFieldRequirementType.DEFAULT, 
8884
          new FieldValueMetaData(TType.I64)));
8885
    }});
8886
 
8887
    static {
8888
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_args.class, metaDataMap);
8889
    }
8890
 
8891
    public getOrdersByBillingDate_args() {
8892
    }
8893
 
8894
    public getOrdersByBillingDate_args(
8895
      OrderStatus status,
8896
      long start_billing_date,
8897
      long end_billing_date,
8898
      long warehouse_id)
8899
    {
8900
      this();
8901
      this.status = status;
8902
      this.start_billing_date = start_billing_date;
8903
      setStart_billing_dateIsSet(true);
8904
      this.end_billing_date = end_billing_date;
8905
      setEnd_billing_dateIsSet(true);
8906
      this.warehouse_id = warehouse_id;
8907
      setWarehouse_idIsSet(true);
8908
    }
8909
 
8910
    /**
8911
     * Performs a deep copy on <i>other</i>.
8912
     */
8913
    public getOrdersByBillingDate_args(getOrdersByBillingDate_args other) {
8914
      __isset_bit_vector.clear();
8915
      __isset_bit_vector.or(other.__isset_bit_vector);
8916
      if (other.isSetStatus()) {
8917
        this.status = other.status;
8918
      }
8919
      this.start_billing_date = other.start_billing_date;
8920
      this.end_billing_date = other.end_billing_date;
8921
      this.warehouse_id = other.warehouse_id;
8922
    }
8923
 
8924
    public getOrdersByBillingDate_args deepCopy() {
8925
      return new getOrdersByBillingDate_args(this);
8926
    }
8927
 
8928
    @Deprecated
8929
    public getOrdersByBillingDate_args clone() {
8930
      return new getOrdersByBillingDate_args(this);
8931
    }
8932
 
8933
    /**
8934
     * 
8935
     * @see OrderStatus
8936
     */
8937
    public OrderStatus getStatus() {
8938
      return this.status;
8939
    }
8940
 
8941
    /**
8942
     * 
8943
     * @see OrderStatus
8944
     */
8945
    public getOrdersByBillingDate_args setStatus(OrderStatus status) {
8946
      this.status = status;
8947
      return this;
8948
    }
8949
 
8950
    public void unsetStatus() {
8951
      this.status = null;
8952
    }
8953
 
8954
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
8955
    public boolean isSetStatus() {
8956
      return this.status != null;
8957
    }
8958
 
8959
    public void setStatusIsSet(boolean value) {
8960
      if (!value) {
8961
        this.status = null;
8962
      }
8963
    }
8964
 
8965
    public long getStart_billing_date() {
8966
      return this.start_billing_date;
8967
    }
8968
 
8969
    public getOrdersByBillingDate_args setStart_billing_date(long start_billing_date) {
8970
      this.start_billing_date = start_billing_date;
8971
      setStart_billing_dateIsSet(true);
8972
      return this;
8973
    }
8974
 
8975
    public void unsetStart_billing_date() {
8976
      __isset_bit_vector.clear(__START_BILLING_DATE_ISSET_ID);
8977
    }
8978
 
8979
    /** Returns true if field start_billing_date is set (has been asigned a value) and false otherwise */
8980
    public boolean isSetStart_billing_date() {
8981
      return __isset_bit_vector.get(__START_BILLING_DATE_ISSET_ID);
8982
    }
8983
 
8984
    public void setStart_billing_dateIsSet(boolean value) {
8985
      __isset_bit_vector.set(__START_BILLING_DATE_ISSET_ID, value);
8986
    }
8987
 
8988
    public long getEnd_billing_date() {
8989
      return this.end_billing_date;
8990
    }
8991
 
8992
    public getOrdersByBillingDate_args setEnd_billing_date(long end_billing_date) {
8993
      this.end_billing_date = end_billing_date;
8994
      setEnd_billing_dateIsSet(true);
8995
      return this;
8996
    }
8997
 
8998
    public void unsetEnd_billing_date() {
8999
      __isset_bit_vector.clear(__END_BILLING_DATE_ISSET_ID);
9000
    }
9001
 
9002
    /** Returns true if field end_billing_date is set (has been asigned a value) and false otherwise */
9003
    public boolean isSetEnd_billing_date() {
9004
      return __isset_bit_vector.get(__END_BILLING_DATE_ISSET_ID);
9005
    }
9006
 
9007
    public void setEnd_billing_dateIsSet(boolean value) {
9008
      __isset_bit_vector.set(__END_BILLING_DATE_ISSET_ID, value);
9009
    }
9010
 
9011
    public long getWarehouse_id() {
9012
      return this.warehouse_id;
9013
    }
9014
 
9015
    public getOrdersByBillingDate_args setWarehouse_id(long warehouse_id) {
9016
      this.warehouse_id = warehouse_id;
9017
      setWarehouse_idIsSet(true);
9018
      return this;
9019
    }
9020
 
9021
    public void unsetWarehouse_id() {
9022
      __isset_bit_vector.clear(__WAREHOUSE_ID_ISSET_ID);
9023
    }
9024
 
9025
    /** Returns true if field warehouse_id is set (has been asigned a value) and false otherwise */
9026
    public boolean isSetWarehouse_id() {
9027
      return __isset_bit_vector.get(__WAREHOUSE_ID_ISSET_ID);
9028
    }
9029
 
9030
    public void setWarehouse_idIsSet(boolean value) {
9031
      __isset_bit_vector.set(__WAREHOUSE_ID_ISSET_ID, value);
9032
    }
9033
 
9034
    public void setFieldValue(_Fields field, Object value) {
9035
      switch (field) {
9036
      case STATUS:
9037
        if (value == null) {
9038
          unsetStatus();
9039
        } else {
9040
          setStatus((OrderStatus)value);
9041
        }
9042
        break;
9043
 
9044
      case START_BILLING_DATE:
9045
        if (value == null) {
9046
          unsetStart_billing_date();
9047
        } else {
9048
          setStart_billing_date((Long)value);
9049
        }
9050
        break;
9051
 
9052
      case END_BILLING_DATE:
9053
        if (value == null) {
9054
          unsetEnd_billing_date();
9055
        } else {
9056
          setEnd_billing_date((Long)value);
9057
        }
9058
        break;
9059
 
9060
      case WAREHOUSE_ID:
9061
        if (value == null) {
9062
          unsetWarehouse_id();
9063
        } else {
9064
          setWarehouse_id((Long)value);
9065
        }
9066
        break;
9067
 
9068
      }
9069
    }
9070
 
9071
    public void setFieldValue(int fieldID, Object value) {
9072
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9073
    }
9074
 
9075
    public Object getFieldValue(_Fields field) {
9076
      switch (field) {
9077
      case STATUS:
9078
        return getStatus();
9079
 
9080
      case START_BILLING_DATE:
9081
        return new Long(getStart_billing_date());
9082
 
9083
      case END_BILLING_DATE:
9084
        return new Long(getEnd_billing_date());
9085
 
9086
      case WAREHOUSE_ID:
9087
        return new Long(getWarehouse_id());
9088
 
9089
      }
9090
      throw new IllegalStateException();
9091
    }
9092
 
9093
    public Object getFieldValue(int fieldId) {
9094
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9095
    }
9096
 
9097
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9098
    public boolean isSet(_Fields field) {
9099
      switch (field) {
9100
      case STATUS:
9101
        return isSetStatus();
9102
      case START_BILLING_DATE:
9103
        return isSetStart_billing_date();
9104
      case END_BILLING_DATE:
9105
        return isSetEnd_billing_date();
9106
      case WAREHOUSE_ID:
9107
        return isSetWarehouse_id();
9108
      }
9109
      throw new IllegalStateException();
9110
    }
9111
 
9112
    public boolean isSet(int fieldID) {
9113
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9114
    }
9115
 
9116
    @Override
9117
    public boolean equals(Object that) {
9118
      if (that == null)
9119
        return false;
9120
      if (that instanceof getOrdersByBillingDate_args)
9121
        return this.equals((getOrdersByBillingDate_args)that);
9122
      return false;
9123
    }
9124
 
9125
    public boolean equals(getOrdersByBillingDate_args that) {
9126
      if (that == null)
9127
        return false;
9128
 
9129
      boolean this_present_status = true && this.isSetStatus();
9130
      boolean that_present_status = true && that.isSetStatus();
9131
      if (this_present_status || that_present_status) {
9132
        if (!(this_present_status && that_present_status))
9133
          return false;
9134
        if (!this.status.equals(that.status))
9135
          return false;
9136
      }
9137
 
9138
      boolean this_present_start_billing_date = true;
9139
      boolean that_present_start_billing_date = true;
9140
      if (this_present_start_billing_date || that_present_start_billing_date) {
9141
        if (!(this_present_start_billing_date && that_present_start_billing_date))
9142
          return false;
9143
        if (this.start_billing_date != that.start_billing_date)
9144
          return false;
9145
      }
9146
 
9147
      boolean this_present_end_billing_date = true;
9148
      boolean that_present_end_billing_date = true;
9149
      if (this_present_end_billing_date || that_present_end_billing_date) {
9150
        if (!(this_present_end_billing_date && that_present_end_billing_date))
9151
          return false;
9152
        if (this.end_billing_date != that.end_billing_date)
9153
          return false;
9154
      }
9155
 
9156
      boolean this_present_warehouse_id = true;
9157
      boolean that_present_warehouse_id = true;
9158
      if (this_present_warehouse_id || that_present_warehouse_id) {
9159
        if (!(this_present_warehouse_id && that_present_warehouse_id))
9160
          return false;
9161
        if (this.warehouse_id != that.warehouse_id)
9162
          return false;
9163
      }
9164
 
9165
      return true;
9166
    }
9167
 
9168
    @Override
9169
    public int hashCode() {
9170
      return 0;
9171
    }
9172
 
9173
    public int compareTo(getOrdersByBillingDate_args other) {
9174
      if (!getClass().equals(other.getClass())) {
9175
        return getClass().getName().compareTo(other.getClass().getName());
9176
      }
9177
 
9178
      int lastComparison = 0;
9179
      getOrdersByBillingDate_args typedOther = (getOrdersByBillingDate_args)other;
9180
 
9181
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
9182
      if (lastComparison != 0) {
9183
        return lastComparison;
9184
      }
9185
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
9186
      if (lastComparison != 0) {
9187
        return lastComparison;
9188
      }
9189
      lastComparison = Boolean.valueOf(isSetStart_billing_date()).compareTo(isSetStart_billing_date());
9190
      if (lastComparison != 0) {
9191
        return lastComparison;
9192
      }
9193
      lastComparison = TBaseHelper.compareTo(start_billing_date, typedOther.start_billing_date);
9194
      if (lastComparison != 0) {
9195
        return lastComparison;
9196
      }
9197
      lastComparison = Boolean.valueOf(isSetEnd_billing_date()).compareTo(isSetEnd_billing_date());
9198
      if (lastComparison != 0) {
9199
        return lastComparison;
9200
      }
9201
      lastComparison = TBaseHelper.compareTo(end_billing_date, typedOther.end_billing_date);
9202
      if (lastComparison != 0) {
9203
        return lastComparison;
9204
      }
9205
      lastComparison = Boolean.valueOf(isSetWarehouse_id()).compareTo(isSetWarehouse_id());
9206
      if (lastComparison != 0) {
9207
        return lastComparison;
9208
      }
9209
      lastComparison = TBaseHelper.compareTo(warehouse_id, typedOther.warehouse_id);
9210
      if (lastComparison != 0) {
9211
        return lastComparison;
9212
      }
9213
      return 0;
9214
    }
9215
 
9216
    public void read(TProtocol iprot) throws TException {
9217
      TField field;
9218
      iprot.readStructBegin();
9219
      while (true)
9220
      {
9221
        field = iprot.readFieldBegin();
9222
        if (field.type == TType.STOP) { 
9223
          break;
9224
        }
9225
        _Fields fieldId = _Fields.findByThriftId(field.id);
9226
        if (fieldId == null) {
9227
          TProtocolUtil.skip(iprot, field.type);
9228
        } else {
9229
          switch (fieldId) {
9230
            case STATUS:
9231
              if (field.type == TType.I32) {
9232
                this.status = OrderStatus.findByValue(iprot.readI32());
9233
              } else { 
9234
                TProtocolUtil.skip(iprot, field.type);
9235
              }
9236
              break;
9237
            case START_BILLING_DATE:
9238
              if (field.type == TType.I64) {
9239
                this.start_billing_date = iprot.readI64();
9240
                setStart_billing_dateIsSet(true);
9241
              } else { 
9242
                TProtocolUtil.skip(iprot, field.type);
9243
              }
9244
              break;
9245
            case END_BILLING_DATE:
9246
              if (field.type == TType.I64) {
9247
                this.end_billing_date = iprot.readI64();
9248
                setEnd_billing_dateIsSet(true);
9249
              } else { 
9250
                TProtocolUtil.skip(iprot, field.type);
9251
              }
9252
              break;
9253
            case WAREHOUSE_ID:
9254
              if (field.type == TType.I64) {
9255
                this.warehouse_id = iprot.readI64();
9256
                setWarehouse_idIsSet(true);
9257
              } else { 
9258
                TProtocolUtil.skip(iprot, field.type);
9259
              }
9260
              break;
9261
          }
9262
          iprot.readFieldEnd();
9263
        }
9264
      }
9265
      iprot.readStructEnd();
9266
      validate();
9267
    }
9268
 
9269
    public void write(TProtocol oprot) throws TException {
9270
      validate();
9271
 
9272
      oprot.writeStructBegin(STRUCT_DESC);
9273
      if (this.status != null) {
9274
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
9275
        oprot.writeI32(this.status.getValue());
9276
        oprot.writeFieldEnd();
9277
      }
9278
      oprot.writeFieldBegin(START_BILLING_DATE_FIELD_DESC);
9279
      oprot.writeI64(this.start_billing_date);
9280
      oprot.writeFieldEnd();
9281
      oprot.writeFieldBegin(END_BILLING_DATE_FIELD_DESC);
9282
      oprot.writeI64(this.end_billing_date);
9283
      oprot.writeFieldEnd();
9284
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
9285
      oprot.writeI64(this.warehouse_id);
9286
      oprot.writeFieldEnd();
9287
      oprot.writeFieldStop();
9288
      oprot.writeStructEnd();
9289
    }
9290
 
9291
    @Override
9292
    public String toString() {
9293
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_args(");
9294
      boolean first = true;
9295
 
9296
      sb.append("status:");
9297
      if (this.status == null) {
9298
        sb.append("null");
9299
      } else {
9300
        String status_name = status.name();
9301
        if (status_name != null) {
9302
          sb.append(status_name);
9303
          sb.append(" (");
9304
        }
9305
        sb.append(this.status);
9306
        if (status_name != null) {
9307
          sb.append(")");
9308
        }
9309
      }
9310
      first = false;
9311
      if (!first) sb.append(", ");
9312
      sb.append("start_billing_date:");
9313
      sb.append(this.start_billing_date);
9314
      first = false;
9315
      if (!first) sb.append(", ");
9316
      sb.append("end_billing_date:");
9317
      sb.append(this.end_billing_date);
9318
      first = false;
9319
      if (!first) sb.append(", ");
9320
      sb.append("warehouse_id:");
9321
      sb.append(this.warehouse_id);
9322
      first = false;
9323
      sb.append(")");
9324
      return sb.toString();
9325
    }
9326
 
9327
    public void validate() throws TException {
9328
      // check for required fields
9329
    }
9330
 
9331
  }
9332
 
9333
  public static class getOrdersByBillingDate_result implements TBase<getOrdersByBillingDate_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersByBillingDate_result>   {
9334
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersByBillingDate_result");
9335
 
9336
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
9337
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
9338
 
9339
    private List<Order> success;
9340
    private TransactionServiceException ex;
9341
 
9342
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9343
    public enum _Fields implements TFieldIdEnum {
9344
      SUCCESS((short)0, "success"),
9345
      EX((short)1, "ex");
9346
 
9347
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9348
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9349
 
9350
      static {
9351
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9352
          byId.put((int)field._thriftId, field);
9353
          byName.put(field.getFieldName(), field);
9354
        }
9355
      }
9356
 
9357
      /**
9358
       * Find the _Fields constant that matches fieldId, or null if its not found.
9359
       */
9360
      public static _Fields findByThriftId(int fieldId) {
9361
        return byId.get(fieldId);
9362
      }
9363
 
9364
      /**
9365
       * Find the _Fields constant that matches fieldId, throwing an exception
9366
       * if it is not found.
9367
       */
9368
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9369
        _Fields fields = findByThriftId(fieldId);
9370
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9371
        return fields;
9372
      }
9373
 
9374
      /**
9375
       * Find the _Fields constant that matches name, or null if its not found.
9376
       */
9377
      public static _Fields findByName(String name) {
9378
        return byName.get(name);
9379
      }
9380
 
9381
      private final short _thriftId;
9382
      private final String _fieldName;
9383
 
9384
      _Fields(short thriftId, String fieldName) {
9385
        _thriftId = thriftId;
9386
        _fieldName = fieldName;
9387
      }
9388
 
9389
      public short getThriftFieldId() {
9390
        return _thriftId;
9391
      }
9392
 
9393
      public String getFieldName() {
9394
        return _fieldName;
9395
      }
9396
    }
9397
 
9398
    // isset id assignments
9399
 
9400
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9401
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
9402
          new ListMetaData(TType.LIST, 
9403
              new StructMetaData(TType.STRUCT, Order.class))));
9404
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
9405
          new FieldValueMetaData(TType.STRUCT)));
9406
    }});
9407
 
9408
    static {
9409
      FieldMetaData.addStructMetaDataMap(getOrdersByBillingDate_result.class, metaDataMap);
9410
    }
9411
 
9412
    public getOrdersByBillingDate_result() {
9413
    }
9414
 
9415
    public getOrdersByBillingDate_result(
9416
      List<Order> success,
9417
      TransactionServiceException ex)
9418
    {
9419
      this();
9420
      this.success = success;
9421
      this.ex = ex;
9422
    }
9423
 
9424
    /**
9425
     * Performs a deep copy on <i>other</i>.
9426
     */
9427
    public getOrdersByBillingDate_result(getOrdersByBillingDate_result other) {
9428
      if (other.isSetSuccess()) {
9429
        List<Order> __this__success = new ArrayList<Order>();
9430
        for (Order other_element : other.success) {
9431
          __this__success.add(new Order(other_element));
9432
        }
9433
        this.success = __this__success;
9434
      }
9435
      if (other.isSetEx()) {
9436
        this.ex = new TransactionServiceException(other.ex);
9437
      }
9438
    }
9439
 
9440
    public getOrdersByBillingDate_result deepCopy() {
9441
      return new getOrdersByBillingDate_result(this);
9442
    }
9443
 
9444
    @Deprecated
9445
    public getOrdersByBillingDate_result clone() {
9446
      return new getOrdersByBillingDate_result(this);
9447
    }
9448
 
9449
    public int getSuccessSize() {
9450
      return (this.success == null) ? 0 : this.success.size();
9451
    }
9452
 
9453
    public java.util.Iterator<Order> getSuccessIterator() {
9454
      return (this.success == null) ? null : this.success.iterator();
9455
    }
9456
 
9457
    public void addToSuccess(Order elem) {
9458
      if (this.success == null) {
9459
        this.success = new ArrayList<Order>();
9460
      }
9461
      this.success.add(elem);
9462
    }
9463
 
9464
    public List<Order> getSuccess() {
9465
      return this.success;
9466
    }
9467
 
9468
    public getOrdersByBillingDate_result setSuccess(List<Order> success) {
9469
      this.success = success;
9470
      return this;
9471
    }
9472
 
9473
    public void unsetSuccess() {
9474
      this.success = null;
9475
    }
9476
 
9477
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
9478
    public boolean isSetSuccess() {
9479
      return this.success != null;
9480
    }
9481
 
9482
    public void setSuccessIsSet(boolean value) {
9483
      if (!value) {
9484
        this.success = null;
9485
      }
9486
    }
9487
 
9488
    public TransactionServiceException getEx() {
9489
      return this.ex;
9490
    }
9491
 
9492
    public getOrdersByBillingDate_result setEx(TransactionServiceException ex) {
9493
      this.ex = ex;
9494
      return this;
9495
    }
9496
 
9497
    public void unsetEx() {
9498
      this.ex = null;
9499
    }
9500
 
9501
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
9502
    public boolean isSetEx() {
9503
      return this.ex != null;
9504
    }
9505
 
9506
    public void setExIsSet(boolean value) {
9507
      if (!value) {
9508
        this.ex = null;
9509
      }
9510
    }
9511
 
9512
    public void setFieldValue(_Fields field, Object value) {
9513
      switch (field) {
9514
      case SUCCESS:
9515
        if (value == null) {
9516
          unsetSuccess();
9517
        } else {
9518
          setSuccess((List<Order>)value);
9519
        }
9520
        break;
9521
 
9522
      case EX:
9523
        if (value == null) {
9524
          unsetEx();
9525
        } else {
9526
          setEx((TransactionServiceException)value);
9527
        }
9528
        break;
9529
 
9530
      }
9531
    }
9532
 
9533
    public void setFieldValue(int fieldID, Object value) {
9534
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9535
    }
9536
 
9537
    public Object getFieldValue(_Fields field) {
9538
      switch (field) {
9539
      case SUCCESS:
9540
        return getSuccess();
9541
 
9542
      case EX:
9543
        return getEx();
9544
 
9545
      }
9546
      throw new IllegalStateException();
9547
    }
9548
 
9549
    public Object getFieldValue(int fieldId) {
9550
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9551
    }
9552
 
9553
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9554
    public boolean isSet(_Fields field) {
9555
      switch (field) {
9556
      case SUCCESS:
9557
        return isSetSuccess();
9558
      case EX:
9559
        return isSetEx();
9560
      }
9561
      throw new IllegalStateException();
9562
    }
9563
 
9564
    public boolean isSet(int fieldID) {
9565
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9566
    }
9567
 
9568
    @Override
9569
    public boolean equals(Object that) {
9570
      if (that == null)
9571
        return false;
9572
      if (that instanceof getOrdersByBillingDate_result)
9573
        return this.equals((getOrdersByBillingDate_result)that);
9574
      return false;
9575
    }
9576
 
9577
    public boolean equals(getOrdersByBillingDate_result that) {
9578
      if (that == null)
9579
        return false;
9580
 
9581
      boolean this_present_success = true && this.isSetSuccess();
9582
      boolean that_present_success = true && that.isSetSuccess();
9583
      if (this_present_success || that_present_success) {
9584
        if (!(this_present_success && that_present_success))
9585
          return false;
9586
        if (!this.success.equals(that.success))
9587
          return false;
9588
      }
9589
 
9590
      boolean this_present_ex = true && this.isSetEx();
9591
      boolean that_present_ex = true && that.isSetEx();
9592
      if (this_present_ex || that_present_ex) {
9593
        if (!(this_present_ex && that_present_ex))
9594
          return false;
9595
        if (!this.ex.equals(that.ex))
9596
          return false;
9597
      }
9598
 
9599
      return true;
9600
    }
9601
 
9602
    @Override
9603
    public int hashCode() {
9604
      return 0;
9605
    }
9606
 
9607
    public int compareTo(getOrdersByBillingDate_result other) {
9608
      if (!getClass().equals(other.getClass())) {
9609
        return getClass().getName().compareTo(other.getClass().getName());
9610
      }
9611
 
9612
      int lastComparison = 0;
9613
      getOrdersByBillingDate_result typedOther = (getOrdersByBillingDate_result)other;
9614
 
9615
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
9616
      if (lastComparison != 0) {
9617
        return lastComparison;
9618
      }
9619
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
9620
      if (lastComparison != 0) {
9621
        return lastComparison;
9622
      }
9623
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
9624
      if (lastComparison != 0) {
9625
        return lastComparison;
9626
      }
9627
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
9628
      if (lastComparison != 0) {
9629
        return lastComparison;
9630
      }
9631
      return 0;
9632
    }
9633
 
9634
    public void read(TProtocol iprot) throws TException {
9635
      TField field;
9636
      iprot.readStructBegin();
9637
      while (true)
9638
      {
9639
        field = iprot.readFieldBegin();
9640
        if (field.type == TType.STOP) { 
9641
          break;
9642
        }
9643
        _Fields fieldId = _Fields.findByThriftId(field.id);
9644
        if (fieldId == null) {
9645
          TProtocolUtil.skip(iprot, field.type);
9646
        } else {
9647
          switch (fieldId) {
9648
            case SUCCESS:
9649
              if (field.type == TType.LIST) {
9650
                {
9651
                  TList _list20 = iprot.readListBegin();
9652
                  this.success = new ArrayList<Order>(_list20.size);
9653
                  for (int _i21 = 0; _i21 < _list20.size; ++_i21)
9654
                  {
9655
                    Order _elem22;
9656
                    _elem22 = new Order();
9657
                    _elem22.read(iprot);
9658
                    this.success.add(_elem22);
9659
                  }
9660
                  iprot.readListEnd();
9661
                }
9662
              } else { 
9663
                TProtocolUtil.skip(iprot, field.type);
9664
              }
9665
              break;
9666
            case EX:
9667
              if (field.type == TType.STRUCT) {
9668
                this.ex = new TransactionServiceException();
9669
                this.ex.read(iprot);
9670
              } else { 
9671
                TProtocolUtil.skip(iprot, field.type);
9672
              }
9673
              break;
9674
          }
9675
          iprot.readFieldEnd();
9676
        }
9677
      }
9678
      iprot.readStructEnd();
9679
      validate();
9680
    }
9681
 
9682
    public void write(TProtocol oprot) throws TException {
9683
      oprot.writeStructBegin(STRUCT_DESC);
9684
 
9685
      if (this.isSetSuccess()) {
9686
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
9687
        {
9688
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
9689
          for (Order _iter23 : this.success)
9690
          {
9691
            _iter23.write(oprot);
9692
          }
9693
          oprot.writeListEnd();
9694
        }
9695
        oprot.writeFieldEnd();
9696
      } else if (this.isSetEx()) {
9697
        oprot.writeFieldBegin(EX_FIELD_DESC);
9698
        this.ex.write(oprot);
9699
        oprot.writeFieldEnd();
9700
      }
9701
      oprot.writeFieldStop();
9702
      oprot.writeStructEnd();
9703
    }
9704
 
9705
    @Override
9706
    public String toString() {
9707
      StringBuilder sb = new StringBuilder("getOrdersByBillingDate_result(");
9708
      boolean first = true;
9709
 
9710
      sb.append("success:");
9711
      if (this.success == null) {
9712
        sb.append("null");
9713
      } else {
9714
        sb.append(this.success);
9715
      }
9716
      first = false;
9717
      if (!first) sb.append(", ");
9718
      sb.append("ex:");
9719
      if (this.ex == null) {
9720
        sb.append("null");
9721
      } else {
9722
        sb.append(this.ex);
9723
      }
9724
      first = false;
9725
      sb.append(")");
9726
      return sb.toString();
9727
    }
9728
 
9729
    public void validate() throws TException {
9730
      // check for required fields
9731
    }
9732
 
9733
  }
9734
 
1382 varun.gupt 9735
  public static class getReturnableOrdersForCustomer_args implements TBase<getReturnableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_args>   {
9736
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_args");
9737
 
9738
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
9739
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
9740
 
9741
    private long customer_id;
9742
    private long limit;
9743
 
9744
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
9745
    public enum _Fields implements TFieldIdEnum {
9746
      CUSTOMER_ID((short)1, "customer_id"),
9747
      LIMIT((short)2, "limit");
9748
 
9749
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
9750
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
9751
 
9752
      static {
9753
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
9754
          byId.put((int)field._thriftId, field);
9755
          byName.put(field.getFieldName(), field);
9756
        }
9757
      }
9758
 
9759
      /**
9760
       * Find the _Fields constant that matches fieldId, or null if its not found.
9761
       */
9762
      public static _Fields findByThriftId(int fieldId) {
9763
        return byId.get(fieldId);
9764
      }
9765
 
9766
      /**
9767
       * Find the _Fields constant that matches fieldId, throwing an exception
9768
       * if it is not found.
9769
       */
9770
      public static _Fields findByThriftIdOrThrow(int fieldId) {
9771
        _Fields fields = findByThriftId(fieldId);
9772
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
9773
        return fields;
9774
      }
9775
 
9776
      /**
9777
       * Find the _Fields constant that matches name, or null if its not found.
9778
       */
9779
      public static _Fields findByName(String name) {
9780
        return byName.get(name);
9781
      }
9782
 
9783
      private final short _thriftId;
9784
      private final String _fieldName;
9785
 
9786
      _Fields(short thriftId, String fieldName) {
9787
        _thriftId = thriftId;
9788
        _fieldName = fieldName;
9789
      }
9790
 
9791
      public short getThriftFieldId() {
9792
        return _thriftId;
9793
      }
9794
 
9795
      public String getFieldName() {
9796
        return _fieldName;
9797
      }
9798
    }
9799
 
9800
    // isset id assignments
9801
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
9802
    private static final int __LIMIT_ISSET_ID = 1;
9803
    private BitSet __isset_bit_vector = new BitSet(2);
9804
 
9805
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
9806
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
9807
          new FieldValueMetaData(TType.I64)));
9808
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
9809
          new FieldValueMetaData(TType.I64)));
9810
    }});
9811
 
9812
    static {
9813
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_args.class, metaDataMap);
9814
    }
9815
 
9816
    public getReturnableOrdersForCustomer_args() {
9817
    }
9818
 
9819
    public getReturnableOrdersForCustomer_args(
9820
      long customer_id,
9821
      long limit)
9822
    {
9823
      this();
9824
      this.customer_id = customer_id;
9825
      setCustomer_idIsSet(true);
9826
      this.limit = limit;
9827
      setLimitIsSet(true);
9828
    }
9829
 
9830
    /**
9831
     * Performs a deep copy on <i>other</i>.
9832
     */
9833
    public getReturnableOrdersForCustomer_args(getReturnableOrdersForCustomer_args other) {
9834
      __isset_bit_vector.clear();
9835
      __isset_bit_vector.or(other.__isset_bit_vector);
9836
      this.customer_id = other.customer_id;
9837
      this.limit = other.limit;
9838
    }
9839
 
9840
    public getReturnableOrdersForCustomer_args deepCopy() {
9841
      return new getReturnableOrdersForCustomer_args(this);
9842
    }
9843
 
9844
    @Deprecated
9845
    public getReturnableOrdersForCustomer_args clone() {
9846
      return new getReturnableOrdersForCustomer_args(this);
9847
    }
9848
 
9849
    public long getCustomer_id() {
9850
      return this.customer_id;
9851
    }
9852
 
9853
    public getReturnableOrdersForCustomer_args setCustomer_id(long customer_id) {
9854
      this.customer_id = customer_id;
9855
      setCustomer_idIsSet(true);
9856
      return this;
9857
    }
9858
 
9859
    public void unsetCustomer_id() {
9860
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
9861
    }
9862
 
9863
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
9864
    public boolean isSetCustomer_id() {
9865
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
9866
    }
9867
 
9868
    public void setCustomer_idIsSet(boolean value) {
9869
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
9870
    }
9871
 
9872
    public long getLimit() {
9873
      return this.limit;
9874
    }
9875
 
9876
    public getReturnableOrdersForCustomer_args setLimit(long limit) {
9877
      this.limit = limit;
9878
      setLimitIsSet(true);
9879
      return this;
9880
    }
9881
 
9882
    public void unsetLimit() {
9883
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
9884
    }
9885
 
9886
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
9887
    public boolean isSetLimit() {
9888
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
9889
    }
9890
 
9891
    public void setLimitIsSet(boolean value) {
9892
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
9893
    }
9894
 
9895
    public void setFieldValue(_Fields field, Object value) {
9896
      switch (field) {
9897
      case CUSTOMER_ID:
9898
        if (value == null) {
9899
          unsetCustomer_id();
9900
        } else {
9901
          setCustomer_id((Long)value);
9902
        }
9903
        break;
9904
 
9905
      case LIMIT:
9906
        if (value == null) {
9907
          unsetLimit();
9908
        } else {
9909
          setLimit((Long)value);
9910
        }
9911
        break;
9912
 
9913
      }
9914
    }
9915
 
9916
    public void setFieldValue(int fieldID, Object value) {
9917
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
9918
    }
9919
 
9920
    public Object getFieldValue(_Fields field) {
9921
      switch (field) {
9922
      case CUSTOMER_ID:
9923
        return new Long(getCustomer_id());
9924
 
9925
      case LIMIT:
9926
        return new Long(getLimit());
9927
 
9928
      }
9929
      throw new IllegalStateException();
9930
    }
9931
 
9932
    public Object getFieldValue(int fieldId) {
9933
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
9934
    }
9935
 
9936
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
9937
    public boolean isSet(_Fields field) {
9938
      switch (field) {
9939
      case CUSTOMER_ID:
9940
        return isSetCustomer_id();
9941
      case LIMIT:
9942
        return isSetLimit();
9943
      }
9944
      throw new IllegalStateException();
9945
    }
9946
 
9947
    public boolean isSet(int fieldID) {
9948
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
9949
    }
9950
 
9951
    @Override
9952
    public boolean equals(Object that) {
9953
      if (that == null)
9954
        return false;
9955
      if (that instanceof getReturnableOrdersForCustomer_args)
9956
        return this.equals((getReturnableOrdersForCustomer_args)that);
9957
      return false;
9958
    }
9959
 
9960
    public boolean equals(getReturnableOrdersForCustomer_args that) {
9961
      if (that == null)
9962
        return false;
9963
 
9964
      boolean this_present_customer_id = true;
9965
      boolean that_present_customer_id = true;
9966
      if (this_present_customer_id || that_present_customer_id) {
9967
        if (!(this_present_customer_id && that_present_customer_id))
9968
          return false;
9969
        if (this.customer_id != that.customer_id)
9970
          return false;
9971
      }
9972
 
9973
      boolean this_present_limit = true;
9974
      boolean that_present_limit = true;
9975
      if (this_present_limit || that_present_limit) {
9976
        if (!(this_present_limit && that_present_limit))
9977
          return false;
9978
        if (this.limit != that.limit)
9979
          return false;
9980
      }
9981
 
9982
      return true;
9983
    }
9984
 
9985
    @Override
9986
    public int hashCode() {
9987
      return 0;
9988
    }
9989
 
9990
    public int compareTo(getReturnableOrdersForCustomer_args other) {
9991
      if (!getClass().equals(other.getClass())) {
9992
        return getClass().getName().compareTo(other.getClass().getName());
9993
      }
9994
 
9995
      int lastComparison = 0;
9996
      getReturnableOrdersForCustomer_args typedOther = (getReturnableOrdersForCustomer_args)other;
9997
 
9998
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
9999
      if (lastComparison != 0) {
10000
        return lastComparison;
10001
      }
10002
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10003
      if (lastComparison != 0) {
10004
        return lastComparison;
10005
      }
10006
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10007
      if (lastComparison != 0) {
10008
        return lastComparison;
10009
      }
10010
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10011
      if (lastComparison != 0) {
10012
        return lastComparison;
10013
      }
10014
      return 0;
10015
    }
10016
 
10017
    public void read(TProtocol iprot) throws TException {
10018
      TField field;
10019
      iprot.readStructBegin();
10020
      while (true)
10021
      {
10022
        field = iprot.readFieldBegin();
10023
        if (field.type == TType.STOP) { 
10024
          break;
10025
        }
10026
        _Fields fieldId = _Fields.findByThriftId(field.id);
10027
        if (fieldId == null) {
10028
          TProtocolUtil.skip(iprot, field.type);
10029
        } else {
10030
          switch (fieldId) {
10031
            case CUSTOMER_ID:
10032
              if (field.type == TType.I64) {
10033
                this.customer_id = iprot.readI64();
10034
                setCustomer_idIsSet(true);
10035
              } else { 
10036
                TProtocolUtil.skip(iprot, field.type);
10037
              }
10038
              break;
10039
            case LIMIT:
10040
              if (field.type == TType.I64) {
10041
                this.limit = iprot.readI64();
10042
                setLimitIsSet(true);
10043
              } else { 
10044
                TProtocolUtil.skip(iprot, field.type);
10045
              }
10046
              break;
10047
          }
10048
          iprot.readFieldEnd();
10049
        }
10050
      }
10051
      iprot.readStructEnd();
10052
      validate();
10053
    }
10054
 
10055
    public void write(TProtocol oprot) throws TException {
10056
      validate();
10057
 
10058
      oprot.writeStructBegin(STRUCT_DESC);
10059
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10060
      oprot.writeI64(this.customer_id);
10061
      oprot.writeFieldEnd();
10062
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10063
      oprot.writeI64(this.limit);
10064
      oprot.writeFieldEnd();
10065
      oprot.writeFieldStop();
10066
      oprot.writeStructEnd();
10067
    }
10068
 
10069
    @Override
10070
    public String toString() {
10071
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_args(");
10072
      boolean first = true;
10073
 
10074
      sb.append("customer_id:");
10075
      sb.append(this.customer_id);
10076
      first = false;
10077
      if (!first) sb.append(", ");
10078
      sb.append("limit:");
10079
      sb.append(this.limit);
10080
      first = false;
10081
      sb.append(")");
10082
      return sb.toString();
10083
    }
10084
 
10085
    public void validate() throws TException {
10086
      // check for required fields
10087
    }
10088
 
10089
  }
10090
 
10091
  public static class getReturnableOrdersForCustomer_result implements TBase<getReturnableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getReturnableOrdersForCustomer_result>   {
10092
    private static final TStruct STRUCT_DESC = new TStruct("getReturnableOrdersForCustomer_result");
10093
 
10094
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10095
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10096
 
10097
    private List<Long> success;
10098
    private TransactionServiceException ex;
10099
 
10100
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10101
    public enum _Fields implements TFieldIdEnum {
10102
      SUCCESS((short)0, "success"),
10103
      EX((short)1, "ex");
10104
 
10105
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10106
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10107
 
10108
      static {
10109
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10110
          byId.put((int)field._thriftId, field);
10111
          byName.put(field.getFieldName(), field);
10112
        }
10113
      }
10114
 
10115
      /**
10116
       * Find the _Fields constant that matches fieldId, or null if its not found.
10117
       */
10118
      public static _Fields findByThriftId(int fieldId) {
10119
        return byId.get(fieldId);
10120
      }
10121
 
10122
      /**
10123
       * Find the _Fields constant that matches fieldId, throwing an exception
10124
       * if it is not found.
10125
       */
10126
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10127
        _Fields fields = findByThriftId(fieldId);
10128
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10129
        return fields;
10130
      }
10131
 
10132
      /**
10133
       * Find the _Fields constant that matches name, or null if its not found.
10134
       */
10135
      public static _Fields findByName(String name) {
10136
        return byName.get(name);
10137
      }
10138
 
10139
      private final short _thriftId;
10140
      private final String _fieldName;
10141
 
10142
      _Fields(short thriftId, String fieldName) {
10143
        _thriftId = thriftId;
10144
        _fieldName = fieldName;
10145
      }
10146
 
10147
      public short getThriftFieldId() {
10148
        return _thriftId;
10149
      }
10150
 
10151
      public String getFieldName() {
10152
        return _fieldName;
10153
      }
10154
    }
10155
 
10156
    // isset id assignments
10157
 
10158
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10159
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10160
          new ListMetaData(TType.LIST, 
10161
              new FieldValueMetaData(TType.I64))));
10162
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10163
          new FieldValueMetaData(TType.STRUCT)));
10164
    }});
10165
 
10166
    static {
10167
      FieldMetaData.addStructMetaDataMap(getReturnableOrdersForCustomer_result.class, metaDataMap);
10168
    }
10169
 
10170
    public getReturnableOrdersForCustomer_result() {
10171
    }
10172
 
10173
    public getReturnableOrdersForCustomer_result(
10174
      List<Long> success,
10175
      TransactionServiceException ex)
10176
    {
10177
      this();
10178
      this.success = success;
10179
      this.ex = ex;
10180
    }
10181
 
10182
    /**
10183
     * Performs a deep copy on <i>other</i>.
10184
     */
10185
    public getReturnableOrdersForCustomer_result(getReturnableOrdersForCustomer_result other) {
10186
      if (other.isSetSuccess()) {
10187
        List<Long> __this__success = new ArrayList<Long>();
10188
        for (Long other_element : other.success) {
10189
          __this__success.add(other_element);
10190
        }
10191
        this.success = __this__success;
10192
      }
10193
      if (other.isSetEx()) {
10194
        this.ex = new TransactionServiceException(other.ex);
10195
      }
10196
    }
10197
 
10198
    public getReturnableOrdersForCustomer_result deepCopy() {
10199
      return new getReturnableOrdersForCustomer_result(this);
10200
    }
10201
 
10202
    @Deprecated
10203
    public getReturnableOrdersForCustomer_result clone() {
10204
      return new getReturnableOrdersForCustomer_result(this);
10205
    }
10206
 
10207
    public int getSuccessSize() {
10208
      return (this.success == null) ? 0 : this.success.size();
10209
    }
10210
 
10211
    public java.util.Iterator<Long> getSuccessIterator() {
10212
      return (this.success == null) ? null : this.success.iterator();
10213
    }
10214
 
10215
    public void addToSuccess(long elem) {
10216
      if (this.success == null) {
10217
        this.success = new ArrayList<Long>();
10218
      }
10219
      this.success.add(elem);
10220
    }
10221
 
10222
    public List<Long> getSuccess() {
10223
      return this.success;
10224
    }
10225
 
10226
    public getReturnableOrdersForCustomer_result setSuccess(List<Long> success) {
10227
      this.success = success;
10228
      return this;
10229
    }
10230
 
10231
    public void unsetSuccess() {
10232
      this.success = null;
10233
    }
10234
 
10235
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10236
    public boolean isSetSuccess() {
10237
      return this.success != null;
10238
    }
10239
 
10240
    public void setSuccessIsSet(boolean value) {
10241
      if (!value) {
10242
        this.success = null;
10243
      }
10244
    }
10245
 
10246
    public TransactionServiceException getEx() {
10247
      return this.ex;
10248
    }
10249
 
10250
    public getReturnableOrdersForCustomer_result setEx(TransactionServiceException ex) {
10251
      this.ex = ex;
10252
      return this;
10253
    }
10254
 
10255
    public void unsetEx() {
10256
      this.ex = null;
10257
    }
10258
 
10259
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
10260
    public boolean isSetEx() {
10261
      return this.ex != null;
10262
    }
10263
 
10264
    public void setExIsSet(boolean value) {
10265
      if (!value) {
10266
        this.ex = null;
10267
      }
10268
    }
10269
 
10270
    public void setFieldValue(_Fields field, Object value) {
10271
      switch (field) {
10272
      case SUCCESS:
10273
        if (value == null) {
10274
          unsetSuccess();
10275
        } else {
10276
          setSuccess((List<Long>)value);
10277
        }
10278
        break;
10279
 
10280
      case EX:
10281
        if (value == null) {
10282
          unsetEx();
10283
        } else {
10284
          setEx((TransactionServiceException)value);
10285
        }
10286
        break;
10287
 
10288
      }
10289
    }
10290
 
10291
    public void setFieldValue(int fieldID, Object value) {
10292
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10293
    }
10294
 
10295
    public Object getFieldValue(_Fields field) {
10296
      switch (field) {
10297
      case SUCCESS:
10298
        return getSuccess();
10299
 
10300
      case EX:
10301
        return getEx();
10302
 
10303
      }
10304
      throw new IllegalStateException();
10305
    }
10306
 
10307
    public Object getFieldValue(int fieldId) {
10308
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10309
    }
10310
 
10311
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10312
    public boolean isSet(_Fields field) {
10313
      switch (field) {
10314
      case SUCCESS:
10315
        return isSetSuccess();
10316
      case EX:
10317
        return isSetEx();
10318
      }
10319
      throw new IllegalStateException();
10320
    }
10321
 
10322
    public boolean isSet(int fieldID) {
10323
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10324
    }
10325
 
10326
    @Override
10327
    public boolean equals(Object that) {
10328
      if (that == null)
10329
        return false;
10330
      if (that instanceof getReturnableOrdersForCustomer_result)
10331
        return this.equals((getReturnableOrdersForCustomer_result)that);
10332
      return false;
10333
    }
10334
 
10335
    public boolean equals(getReturnableOrdersForCustomer_result that) {
10336
      if (that == null)
10337
        return false;
10338
 
10339
      boolean this_present_success = true && this.isSetSuccess();
10340
      boolean that_present_success = true && that.isSetSuccess();
10341
      if (this_present_success || that_present_success) {
10342
        if (!(this_present_success && that_present_success))
10343
          return false;
10344
        if (!this.success.equals(that.success))
10345
          return false;
10346
      }
10347
 
10348
      boolean this_present_ex = true && this.isSetEx();
10349
      boolean that_present_ex = true && that.isSetEx();
10350
      if (this_present_ex || that_present_ex) {
10351
        if (!(this_present_ex && that_present_ex))
10352
          return false;
10353
        if (!this.ex.equals(that.ex))
10354
          return false;
10355
      }
10356
 
10357
      return true;
10358
    }
10359
 
10360
    @Override
10361
    public int hashCode() {
10362
      return 0;
10363
    }
10364
 
10365
    public int compareTo(getReturnableOrdersForCustomer_result other) {
10366
      if (!getClass().equals(other.getClass())) {
10367
        return getClass().getName().compareTo(other.getClass().getName());
10368
      }
10369
 
10370
      int lastComparison = 0;
10371
      getReturnableOrdersForCustomer_result typedOther = (getReturnableOrdersForCustomer_result)other;
10372
 
10373
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
10374
      if (lastComparison != 0) {
10375
        return lastComparison;
10376
      }
10377
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
10378
      if (lastComparison != 0) {
10379
        return lastComparison;
10380
      }
10381
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
10382
      if (lastComparison != 0) {
10383
        return lastComparison;
10384
      }
10385
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
10386
      if (lastComparison != 0) {
10387
        return lastComparison;
10388
      }
10389
      return 0;
10390
    }
10391
 
10392
    public void read(TProtocol iprot) throws TException {
10393
      TField field;
10394
      iprot.readStructBegin();
10395
      while (true)
10396
      {
10397
        field = iprot.readFieldBegin();
10398
        if (field.type == TType.STOP) { 
10399
          break;
10400
        }
10401
        _Fields fieldId = _Fields.findByThriftId(field.id);
10402
        if (fieldId == null) {
10403
          TProtocolUtil.skip(iprot, field.type);
10404
        } else {
10405
          switch (fieldId) {
10406
            case SUCCESS:
10407
              if (field.type == TType.LIST) {
10408
                {
10409
                  TList _list24 = iprot.readListBegin();
10410
                  this.success = new ArrayList<Long>(_list24.size);
10411
                  for (int _i25 = 0; _i25 < _list24.size; ++_i25)
10412
                  {
10413
                    long _elem26;
10414
                    _elem26 = iprot.readI64();
10415
                    this.success.add(_elem26);
10416
                  }
10417
                  iprot.readListEnd();
10418
                }
10419
              } else { 
10420
                TProtocolUtil.skip(iprot, field.type);
10421
              }
10422
              break;
10423
            case EX:
10424
              if (field.type == TType.STRUCT) {
10425
                this.ex = new TransactionServiceException();
10426
                this.ex.read(iprot);
10427
              } else { 
10428
                TProtocolUtil.skip(iprot, field.type);
10429
              }
10430
              break;
10431
          }
10432
          iprot.readFieldEnd();
10433
        }
10434
      }
10435
      iprot.readStructEnd();
10436
      validate();
10437
    }
10438
 
10439
    public void write(TProtocol oprot) throws TException {
10440
      oprot.writeStructBegin(STRUCT_DESC);
10441
 
10442
      if (this.isSetSuccess()) {
10443
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
10444
        {
10445
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
10446
          for (long _iter27 : this.success)
10447
          {
10448
            oprot.writeI64(_iter27);
10449
          }
10450
          oprot.writeListEnd();
10451
        }
10452
        oprot.writeFieldEnd();
10453
      } else if (this.isSetEx()) {
10454
        oprot.writeFieldBegin(EX_FIELD_DESC);
10455
        this.ex.write(oprot);
10456
        oprot.writeFieldEnd();
10457
      }
10458
      oprot.writeFieldStop();
10459
      oprot.writeStructEnd();
10460
    }
10461
 
10462
    @Override
10463
    public String toString() {
10464
      StringBuilder sb = new StringBuilder("getReturnableOrdersForCustomer_result(");
10465
      boolean first = true;
10466
 
10467
      sb.append("success:");
10468
      if (this.success == null) {
10469
        sb.append("null");
10470
      } else {
10471
        sb.append(this.success);
10472
      }
10473
      first = false;
10474
      if (!first) sb.append(", ");
10475
      sb.append("ex:");
10476
      if (this.ex == null) {
10477
        sb.append("null");
10478
      } else {
10479
        sb.append(this.ex);
10480
      }
10481
      first = false;
10482
      sb.append(")");
10483
      return sb.toString();
10484
    }
10485
 
10486
    public void validate() throws TException {
10487
      // check for required fields
10488
    }
10489
 
10490
  }
10491
 
10492
  public static class getCancellableOrdersForCustomer_args implements TBase<getCancellableOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_args>   {
10493
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_args");
10494
 
10495
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customer_id", TType.I64, (short)1);
10496
    private static final TField LIMIT_FIELD_DESC = new TField("limit", TType.I64, (short)2);
10497
 
10498
    private long customer_id;
10499
    private long limit;
10500
 
10501
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10502
    public enum _Fields implements TFieldIdEnum {
10503
      CUSTOMER_ID((short)1, "customer_id"),
10504
      LIMIT((short)2, "limit");
10505
 
10506
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10507
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10508
 
10509
      static {
10510
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10511
          byId.put((int)field._thriftId, field);
10512
          byName.put(field.getFieldName(), field);
10513
        }
10514
      }
10515
 
10516
      /**
10517
       * Find the _Fields constant that matches fieldId, or null if its not found.
10518
       */
10519
      public static _Fields findByThriftId(int fieldId) {
10520
        return byId.get(fieldId);
10521
      }
10522
 
10523
      /**
10524
       * Find the _Fields constant that matches fieldId, throwing an exception
10525
       * if it is not found.
10526
       */
10527
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10528
        _Fields fields = findByThriftId(fieldId);
10529
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10530
        return fields;
10531
      }
10532
 
10533
      /**
10534
       * Find the _Fields constant that matches name, or null if its not found.
10535
       */
10536
      public static _Fields findByName(String name) {
10537
        return byName.get(name);
10538
      }
10539
 
10540
      private final short _thriftId;
10541
      private final String _fieldName;
10542
 
10543
      _Fields(short thriftId, String fieldName) {
10544
        _thriftId = thriftId;
10545
        _fieldName = fieldName;
10546
      }
10547
 
10548
      public short getThriftFieldId() {
10549
        return _thriftId;
10550
      }
10551
 
10552
      public String getFieldName() {
10553
        return _fieldName;
10554
      }
10555
    }
10556
 
10557
    // isset id assignments
10558
    private static final int __CUSTOMER_ID_ISSET_ID = 0;
10559
    private static final int __LIMIT_ISSET_ID = 1;
10560
    private BitSet __isset_bit_vector = new BitSet(2);
10561
 
10562
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10563
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customer_id", TFieldRequirementType.DEFAULT, 
10564
          new FieldValueMetaData(TType.I64)));
10565
      put(_Fields.LIMIT, new FieldMetaData("limit", TFieldRequirementType.DEFAULT, 
10566
          new FieldValueMetaData(TType.I64)));
10567
    }});
10568
 
10569
    static {
10570
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_args.class, metaDataMap);
10571
    }
10572
 
10573
    public getCancellableOrdersForCustomer_args() {
10574
    }
10575
 
10576
    public getCancellableOrdersForCustomer_args(
10577
      long customer_id,
10578
      long limit)
10579
    {
10580
      this();
10581
      this.customer_id = customer_id;
10582
      setCustomer_idIsSet(true);
10583
      this.limit = limit;
10584
      setLimitIsSet(true);
10585
    }
10586
 
10587
    /**
10588
     * Performs a deep copy on <i>other</i>.
10589
     */
10590
    public getCancellableOrdersForCustomer_args(getCancellableOrdersForCustomer_args other) {
10591
      __isset_bit_vector.clear();
10592
      __isset_bit_vector.or(other.__isset_bit_vector);
10593
      this.customer_id = other.customer_id;
10594
      this.limit = other.limit;
10595
    }
10596
 
10597
    public getCancellableOrdersForCustomer_args deepCopy() {
10598
      return new getCancellableOrdersForCustomer_args(this);
10599
    }
10600
 
10601
    @Deprecated
10602
    public getCancellableOrdersForCustomer_args clone() {
10603
      return new getCancellableOrdersForCustomer_args(this);
10604
    }
10605
 
10606
    public long getCustomer_id() {
10607
      return this.customer_id;
10608
    }
10609
 
10610
    public getCancellableOrdersForCustomer_args setCustomer_id(long customer_id) {
10611
      this.customer_id = customer_id;
10612
      setCustomer_idIsSet(true);
10613
      return this;
10614
    }
10615
 
10616
    public void unsetCustomer_id() {
10617
      __isset_bit_vector.clear(__CUSTOMER_ID_ISSET_ID);
10618
    }
10619
 
10620
    /** Returns true if field customer_id is set (has been asigned a value) and false otherwise */
10621
    public boolean isSetCustomer_id() {
10622
      return __isset_bit_vector.get(__CUSTOMER_ID_ISSET_ID);
10623
    }
10624
 
10625
    public void setCustomer_idIsSet(boolean value) {
10626
      __isset_bit_vector.set(__CUSTOMER_ID_ISSET_ID, value);
10627
    }
10628
 
10629
    public long getLimit() {
10630
      return this.limit;
10631
    }
10632
 
10633
    public getCancellableOrdersForCustomer_args setLimit(long limit) {
10634
      this.limit = limit;
10635
      setLimitIsSet(true);
10636
      return this;
10637
    }
10638
 
10639
    public void unsetLimit() {
10640
      __isset_bit_vector.clear(__LIMIT_ISSET_ID);
10641
    }
10642
 
10643
    /** Returns true if field limit is set (has been asigned a value) and false otherwise */
10644
    public boolean isSetLimit() {
10645
      return __isset_bit_vector.get(__LIMIT_ISSET_ID);
10646
    }
10647
 
10648
    public void setLimitIsSet(boolean value) {
10649
      __isset_bit_vector.set(__LIMIT_ISSET_ID, value);
10650
    }
10651
 
10652
    public void setFieldValue(_Fields field, Object value) {
10653
      switch (field) {
10654
      case CUSTOMER_ID:
10655
        if (value == null) {
10656
          unsetCustomer_id();
10657
        } else {
10658
          setCustomer_id((Long)value);
10659
        }
10660
        break;
10661
 
10662
      case LIMIT:
10663
        if (value == null) {
10664
          unsetLimit();
10665
        } else {
10666
          setLimit((Long)value);
10667
        }
10668
        break;
10669
 
10670
      }
10671
    }
10672
 
10673
    public void setFieldValue(int fieldID, Object value) {
10674
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
10675
    }
10676
 
10677
    public Object getFieldValue(_Fields field) {
10678
      switch (field) {
10679
      case CUSTOMER_ID:
10680
        return new Long(getCustomer_id());
10681
 
10682
      case LIMIT:
10683
        return new Long(getLimit());
10684
 
10685
      }
10686
      throw new IllegalStateException();
10687
    }
10688
 
10689
    public Object getFieldValue(int fieldId) {
10690
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
10691
    }
10692
 
10693
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
10694
    public boolean isSet(_Fields field) {
10695
      switch (field) {
10696
      case CUSTOMER_ID:
10697
        return isSetCustomer_id();
10698
      case LIMIT:
10699
        return isSetLimit();
10700
      }
10701
      throw new IllegalStateException();
10702
    }
10703
 
10704
    public boolean isSet(int fieldID) {
10705
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
10706
    }
10707
 
10708
    @Override
10709
    public boolean equals(Object that) {
10710
      if (that == null)
10711
        return false;
10712
      if (that instanceof getCancellableOrdersForCustomer_args)
10713
        return this.equals((getCancellableOrdersForCustomer_args)that);
10714
      return false;
10715
    }
10716
 
10717
    public boolean equals(getCancellableOrdersForCustomer_args that) {
10718
      if (that == null)
10719
        return false;
10720
 
10721
      boolean this_present_customer_id = true;
10722
      boolean that_present_customer_id = true;
10723
      if (this_present_customer_id || that_present_customer_id) {
10724
        if (!(this_present_customer_id && that_present_customer_id))
10725
          return false;
10726
        if (this.customer_id != that.customer_id)
10727
          return false;
10728
      }
10729
 
10730
      boolean this_present_limit = true;
10731
      boolean that_present_limit = true;
10732
      if (this_present_limit || that_present_limit) {
10733
        if (!(this_present_limit && that_present_limit))
10734
          return false;
10735
        if (this.limit != that.limit)
10736
          return false;
10737
      }
10738
 
10739
      return true;
10740
    }
10741
 
10742
    @Override
10743
    public int hashCode() {
10744
      return 0;
10745
    }
10746
 
10747
    public int compareTo(getCancellableOrdersForCustomer_args other) {
10748
      if (!getClass().equals(other.getClass())) {
10749
        return getClass().getName().compareTo(other.getClass().getName());
10750
      }
10751
 
10752
      int lastComparison = 0;
10753
      getCancellableOrdersForCustomer_args typedOther = (getCancellableOrdersForCustomer_args)other;
10754
 
10755
      lastComparison = Boolean.valueOf(isSetCustomer_id()).compareTo(isSetCustomer_id());
10756
      if (lastComparison != 0) {
10757
        return lastComparison;
10758
      }
10759
      lastComparison = TBaseHelper.compareTo(customer_id, typedOther.customer_id);
10760
      if (lastComparison != 0) {
10761
        return lastComparison;
10762
      }
10763
      lastComparison = Boolean.valueOf(isSetLimit()).compareTo(isSetLimit());
10764
      if (lastComparison != 0) {
10765
        return lastComparison;
10766
      }
10767
      lastComparison = TBaseHelper.compareTo(limit, typedOther.limit);
10768
      if (lastComparison != 0) {
10769
        return lastComparison;
10770
      }
10771
      return 0;
10772
    }
10773
 
10774
    public void read(TProtocol iprot) throws TException {
10775
      TField field;
10776
      iprot.readStructBegin();
10777
      while (true)
10778
      {
10779
        field = iprot.readFieldBegin();
10780
        if (field.type == TType.STOP) { 
10781
          break;
10782
        }
10783
        _Fields fieldId = _Fields.findByThriftId(field.id);
10784
        if (fieldId == null) {
10785
          TProtocolUtil.skip(iprot, field.type);
10786
        } else {
10787
          switch (fieldId) {
10788
            case CUSTOMER_ID:
10789
              if (field.type == TType.I64) {
10790
                this.customer_id = iprot.readI64();
10791
                setCustomer_idIsSet(true);
10792
              } else { 
10793
                TProtocolUtil.skip(iprot, field.type);
10794
              }
10795
              break;
10796
            case LIMIT:
10797
              if (field.type == TType.I64) {
10798
                this.limit = iprot.readI64();
10799
                setLimitIsSet(true);
10800
              } else { 
10801
                TProtocolUtil.skip(iprot, field.type);
10802
              }
10803
              break;
10804
          }
10805
          iprot.readFieldEnd();
10806
        }
10807
      }
10808
      iprot.readStructEnd();
10809
      validate();
10810
    }
10811
 
10812
    public void write(TProtocol oprot) throws TException {
10813
      validate();
10814
 
10815
      oprot.writeStructBegin(STRUCT_DESC);
10816
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
10817
      oprot.writeI64(this.customer_id);
10818
      oprot.writeFieldEnd();
10819
      oprot.writeFieldBegin(LIMIT_FIELD_DESC);
10820
      oprot.writeI64(this.limit);
10821
      oprot.writeFieldEnd();
10822
      oprot.writeFieldStop();
10823
      oprot.writeStructEnd();
10824
    }
10825
 
10826
    @Override
10827
    public String toString() {
10828
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_args(");
10829
      boolean first = true;
10830
 
10831
      sb.append("customer_id:");
10832
      sb.append(this.customer_id);
10833
      first = false;
10834
      if (!first) sb.append(", ");
10835
      sb.append("limit:");
10836
      sb.append(this.limit);
10837
      first = false;
10838
      sb.append(")");
10839
      return sb.toString();
10840
    }
10841
 
10842
    public void validate() throws TException {
10843
      // check for required fields
10844
    }
10845
 
10846
  }
10847
 
10848
  public static class getCancellableOrdersForCustomer_result implements TBase<getCancellableOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getCancellableOrdersForCustomer_result>   {
10849
    private static final TStruct STRUCT_DESC = new TStruct("getCancellableOrdersForCustomer_result");
10850
 
10851
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
10852
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
10853
 
10854
    private List<Long> success;
10855
    private TransactionServiceException ex;
10856
 
10857
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
10858
    public enum _Fields implements TFieldIdEnum {
10859
      SUCCESS((short)0, "success"),
10860
      EX((short)1, "ex");
10861
 
10862
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
10863
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
10864
 
10865
      static {
10866
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
10867
          byId.put((int)field._thriftId, field);
10868
          byName.put(field.getFieldName(), field);
10869
        }
10870
      }
10871
 
10872
      /**
10873
       * Find the _Fields constant that matches fieldId, or null if its not found.
10874
       */
10875
      public static _Fields findByThriftId(int fieldId) {
10876
        return byId.get(fieldId);
10877
      }
10878
 
10879
      /**
10880
       * Find the _Fields constant that matches fieldId, throwing an exception
10881
       * if it is not found.
10882
       */
10883
      public static _Fields findByThriftIdOrThrow(int fieldId) {
10884
        _Fields fields = findByThriftId(fieldId);
10885
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
10886
        return fields;
10887
      }
10888
 
10889
      /**
10890
       * Find the _Fields constant that matches name, or null if its not found.
10891
       */
10892
      public static _Fields findByName(String name) {
10893
        return byName.get(name);
10894
      }
10895
 
10896
      private final short _thriftId;
10897
      private final String _fieldName;
10898
 
10899
      _Fields(short thriftId, String fieldName) {
10900
        _thriftId = thriftId;
10901
        _fieldName = fieldName;
10902
      }
10903
 
10904
      public short getThriftFieldId() {
10905
        return _thriftId;
10906
      }
10907
 
10908
      public String getFieldName() {
10909
        return _fieldName;
10910
      }
10911
    }
10912
 
10913
    // isset id assignments
10914
 
10915
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
10916
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
10917
          new ListMetaData(TType.LIST, 
10918
              new FieldValueMetaData(TType.I64))));
10919
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
10920
          new FieldValueMetaData(TType.STRUCT)));
10921
    }});
10922
 
10923
    static {
10924
      FieldMetaData.addStructMetaDataMap(getCancellableOrdersForCustomer_result.class, metaDataMap);
10925
    }
10926
 
10927
    public getCancellableOrdersForCustomer_result() {
10928
    }
10929
 
10930
    public getCancellableOrdersForCustomer_result(
10931
      List<Long> success,
10932
      TransactionServiceException ex)
10933
    {
10934
      this();
10935
      this.success = success;
10936
      this.ex = ex;
10937
    }
10938
 
10939
    /**
10940
     * Performs a deep copy on <i>other</i>.
10941
     */
10942
    public getCancellableOrdersForCustomer_result(getCancellableOrdersForCustomer_result other) {
10943
      if (other.isSetSuccess()) {
10944
        List<Long> __this__success = new ArrayList<Long>();
10945
        for (Long other_element : other.success) {
10946
          __this__success.add(other_element);
10947
        }
10948
        this.success = __this__success;
10949
      }
10950
      if (other.isSetEx()) {
10951
        this.ex = new TransactionServiceException(other.ex);
10952
      }
10953
    }
10954
 
10955
    public getCancellableOrdersForCustomer_result deepCopy() {
10956
      return new getCancellableOrdersForCustomer_result(this);
10957
    }
10958
 
10959
    @Deprecated
10960
    public getCancellableOrdersForCustomer_result clone() {
10961
      return new getCancellableOrdersForCustomer_result(this);
10962
    }
10963
 
10964
    public int getSuccessSize() {
10965
      return (this.success == null) ? 0 : this.success.size();
10966
    }
10967
 
10968
    public java.util.Iterator<Long> getSuccessIterator() {
10969
      return (this.success == null) ? null : this.success.iterator();
10970
    }
10971
 
10972
    public void addToSuccess(long elem) {
10973
      if (this.success == null) {
10974
        this.success = new ArrayList<Long>();
10975
      }
10976
      this.success.add(elem);
10977
    }
10978
 
10979
    public List<Long> getSuccess() {
10980
      return this.success;
10981
    }
10982
 
10983
    public getCancellableOrdersForCustomer_result setSuccess(List<Long> success) {
10984
      this.success = success;
10985
      return this;
10986
    }
10987
 
10988
    public void unsetSuccess() {
10989
      this.success = null;
10990
    }
10991
 
10992
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
10993
    public boolean isSetSuccess() {
10994
      return this.success != null;
10995
    }
10996
 
10997
    public void setSuccessIsSet(boolean value) {
10998
      if (!value) {
10999
        this.success = null;
11000
      }
11001
    }
11002
 
11003
    public TransactionServiceException getEx() {
11004
      return this.ex;
11005
    }
11006
 
11007
    public getCancellableOrdersForCustomer_result setEx(TransactionServiceException ex) {
11008
      this.ex = ex;
11009
      return this;
11010
    }
11011
 
11012
    public void unsetEx() {
11013
      this.ex = null;
11014
    }
11015
 
11016
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11017
    public boolean isSetEx() {
11018
      return this.ex != null;
11019
    }
11020
 
11021
    public void setExIsSet(boolean value) {
11022
      if (!value) {
11023
        this.ex = null;
11024
      }
11025
    }
11026
 
11027
    public void setFieldValue(_Fields field, Object value) {
11028
      switch (field) {
11029
      case SUCCESS:
11030
        if (value == null) {
11031
          unsetSuccess();
11032
        } else {
11033
          setSuccess((List<Long>)value);
11034
        }
11035
        break;
11036
 
11037
      case EX:
11038
        if (value == null) {
11039
          unsetEx();
11040
        } else {
11041
          setEx((TransactionServiceException)value);
11042
        }
11043
        break;
11044
 
11045
      }
11046
    }
11047
 
11048
    public void setFieldValue(int fieldID, Object value) {
11049
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11050
    }
11051
 
11052
    public Object getFieldValue(_Fields field) {
11053
      switch (field) {
11054
      case SUCCESS:
11055
        return getSuccess();
11056
 
11057
      case EX:
11058
        return getEx();
11059
 
11060
      }
11061
      throw new IllegalStateException();
11062
    }
11063
 
11064
    public Object getFieldValue(int fieldId) {
11065
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11066
    }
11067
 
11068
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11069
    public boolean isSet(_Fields field) {
11070
      switch (field) {
11071
      case SUCCESS:
11072
        return isSetSuccess();
11073
      case EX:
11074
        return isSetEx();
11075
      }
11076
      throw new IllegalStateException();
11077
    }
11078
 
11079
    public boolean isSet(int fieldID) {
11080
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11081
    }
11082
 
11083
    @Override
11084
    public boolean equals(Object that) {
11085
      if (that == null)
11086
        return false;
11087
      if (that instanceof getCancellableOrdersForCustomer_result)
11088
        return this.equals((getCancellableOrdersForCustomer_result)that);
11089
      return false;
11090
    }
11091
 
11092
    public boolean equals(getCancellableOrdersForCustomer_result that) {
11093
      if (that == null)
11094
        return false;
11095
 
11096
      boolean this_present_success = true && this.isSetSuccess();
11097
      boolean that_present_success = true && that.isSetSuccess();
11098
      if (this_present_success || that_present_success) {
11099
        if (!(this_present_success && that_present_success))
11100
          return false;
11101
        if (!this.success.equals(that.success))
11102
          return false;
11103
      }
11104
 
11105
      boolean this_present_ex = true && this.isSetEx();
11106
      boolean that_present_ex = true && that.isSetEx();
11107
      if (this_present_ex || that_present_ex) {
11108
        if (!(this_present_ex && that_present_ex))
11109
          return false;
11110
        if (!this.ex.equals(that.ex))
11111
          return false;
11112
      }
11113
 
11114
      return true;
11115
    }
11116
 
11117
    @Override
11118
    public int hashCode() {
11119
      return 0;
11120
    }
11121
 
11122
    public int compareTo(getCancellableOrdersForCustomer_result other) {
11123
      if (!getClass().equals(other.getClass())) {
11124
        return getClass().getName().compareTo(other.getClass().getName());
11125
      }
11126
 
11127
      int lastComparison = 0;
11128
      getCancellableOrdersForCustomer_result typedOther = (getCancellableOrdersForCustomer_result)other;
11129
 
11130
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11131
      if (lastComparison != 0) {
11132
        return lastComparison;
11133
      }
11134
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11135
      if (lastComparison != 0) {
11136
        return lastComparison;
11137
      }
11138
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11139
      if (lastComparison != 0) {
11140
        return lastComparison;
11141
      }
11142
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11143
      if (lastComparison != 0) {
11144
        return lastComparison;
11145
      }
11146
      return 0;
11147
    }
11148
 
11149
    public void read(TProtocol iprot) throws TException {
11150
      TField field;
11151
      iprot.readStructBegin();
11152
      while (true)
11153
      {
11154
        field = iprot.readFieldBegin();
11155
        if (field.type == TType.STOP) { 
11156
          break;
11157
        }
11158
        _Fields fieldId = _Fields.findByThriftId(field.id);
11159
        if (fieldId == null) {
11160
          TProtocolUtil.skip(iprot, field.type);
11161
        } else {
11162
          switch (fieldId) {
11163
            case SUCCESS:
11164
              if (field.type == TType.LIST) {
11165
                {
11166
                  TList _list28 = iprot.readListBegin();
11167
                  this.success = new ArrayList<Long>(_list28.size);
11168
                  for (int _i29 = 0; _i29 < _list28.size; ++_i29)
11169
                  {
11170
                    long _elem30;
11171
                    _elem30 = iprot.readI64();
11172
                    this.success.add(_elem30);
11173
                  }
11174
                  iprot.readListEnd();
11175
                }
11176
              } else { 
11177
                TProtocolUtil.skip(iprot, field.type);
11178
              }
11179
              break;
11180
            case EX:
11181
              if (field.type == TType.STRUCT) {
11182
                this.ex = new TransactionServiceException();
11183
                this.ex.read(iprot);
11184
              } else { 
11185
                TProtocolUtil.skip(iprot, field.type);
11186
              }
11187
              break;
11188
          }
11189
          iprot.readFieldEnd();
11190
        }
11191
      }
11192
      iprot.readStructEnd();
11193
      validate();
11194
    }
11195
 
11196
    public void write(TProtocol oprot) throws TException {
11197
      oprot.writeStructBegin(STRUCT_DESC);
11198
 
11199
      if (this.isSetSuccess()) {
11200
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
11201
        {
11202
          oprot.writeListBegin(new TList(TType.I64, this.success.size()));
11203
          for (long _iter31 : this.success)
11204
          {
11205
            oprot.writeI64(_iter31);
11206
          }
11207
          oprot.writeListEnd();
11208
        }
11209
        oprot.writeFieldEnd();
11210
      } else if (this.isSetEx()) {
11211
        oprot.writeFieldBegin(EX_FIELD_DESC);
11212
        this.ex.write(oprot);
11213
        oprot.writeFieldEnd();
11214
      }
11215
      oprot.writeFieldStop();
11216
      oprot.writeStructEnd();
11217
    }
11218
 
11219
    @Override
11220
    public String toString() {
11221
      StringBuilder sb = new StringBuilder("getCancellableOrdersForCustomer_result(");
11222
      boolean first = true;
11223
 
11224
      sb.append("success:");
11225
      if (this.success == null) {
11226
        sb.append("null");
11227
      } else {
11228
        sb.append(this.success);
11229
      }
11230
      first = false;
11231
      if (!first) sb.append(", ");
11232
      sb.append("ex:");
11233
      if (this.ex == null) {
11234
        sb.append("null");
11235
      } else {
11236
        sb.append(this.ex);
11237
      }
11238
      first = false;
11239
      sb.append(")");
11240
      return sb.toString();
11241
    }
11242
 
11243
    public void validate() throws TException {
11244
      // check for required fields
11245
    }
11246
 
11247
  }
11248
 
483 rajveer 11249
  public static class changeOrderStatus_args implements TBase<changeOrderStatus_args._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_args>   {
11250
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_args");
68 ashish 11251
 
483 rajveer 11252
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
11253
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)2);
11254
    private static final TField DESCRIPTION_FIELD_DESC = new TField("description", TType.STRING, (short)3);
68 ashish 11255
 
483 rajveer 11256
    private long orderId;
11257
    private OrderStatus status;
11258
    private String description;
68 ashish 11259
 
11260
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11261
    public enum _Fields implements TFieldIdEnum {
483 rajveer 11262
      ORDER_ID((short)1, "orderId"),
11263
      /**
11264
       * 
11265
       * @see OrderStatus
11266
       */
11267
      STATUS((short)2, "status"),
11268
      DESCRIPTION((short)3, "description");
68 ashish 11269
 
11270
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11271
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11272
 
11273
      static {
11274
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11275
          byId.put((int)field._thriftId, field);
11276
          byName.put(field.getFieldName(), field);
11277
        }
11278
      }
11279
 
11280
      /**
11281
       * Find the _Fields constant that matches fieldId, or null if its not found.
11282
       */
11283
      public static _Fields findByThriftId(int fieldId) {
11284
        return byId.get(fieldId);
11285
      }
11286
 
11287
      /**
11288
       * Find the _Fields constant that matches fieldId, throwing an exception
11289
       * if it is not found.
11290
       */
11291
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11292
        _Fields fields = findByThriftId(fieldId);
11293
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11294
        return fields;
11295
      }
11296
 
11297
      /**
11298
       * Find the _Fields constant that matches name, or null if its not found.
11299
       */
11300
      public static _Fields findByName(String name) {
11301
        return byName.get(name);
11302
      }
11303
 
11304
      private final short _thriftId;
11305
      private final String _fieldName;
11306
 
11307
      _Fields(short thriftId, String fieldName) {
11308
        _thriftId = thriftId;
11309
        _fieldName = fieldName;
11310
      }
11311
 
11312
      public short getThriftFieldId() {
11313
        return _thriftId;
11314
      }
11315
 
11316
      public String getFieldName() {
11317
        return _fieldName;
11318
      }
11319
    }
11320
 
11321
    // isset id assignments
483 rajveer 11322
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 11323
    private BitSet __isset_bit_vector = new BitSet(1);
11324
 
11325
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 11326
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 11327
          new FieldValueMetaData(TType.I64)));
483 rajveer 11328
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
11329
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
11330
      put(_Fields.DESCRIPTION, new FieldMetaData("description", TFieldRequirementType.DEFAULT, 
11331
          new FieldValueMetaData(TType.STRING)));
68 ashish 11332
    }});
11333
 
11334
    static {
483 rajveer 11335
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_args.class, metaDataMap);
68 ashish 11336
    }
11337
 
483 rajveer 11338
    public changeOrderStatus_args() {
68 ashish 11339
    }
11340
 
483 rajveer 11341
    public changeOrderStatus_args(
11342
      long orderId,
11343
      OrderStatus status,
11344
      String description)
68 ashish 11345
    {
11346
      this();
483 rajveer 11347
      this.orderId = orderId;
11348
      setOrderIdIsSet(true);
11349
      this.status = status;
11350
      this.description = description;
68 ashish 11351
    }
11352
 
11353
    /**
11354
     * Performs a deep copy on <i>other</i>.
11355
     */
483 rajveer 11356
    public changeOrderStatus_args(changeOrderStatus_args other) {
68 ashish 11357
      __isset_bit_vector.clear();
11358
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 11359
      this.orderId = other.orderId;
11360
      if (other.isSetStatus()) {
11361
        this.status = other.status;
11362
      }
11363
      if (other.isSetDescription()) {
11364
        this.description = other.description;
11365
      }
68 ashish 11366
    }
11367
 
483 rajveer 11368
    public changeOrderStatus_args deepCopy() {
11369
      return new changeOrderStatus_args(this);
68 ashish 11370
    }
11371
 
11372
    @Deprecated
483 rajveer 11373
    public changeOrderStatus_args clone() {
11374
      return new changeOrderStatus_args(this);
68 ashish 11375
    }
11376
 
483 rajveer 11377
    public long getOrderId() {
11378
      return this.orderId;
68 ashish 11379
    }
11380
 
483 rajveer 11381
    public changeOrderStatus_args setOrderId(long orderId) {
11382
      this.orderId = orderId;
11383
      setOrderIdIsSet(true);
68 ashish 11384
      return this;
11385
    }
11386
 
483 rajveer 11387
    public void unsetOrderId() {
11388
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 11389
    }
11390
 
483 rajveer 11391
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
11392
    public boolean isSetOrderId() {
11393
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 11394
    }
11395
 
483 rajveer 11396
    public void setOrderIdIsSet(boolean value) {
11397
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 11398
    }
11399
 
483 rajveer 11400
    /**
11401
     * 
11402
     * @see OrderStatus
11403
     */
11404
    public OrderStatus getStatus() {
11405
      return this.status;
68 ashish 11406
    }
11407
 
11408
    /**
483 rajveer 11409
     * 
11410
     * @see OrderStatus
68 ashish 11411
     */
483 rajveer 11412
    public changeOrderStatus_args setStatus(OrderStatus status) {
11413
      this.status = status;
68 ashish 11414
      return this;
11415
    }
11416
 
483 rajveer 11417
    public void unsetStatus() {
11418
      this.status = null;
68 ashish 11419
    }
11420
 
483 rajveer 11421
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
11422
    public boolean isSetStatus() {
11423
      return this.status != null;
68 ashish 11424
    }
11425
 
483 rajveer 11426
    public void setStatusIsSet(boolean value) {
68 ashish 11427
      if (!value) {
483 rajveer 11428
        this.status = null;
68 ashish 11429
      }
11430
    }
11431
 
483 rajveer 11432
    public String getDescription() {
11433
      return this.description;
68 ashish 11434
    }
11435
 
483 rajveer 11436
    public changeOrderStatus_args setDescription(String description) {
11437
      this.description = description;
68 ashish 11438
      return this;
11439
    }
11440
 
483 rajveer 11441
    public void unsetDescription() {
11442
      this.description = null;
68 ashish 11443
    }
11444
 
483 rajveer 11445
    /** Returns true if field description is set (has been asigned a value) and false otherwise */
11446
    public boolean isSetDescription() {
11447
      return this.description != null;
68 ashish 11448
    }
11449
 
483 rajveer 11450
    public void setDescriptionIsSet(boolean value) {
68 ashish 11451
      if (!value) {
483 rajveer 11452
        this.description = null;
68 ashish 11453
      }
11454
    }
11455
 
11456
    public void setFieldValue(_Fields field, Object value) {
11457
      switch (field) {
483 rajveer 11458
      case ORDER_ID:
68 ashish 11459
        if (value == null) {
483 rajveer 11460
          unsetOrderId();
68 ashish 11461
        } else {
483 rajveer 11462
          setOrderId((Long)value);
68 ashish 11463
        }
11464
        break;
11465
 
483 rajveer 11466
      case STATUS:
68 ashish 11467
        if (value == null) {
483 rajveer 11468
          unsetStatus();
68 ashish 11469
        } else {
483 rajveer 11470
          setStatus((OrderStatus)value);
68 ashish 11471
        }
11472
        break;
11473
 
483 rajveer 11474
      case DESCRIPTION:
11475
        if (value == null) {
11476
          unsetDescription();
11477
        } else {
11478
          setDescription((String)value);
11479
        }
11480
        break;
11481
 
68 ashish 11482
      }
11483
    }
11484
 
11485
    public void setFieldValue(int fieldID, Object value) {
11486
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11487
    }
11488
 
11489
    public Object getFieldValue(_Fields field) {
11490
      switch (field) {
483 rajveer 11491
      case ORDER_ID:
11492
        return new Long(getOrderId());
68 ashish 11493
 
483 rajveer 11494
      case STATUS:
11495
        return getStatus();
68 ashish 11496
 
483 rajveer 11497
      case DESCRIPTION:
11498
        return getDescription();
11499
 
68 ashish 11500
      }
11501
      throw new IllegalStateException();
11502
    }
11503
 
11504
    public Object getFieldValue(int fieldId) {
11505
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11506
    }
11507
 
11508
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11509
    public boolean isSet(_Fields field) {
11510
      switch (field) {
483 rajveer 11511
      case ORDER_ID:
11512
        return isSetOrderId();
11513
      case STATUS:
11514
        return isSetStatus();
11515
      case DESCRIPTION:
11516
        return isSetDescription();
68 ashish 11517
      }
11518
      throw new IllegalStateException();
11519
    }
11520
 
11521
    public boolean isSet(int fieldID) {
11522
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11523
    }
11524
 
11525
    @Override
11526
    public boolean equals(Object that) {
11527
      if (that == null)
11528
        return false;
483 rajveer 11529
      if (that instanceof changeOrderStatus_args)
11530
        return this.equals((changeOrderStatus_args)that);
68 ashish 11531
      return false;
11532
    }
11533
 
483 rajveer 11534
    public boolean equals(changeOrderStatus_args that) {
68 ashish 11535
      if (that == null)
11536
        return false;
11537
 
483 rajveer 11538
      boolean this_present_orderId = true;
11539
      boolean that_present_orderId = true;
11540
      if (this_present_orderId || that_present_orderId) {
11541
        if (!(this_present_orderId && that_present_orderId))
68 ashish 11542
          return false;
483 rajveer 11543
        if (this.orderId != that.orderId)
68 ashish 11544
          return false;
11545
      }
11546
 
483 rajveer 11547
      boolean this_present_status = true && this.isSetStatus();
11548
      boolean that_present_status = true && that.isSetStatus();
11549
      if (this_present_status || that_present_status) {
11550
        if (!(this_present_status && that_present_status))
68 ashish 11551
          return false;
483 rajveer 11552
        if (!this.status.equals(that.status))
68 ashish 11553
          return false;
11554
      }
11555
 
483 rajveer 11556
      boolean this_present_description = true && this.isSetDescription();
11557
      boolean that_present_description = true && that.isSetDescription();
11558
      if (this_present_description || that_present_description) {
11559
        if (!(this_present_description && that_present_description))
11560
          return false;
11561
        if (!this.description.equals(that.description))
11562
          return false;
11563
      }
11564
 
68 ashish 11565
      return true;
11566
    }
11567
 
11568
    @Override
11569
    public int hashCode() {
11570
      return 0;
11571
    }
11572
 
483 rajveer 11573
    public int compareTo(changeOrderStatus_args other) {
11574
      if (!getClass().equals(other.getClass())) {
11575
        return getClass().getName().compareTo(other.getClass().getName());
68 ashish 11576
      }
11577
 
483 rajveer 11578
      int lastComparison = 0;
11579
      changeOrderStatus_args typedOther = (changeOrderStatus_args)other;
68 ashish 11580
 
483 rajveer 11581
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
11582
      if (lastComparison != 0) {
11583
        return lastComparison;
68 ashish 11584
      }
483 rajveer 11585
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
11586
      if (lastComparison != 0) {
11587
        return lastComparison;
68 ashish 11588
      }
483 rajveer 11589
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
11590
      if (lastComparison != 0) {
11591
        return lastComparison;
68 ashish 11592
      }
483 rajveer 11593
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
11594
      if (lastComparison != 0) {
11595
        return lastComparison;
68 ashish 11596
      }
483 rajveer 11597
      lastComparison = Boolean.valueOf(isSetDescription()).compareTo(isSetDescription());
11598
      if (lastComparison != 0) {
11599
        return lastComparison;
68 ashish 11600
      }
483 rajveer 11601
      lastComparison = TBaseHelper.compareTo(description, typedOther.description);
11602
      if (lastComparison != 0) {
11603
        return lastComparison;
68 ashish 11604
      }
11605
      return 0;
11606
    }
11607
 
11608
    public void read(TProtocol iprot) throws TException {
11609
      TField field;
11610
      iprot.readStructBegin();
11611
      while (true)
11612
      {
11613
        field = iprot.readFieldBegin();
11614
        if (field.type == TType.STOP) { 
11615
          break;
11616
        }
11617
        _Fields fieldId = _Fields.findByThriftId(field.id);
11618
        if (fieldId == null) {
11619
          TProtocolUtil.skip(iprot, field.type);
11620
        } else {
11621
          switch (fieldId) {
483 rajveer 11622
            case ORDER_ID:
68 ashish 11623
              if (field.type == TType.I64) {
483 rajveer 11624
                this.orderId = iprot.readI64();
11625
                setOrderIdIsSet(true);
68 ashish 11626
              } else { 
11627
                TProtocolUtil.skip(iprot, field.type);
11628
              }
11629
              break;
483 rajveer 11630
            case STATUS:
11631
              if (field.type == TType.I32) {
11632
                this.status = OrderStatus.findByValue(iprot.readI32());
68 ashish 11633
              } else { 
11634
                TProtocolUtil.skip(iprot, field.type);
11635
              }
11636
              break;
483 rajveer 11637
            case DESCRIPTION:
11638
              if (field.type == TType.STRING) {
11639
                this.description = iprot.readString();
11640
              } else { 
11641
                TProtocolUtil.skip(iprot, field.type);
11642
              }
11643
              break;
68 ashish 11644
          }
11645
          iprot.readFieldEnd();
11646
        }
11647
      }
11648
      iprot.readStructEnd();
11649
      validate();
11650
    }
11651
 
11652
    public void write(TProtocol oprot) throws TException {
11653
      validate();
11654
 
11655
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 11656
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
11657
      oprot.writeI64(this.orderId);
68 ashish 11658
      oprot.writeFieldEnd();
483 rajveer 11659
      if (this.status != null) {
11660
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
11661
        oprot.writeI32(this.status.getValue());
68 ashish 11662
        oprot.writeFieldEnd();
11663
      }
483 rajveer 11664
      if (this.description != null) {
11665
        oprot.writeFieldBegin(DESCRIPTION_FIELD_DESC);
11666
        oprot.writeString(this.description);
11667
        oprot.writeFieldEnd();
11668
      }
68 ashish 11669
      oprot.writeFieldStop();
11670
      oprot.writeStructEnd();
11671
    }
11672
 
11673
    @Override
11674
    public String toString() {
483 rajveer 11675
      StringBuilder sb = new StringBuilder("changeOrderStatus_args(");
68 ashish 11676
      boolean first = true;
11677
 
483 rajveer 11678
      sb.append("orderId:");
11679
      sb.append(this.orderId);
68 ashish 11680
      first = false;
11681
      if (!first) sb.append(", ");
483 rajveer 11682
      sb.append("status:");
11683
      if (this.status == null) {
68 ashish 11684
        sb.append("null");
11685
      } else {
483 rajveer 11686
        String status_name = status.name();
11687
        if (status_name != null) {
11688
          sb.append(status_name);
11689
          sb.append(" (");
11690
        }
11691
        sb.append(this.status);
11692
        if (status_name != null) {
11693
          sb.append(")");
11694
        }
68 ashish 11695
      }
11696
      first = false;
483 rajveer 11697
      if (!first) sb.append(", ");
11698
      sb.append("description:");
11699
      if (this.description == null) {
11700
        sb.append("null");
11701
      } else {
11702
        sb.append(this.description);
11703
      }
11704
      first = false;
68 ashish 11705
      sb.append(")");
11706
      return sb.toString();
11707
    }
11708
 
11709
    public void validate() throws TException {
11710
      // check for required fields
11711
    }
11712
 
11713
  }
11714
 
483 rajveer 11715
  public static class changeOrderStatus_result implements TBase<changeOrderStatus_result._Fields>, java.io.Serializable, Cloneable, Comparable<changeOrderStatus_result>   {
11716
    private static final TStruct STRUCT_DESC = new TStruct("changeOrderStatus_result");
68 ashish 11717
 
11718
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
11719
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
11720
 
11721
    private boolean success;
11722
    private TransactionServiceException ex;
11723
 
11724
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
11725
    public enum _Fields implements TFieldIdEnum {
11726
      SUCCESS((short)0, "success"),
11727
      EX((short)1, "ex");
11728
 
11729
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
11730
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
11731
 
11732
      static {
11733
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
11734
          byId.put((int)field._thriftId, field);
11735
          byName.put(field.getFieldName(), field);
11736
        }
11737
      }
11738
 
11739
      /**
11740
       * Find the _Fields constant that matches fieldId, or null if its not found.
11741
       */
11742
      public static _Fields findByThriftId(int fieldId) {
11743
        return byId.get(fieldId);
11744
      }
11745
 
11746
      /**
11747
       * Find the _Fields constant that matches fieldId, throwing an exception
11748
       * if it is not found.
11749
       */
11750
      public static _Fields findByThriftIdOrThrow(int fieldId) {
11751
        _Fields fields = findByThriftId(fieldId);
11752
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
11753
        return fields;
11754
      }
11755
 
11756
      /**
11757
       * Find the _Fields constant that matches name, or null if its not found.
11758
       */
11759
      public static _Fields findByName(String name) {
11760
        return byName.get(name);
11761
      }
11762
 
11763
      private final short _thriftId;
11764
      private final String _fieldName;
11765
 
11766
      _Fields(short thriftId, String fieldName) {
11767
        _thriftId = thriftId;
11768
        _fieldName = fieldName;
11769
      }
11770
 
11771
      public short getThriftFieldId() {
11772
        return _thriftId;
11773
      }
11774
 
11775
      public String getFieldName() {
11776
        return _fieldName;
11777
      }
11778
    }
11779
 
11780
    // isset id assignments
11781
    private static final int __SUCCESS_ISSET_ID = 0;
11782
    private BitSet __isset_bit_vector = new BitSet(1);
11783
 
11784
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
11785
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
11786
          new FieldValueMetaData(TType.BOOL)));
11787
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
11788
          new FieldValueMetaData(TType.STRUCT)));
11789
    }});
11790
 
11791
    static {
483 rajveer 11792
      FieldMetaData.addStructMetaDataMap(changeOrderStatus_result.class, metaDataMap);
68 ashish 11793
    }
11794
 
483 rajveer 11795
    public changeOrderStatus_result() {
68 ashish 11796
    }
11797
 
483 rajveer 11798
    public changeOrderStatus_result(
68 ashish 11799
      boolean success,
11800
      TransactionServiceException ex)
11801
    {
11802
      this();
11803
      this.success = success;
11804
      setSuccessIsSet(true);
11805
      this.ex = ex;
11806
    }
11807
 
11808
    /**
11809
     * Performs a deep copy on <i>other</i>.
11810
     */
483 rajveer 11811
    public changeOrderStatus_result(changeOrderStatus_result other) {
68 ashish 11812
      __isset_bit_vector.clear();
11813
      __isset_bit_vector.or(other.__isset_bit_vector);
11814
      this.success = other.success;
11815
      if (other.isSetEx()) {
11816
        this.ex = new TransactionServiceException(other.ex);
11817
      }
11818
    }
11819
 
483 rajveer 11820
    public changeOrderStatus_result deepCopy() {
11821
      return new changeOrderStatus_result(this);
68 ashish 11822
    }
11823
 
11824
    @Deprecated
483 rajveer 11825
    public changeOrderStatus_result clone() {
11826
      return new changeOrderStatus_result(this);
68 ashish 11827
    }
11828
 
11829
    public boolean isSuccess() {
11830
      return this.success;
11831
    }
11832
 
483 rajveer 11833
    public changeOrderStatus_result setSuccess(boolean success) {
68 ashish 11834
      this.success = success;
11835
      setSuccessIsSet(true);
11836
      return this;
11837
    }
11838
 
11839
    public void unsetSuccess() {
11840
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
11841
    }
11842
 
11843
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
11844
    public boolean isSetSuccess() {
11845
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
11846
    }
11847
 
11848
    public void setSuccessIsSet(boolean value) {
11849
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
11850
    }
11851
 
11852
    public TransactionServiceException getEx() {
11853
      return this.ex;
11854
    }
11855
 
483 rajveer 11856
    public changeOrderStatus_result setEx(TransactionServiceException ex) {
68 ashish 11857
      this.ex = ex;
11858
      return this;
11859
    }
11860
 
11861
    public void unsetEx() {
11862
      this.ex = null;
11863
    }
11864
 
11865
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
11866
    public boolean isSetEx() {
11867
      return this.ex != null;
11868
    }
11869
 
11870
    public void setExIsSet(boolean value) {
11871
      if (!value) {
11872
        this.ex = null;
11873
      }
11874
    }
11875
 
11876
    public void setFieldValue(_Fields field, Object value) {
11877
      switch (field) {
11878
      case SUCCESS:
11879
        if (value == null) {
11880
          unsetSuccess();
11881
        } else {
11882
          setSuccess((Boolean)value);
11883
        }
11884
        break;
11885
 
11886
      case EX:
11887
        if (value == null) {
11888
          unsetEx();
11889
        } else {
11890
          setEx((TransactionServiceException)value);
11891
        }
11892
        break;
11893
 
11894
      }
11895
    }
11896
 
11897
    public void setFieldValue(int fieldID, Object value) {
11898
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
11899
    }
11900
 
11901
    public Object getFieldValue(_Fields field) {
11902
      switch (field) {
11903
      case SUCCESS:
11904
        return new Boolean(isSuccess());
11905
 
11906
      case EX:
11907
        return getEx();
11908
 
11909
      }
11910
      throw new IllegalStateException();
11911
    }
11912
 
11913
    public Object getFieldValue(int fieldId) {
11914
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
11915
    }
11916
 
11917
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
11918
    public boolean isSet(_Fields field) {
11919
      switch (field) {
11920
      case SUCCESS:
11921
        return isSetSuccess();
11922
      case EX:
11923
        return isSetEx();
11924
      }
11925
      throw new IllegalStateException();
11926
    }
11927
 
11928
    public boolean isSet(int fieldID) {
11929
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
11930
    }
11931
 
11932
    @Override
11933
    public boolean equals(Object that) {
11934
      if (that == null)
11935
        return false;
483 rajveer 11936
      if (that instanceof changeOrderStatus_result)
11937
        return this.equals((changeOrderStatus_result)that);
68 ashish 11938
      return false;
11939
    }
11940
 
483 rajveer 11941
    public boolean equals(changeOrderStatus_result that) {
68 ashish 11942
      if (that == null)
11943
        return false;
11944
 
11945
      boolean this_present_success = true;
11946
      boolean that_present_success = true;
11947
      if (this_present_success || that_present_success) {
11948
        if (!(this_present_success && that_present_success))
11949
          return false;
11950
        if (this.success != that.success)
11951
          return false;
11952
      }
11953
 
11954
      boolean this_present_ex = true && this.isSetEx();
11955
      boolean that_present_ex = true && that.isSetEx();
11956
      if (this_present_ex || that_present_ex) {
11957
        if (!(this_present_ex && that_present_ex))
11958
          return false;
11959
        if (!this.ex.equals(that.ex))
11960
          return false;
11961
      }
11962
 
11963
      return true;
11964
    }
11965
 
11966
    @Override
11967
    public int hashCode() {
11968
      return 0;
11969
    }
11970
 
483 rajveer 11971
    public int compareTo(changeOrderStatus_result other) {
68 ashish 11972
      if (!getClass().equals(other.getClass())) {
11973
        return getClass().getName().compareTo(other.getClass().getName());
11974
      }
11975
 
11976
      int lastComparison = 0;
483 rajveer 11977
      changeOrderStatus_result typedOther = (changeOrderStatus_result)other;
68 ashish 11978
 
11979
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
11980
      if (lastComparison != 0) {
11981
        return lastComparison;
11982
      }
11983
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
11984
      if (lastComparison != 0) {
11985
        return lastComparison;
11986
      }
11987
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
11988
      if (lastComparison != 0) {
11989
        return lastComparison;
11990
      }
11991
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
11992
      if (lastComparison != 0) {
11993
        return lastComparison;
11994
      }
11995
      return 0;
11996
    }
11997
 
11998
    public void read(TProtocol iprot) throws TException {
11999
      TField field;
12000
      iprot.readStructBegin();
12001
      while (true)
12002
      {
12003
        field = iprot.readFieldBegin();
12004
        if (field.type == TType.STOP) { 
12005
          break;
12006
        }
12007
        _Fields fieldId = _Fields.findByThriftId(field.id);
12008
        if (fieldId == null) {
12009
          TProtocolUtil.skip(iprot, field.type);
12010
        } else {
12011
          switch (fieldId) {
12012
            case SUCCESS:
12013
              if (field.type == TType.BOOL) {
12014
                this.success = iprot.readBool();
12015
                setSuccessIsSet(true);
12016
              } else { 
12017
                TProtocolUtil.skip(iprot, field.type);
12018
              }
12019
              break;
12020
            case EX:
12021
              if (field.type == TType.STRUCT) {
12022
                this.ex = new TransactionServiceException();
12023
                this.ex.read(iprot);
12024
              } else { 
12025
                TProtocolUtil.skip(iprot, field.type);
12026
              }
12027
              break;
12028
          }
12029
          iprot.readFieldEnd();
12030
        }
12031
      }
12032
      iprot.readStructEnd();
12033
      validate();
12034
    }
12035
 
12036
    public void write(TProtocol oprot) throws TException {
12037
      oprot.writeStructBegin(STRUCT_DESC);
12038
 
12039
      if (this.isSetSuccess()) {
12040
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12041
        oprot.writeBool(this.success);
12042
        oprot.writeFieldEnd();
12043
      } else if (this.isSetEx()) {
12044
        oprot.writeFieldBegin(EX_FIELD_DESC);
12045
        this.ex.write(oprot);
12046
        oprot.writeFieldEnd();
12047
      }
12048
      oprot.writeFieldStop();
12049
      oprot.writeStructEnd();
12050
    }
12051
 
12052
    @Override
12053
    public String toString() {
483 rajveer 12054
      StringBuilder sb = new StringBuilder("changeOrderStatus_result(");
68 ashish 12055
      boolean first = true;
12056
 
12057
      sb.append("success:");
12058
      sb.append(this.success);
12059
      first = false;
12060
      if (!first) sb.append(", ");
12061
      sb.append("ex:");
12062
      if (this.ex == null) {
12063
        sb.append("null");
12064
      } else {
12065
        sb.append(this.ex);
12066
      }
12067
      first = false;
12068
      sb.append(")");
12069
      return sb.toString();
12070
    }
12071
 
12072
    public void validate() throws TException {
12073
      // check for required fields
12074
    }
12075
 
12076
  }
12077
 
495 rajveer 12078
  public static class addBillingDetails_args implements TBase<addBillingDetails_args._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_args>   {
12079
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_args");
12080
 
12081
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12082
    private static final TField INVOICE_NUMBER_FIELD_DESC = new TField("invoice_number", TType.STRING, (short)2);
1148 chandransh 12083
    private static final TField BILLED_BY_FIELD_DESC = new TField("billed_by", TType.STRING, (short)3);
495 rajveer 12084
 
12085
    private long orderId;
12086
    private String invoice_number;
12087
    private String billed_by;
12088
 
12089
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12090
    public enum _Fields implements TFieldIdEnum {
12091
      ORDER_ID((short)1, "orderId"),
12092
      INVOICE_NUMBER((short)2, "invoice_number"),
1148 chandransh 12093
      BILLED_BY((short)3, "billed_by");
495 rajveer 12094
 
12095
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12096
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12097
 
12098
      static {
12099
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12100
          byId.put((int)field._thriftId, field);
12101
          byName.put(field.getFieldName(), field);
12102
        }
12103
      }
12104
 
12105
      /**
12106
       * Find the _Fields constant that matches fieldId, or null if its not found.
12107
       */
12108
      public static _Fields findByThriftId(int fieldId) {
12109
        return byId.get(fieldId);
12110
      }
12111
 
12112
      /**
12113
       * Find the _Fields constant that matches fieldId, throwing an exception
12114
       * if it is not found.
12115
       */
12116
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12117
        _Fields fields = findByThriftId(fieldId);
12118
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12119
        return fields;
12120
      }
12121
 
12122
      /**
12123
       * Find the _Fields constant that matches name, or null if its not found.
12124
       */
12125
      public static _Fields findByName(String name) {
12126
        return byName.get(name);
12127
      }
12128
 
12129
      private final short _thriftId;
12130
      private final String _fieldName;
12131
 
12132
      _Fields(short thriftId, String fieldName) {
12133
        _thriftId = thriftId;
12134
        _fieldName = fieldName;
12135
      }
12136
 
12137
      public short getThriftFieldId() {
12138
        return _thriftId;
12139
      }
12140
 
12141
      public String getFieldName() {
12142
        return _fieldName;
12143
      }
12144
    }
12145
 
12146
    // isset id assignments
12147
    private static final int __ORDERID_ISSET_ID = 0;
1148 chandransh 12148
    private BitSet __isset_bit_vector = new BitSet(1);
495 rajveer 12149
 
12150
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12151
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12152
          new FieldValueMetaData(TType.I64)));
12153
      put(_Fields.INVOICE_NUMBER, new FieldMetaData("invoice_number", TFieldRequirementType.DEFAULT, 
12154
          new FieldValueMetaData(TType.STRING)));
12155
      put(_Fields.BILLED_BY, new FieldMetaData("billed_by", TFieldRequirementType.DEFAULT, 
12156
          new FieldValueMetaData(TType.STRING)));
12157
    }});
12158
 
12159
    static {
12160
      FieldMetaData.addStructMetaDataMap(addBillingDetails_args.class, metaDataMap);
12161
    }
12162
 
12163
    public addBillingDetails_args() {
12164
    }
12165
 
12166
    public addBillingDetails_args(
12167
      long orderId,
12168
      String invoice_number,
12169
      String billed_by)
12170
    {
12171
      this();
12172
      this.orderId = orderId;
12173
      setOrderIdIsSet(true);
12174
      this.invoice_number = invoice_number;
12175
      this.billed_by = billed_by;
12176
    }
12177
 
12178
    /**
12179
     * Performs a deep copy on <i>other</i>.
12180
     */
12181
    public addBillingDetails_args(addBillingDetails_args other) {
12182
      __isset_bit_vector.clear();
12183
      __isset_bit_vector.or(other.__isset_bit_vector);
12184
      this.orderId = other.orderId;
12185
      if (other.isSetInvoice_number()) {
12186
        this.invoice_number = other.invoice_number;
12187
      }
12188
      if (other.isSetBilled_by()) {
12189
        this.billed_by = other.billed_by;
12190
      }
12191
    }
12192
 
12193
    public addBillingDetails_args deepCopy() {
12194
      return new addBillingDetails_args(this);
12195
    }
12196
 
12197
    @Deprecated
12198
    public addBillingDetails_args clone() {
12199
      return new addBillingDetails_args(this);
12200
    }
12201
 
12202
    public long getOrderId() {
12203
      return this.orderId;
12204
    }
12205
 
12206
    public addBillingDetails_args setOrderId(long orderId) {
12207
      this.orderId = orderId;
12208
      setOrderIdIsSet(true);
12209
      return this;
12210
    }
12211
 
12212
    public void unsetOrderId() {
12213
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
12214
    }
12215
 
12216
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
12217
    public boolean isSetOrderId() {
12218
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
12219
    }
12220
 
12221
    public void setOrderIdIsSet(boolean value) {
12222
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
12223
    }
12224
 
12225
    public String getInvoice_number() {
12226
      return this.invoice_number;
12227
    }
12228
 
12229
    public addBillingDetails_args setInvoice_number(String invoice_number) {
12230
      this.invoice_number = invoice_number;
12231
      return this;
12232
    }
12233
 
12234
    public void unsetInvoice_number() {
12235
      this.invoice_number = null;
12236
    }
12237
 
12238
    /** Returns true if field invoice_number is set (has been asigned a value) and false otherwise */
12239
    public boolean isSetInvoice_number() {
12240
      return this.invoice_number != null;
12241
    }
12242
 
12243
    public void setInvoice_numberIsSet(boolean value) {
12244
      if (!value) {
12245
        this.invoice_number = null;
12246
      }
12247
    }
12248
 
12249
    public String getBilled_by() {
12250
      return this.billed_by;
12251
    }
12252
 
12253
    public addBillingDetails_args setBilled_by(String billed_by) {
12254
      this.billed_by = billed_by;
12255
      return this;
12256
    }
12257
 
12258
    public void unsetBilled_by() {
12259
      this.billed_by = null;
12260
    }
12261
 
12262
    /** Returns true if field billed_by is set (has been asigned a value) and false otherwise */
12263
    public boolean isSetBilled_by() {
12264
      return this.billed_by != null;
12265
    }
12266
 
12267
    public void setBilled_byIsSet(boolean value) {
12268
      if (!value) {
12269
        this.billed_by = null;
12270
      }
12271
    }
12272
 
12273
    public void setFieldValue(_Fields field, Object value) {
12274
      switch (field) {
12275
      case ORDER_ID:
12276
        if (value == null) {
12277
          unsetOrderId();
12278
        } else {
12279
          setOrderId((Long)value);
12280
        }
12281
        break;
12282
 
12283
      case INVOICE_NUMBER:
12284
        if (value == null) {
12285
          unsetInvoice_number();
12286
        } else {
12287
          setInvoice_number((String)value);
12288
        }
12289
        break;
12290
 
12291
      case BILLED_BY:
12292
        if (value == null) {
12293
          unsetBilled_by();
12294
        } else {
12295
          setBilled_by((String)value);
12296
        }
12297
        break;
12298
 
12299
      }
12300
    }
12301
 
12302
    public void setFieldValue(int fieldID, Object value) {
12303
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12304
    }
12305
 
12306
    public Object getFieldValue(_Fields field) {
12307
      switch (field) {
12308
      case ORDER_ID:
12309
        return new Long(getOrderId());
12310
 
12311
      case INVOICE_NUMBER:
12312
        return getInvoice_number();
12313
 
12314
      case BILLED_BY:
12315
        return getBilled_by();
12316
 
12317
      }
12318
      throw new IllegalStateException();
12319
    }
12320
 
12321
    public Object getFieldValue(int fieldId) {
12322
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12323
    }
12324
 
12325
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12326
    public boolean isSet(_Fields field) {
12327
      switch (field) {
12328
      case ORDER_ID:
12329
        return isSetOrderId();
12330
      case INVOICE_NUMBER:
12331
        return isSetInvoice_number();
12332
      case BILLED_BY:
12333
        return isSetBilled_by();
12334
      }
12335
      throw new IllegalStateException();
12336
    }
12337
 
12338
    public boolean isSet(int fieldID) {
12339
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12340
    }
12341
 
12342
    @Override
12343
    public boolean equals(Object that) {
12344
      if (that == null)
12345
        return false;
12346
      if (that instanceof addBillingDetails_args)
12347
        return this.equals((addBillingDetails_args)that);
12348
      return false;
12349
    }
12350
 
12351
    public boolean equals(addBillingDetails_args that) {
12352
      if (that == null)
12353
        return false;
12354
 
12355
      boolean this_present_orderId = true;
12356
      boolean that_present_orderId = true;
12357
      if (this_present_orderId || that_present_orderId) {
12358
        if (!(this_present_orderId && that_present_orderId))
12359
          return false;
12360
        if (this.orderId != that.orderId)
12361
          return false;
12362
      }
12363
 
12364
      boolean this_present_invoice_number = true && this.isSetInvoice_number();
12365
      boolean that_present_invoice_number = true && that.isSetInvoice_number();
12366
      if (this_present_invoice_number || that_present_invoice_number) {
12367
        if (!(this_present_invoice_number && that_present_invoice_number))
12368
          return false;
12369
        if (!this.invoice_number.equals(that.invoice_number))
12370
          return false;
12371
      }
12372
 
12373
      boolean this_present_billed_by = true && this.isSetBilled_by();
12374
      boolean that_present_billed_by = true && that.isSetBilled_by();
12375
      if (this_present_billed_by || that_present_billed_by) {
12376
        if (!(this_present_billed_by && that_present_billed_by))
12377
          return false;
12378
        if (!this.billed_by.equals(that.billed_by))
12379
          return false;
12380
      }
12381
 
12382
      return true;
12383
    }
12384
 
12385
    @Override
12386
    public int hashCode() {
12387
      return 0;
12388
    }
12389
 
12390
    public int compareTo(addBillingDetails_args other) {
12391
      if (!getClass().equals(other.getClass())) {
12392
        return getClass().getName().compareTo(other.getClass().getName());
12393
      }
12394
 
12395
      int lastComparison = 0;
12396
      addBillingDetails_args typedOther = (addBillingDetails_args)other;
12397
 
12398
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
12399
      if (lastComparison != 0) {
12400
        return lastComparison;
12401
      }
12402
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
12403
      if (lastComparison != 0) {
12404
        return lastComparison;
12405
      }
12406
      lastComparison = Boolean.valueOf(isSetInvoice_number()).compareTo(isSetInvoice_number());
12407
      if (lastComparison != 0) {
12408
        return lastComparison;
12409
      }
12410
      lastComparison = TBaseHelper.compareTo(invoice_number, typedOther.invoice_number);
12411
      if (lastComparison != 0) {
12412
        return lastComparison;
12413
      }
12414
      lastComparison = Boolean.valueOf(isSetBilled_by()).compareTo(isSetBilled_by());
12415
      if (lastComparison != 0) {
12416
        return lastComparison;
12417
      }
12418
      lastComparison = TBaseHelper.compareTo(billed_by, typedOther.billed_by);
12419
      if (lastComparison != 0) {
12420
        return lastComparison;
12421
      }
12422
      return 0;
12423
    }
12424
 
12425
    public void read(TProtocol iprot) throws TException {
12426
      TField field;
12427
      iprot.readStructBegin();
12428
      while (true)
12429
      {
12430
        field = iprot.readFieldBegin();
12431
        if (field.type == TType.STOP) { 
12432
          break;
12433
        }
12434
        _Fields fieldId = _Fields.findByThriftId(field.id);
12435
        if (fieldId == null) {
12436
          TProtocolUtil.skip(iprot, field.type);
12437
        } else {
12438
          switch (fieldId) {
12439
            case ORDER_ID:
12440
              if (field.type == TType.I64) {
12441
                this.orderId = iprot.readI64();
12442
                setOrderIdIsSet(true);
12443
              } else { 
12444
                TProtocolUtil.skip(iprot, field.type);
12445
              }
12446
              break;
12447
            case INVOICE_NUMBER:
12448
              if (field.type == TType.STRING) {
12449
                this.invoice_number = iprot.readString();
12450
              } else { 
12451
                TProtocolUtil.skip(iprot, field.type);
12452
              }
12453
              break;
12454
            case BILLED_BY:
12455
              if (field.type == TType.STRING) {
12456
                this.billed_by = iprot.readString();
12457
              } else { 
12458
                TProtocolUtil.skip(iprot, field.type);
12459
              }
12460
              break;
12461
          }
12462
          iprot.readFieldEnd();
12463
        }
12464
      }
12465
      iprot.readStructEnd();
12466
      validate();
12467
    }
12468
 
12469
    public void write(TProtocol oprot) throws TException {
12470
      validate();
12471
 
12472
      oprot.writeStructBegin(STRUCT_DESC);
12473
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
12474
      oprot.writeI64(this.orderId);
12475
      oprot.writeFieldEnd();
12476
      if (this.invoice_number != null) {
12477
        oprot.writeFieldBegin(INVOICE_NUMBER_FIELD_DESC);
12478
        oprot.writeString(this.invoice_number);
12479
        oprot.writeFieldEnd();
12480
      }
12481
      if (this.billed_by != null) {
12482
        oprot.writeFieldBegin(BILLED_BY_FIELD_DESC);
12483
        oprot.writeString(this.billed_by);
12484
        oprot.writeFieldEnd();
12485
      }
12486
      oprot.writeFieldStop();
12487
      oprot.writeStructEnd();
12488
    }
12489
 
12490
    @Override
12491
    public String toString() {
12492
      StringBuilder sb = new StringBuilder("addBillingDetails_args(");
12493
      boolean first = true;
12494
 
12495
      sb.append("orderId:");
12496
      sb.append(this.orderId);
12497
      first = false;
12498
      if (!first) sb.append(", ");
12499
      sb.append("invoice_number:");
12500
      if (this.invoice_number == null) {
12501
        sb.append("null");
12502
      } else {
12503
        sb.append(this.invoice_number);
12504
      }
12505
      first = false;
12506
      if (!first) sb.append(", ");
12507
      sb.append("billed_by:");
12508
      if (this.billed_by == null) {
12509
        sb.append("null");
12510
      } else {
12511
        sb.append(this.billed_by);
12512
      }
12513
      first = false;
12514
      sb.append(")");
12515
      return sb.toString();
12516
    }
12517
 
12518
    public void validate() throws TException {
12519
      // check for required fields
12520
    }
12521
 
12522
  }
12523
 
12524
  public static class addBillingDetails_result implements TBase<addBillingDetails_result._Fields>, java.io.Serializable, Cloneable, Comparable<addBillingDetails_result>   {
12525
    private static final TStruct STRUCT_DESC = new TStruct("addBillingDetails_result");
12526
 
12527
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
12528
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
12529
 
12530
    private boolean success;
12531
    private TransactionServiceException ex;
12532
 
12533
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12534
    public enum _Fields implements TFieldIdEnum {
12535
      SUCCESS((short)0, "success"),
12536
      EX((short)1, "ex");
12537
 
12538
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12539
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12540
 
12541
      static {
12542
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12543
          byId.put((int)field._thriftId, field);
12544
          byName.put(field.getFieldName(), field);
12545
        }
12546
      }
12547
 
12548
      /**
12549
       * Find the _Fields constant that matches fieldId, or null if its not found.
12550
       */
12551
      public static _Fields findByThriftId(int fieldId) {
12552
        return byId.get(fieldId);
12553
      }
12554
 
12555
      /**
12556
       * Find the _Fields constant that matches fieldId, throwing an exception
12557
       * if it is not found.
12558
       */
12559
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12560
        _Fields fields = findByThriftId(fieldId);
12561
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12562
        return fields;
12563
      }
12564
 
12565
      /**
12566
       * Find the _Fields constant that matches name, or null if its not found.
12567
       */
12568
      public static _Fields findByName(String name) {
12569
        return byName.get(name);
12570
      }
12571
 
12572
      private final short _thriftId;
12573
      private final String _fieldName;
12574
 
12575
      _Fields(short thriftId, String fieldName) {
12576
        _thriftId = thriftId;
12577
        _fieldName = fieldName;
12578
      }
12579
 
12580
      public short getThriftFieldId() {
12581
        return _thriftId;
12582
      }
12583
 
12584
      public String getFieldName() {
12585
        return _fieldName;
12586
      }
12587
    }
12588
 
12589
    // isset id assignments
12590
    private static final int __SUCCESS_ISSET_ID = 0;
12591
    private BitSet __isset_bit_vector = new BitSet(1);
12592
 
12593
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12594
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
12595
          new FieldValueMetaData(TType.BOOL)));
12596
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
12597
          new FieldValueMetaData(TType.STRUCT)));
12598
    }});
12599
 
12600
    static {
12601
      FieldMetaData.addStructMetaDataMap(addBillingDetails_result.class, metaDataMap);
12602
    }
12603
 
12604
    public addBillingDetails_result() {
12605
    }
12606
 
12607
    public addBillingDetails_result(
12608
      boolean success,
12609
      TransactionServiceException ex)
12610
    {
12611
      this();
12612
      this.success = success;
12613
      setSuccessIsSet(true);
12614
      this.ex = ex;
12615
    }
12616
 
12617
    /**
12618
     * Performs a deep copy on <i>other</i>.
12619
     */
12620
    public addBillingDetails_result(addBillingDetails_result other) {
12621
      __isset_bit_vector.clear();
12622
      __isset_bit_vector.or(other.__isset_bit_vector);
12623
      this.success = other.success;
12624
      if (other.isSetEx()) {
12625
        this.ex = new TransactionServiceException(other.ex);
12626
      }
12627
    }
12628
 
12629
    public addBillingDetails_result deepCopy() {
12630
      return new addBillingDetails_result(this);
12631
    }
12632
 
12633
    @Deprecated
12634
    public addBillingDetails_result clone() {
12635
      return new addBillingDetails_result(this);
12636
    }
12637
 
12638
    public boolean isSuccess() {
12639
      return this.success;
12640
    }
12641
 
12642
    public addBillingDetails_result setSuccess(boolean success) {
12643
      this.success = success;
12644
      setSuccessIsSet(true);
12645
      return this;
12646
    }
12647
 
12648
    public void unsetSuccess() {
12649
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
12650
    }
12651
 
12652
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
12653
    public boolean isSetSuccess() {
12654
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
12655
    }
12656
 
12657
    public void setSuccessIsSet(boolean value) {
12658
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
12659
    }
12660
 
12661
    public TransactionServiceException getEx() {
12662
      return this.ex;
12663
    }
12664
 
12665
    public addBillingDetails_result setEx(TransactionServiceException ex) {
12666
      this.ex = ex;
12667
      return this;
12668
    }
12669
 
12670
    public void unsetEx() {
12671
      this.ex = null;
12672
    }
12673
 
12674
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
12675
    public boolean isSetEx() {
12676
      return this.ex != null;
12677
    }
12678
 
12679
    public void setExIsSet(boolean value) {
12680
      if (!value) {
12681
        this.ex = null;
12682
      }
12683
    }
12684
 
12685
    public void setFieldValue(_Fields field, Object value) {
12686
      switch (field) {
12687
      case SUCCESS:
12688
        if (value == null) {
12689
          unsetSuccess();
12690
        } else {
12691
          setSuccess((Boolean)value);
12692
        }
12693
        break;
12694
 
12695
      case EX:
12696
        if (value == null) {
12697
          unsetEx();
12698
        } else {
12699
          setEx((TransactionServiceException)value);
12700
        }
12701
        break;
12702
 
12703
      }
12704
    }
12705
 
12706
    public void setFieldValue(int fieldID, Object value) {
12707
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
12708
    }
12709
 
12710
    public Object getFieldValue(_Fields field) {
12711
      switch (field) {
12712
      case SUCCESS:
12713
        return new Boolean(isSuccess());
12714
 
12715
      case EX:
12716
        return getEx();
12717
 
12718
      }
12719
      throw new IllegalStateException();
12720
    }
12721
 
12722
    public Object getFieldValue(int fieldId) {
12723
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
12724
    }
12725
 
12726
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
12727
    public boolean isSet(_Fields field) {
12728
      switch (field) {
12729
      case SUCCESS:
12730
        return isSetSuccess();
12731
      case EX:
12732
        return isSetEx();
12733
      }
12734
      throw new IllegalStateException();
12735
    }
12736
 
12737
    public boolean isSet(int fieldID) {
12738
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
12739
    }
12740
 
12741
    @Override
12742
    public boolean equals(Object that) {
12743
      if (that == null)
12744
        return false;
12745
      if (that instanceof addBillingDetails_result)
12746
        return this.equals((addBillingDetails_result)that);
12747
      return false;
12748
    }
12749
 
12750
    public boolean equals(addBillingDetails_result that) {
12751
      if (that == null)
12752
        return false;
12753
 
12754
      boolean this_present_success = true;
12755
      boolean that_present_success = true;
12756
      if (this_present_success || that_present_success) {
12757
        if (!(this_present_success && that_present_success))
12758
          return false;
12759
        if (this.success != that.success)
12760
          return false;
12761
      }
12762
 
12763
      boolean this_present_ex = true && this.isSetEx();
12764
      boolean that_present_ex = true && that.isSetEx();
12765
      if (this_present_ex || that_present_ex) {
12766
        if (!(this_present_ex && that_present_ex))
12767
          return false;
12768
        if (!this.ex.equals(that.ex))
12769
          return false;
12770
      }
12771
 
12772
      return true;
12773
    }
12774
 
12775
    @Override
12776
    public int hashCode() {
12777
      return 0;
12778
    }
12779
 
12780
    public int compareTo(addBillingDetails_result other) {
12781
      if (!getClass().equals(other.getClass())) {
12782
        return getClass().getName().compareTo(other.getClass().getName());
12783
      }
12784
 
12785
      int lastComparison = 0;
12786
      addBillingDetails_result typedOther = (addBillingDetails_result)other;
12787
 
12788
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
12789
      if (lastComparison != 0) {
12790
        return lastComparison;
12791
      }
12792
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
12793
      if (lastComparison != 0) {
12794
        return lastComparison;
12795
      }
12796
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
12797
      if (lastComparison != 0) {
12798
        return lastComparison;
12799
      }
12800
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
12801
      if (lastComparison != 0) {
12802
        return lastComparison;
12803
      }
12804
      return 0;
12805
    }
12806
 
12807
    public void read(TProtocol iprot) throws TException {
12808
      TField field;
12809
      iprot.readStructBegin();
12810
      while (true)
12811
      {
12812
        field = iprot.readFieldBegin();
12813
        if (field.type == TType.STOP) { 
12814
          break;
12815
        }
12816
        _Fields fieldId = _Fields.findByThriftId(field.id);
12817
        if (fieldId == null) {
12818
          TProtocolUtil.skip(iprot, field.type);
12819
        } else {
12820
          switch (fieldId) {
12821
            case SUCCESS:
12822
              if (field.type == TType.BOOL) {
12823
                this.success = iprot.readBool();
12824
                setSuccessIsSet(true);
12825
              } else { 
12826
                TProtocolUtil.skip(iprot, field.type);
12827
              }
12828
              break;
12829
            case EX:
12830
              if (field.type == TType.STRUCT) {
12831
                this.ex = new TransactionServiceException();
12832
                this.ex.read(iprot);
12833
              } else { 
12834
                TProtocolUtil.skip(iprot, field.type);
12835
              }
12836
              break;
12837
          }
12838
          iprot.readFieldEnd();
12839
        }
12840
      }
12841
      iprot.readStructEnd();
12842
      validate();
12843
    }
12844
 
12845
    public void write(TProtocol oprot) throws TException {
12846
      oprot.writeStructBegin(STRUCT_DESC);
12847
 
12848
      if (this.isSetSuccess()) {
12849
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
12850
        oprot.writeBool(this.success);
12851
        oprot.writeFieldEnd();
12852
      } else if (this.isSetEx()) {
12853
        oprot.writeFieldBegin(EX_FIELD_DESC);
12854
        this.ex.write(oprot);
12855
        oprot.writeFieldEnd();
12856
      }
12857
      oprot.writeFieldStop();
12858
      oprot.writeStructEnd();
12859
    }
12860
 
12861
    @Override
12862
    public String toString() {
12863
      StringBuilder sb = new StringBuilder("addBillingDetails_result(");
12864
      boolean first = true;
12865
 
12866
      sb.append("success:");
12867
      sb.append(this.success);
12868
      first = false;
12869
      if (!first) sb.append(", ");
12870
      sb.append("ex:");
12871
      if (this.ex == null) {
12872
        sb.append("null");
12873
      } else {
12874
        sb.append(this.ex);
12875
      }
12876
      first = false;
12877
      sb.append(")");
12878
      return sb.toString();
12879
    }
12880
 
12881
    public void validate() throws TException {
12882
      // check for required fields
12883
    }
12884
 
12885
  }
12886
 
1148 chandransh 12887
  public static class addJacketNumber_args implements TBase<addJacketNumber_args._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_args>   {
12888
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_args");
12889
 
12890
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
12891
    private static final TField JACKET_NUMBER_FIELD_DESC = new TField("jacketNumber", TType.I64, (short)2);
12892
 
12893
    private long orderId;
12894
    private long jacketNumber;
12895
 
12896
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
12897
    public enum _Fields implements TFieldIdEnum {
12898
      ORDER_ID((short)1, "orderId"),
12899
      JACKET_NUMBER((short)2, "jacketNumber");
12900
 
12901
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
12902
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
12903
 
12904
      static {
12905
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
12906
          byId.put((int)field._thriftId, field);
12907
          byName.put(field.getFieldName(), field);
12908
        }
12909
      }
12910
 
12911
      /**
12912
       * Find the _Fields constant that matches fieldId, or null if its not found.
12913
       */
12914
      public static _Fields findByThriftId(int fieldId) {
12915
        return byId.get(fieldId);
12916
      }
12917
 
12918
      /**
12919
       * Find the _Fields constant that matches fieldId, throwing an exception
12920
       * if it is not found.
12921
       */
12922
      public static _Fields findByThriftIdOrThrow(int fieldId) {
12923
        _Fields fields = findByThriftId(fieldId);
12924
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
12925
        return fields;
12926
      }
12927
 
12928
      /**
12929
       * Find the _Fields constant that matches name, or null if its not found.
12930
       */
12931
      public static _Fields findByName(String name) {
12932
        return byName.get(name);
12933
      }
12934
 
12935
      private final short _thriftId;
12936
      private final String _fieldName;
12937
 
12938
      _Fields(short thriftId, String fieldName) {
12939
        _thriftId = thriftId;
12940
        _fieldName = fieldName;
12941
      }
12942
 
12943
      public short getThriftFieldId() {
12944
        return _thriftId;
12945
      }
12946
 
12947
      public String getFieldName() {
12948
        return _fieldName;
12949
      }
12950
    }
12951
 
12952
    // isset id assignments
12953
    private static final int __ORDERID_ISSET_ID = 0;
12954
    private static final int __JACKETNUMBER_ISSET_ID = 1;
12955
    private BitSet __isset_bit_vector = new BitSet(2);
12956
 
12957
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
12958
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
12959
          new FieldValueMetaData(TType.I64)));
12960
      put(_Fields.JACKET_NUMBER, new FieldMetaData("jacketNumber", TFieldRequirementType.DEFAULT, 
12961
          new FieldValueMetaData(TType.I64)));
12962
    }});
12963
 
12964
    static {
12965
      FieldMetaData.addStructMetaDataMap(addJacketNumber_args.class, metaDataMap);
12966
    }
12967
 
12968
    public addJacketNumber_args() {
12969
    }
12970
 
12971
    public addJacketNumber_args(
12972
      long orderId,
12973
      long jacketNumber)
12974
    {
12975
      this();
12976
      this.orderId = orderId;
12977
      setOrderIdIsSet(true);
12978
      this.jacketNumber = jacketNumber;
12979
      setJacketNumberIsSet(true);
12980
    }
12981
 
12982
    /**
12983
     * Performs a deep copy on <i>other</i>.
12984
     */
12985
    public addJacketNumber_args(addJacketNumber_args other) {
12986
      __isset_bit_vector.clear();
12987
      __isset_bit_vector.or(other.__isset_bit_vector);
12988
      this.orderId = other.orderId;
12989
      this.jacketNumber = other.jacketNumber;
12990
    }
12991
 
12992
    public addJacketNumber_args deepCopy() {
12993
      return new addJacketNumber_args(this);
12994
    }
12995
 
12996
    @Deprecated
12997
    public addJacketNumber_args clone() {
12998
      return new addJacketNumber_args(this);
12999
    }
13000
 
13001
    public long getOrderId() {
13002
      return this.orderId;
13003
    }
13004
 
13005
    public addJacketNumber_args setOrderId(long orderId) {
13006
      this.orderId = orderId;
13007
      setOrderIdIsSet(true);
13008
      return this;
13009
    }
13010
 
13011
    public void unsetOrderId() {
13012
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13013
    }
13014
 
13015
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13016
    public boolean isSetOrderId() {
13017
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13018
    }
13019
 
13020
    public void setOrderIdIsSet(boolean value) {
13021
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13022
    }
13023
 
13024
    public long getJacketNumber() {
13025
      return this.jacketNumber;
13026
    }
13027
 
13028
    public addJacketNumber_args setJacketNumber(long jacketNumber) {
13029
      this.jacketNumber = jacketNumber;
13030
      setJacketNumberIsSet(true);
13031
      return this;
13032
    }
13033
 
13034
    public void unsetJacketNumber() {
13035
      __isset_bit_vector.clear(__JACKETNUMBER_ISSET_ID);
13036
    }
13037
 
13038
    /** Returns true if field jacketNumber is set (has been asigned a value) and false otherwise */
13039
    public boolean isSetJacketNumber() {
13040
      return __isset_bit_vector.get(__JACKETNUMBER_ISSET_ID);
13041
    }
13042
 
13043
    public void setJacketNumberIsSet(boolean value) {
13044
      __isset_bit_vector.set(__JACKETNUMBER_ISSET_ID, value);
13045
    }
13046
 
13047
    public void setFieldValue(_Fields field, Object value) {
13048
      switch (field) {
13049
      case ORDER_ID:
13050
        if (value == null) {
13051
          unsetOrderId();
13052
        } else {
13053
          setOrderId((Long)value);
13054
        }
13055
        break;
13056
 
13057
      case JACKET_NUMBER:
13058
        if (value == null) {
13059
          unsetJacketNumber();
13060
        } else {
13061
          setJacketNumber((Long)value);
13062
        }
13063
        break;
13064
 
13065
      }
13066
    }
13067
 
13068
    public void setFieldValue(int fieldID, Object value) {
13069
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13070
    }
13071
 
13072
    public Object getFieldValue(_Fields field) {
13073
      switch (field) {
13074
      case ORDER_ID:
13075
        return new Long(getOrderId());
13076
 
13077
      case JACKET_NUMBER:
13078
        return new Long(getJacketNumber());
13079
 
13080
      }
13081
      throw new IllegalStateException();
13082
    }
13083
 
13084
    public Object getFieldValue(int fieldId) {
13085
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13086
    }
13087
 
13088
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13089
    public boolean isSet(_Fields field) {
13090
      switch (field) {
13091
      case ORDER_ID:
13092
        return isSetOrderId();
13093
      case JACKET_NUMBER:
13094
        return isSetJacketNumber();
13095
      }
13096
      throw new IllegalStateException();
13097
    }
13098
 
13099
    public boolean isSet(int fieldID) {
13100
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13101
    }
13102
 
13103
    @Override
13104
    public boolean equals(Object that) {
13105
      if (that == null)
13106
        return false;
13107
      if (that instanceof addJacketNumber_args)
13108
        return this.equals((addJacketNumber_args)that);
13109
      return false;
13110
    }
13111
 
13112
    public boolean equals(addJacketNumber_args that) {
13113
      if (that == null)
13114
        return false;
13115
 
13116
      boolean this_present_orderId = true;
13117
      boolean that_present_orderId = true;
13118
      if (this_present_orderId || that_present_orderId) {
13119
        if (!(this_present_orderId && that_present_orderId))
13120
          return false;
13121
        if (this.orderId != that.orderId)
13122
          return false;
13123
      }
13124
 
13125
      boolean this_present_jacketNumber = true;
13126
      boolean that_present_jacketNumber = true;
13127
      if (this_present_jacketNumber || that_present_jacketNumber) {
13128
        if (!(this_present_jacketNumber && that_present_jacketNumber))
13129
          return false;
13130
        if (this.jacketNumber != that.jacketNumber)
13131
          return false;
13132
      }
13133
 
13134
      return true;
13135
    }
13136
 
13137
    @Override
13138
    public int hashCode() {
13139
      return 0;
13140
    }
13141
 
13142
    public int compareTo(addJacketNumber_args other) {
13143
      if (!getClass().equals(other.getClass())) {
13144
        return getClass().getName().compareTo(other.getClass().getName());
13145
      }
13146
 
13147
      int lastComparison = 0;
13148
      addJacketNumber_args typedOther = (addJacketNumber_args)other;
13149
 
13150
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13151
      if (lastComparison != 0) {
13152
        return lastComparison;
13153
      }
13154
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13155
      if (lastComparison != 0) {
13156
        return lastComparison;
13157
      }
13158
      lastComparison = Boolean.valueOf(isSetJacketNumber()).compareTo(isSetJacketNumber());
13159
      if (lastComparison != 0) {
13160
        return lastComparison;
13161
      }
13162
      lastComparison = TBaseHelper.compareTo(jacketNumber, typedOther.jacketNumber);
13163
      if (lastComparison != 0) {
13164
        return lastComparison;
13165
      }
13166
      return 0;
13167
    }
13168
 
13169
    public void read(TProtocol iprot) throws TException {
13170
      TField field;
13171
      iprot.readStructBegin();
13172
      while (true)
13173
      {
13174
        field = iprot.readFieldBegin();
13175
        if (field.type == TType.STOP) { 
13176
          break;
13177
        }
13178
        _Fields fieldId = _Fields.findByThriftId(field.id);
13179
        if (fieldId == null) {
13180
          TProtocolUtil.skip(iprot, field.type);
13181
        } else {
13182
          switch (fieldId) {
13183
            case ORDER_ID:
13184
              if (field.type == TType.I64) {
13185
                this.orderId = iprot.readI64();
13186
                setOrderIdIsSet(true);
13187
              } else { 
13188
                TProtocolUtil.skip(iprot, field.type);
13189
              }
13190
              break;
13191
            case JACKET_NUMBER:
13192
              if (field.type == TType.I64) {
13193
                this.jacketNumber = iprot.readI64();
13194
                setJacketNumberIsSet(true);
13195
              } else { 
13196
                TProtocolUtil.skip(iprot, field.type);
13197
              }
13198
              break;
13199
          }
13200
          iprot.readFieldEnd();
13201
        }
13202
      }
13203
      iprot.readStructEnd();
13204
      validate();
13205
    }
13206
 
13207
    public void write(TProtocol oprot) throws TException {
13208
      validate();
13209
 
13210
      oprot.writeStructBegin(STRUCT_DESC);
13211
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13212
      oprot.writeI64(this.orderId);
13213
      oprot.writeFieldEnd();
13214
      oprot.writeFieldBegin(JACKET_NUMBER_FIELD_DESC);
13215
      oprot.writeI64(this.jacketNumber);
13216
      oprot.writeFieldEnd();
13217
      oprot.writeFieldStop();
13218
      oprot.writeStructEnd();
13219
    }
13220
 
13221
    @Override
13222
    public String toString() {
13223
      StringBuilder sb = new StringBuilder("addJacketNumber_args(");
13224
      boolean first = true;
13225
 
13226
      sb.append("orderId:");
13227
      sb.append(this.orderId);
13228
      first = false;
13229
      if (!first) sb.append(", ");
13230
      sb.append("jacketNumber:");
13231
      sb.append(this.jacketNumber);
13232
      first = false;
13233
      sb.append(")");
13234
      return sb.toString();
13235
    }
13236
 
13237
    public void validate() throws TException {
13238
      // check for required fields
13239
    }
13240
 
13241
  }
13242
 
13243
  public static class addJacketNumber_result implements TBase<addJacketNumber_result._Fields>, java.io.Serializable, Cloneable, Comparable<addJacketNumber_result>   {
13244
    private static final TStruct STRUCT_DESC = new TStruct("addJacketNumber_result");
13245
 
13246
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13247
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13248
 
13249
    private boolean success;
13250
    private TransactionServiceException ex;
13251
 
13252
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13253
    public enum _Fields implements TFieldIdEnum {
13254
      SUCCESS((short)0, "success"),
13255
      EX((short)1, "ex");
13256
 
13257
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13258
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13259
 
13260
      static {
13261
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13262
          byId.put((int)field._thriftId, field);
13263
          byName.put(field.getFieldName(), field);
13264
        }
13265
      }
13266
 
13267
      /**
13268
       * Find the _Fields constant that matches fieldId, or null if its not found.
13269
       */
13270
      public static _Fields findByThriftId(int fieldId) {
13271
        return byId.get(fieldId);
13272
      }
13273
 
13274
      /**
13275
       * Find the _Fields constant that matches fieldId, throwing an exception
13276
       * if it is not found.
13277
       */
13278
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13279
        _Fields fields = findByThriftId(fieldId);
13280
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13281
        return fields;
13282
      }
13283
 
13284
      /**
13285
       * Find the _Fields constant that matches name, or null if its not found.
13286
       */
13287
      public static _Fields findByName(String name) {
13288
        return byName.get(name);
13289
      }
13290
 
13291
      private final short _thriftId;
13292
      private final String _fieldName;
13293
 
13294
      _Fields(short thriftId, String fieldName) {
13295
        _thriftId = thriftId;
13296
        _fieldName = fieldName;
13297
      }
13298
 
13299
      public short getThriftFieldId() {
13300
        return _thriftId;
13301
      }
13302
 
13303
      public String getFieldName() {
13304
        return _fieldName;
13305
      }
13306
    }
13307
 
13308
    // isset id assignments
13309
    private static final int __SUCCESS_ISSET_ID = 0;
13310
    private BitSet __isset_bit_vector = new BitSet(1);
13311
 
13312
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13313
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13314
          new FieldValueMetaData(TType.BOOL)));
13315
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13316
          new FieldValueMetaData(TType.STRUCT)));
13317
    }});
13318
 
13319
    static {
13320
      FieldMetaData.addStructMetaDataMap(addJacketNumber_result.class, metaDataMap);
13321
    }
13322
 
13323
    public addJacketNumber_result() {
13324
    }
13325
 
13326
    public addJacketNumber_result(
13327
      boolean success,
13328
      TransactionServiceException ex)
13329
    {
13330
      this();
13331
      this.success = success;
13332
      setSuccessIsSet(true);
13333
      this.ex = ex;
13334
    }
13335
 
13336
    /**
13337
     * Performs a deep copy on <i>other</i>.
13338
     */
13339
    public addJacketNumber_result(addJacketNumber_result other) {
13340
      __isset_bit_vector.clear();
13341
      __isset_bit_vector.or(other.__isset_bit_vector);
13342
      this.success = other.success;
13343
      if (other.isSetEx()) {
13344
        this.ex = new TransactionServiceException(other.ex);
13345
      }
13346
    }
13347
 
13348
    public addJacketNumber_result deepCopy() {
13349
      return new addJacketNumber_result(this);
13350
    }
13351
 
13352
    @Deprecated
13353
    public addJacketNumber_result clone() {
13354
      return new addJacketNumber_result(this);
13355
    }
13356
 
13357
    public boolean isSuccess() {
13358
      return this.success;
13359
    }
13360
 
13361
    public addJacketNumber_result setSuccess(boolean success) {
13362
      this.success = success;
13363
      setSuccessIsSet(true);
13364
      return this;
13365
    }
13366
 
13367
    public void unsetSuccess() {
13368
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
13369
    }
13370
 
13371
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
13372
    public boolean isSetSuccess() {
13373
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
13374
    }
13375
 
13376
    public void setSuccessIsSet(boolean value) {
13377
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
13378
    }
13379
 
13380
    public TransactionServiceException getEx() {
13381
      return this.ex;
13382
    }
13383
 
13384
    public addJacketNumber_result setEx(TransactionServiceException ex) {
13385
      this.ex = ex;
13386
      return this;
13387
    }
13388
 
13389
    public void unsetEx() {
13390
      this.ex = null;
13391
    }
13392
 
13393
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
13394
    public boolean isSetEx() {
13395
      return this.ex != null;
13396
    }
13397
 
13398
    public void setExIsSet(boolean value) {
13399
      if (!value) {
13400
        this.ex = null;
13401
      }
13402
    }
13403
 
13404
    public void setFieldValue(_Fields field, Object value) {
13405
      switch (field) {
13406
      case SUCCESS:
13407
        if (value == null) {
13408
          unsetSuccess();
13409
        } else {
13410
          setSuccess((Boolean)value);
13411
        }
13412
        break;
13413
 
13414
      case EX:
13415
        if (value == null) {
13416
          unsetEx();
13417
        } else {
13418
          setEx((TransactionServiceException)value);
13419
        }
13420
        break;
13421
 
13422
      }
13423
    }
13424
 
13425
    public void setFieldValue(int fieldID, Object value) {
13426
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13427
    }
13428
 
13429
    public Object getFieldValue(_Fields field) {
13430
      switch (field) {
13431
      case SUCCESS:
13432
        return new Boolean(isSuccess());
13433
 
13434
      case EX:
13435
        return getEx();
13436
 
13437
      }
13438
      throw new IllegalStateException();
13439
    }
13440
 
13441
    public Object getFieldValue(int fieldId) {
13442
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13443
    }
13444
 
13445
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13446
    public boolean isSet(_Fields field) {
13447
      switch (field) {
13448
      case SUCCESS:
13449
        return isSetSuccess();
13450
      case EX:
13451
        return isSetEx();
13452
      }
13453
      throw new IllegalStateException();
13454
    }
13455
 
13456
    public boolean isSet(int fieldID) {
13457
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13458
    }
13459
 
13460
    @Override
13461
    public boolean equals(Object that) {
13462
      if (that == null)
13463
        return false;
13464
      if (that instanceof addJacketNumber_result)
13465
        return this.equals((addJacketNumber_result)that);
13466
      return false;
13467
    }
13468
 
13469
    public boolean equals(addJacketNumber_result that) {
13470
      if (that == null)
13471
        return false;
13472
 
13473
      boolean this_present_success = true;
13474
      boolean that_present_success = true;
13475
      if (this_present_success || that_present_success) {
13476
        if (!(this_present_success && that_present_success))
13477
          return false;
13478
        if (this.success != that.success)
13479
          return false;
13480
      }
13481
 
13482
      boolean this_present_ex = true && this.isSetEx();
13483
      boolean that_present_ex = true && that.isSetEx();
13484
      if (this_present_ex || that_present_ex) {
13485
        if (!(this_present_ex && that_present_ex))
13486
          return false;
13487
        if (!this.ex.equals(that.ex))
13488
          return false;
13489
      }
13490
 
13491
      return true;
13492
    }
13493
 
13494
    @Override
13495
    public int hashCode() {
13496
      return 0;
13497
    }
13498
 
13499
    public int compareTo(addJacketNumber_result other) {
13500
      if (!getClass().equals(other.getClass())) {
13501
        return getClass().getName().compareTo(other.getClass().getName());
13502
      }
13503
 
13504
      int lastComparison = 0;
13505
      addJacketNumber_result typedOther = (addJacketNumber_result)other;
13506
 
13507
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
13508
      if (lastComparison != 0) {
13509
        return lastComparison;
13510
      }
13511
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
13512
      if (lastComparison != 0) {
13513
        return lastComparison;
13514
      }
13515
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
13516
      if (lastComparison != 0) {
13517
        return lastComparison;
13518
      }
13519
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
13520
      if (lastComparison != 0) {
13521
        return lastComparison;
13522
      }
13523
      return 0;
13524
    }
13525
 
13526
    public void read(TProtocol iprot) throws TException {
13527
      TField field;
13528
      iprot.readStructBegin();
13529
      while (true)
13530
      {
13531
        field = iprot.readFieldBegin();
13532
        if (field.type == TType.STOP) { 
13533
          break;
13534
        }
13535
        _Fields fieldId = _Fields.findByThriftId(field.id);
13536
        if (fieldId == null) {
13537
          TProtocolUtil.skip(iprot, field.type);
13538
        } else {
13539
          switch (fieldId) {
13540
            case SUCCESS:
13541
              if (field.type == TType.BOOL) {
13542
                this.success = iprot.readBool();
13543
                setSuccessIsSet(true);
13544
              } else { 
13545
                TProtocolUtil.skip(iprot, field.type);
13546
              }
13547
              break;
13548
            case EX:
13549
              if (field.type == TType.STRUCT) {
13550
                this.ex = new TransactionServiceException();
13551
                this.ex.read(iprot);
13552
              } else { 
13553
                TProtocolUtil.skip(iprot, field.type);
13554
              }
13555
              break;
13556
          }
13557
          iprot.readFieldEnd();
13558
        }
13559
      }
13560
      iprot.readStructEnd();
13561
      validate();
13562
    }
13563
 
13564
    public void write(TProtocol oprot) throws TException {
13565
      oprot.writeStructBegin(STRUCT_DESC);
13566
 
13567
      if (this.isSetSuccess()) {
13568
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
13569
        oprot.writeBool(this.success);
13570
        oprot.writeFieldEnd();
13571
      } else if (this.isSetEx()) {
13572
        oprot.writeFieldBegin(EX_FIELD_DESC);
13573
        this.ex.write(oprot);
13574
        oprot.writeFieldEnd();
13575
      }
13576
      oprot.writeFieldStop();
13577
      oprot.writeStructEnd();
13578
    }
13579
 
13580
    @Override
13581
    public String toString() {
13582
      StringBuilder sb = new StringBuilder("addJacketNumber_result(");
13583
      boolean first = true;
13584
 
13585
      sb.append("success:");
13586
      sb.append(this.success);
13587
      first = false;
13588
      if (!first) sb.append(", ");
13589
      sb.append("ex:");
13590
      if (this.ex == null) {
13591
        sb.append("null");
13592
      } else {
13593
        sb.append(this.ex);
13594
      }
13595
      first = false;
13596
      sb.append(")");
13597
      return sb.toString();
13598
    }
13599
 
13600
    public void validate() throws TException {
13601
      // check for required fields
13602
    }
13603
 
13604
  }
13605
 
923 rajveer 13606
  public static class acceptOrder_args implements TBase<acceptOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_args>   {
13607
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_args");
13608
 
13609
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
13610
 
13611
    private long orderId;
13612
 
13613
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13614
    public enum _Fields implements TFieldIdEnum {
13615
      ORDER_ID((short)1, "orderId");
13616
 
13617
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13618
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13619
 
13620
      static {
13621
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13622
          byId.put((int)field._thriftId, field);
13623
          byName.put(field.getFieldName(), field);
13624
        }
13625
      }
13626
 
13627
      /**
13628
       * Find the _Fields constant that matches fieldId, or null if its not found.
13629
       */
13630
      public static _Fields findByThriftId(int fieldId) {
13631
        return byId.get(fieldId);
13632
      }
13633
 
13634
      /**
13635
       * Find the _Fields constant that matches fieldId, throwing an exception
13636
       * if it is not found.
13637
       */
13638
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13639
        _Fields fields = findByThriftId(fieldId);
13640
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13641
        return fields;
13642
      }
13643
 
13644
      /**
13645
       * Find the _Fields constant that matches name, or null if its not found.
13646
       */
13647
      public static _Fields findByName(String name) {
13648
        return byName.get(name);
13649
      }
13650
 
13651
      private final short _thriftId;
13652
      private final String _fieldName;
13653
 
13654
      _Fields(short thriftId, String fieldName) {
13655
        _thriftId = thriftId;
13656
        _fieldName = fieldName;
13657
      }
13658
 
13659
      public short getThriftFieldId() {
13660
        return _thriftId;
13661
      }
13662
 
13663
      public String getFieldName() {
13664
        return _fieldName;
13665
      }
13666
    }
13667
 
13668
    // isset id assignments
13669
    private static final int __ORDERID_ISSET_ID = 0;
13670
    private BitSet __isset_bit_vector = new BitSet(1);
13671
 
13672
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13673
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
13674
          new FieldValueMetaData(TType.I64)));
13675
    }});
13676
 
13677
    static {
13678
      FieldMetaData.addStructMetaDataMap(acceptOrder_args.class, metaDataMap);
13679
    }
13680
 
13681
    public acceptOrder_args() {
13682
    }
13683
 
13684
    public acceptOrder_args(
13685
      long orderId)
13686
    {
13687
      this();
13688
      this.orderId = orderId;
13689
      setOrderIdIsSet(true);
13690
    }
13691
 
13692
    /**
13693
     * Performs a deep copy on <i>other</i>.
13694
     */
13695
    public acceptOrder_args(acceptOrder_args other) {
13696
      __isset_bit_vector.clear();
13697
      __isset_bit_vector.or(other.__isset_bit_vector);
13698
      this.orderId = other.orderId;
13699
    }
13700
 
13701
    public acceptOrder_args deepCopy() {
13702
      return new acceptOrder_args(this);
13703
    }
13704
 
13705
    @Deprecated
13706
    public acceptOrder_args clone() {
13707
      return new acceptOrder_args(this);
13708
    }
13709
 
13710
    public long getOrderId() {
13711
      return this.orderId;
13712
    }
13713
 
13714
    public acceptOrder_args setOrderId(long orderId) {
13715
      this.orderId = orderId;
13716
      setOrderIdIsSet(true);
13717
      return this;
13718
    }
13719
 
13720
    public void unsetOrderId() {
13721
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
13722
    }
13723
 
13724
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
13725
    public boolean isSetOrderId() {
13726
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
13727
    }
13728
 
13729
    public void setOrderIdIsSet(boolean value) {
13730
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
13731
    }
13732
 
13733
    public void setFieldValue(_Fields field, Object value) {
13734
      switch (field) {
13735
      case ORDER_ID:
13736
        if (value == null) {
13737
          unsetOrderId();
13738
        } else {
13739
          setOrderId((Long)value);
13740
        }
13741
        break;
13742
 
13743
      }
13744
    }
13745
 
13746
    public void setFieldValue(int fieldID, Object value) {
13747
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
13748
    }
13749
 
13750
    public Object getFieldValue(_Fields field) {
13751
      switch (field) {
13752
      case ORDER_ID:
13753
        return new Long(getOrderId());
13754
 
13755
      }
13756
      throw new IllegalStateException();
13757
    }
13758
 
13759
    public Object getFieldValue(int fieldId) {
13760
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
13761
    }
13762
 
13763
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
13764
    public boolean isSet(_Fields field) {
13765
      switch (field) {
13766
      case ORDER_ID:
13767
        return isSetOrderId();
13768
      }
13769
      throw new IllegalStateException();
13770
    }
13771
 
13772
    public boolean isSet(int fieldID) {
13773
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
13774
    }
13775
 
13776
    @Override
13777
    public boolean equals(Object that) {
13778
      if (that == null)
13779
        return false;
13780
      if (that instanceof acceptOrder_args)
13781
        return this.equals((acceptOrder_args)that);
13782
      return false;
13783
    }
13784
 
13785
    public boolean equals(acceptOrder_args that) {
13786
      if (that == null)
13787
        return false;
13788
 
13789
      boolean this_present_orderId = true;
13790
      boolean that_present_orderId = true;
13791
      if (this_present_orderId || that_present_orderId) {
13792
        if (!(this_present_orderId && that_present_orderId))
13793
          return false;
13794
        if (this.orderId != that.orderId)
13795
          return false;
13796
      }
13797
 
13798
      return true;
13799
    }
13800
 
13801
    @Override
13802
    public int hashCode() {
13803
      return 0;
13804
    }
13805
 
13806
    public int compareTo(acceptOrder_args other) {
13807
      if (!getClass().equals(other.getClass())) {
13808
        return getClass().getName().compareTo(other.getClass().getName());
13809
      }
13810
 
13811
      int lastComparison = 0;
13812
      acceptOrder_args typedOther = (acceptOrder_args)other;
13813
 
13814
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
13815
      if (lastComparison != 0) {
13816
        return lastComparison;
13817
      }
13818
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
13819
      if (lastComparison != 0) {
13820
        return lastComparison;
13821
      }
13822
      return 0;
13823
    }
13824
 
13825
    public void read(TProtocol iprot) throws TException {
13826
      TField field;
13827
      iprot.readStructBegin();
13828
      while (true)
13829
      {
13830
        field = iprot.readFieldBegin();
13831
        if (field.type == TType.STOP) { 
13832
          break;
13833
        }
13834
        _Fields fieldId = _Fields.findByThriftId(field.id);
13835
        if (fieldId == null) {
13836
          TProtocolUtil.skip(iprot, field.type);
13837
        } else {
13838
          switch (fieldId) {
13839
            case ORDER_ID:
13840
              if (field.type == TType.I64) {
13841
                this.orderId = iprot.readI64();
13842
                setOrderIdIsSet(true);
13843
              } else { 
13844
                TProtocolUtil.skip(iprot, field.type);
13845
              }
13846
              break;
13847
          }
13848
          iprot.readFieldEnd();
13849
        }
13850
      }
13851
      iprot.readStructEnd();
13852
      validate();
13853
    }
13854
 
13855
    public void write(TProtocol oprot) throws TException {
13856
      validate();
13857
 
13858
      oprot.writeStructBegin(STRUCT_DESC);
13859
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
13860
      oprot.writeI64(this.orderId);
13861
      oprot.writeFieldEnd();
13862
      oprot.writeFieldStop();
13863
      oprot.writeStructEnd();
13864
    }
13865
 
13866
    @Override
13867
    public String toString() {
13868
      StringBuilder sb = new StringBuilder("acceptOrder_args(");
13869
      boolean first = true;
13870
 
13871
      sb.append("orderId:");
13872
      sb.append(this.orderId);
13873
      first = false;
13874
      sb.append(")");
13875
      return sb.toString();
13876
    }
13877
 
13878
    public void validate() throws TException {
13879
      // check for required fields
13880
    }
13881
 
13882
  }
13883
 
13884
  public static class acceptOrder_result implements TBase<acceptOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<acceptOrder_result>   {
13885
    private static final TStruct STRUCT_DESC = new TStruct("acceptOrder_result");
13886
 
13887
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
13888
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
13889
 
13890
    private boolean success;
13891
    private TransactionServiceException ex;
13892
 
13893
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
13894
    public enum _Fields implements TFieldIdEnum {
13895
      SUCCESS((short)0, "success"),
13896
      EX((short)1, "ex");
13897
 
13898
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
13899
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
13900
 
13901
      static {
13902
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
13903
          byId.put((int)field._thriftId, field);
13904
          byName.put(field.getFieldName(), field);
13905
        }
13906
      }
13907
 
13908
      /**
13909
       * Find the _Fields constant that matches fieldId, or null if its not found.
13910
       */
13911
      public static _Fields findByThriftId(int fieldId) {
13912
        return byId.get(fieldId);
13913
      }
13914
 
13915
      /**
13916
       * Find the _Fields constant that matches fieldId, throwing an exception
13917
       * if it is not found.
13918
       */
13919
      public static _Fields findByThriftIdOrThrow(int fieldId) {
13920
        _Fields fields = findByThriftId(fieldId);
13921
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
13922
        return fields;
13923
      }
13924
 
13925
      /**
13926
       * Find the _Fields constant that matches name, or null if its not found.
13927
       */
13928
      public static _Fields findByName(String name) {
13929
        return byName.get(name);
13930
      }
13931
 
13932
      private final short _thriftId;
13933
      private final String _fieldName;
13934
 
13935
      _Fields(short thriftId, String fieldName) {
13936
        _thriftId = thriftId;
13937
        _fieldName = fieldName;
13938
      }
13939
 
13940
      public short getThriftFieldId() {
13941
        return _thriftId;
13942
      }
13943
 
13944
      public String getFieldName() {
13945
        return _fieldName;
13946
      }
13947
    }
13948
 
13949
    // isset id assignments
13950
    private static final int __SUCCESS_ISSET_ID = 0;
13951
    private BitSet __isset_bit_vector = new BitSet(1);
13952
 
13953
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
13954
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
13955
          new FieldValueMetaData(TType.BOOL)));
13956
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
13957
          new FieldValueMetaData(TType.STRUCT)));
13958
    }});
13959
 
13960
    static {
13961
      FieldMetaData.addStructMetaDataMap(acceptOrder_result.class, metaDataMap);
13962
    }
13963
 
13964
    public acceptOrder_result() {
13965
    }
13966
 
13967
    public acceptOrder_result(
13968
      boolean success,
13969
      TransactionServiceException ex)
13970
    {
13971
      this();
13972
      this.success = success;
13973
      setSuccessIsSet(true);
13974
      this.ex = ex;
13975
    }
13976
 
13977
    /**
13978
     * Performs a deep copy on <i>other</i>.
13979
     */
13980
    public acceptOrder_result(acceptOrder_result other) {
13981
      __isset_bit_vector.clear();
13982
      __isset_bit_vector.or(other.__isset_bit_vector);
13983
      this.success = other.success;
13984
      if (other.isSetEx()) {
13985
        this.ex = new TransactionServiceException(other.ex);
13986
      }
13987
    }
13988
 
13989
    public acceptOrder_result deepCopy() {
13990
      return new acceptOrder_result(this);
13991
    }
13992
 
13993
    @Deprecated
13994
    public acceptOrder_result clone() {
13995
      return new acceptOrder_result(this);
13996
    }
13997
 
13998
    public boolean isSuccess() {
13999
      return this.success;
14000
    }
14001
 
14002
    public acceptOrder_result setSuccess(boolean success) {
14003
      this.success = success;
14004
      setSuccessIsSet(true);
14005
      return this;
14006
    }
14007
 
14008
    public void unsetSuccess() {
14009
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14010
    }
14011
 
14012
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14013
    public boolean isSetSuccess() {
14014
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14015
    }
14016
 
14017
    public void setSuccessIsSet(boolean value) {
14018
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14019
    }
14020
 
14021
    public TransactionServiceException getEx() {
14022
      return this.ex;
14023
    }
14024
 
14025
    public acceptOrder_result setEx(TransactionServiceException ex) {
14026
      this.ex = ex;
14027
      return this;
14028
    }
14029
 
14030
    public void unsetEx() {
14031
      this.ex = null;
14032
    }
14033
 
14034
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14035
    public boolean isSetEx() {
14036
      return this.ex != null;
14037
    }
14038
 
14039
    public void setExIsSet(boolean value) {
14040
      if (!value) {
14041
        this.ex = null;
14042
      }
14043
    }
14044
 
14045
    public void setFieldValue(_Fields field, Object value) {
14046
      switch (field) {
14047
      case SUCCESS:
14048
        if (value == null) {
14049
          unsetSuccess();
14050
        } else {
14051
          setSuccess((Boolean)value);
14052
        }
14053
        break;
14054
 
14055
      case EX:
14056
        if (value == null) {
14057
          unsetEx();
14058
        } else {
14059
          setEx((TransactionServiceException)value);
14060
        }
14061
        break;
14062
 
14063
      }
14064
    }
14065
 
14066
    public void setFieldValue(int fieldID, Object value) {
14067
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14068
    }
14069
 
14070
    public Object getFieldValue(_Fields field) {
14071
      switch (field) {
14072
      case SUCCESS:
14073
        return new Boolean(isSuccess());
14074
 
14075
      case EX:
14076
        return getEx();
14077
 
14078
      }
14079
      throw new IllegalStateException();
14080
    }
14081
 
14082
    public Object getFieldValue(int fieldId) {
14083
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14084
    }
14085
 
14086
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14087
    public boolean isSet(_Fields field) {
14088
      switch (field) {
14089
      case SUCCESS:
14090
        return isSetSuccess();
14091
      case EX:
14092
        return isSetEx();
14093
      }
14094
      throw new IllegalStateException();
14095
    }
14096
 
14097
    public boolean isSet(int fieldID) {
14098
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14099
    }
14100
 
14101
    @Override
14102
    public boolean equals(Object that) {
14103
      if (that == null)
14104
        return false;
14105
      if (that instanceof acceptOrder_result)
14106
        return this.equals((acceptOrder_result)that);
14107
      return false;
14108
    }
14109
 
14110
    public boolean equals(acceptOrder_result that) {
14111
      if (that == null)
14112
        return false;
14113
 
14114
      boolean this_present_success = true;
14115
      boolean that_present_success = true;
14116
      if (this_present_success || that_present_success) {
14117
        if (!(this_present_success && that_present_success))
14118
          return false;
14119
        if (this.success != that.success)
14120
          return false;
14121
      }
14122
 
14123
      boolean this_present_ex = true && this.isSetEx();
14124
      boolean that_present_ex = true && that.isSetEx();
14125
      if (this_present_ex || that_present_ex) {
14126
        if (!(this_present_ex && that_present_ex))
14127
          return false;
14128
        if (!this.ex.equals(that.ex))
14129
          return false;
14130
      }
14131
 
14132
      return true;
14133
    }
14134
 
14135
    @Override
14136
    public int hashCode() {
14137
      return 0;
14138
    }
14139
 
14140
    public int compareTo(acceptOrder_result other) {
14141
      if (!getClass().equals(other.getClass())) {
14142
        return getClass().getName().compareTo(other.getClass().getName());
14143
      }
14144
 
14145
      int lastComparison = 0;
14146
      acceptOrder_result typedOther = (acceptOrder_result)other;
14147
 
14148
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14149
      if (lastComparison != 0) {
14150
        return lastComparison;
14151
      }
14152
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14153
      if (lastComparison != 0) {
14154
        return lastComparison;
14155
      }
14156
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14157
      if (lastComparison != 0) {
14158
        return lastComparison;
14159
      }
14160
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14161
      if (lastComparison != 0) {
14162
        return lastComparison;
14163
      }
14164
      return 0;
14165
    }
14166
 
14167
    public void read(TProtocol iprot) throws TException {
14168
      TField field;
14169
      iprot.readStructBegin();
14170
      while (true)
14171
      {
14172
        field = iprot.readFieldBegin();
14173
        if (field.type == TType.STOP) { 
14174
          break;
14175
        }
14176
        _Fields fieldId = _Fields.findByThriftId(field.id);
14177
        if (fieldId == null) {
14178
          TProtocolUtil.skip(iprot, field.type);
14179
        } else {
14180
          switch (fieldId) {
14181
            case SUCCESS:
14182
              if (field.type == TType.BOOL) {
14183
                this.success = iprot.readBool();
14184
                setSuccessIsSet(true);
14185
              } else { 
14186
                TProtocolUtil.skip(iprot, field.type);
14187
              }
14188
              break;
14189
            case EX:
14190
              if (field.type == TType.STRUCT) {
14191
                this.ex = new TransactionServiceException();
14192
                this.ex.read(iprot);
14193
              } else { 
14194
                TProtocolUtil.skip(iprot, field.type);
14195
              }
14196
              break;
14197
          }
14198
          iprot.readFieldEnd();
14199
        }
14200
      }
14201
      iprot.readStructEnd();
14202
      validate();
14203
    }
14204
 
14205
    public void write(TProtocol oprot) throws TException {
14206
      oprot.writeStructBegin(STRUCT_DESC);
14207
 
14208
      if (this.isSetSuccess()) {
14209
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14210
        oprot.writeBool(this.success);
14211
        oprot.writeFieldEnd();
14212
      } else if (this.isSetEx()) {
14213
        oprot.writeFieldBegin(EX_FIELD_DESC);
14214
        this.ex.write(oprot);
14215
        oprot.writeFieldEnd();
14216
      }
14217
      oprot.writeFieldStop();
14218
      oprot.writeStructEnd();
14219
    }
14220
 
14221
    @Override
14222
    public String toString() {
14223
      StringBuilder sb = new StringBuilder("acceptOrder_result(");
14224
      boolean first = true;
14225
 
14226
      sb.append("success:");
14227
      sb.append(this.success);
14228
      first = false;
14229
      if (!first) sb.append(", ");
14230
      sb.append("ex:");
14231
      if (this.ex == null) {
14232
        sb.append("null");
14233
      } else {
14234
        sb.append(this.ex);
14235
      }
14236
      first = false;
14237
      sb.append(")");
14238
      return sb.toString();
14239
    }
14240
 
14241
    public void validate() throws TException {
14242
      // check for required fields
14243
    }
14244
 
14245
  }
14246
 
14247
  public static class billOrder_args implements TBase<billOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_args>   {
14248
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_args");
14249
 
14250
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
14251
 
14252
    private long orderId;
14253
 
14254
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14255
    public enum _Fields implements TFieldIdEnum {
14256
      ORDER_ID((short)1, "orderId");
14257
 
14258
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14260
 
14261
      static {
14262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14263
          byId.put((int)field._thriftId, field);
14264
          byName.put(field.getFieldName(), field);
14265
        }
14266
      }
14267
 
14268
      /**
14269
       * Find the _Fields constant that matches fieldId, or null if its not found.
14270
       */
14271
      public static _Fields findByThriftId(int fieldId) {
14272
        return byId.get(fieldId);
14273
      }
14274
 
14275
      /**
14276
       * Find the _Fields constant that matches fieldId, throwing an exception
14277
       * if it is not found.
14278
       */
14279
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14280
        _Fields fields = findByThriftId(fieldId);
14281
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14282
        return fields;
14283
      }
14284
 
14285
      /**
14286
       * Find the _Fields constant that matches name, or null if its not found.
14287
       */
14288
      public static _Fields findByName(String name) {
14289
        return byName.get(name);
14290
      }
14291
 
14292
      private final short _thriftId;
14293
      private final String _fieldName;
14294
 
14295
      _Fields(short thriftId, String fieldName) {
14296
        _thriftId = thriftId;
14297
        _fieldName = fieldName;
14298
      }
14299
 
14300
      public short getThriftFieldId() {
14301
        return _thriftId;
14302
      }
14303
 
14304
      public String getFieldName() {
14305
        return _fieldName;
14306
      }
14307
    }
14308
 
14309
    // isset id assignments
14310
    private static final int __ORDERID_ISSET_ID = 0;
14311
    private BitSet __isset_bit_vector = new BitSet(1);
14312
 
14313
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14314
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
14315
          new FieldValueMetaData(TType.I64)));
14316
    }});
14317
 
14318
    static {
14319
      FieldMetaData.addStructMetaDataMap(billOrder_args.class, metaDataMap);
14320
    }
14321
 
14322
    public billOrder_args() {
14323
    }
14324
 
14325
    public billOrder_args(
14326
      long orderId)
14327
    {
14328
      this();
14329
      this.orderId = orderId;
14330
      setOrderIdIsSet(true);
14331
    }
14332
 
14333
    /**
14334
     * Performs a deep copy on <i>other</i>.
14335
     */
14336
    public billOrder_args(billOrder_args other) {
14337
      __isset_bit_vector.clear();
14338
      __isset_bit_vector.or(other.__isset_bit_vector);
14339
      this.orderId = other.orderId;
14340
    }
14341
 
14342
    public billOrder_args deepCopy() {
14343
      return new billOrder_args(this);
14344
    }
14345
 
14346
    @Deprecated
14347
    public billOrder_args clone() {
14348
      return new billOrder_args(this);
14349
    }
14350
 
14351
    public long getOrderId() {
14352
      return this.orderId;
14353
    }
14354
 
14355
    public billOrder_args setOrderId(long orderId) {
14356
      this.orderId = orderId;
14357
      setOrderIdIsSet(true);
14358
      return this;
14359
    }
14360
 
14361
    public void unsetOrderId() {
14362
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
14363
    }
14364
 
14365
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
14366
    public boolean isSetOrderId() {
14367
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
14368
    }
14369
 
14370
    public void setOrderIdIsSet(boolean value) {
14371
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
14372
    }
14373
 
14374
    public void setFieldValue(_Fields field, Object value) {
14375
      switch (field) {
14376
      case ORDER_ID:
14377
        if (value == null) {
14378
          unsetOrderId();
14379
        } else {
14380
          setOrderId((Long)value);
14381
        }
14382
        break;
14383
 
14384
      }
14385
    }
14386
 
14387
    public void setFieldValue(int fieldID, Object value) {
14388
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14389
    }
14390
 
14391
    public Object getFieldValue(_Fields field) {
14392
      switch (field) {
14393
      case ORDER_ID:
14394
        return new Long(getOrderId());
14395
 
14396
      }
14397
      throw new IllegalStateException();
14398
    }
14399
 
14400
    public Object getFieldValue(int fieldId) {
14401
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14402
    }
14403
 
14404
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14405
    public boolean isSet(_Fields field) {
14406
      switch (field) {
14407
      case ORDER_ID:
14408
        return isSetOrderId();
14409
      }
14410
      throw new IllegalStateException();
14411
    }
14412
 
14413
    public boolean isSet(int fieldID) {
14414
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14415
    }
14416
 
14417
    @Override
14418
    public boolean equals(Object that) {
14419
      if (that == null)
14420
        return false;
14421
      if (that instanceof billOrder_args)
14422
        return this.equals((billOrder_args)that);
14423
      return false;
14424
    }
14425
 
14426
    public boolean equals(billOrder_args that) {
14427
      if (that == null)
14428
        return false;
14429
 
14430
      boolean this_present_orderId = true;
14431
      boolean that_present_orderId = true;
14432
      if (this_present_orderId || that_present_orderId) {
14433
        if (!(this_present_orderId && that_present_orderId))
14434
          return false;
14435
        if (this.orderId != that.orderId)
14436
          return false;
14437
      }
14438
 
14439
      return true;
14440
    }
14441
 
14442
    @Override
14443
    public int hashCode() {
14444
      return 0;
14445
    }
14446
 
14447
    public int compareTo(billOrder_args other) {
14448
      if (!getClass().equals(other.getClass())) {
14449
        return getClass().getName().compareTo(other.getClass().getName());
14450
      }
14451
 
14452
      int lastComparison = 0;
14453
      billOrder_args typedOther = (billOrder_args)other;
14454
 
14455
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
14456
      if (lastComparison != 0) {
14457
        return lastComparison;
14458
      }
14459
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
14460
      if (lastComparison != 0) {
14461
        return lastComparison;
14462
      }
14463
      return 0;
14464
    }
14465
 
14466
    public void read(TProtocol iprot) throws TException {
14467
      TField field;
14468
      iprot.readStructBegin();
14469
      while (true)
14470
      {
14471
        field = iprot.readFieldBegin();
14472
        if (field.type == TType.STOP) { 
14473
          break;
14474
        }
14475
        _Fields fieldId = _Fields.findByThriftId(field.id);
14476
        if (fieldId == null) {
14477
          TProtocolUtil.skip(iprot, field.type);
14478
        } else {
14479
          switch (fieldId) {
14480
            case ORDER_ID:
14481
              if (field.type == TType.I64) {
14482
                this.orderId = iprot.readI64();
14483
                setOrderIdIsSet(true);
14484
              } else { 
14485
                TProtocolUtil.skip(iprot, field.type);
14486
              }
14487
              break;
14488
          }
14489
          iprot.readFieldEnd();
14490
        }
14491
      }
14492
      iprot.readStructEnd();
14493
      validate();
14494
    }
14495
 
14496
    public void write(TProtocol oprot) throws TException {
14497
      validate();
14498
 
14499
      oprot.writeStructBegin(STRUCT_DESC);
14500
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
14501
      oprot.writeI64(this.orderId);
14502
      oprot.writeFieldEnd();
14503
      oprot.writeFieldStop();
14504
      oprot.writeStructEnd();
14505
    }
14506
 
14507
    @Override
14508
    public String toString() {
14509
      StringBuilder sb = new StringBuilder("billOrder_args(");
14510
      boolean first = true;
14511
 
14512
      sb.append("orderId:");
14513
      sb.append(this.orderId);
14514
      first = false;
14515
      sb.append(")");
14516
      return sb.toString();
14517
    }
14518
 
14519
    public void validate() throws TException {
14520
      // check for required fields
14521
    }
14522
 
14523
  }
14524
 
14525
  public static class billOrder_result implements TBase<billOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<billOrder_result>   {
14526
    private static final TStruct STRUCT_DESC = new TStruct("billOrder_result");
14527
 
14528
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
14529
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
14530
 
14531
    private boolean success;
14532
    private TransactionServiceException ex;
14533
 
14534
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14535
    public enum _Fields implements TFieldIdEnum {
14536
      SUCCESS((short)0, "success"),
14537
      EX((short)1, "ex");
14538
 
14539
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14540
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14541
 
14542
      static {
14543
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14544
          byId.put((int)field._thriftId, field);
14545
          byName.put(field.getFieldName(), field);
14546
        }
14547
      }
14548
 
14549
      /**
14550
       * Find the _Fields constant that matches fieldId, or null if its not found.
14551
       */
14552
      public static _Fields findByThriftId(int fieldId) {
14553
        return byId.get(fieldId);
14554
      }
14555
 
14556
      /**
14557
       * Find the _Fields constant that matches fieldId, throwing an exception
14558
       * if it is not found.
14559
       */
14560
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14561
        _Fields fields = findByThriftId(fieldId);
14562
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14563
        return fields;
14564
      }
14565
 
14566
      /**
14567
       * Find the _Fields constant that matches name, or null if its not found.
14568
       */
14569
      public static _Fields findByName(String name) {
14570
        return byName.get(name);
14571
      }
14572
 
14573
      private final short _thriftId;
14574
      private final String _fieldName;
14575
 
14576
      _Fields(short thriftId, String fieldName) {
14577
        _thriftId = thriftId;
14578
        _fieldName = fieldName;
14579
      }
14580
 
14581
      public short getThriftFieldId() {
14582
        return _thriftId;
14583
      }
14584
 
14585
      public String getFieldName() {
14586
        return _fieldName;
14587
      }
14588
    }
14589
 
14590
    // isset id assignments
14591
    private static final int __SUCCESS_ISSET_ID = 0;
14592
    private BitSet __isset_bit_vector = new BitSet(1);
14593
 
14594
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14595
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
14596
          new FieldValueMetaData(TType.BOOL)));
14597
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
14598
          new FieldValueMetaData(TType.STRUCT)));
14599
    }});
14600
 
14601
    static {
14602
      FieldMetaData.addStructMetaDataMap(billOrder_result.class, metaDataMap);
14603
    }
14604
 
14605
    public billOrder_result() {
14606
    }
14607
 
14608
    public billOrder_result(
14609
      boolean success,
14610
      TransactionServiceException ex)
14611
    {
14612
      this();
14613
      this.success = success;
14614
      setSuccessIsSet(true);
14615
      this.ex = ex;
14616
    }
14617
 
14618
    /**
14619
     * Performs a deep copy on <i>other</i>.
14620
     */
14621
    public billOrder_result(billOrder_result other) {
14622
      __isset_bit_vector.clear();
14623
      __isset_bit_vector.or(other.__isset_bit_vector);
14624
      this.success = other.success;
14625
      if (other.isSetEx()) {
14626
        this.ex = new TransactionServiceException(other.ex);
14627
      }
14628
    }
14629
 
14630
    public billOrder_result deepCopy() {
14631
      return new billOrder_result(this);
14632
    }
14633
 
14634
    @Deprecated
14635
    public billOrder_result clone() {
14636
      return new billOrder_result(this);
14637
    }
14638
 
14639
    public boolean isSuccess() {
14640
      return this.success;
14641
    }
14642
 
14643
    public billOrder_result setSuccess(boolean success) {
14644
      this.success = success;
14645
      setSuccessIsSet(true);
14646
      return this;
14647
    }
14648
 
14649
    public void unsetSuccess() {
14650
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
14651
    }
14652
 
14653
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
14654
    public boolean isSetSuccess() {
14655
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
14656
    }
14657
 
14658
    public void setSuccessIsSet(boolean value) {
14659
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
14660
    }
14661
 
14662
    public TransactionServiceException getEx() {
14663
      return this.ex;
14664
    }
14665
 
14666
    public billOrder_result setEx(TransactionServiceException ex) {
14667
      this.ex = ex;
14668
      return this;
14669
    }
14670
 
14671
    public void unsetEx() {
14672
      this.ex = null;
14673
    }
14674
 
14675
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
14676
    public boolean isSetEx() {
14677
      return this.ex != null;
14678
    }
14679
 
14680
    public void setExIsSet(boolean value) {
14681
      if (!value) {
14682
        this.ex = null;
14683
      }
14684
    }
14685
 
14686
    public void setFieldValue(_Fields field, Object value) {
14687
      switch (field) {
14688
      case SUCCESS:
14689
        if (value == null) {
14690
          unsetSuccess();
14691
        } else {
14692
          setSuccess((Boolean)value);
14693
        }
14694
        break;
14695
 
14696
      case EX:
14697
        if (value == null) {
14698
          unsetEx();
14699
        } else {
14700
          setEx((TransactionServiceException)value);
14701
        }
14702
        break;
14703
 
14704
      }
14705
    }
14706
 
14707
    public void setFieldValue(int fieldID, Object value) {
14708
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
14709
    }
14710
 
14711
    public Object getFieldValue(_Fields field) {
14712
      switch (field) {
14713
      case SUCCESS:
14714
        return new Boolean(isSuccess());
14715
 
14716
      case EX:
14717
        return getEx();
14718
 
14719
      }
14720
      throw new IllegalStateException();
14721
    }
14722
 
14723
    public Object getFieldValue(int fieldId) {
14724
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
14725
    }
14726
 
14727
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
14728
    public boolean isSet(_Fields field) {
14729
      switch (field) {
14730
      case SUCCESS:
14731
        return isSetSuccess();
14732
      case EX:
14733
        return isSetEx();
14734
      }
14735
      throw new IllegalStateException();
14736
    }
14737
 
14738
    public boolean isSet(int fieldID) {
14739
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
14740
    }
14741
 
14742
    @Override
14743
    public boolean equals(Object that) {
14744
      if (that == null)
14745
        return false;
14746
      if (that instanceof billOrder_result)
14747
        return this.equals((billOrder_result)that);
14748
      return false;
14749
    }
14750
 
14751
    public boolean equals(billOrder_result that) {
14752
      if (that == null)
14753
        return false;
14754
 
14755
      boolean this_present_success = true;
14756
      boolean that_present_success = true;
14757
      if (this_present_success || that_present_success) {
14758
        if (!(this_present_success && that_present_success))
14759
          return false;
14760
        if (this.success != that.success)
14761
          return false;
14762
      }
14763
 
14764
      boolean this_present_ex = true && this.isSetEx();
14765
      boolean that_present_ex = true && that.isSetEx();
14766
      if (this_present_ex || that_present_ex) {
14767
        if (!(this_present_ex && that_present_ex))
14768
          return false;
14769
        if (!this.ex.equals(that.ex))
14770
          return false;
14771
      }
14772
 
14773
      return true;
14774
    }
14775
 
14776
    @Override
14777
    public int hashCode() {
14778
      return 0;
14779
    }
14780
 
14781
    public int compareTo(billOrder_result other) {
14782
      if (!getClass().equals(other.getClass())) {
14783
        return getClass().getName().compareTo(other.getClass().getName());
14784
      }
14785
 
14786
      int lastComparison = 0;
14787
      billOrder_result typedOther = (billOrder_result)other;
14788
 
14789
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
14790
      if (lastComparison != 0) {
14791
        return lastComparison;
14792
      }
14793
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
14794
      if (lastComparison != 0) {
14795
        return lastComparison;
14796
      }
14797
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
14798
      if (lastComparison != 0) {
14799
        return lastComparison;
14800
      }
14801
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
14802
      if (lastComparison != 0) {
14803
        return lastComparison;
14804
      }
14805
      return 0;
14806
    }
14807
 
14808
    public void read(TProtocol iprot) throws TException {
14809
      TField field;
14810
      iprot.readStructBegin();
14811
      while (true)
14812
      {
14813
        field = iprot.readFieldBegin();
14814
        if (field.type == TType.STOP) { 
14815
          break;
14816
        }
14817
        _Fields fieldId = _Fields.findByThriftId(field.id);
14818
        if (fieldId == null) {
14819
          TProtocolUtil.skip(iprot, field.type);
14820
        } else {
14821
          switch (fieldId) {
14822
            case SUCCESS:
14823
              if (field.type == TType.BOOL) {
14824
                this.success = iprot.readBool();
14825
                setSuccessIsSet(true);
14826
              } else { 
14827
                TProtocolUtil.skip(iprot, field.type);
14828
              }
14829
              break;
14830
            case EX:
14831
              if (field.type == TType.STRUCT) {
14832
                this.ex = new TransactionServiceException();
14833
                this.ex.read(iprot);
14834
              } else { 
14835
                TProtocolUtil.skip(iprot, field.type);
14836
              }
14837
              break;
14838
          }
14839
          iprot.readFieldEnd();
14840
        }
14841
      }
14842
      iprot.readStructEnd();
14843
      validate();
14844
    }
14845
 
14846
    public void write(TProtocol oprot) throws TException {
14847
      oprot.writeStructBegin(STRUCT_DESC);
14848
 
14849
      if (this.isSetSuccess()) {
14850
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
14851
        oprot.writeBool(this.success);
14852
        oprot.writeFieldEnd();
14853
      } else if (this.isSetEx()) {
14854
        oprot.writeFieldBegin(EX_FIELD_DESC);
14855
        this.ex.write(oprot);
14856
        oprot.writeFieldEnd();
14857
      }
14858
      oprot.writeFieldStop();
14859
      oprot.writeStructEnd();
14860
    }
14861
 
14862
    @Override
14863
    public String toString() {
14864
      StringBuilder sb = new StringBuilder("billOrder_result(");
14865
      boolean first = true;
14866
 
14867
      sb.append("success:");
14868
      sb.append(this.success);
14869
      first = false;
14870
      if (!first) sb.append(", ");
14871
      sb.append("ex:");
14872
      if (this.ex == null) {
14873
        sb.append("null");
14874
      } else {
14875
        sb.append(this.ex);
14876
      }
14877
      first = false;
14878
      sb.append(")");
14879
      return sb.toString();
14880
    }
14881
 
14882
    public void validate() throws TException {
14883
      // check for required fields
14884
    }
14885
 
14886
  }
14887
 
483 rajveer 14888
  public static class getOrdersForTransaction_args implements TBase<getOrdersForTransaction_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_args>   {
14889
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_args");
68 ashish 14890
 
14891
    private static final TField TRANSACTION_ID_FIELD_DESC = new TField("transactionId", TType.I64, (short)1);
1529 ankur.sing 14892
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
68 ashish 14893
 
14894
    private long transactionId;
1529 ankur.sing 14895
    private long customerId;
68 ashish 14896
 
14897
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
14898
    public enum _Fields implements TFieldIdEnum {
1529 ankur.sing 14899
      TRANSACTION_ID((short)1, "transactionId"),
14900
      CUSTOMER_ID((short)2, "customerId");
68 ashish 14901
 
14902
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
14903
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
14904
 
14905
      static {
14906
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
14907
          byId.put((int)field._thriftId, field);
14908
          byName.put(field.getFieldName(), field);
14909
        }
14910
      }
14911
 
14912
      /**
14913
       * Find the _Fields constant that matches fieldId, or null if its not found.
14914
       */
14915
      public static _Fields findByThriftId(int fieldId) {
14916
        return byId.get(fieldId);
14917
      }
14918
 
14919
      /**
14920
       * Find the _Fields constant that matches fieldId, throwing an exception
14921
       * if it is not found.
14922
       */
14923
      public static _Fields findByThriftIdOrThrow(int fieldId) {
14924
        _Fields fields = findByThriftId(fieldId);
14925
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
14926
        return fields;
14927
      }
14928
 
14929
      /**
14930
       * Find the _Fields constant that matches name, or null if its not found.
14931
       */
14932
      public static _Fields findByName(String name) {
14933
        return byName.get(name);
14934
      }
14935
 
14936
      private final short _thriftId;
14937
      private final String _fieldName;
14938
 
14939
      _Fields(short thriftId, String fieldName) {
14940
        _thriftId = thriftId;
14941
        _fieldName = fieldName;
14942
      }
14943
 
14944
      public short getThriftFieldId() {
14945
        return _thriftId;
14946
      }
14947
 
14948
      public String getFieldName() {
14949
        return _fieldName;
14950
      }
14951
    }
14952
 
14953
    // isset id assignments
14954
    private static final int __TRANSACTIONID_ISSET_ID = 0;
1529 ankur.sing 14955
    private static final int __CUSTOMERID_ISSET_ID = 1;
14956
    private BitSet __isset_bit_vector = new BitSet(2);
68 ashish 14957
 
14958
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
14959
      put(_Fields.TRANSACTION_ID, new FieldMetaData("transactionId", TFieldRequirementType.DEFAULT, 
14960
          new FieldValueMetaData(TType.I64)));
1529 ankur.sing 14961
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
14962
          new FieldValueMetaData(TType.I64)));
68 ashish 14963
    }});
14964
 
14965
    static {
483 rajveer 14966
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_args.class, metaDataMap);
68 ashish 14967
    }
14968
 
483 rajveer 14969
    public getOrdersForTransaction_args() {
68 ashish 14970
    }
14971
 
483 rajveer 14972
    public getOrdersForTransaction_args(
1529 ankur.sing 14973
      long transactionId,
14974
      long customerId)
68 ashish 14975
    {
14976
      this();
14977
      this.transactionId = transactionId;
14978
      setTransactionIdIsSet(true);
1529 ankur.sing 14979
      this.customerId = customerId;
14980
      setCustomerIdIsSet(true);
68 ashish 14981
    }
14982
 
14983
    /**
14984
     * Performs a deep copy on <i>other</i>.
14985
     */
483 rajveer 14986
    public getOrdersForTransaction_args(getOrdersForTransaction_args other) {
68 ashish 14987
      __isset_bit_vector.clear();
14988
      __isset_bit_vector.or(other.__isset_bit_vector);
14989
      this.transactionId = other.transactionId;
1529 ankur.sing 14990
      this.customerId = other.customerId;
68 ashish 14991
    }
14992
 
483 rajveer 14993
    public getOrdersForTransaction_args deepCopy() {
14994
      return new getOrdersForTransaction_args(this);
68 ashish 14995
    }
14996
 
14997
    @Deprecated
483 rajveer 14998
    public getOrdersForTransaction_args clone() {
14999
      return new getOrdersForTransaction_args(this);
68 ashish 15000
    }
15001
 
15002
    public long getTransactionId() {
15003
      return this.transactionId;
15004
    }
15005
 
483 rajveer 15006
    public getOrdersForTransaction_args setTransactionId(long transactionId) {
68 ashish 15007
      this.transactionId = transactionId;
15008
      setTransactionIdIsSet(true);
15009
      return this;
15010
    }
15011
 
15012
    public void unsetTransactionId() {
15013
      __isset_bit_vector.clear(__TRANSACTIONID_ISSET_ID);
15014
    }
15015
 
15016
    /** Returns true if field transactionId is set (has been asigned a value) and false otherwise */
15017
    public boolean isSetTransactionId() {
15018
      return __isset_bit_vector.get(__TRANSACTIONID_ISSET_ID);
15019
    }
15020
 
15021
    public void setTransactionIdIsSet(boolean value) {
15022
      __isset_bit_vector.set(__TRANSACTIONID_ISSET_ID, value);
15023
    }
15024
 
1529 ankur.sing 15025
    public long getCustomerId() {
15026
      return this.customerId;
15027
    }
15028
 
15029
    public getOrdersForTransaction_args setCustomerId(long customerId) {
15030
      this.customerId = customerId;
15031
      setCustomerIdIsSet(true);
15032
      return this;
15033
    }
15034
 
15035
    public void unsetCustomerId() {
15036
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
15037
    }
15038
 
15039
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15040
    public boolean isSetCustomerId() {
15041
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
15042
    }
15043
 
15044
    public void setCustomerIdIsSet(boolean value) {
15045
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
15046
    }
15047
 
68 ashish 15048
    public void setFieldValue(_Fields field, Object value) {
15049
      switch (field) {
15050
      case TRANSACTION_ID:
15051
        if (value == null) {
15052
          unsetTransactionId();
15053
        } else {
15054
          setTransactionId((Long)value);
15055
        }
15056
        break;
15057
 
1529 ankur.sing 15058
      case CUSTOMER_ID:
15059
        if (value == null) {
15060
          unsetCustomerId();
15061
        } else {
15062
          setCustomerId((Long)value);
15063
        }
15064
        break;
15065
 
68 ashish 15066
      }
15067
    }
15068
 
15069
    public void setFieldValue(int fieldID, Object value) {
15070
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15071
    }
15072
 
15073
    public Object getFieldValue(_Fields field) {
15074
      switch (field) {
15075
      case TRANSACTION_ID:
15076
        return new Long(getTransactionId());
15077
 
1529 ankur.sing 15078
      case CUSTOMER_ID:
15079
        return new Long(getCustomerId());
15080
 
68 ashish 15081
      }
15082
      throw new IllegalStateException();
15083
    }
15084
 
15085
    public Object getFieldValue(int fieldId) {
15086
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15087
    }
15088
 
15089
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15090
    public boolean isSet(_Fields field) {
15091
      switch (field) {
15092
      case TRANSACTION_ID:
15093
        return isSetTransactionId();
1529 ankur.sing 15094
      case CUSTOMER_ID:
15095
        return isSetCustomerId();
68 ashish 15096
      }
15097
      throw new IllegalStateException();
15098
    }
15099
 
15100
    public boolean isSet(int fieldID) {
15101
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15102
    }
15103
 
15104
    @Override
15105
    public boolean equals(Object that) {
15106
      if (that == null)
15107
        return false;
483 rajveer 15108
      if (that instanceof getOrdersForTransaction_args)
15109
        return this.equals((getOrdersForTransaction_args)that);
68 ashish 15110
      return false;
15111
    }
15112
 
483 rajveer 15113
    public boolean equals(getOrdersForTransaction_args that) {
68 ashish 15114
      if (that == null)
15115
        return false;
15116
 
15117
      boolean this_present_transactionId = true;
15118
      boolean that_present_transactionId = true;
15119
      if (this_present_transactionId || that_present_transactionId) {
15120
        if (!(this_present_transactionId && that_present_transactionId))
15121
          return false;
15122
        if (this.transactionId != that.transactionId)
15123
          return false;
15124
      }
15125
 
1529 ankur.sing 15126
      boolean this_present_customerId = true;
15127
      boolean that_present_customerId = true;
15128
      if (this_present_customerId || that_present_customerId) {
15129
        if (!(this_present_customerId && that_present_customerId))
15130
          return false;
15131
        if (this.customerId != that.customerId)
15132
          return false;
15133
      }
15134
 
68 ashish 15135
      return true;
15136
    }
15137
 
15138
    @Override
15139
    public int hashCode() {
15140
      return 0;
15141
    }
15142
 
483 rajveer 15143
    public int compareTo(getOrdersForTransaction_args other) {
68 ashish 15144
      if (!getClass().equals(other.getClass())) {
15145
        return getClass().getName().compareTo(other.getClass().getName());
15146
      }
15147
 
15148
      int lastComparison = 0;
483 rajveer 15149
      getOrdersForTransaction_args typedOther = (getOrdersForTransaction_args)other;
68 ashish 15150
 
15151
      lastComparison = Boolean.valueOf(isSetTransactionId()).compareTo(isSetTransactionId());
15152
      if (lastComparison != 0) {
15153
        return lastComparison;
15154
      }
15155
      lastComparison = TBaseHelper.compareTo(transactionId, typedOther.transactionId);
15156
      if (lastComparison != 0) {
15157
        return lastComparison;
15158
      }
1529 ankur.sing 15159
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
15160
      if (lastComparison != 0) {
15161
        return lastComparison;
15162
      }
15163
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
15164
      if (lastComparison != 0) {
15165
        return lastComparison;
15166
      }
68 ashish 15167
      return 0;
15168
    }
15169
 
15170
    public void read(TProtocol iprot) throws TException {
15171
      TField field;
15172
      iprot.readStructBegin();
15173
      while (true)
15174
      {
15175
        field = iprot.readFieldBegin();
15176
        if (field.type == TType.STOP) { 
15177
          break;
15178
        }
15179
        _Fields fieldId = _Fields.findByThriftId(field.id);
15180
        if (fieldId == null) {
15181
          TProtocolUtil.skip(iprot, field.type);
15182
        } else {
15183
          switch (fieldId) {
15184
            case TRANSACTION_ID:
15185
              if (field.type == TType.I64) {
15186
                this.transactionId = iprot.readI64();
15187
                setTransactionIdIsSet(true);
15188
              } else { 
15189
                TProtocolUtil.skip(iprot, field.type);
15190
              }
15191
              break;
1529 ankur.sing 15192
            case CUSTOMER_ID:
15193
              if (field.type == TType.I64) {
15194
                this.customerId = iprot.readI64();
15195
                setCustomerIdIsSet(true);
15196
              } else { 
15197
                TProtocolUtil.skip(iprot, field.type);
15198
              }
15199
              break;
68 ashish 15200
          }
15201
          iprot.readFieldEnd();
15202
        }
15203
      }
15204
      iprot.readStructEnd();
15205
      validate();
15206
    }
15207
 
15208
    public void write(TProtocol oprot) throws TException {
15209
      validate();
15210
 
15211
      oprot.writeStructBegin(STRUCT_DESC);
15212
      oprot.writeFieldBegin(TRANSACTION_ID_FIELD_DESC);
15213
      oprot.writeI64(this.transactionId);
15214
      oprot.writeFieldEnd();
1529 ankur.sing 15215
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
15216
      oprot.writeI64(this.customerId);
15217
      oprot.writeFieldEnd();
68 ashish 15218
      oprot.writeFieldStop();
15219
      oprot.writeStructEnd();
15220
    }
15221
 
15222
    @Override
15223
    public String toString() {
483 rajveer 15224
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_args(");
68 ashish 15225
      boolean first = true;
15226
 
15227
      sb.append("transactionId:");
15228
      sb.append(this.transactionId);
15229
      first = false;
1529 ankur.sing 15230
      if (!first) sb.append(", ");
15231
      sb.append("customerId:");
15232
      sb.append(this.customerId);
15233
      first = false;
68 ashish 15234
      sb.append(")");
15235
      return sb.toString();
15236
    }
15237
 
15238
    public void validate() throws TException {
15239
      // check for required fields
15240
    }
15241
 
15242
  }
15243
 
483 rajveer 15244
  public static class getOrdersForTransaction_result implements TBase<getOrdersForTransaction_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForTransaction_result>   {
15245
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForTransaction_result");
68 ashish 15246
 
483 rajveer 15247
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 15248
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
15249
 
483 rajveer 15250
    private List<Order> success;
68 ashish 15251
    private TransactionServiceException ex;
15252
 
15253
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15254
    public enum _Fields implements TFieldIdEnum {
15255
      SUCCESS((short)0, "success"),
15256
      EX((short)1, "ex");
15257
 
15258
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15259
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15260
 
15261
      static {
15262
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15263
          byId.put((int)field._thriftId, field);
15264
          byName.put(field.getFieldName(), field);
15265
        }
15266
      }
15267
 
15268
      /**
15269
       * Find the _Fields constant that matches fieldId, or null if its not found.
15270
       */
15271
      public static _Fields findByThriftId(int fieldId) {
15272
        return byId.get(fieldId);
15273
      }
15274
 
15275
      /**
15276
       * Find the _Fields constant that matches fieldId, throwing an exception
15277
       * if it is not found.
15278
       */
15279
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15280
        _Fields fields = findByThriftId(fieldId);
15281
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15282
        return fields;
15283
      }
15284
 
15285
      /**
15286
       * Find the _Fields constant that matches name, or null if its not found.
15287
       */
15288
      public static _Fields findByName(String name) {
15289
        return byName.get(name);
15290
      }
15291
 
15292
      private final short _thriftId;
15293
      private final String _fieldName;
15294
 
15295
      _Fields(short thriftId, String fieldName) {
15296
        _thriftId = thriftId;
15297
        _fieldName = fieldName;
15298
      }
15299
 
15300
      public short getThriftFieldId() {
15301
        return _thriftId;
15302
      }
15303
 
15304
      public String getFieldName() {
15305
        return _fieldName;
15306
      }
15307
    }
15308
 
15309
    // isset id assignments
15310
 
15311
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
15312
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 15313
          new ListMetaData(TType.LIST, 
15314
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 15315
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
15316
          new FieldValueMetaData(TType.STRUCT)));
15317
    }});
15318
 
15319
    static {
483 rajveer 15320
      FieldMetaData.addStructMetaDataMap(getOrdersForTransaction_result.class, metaDataMap);
68 ashish 15321
    }
15322
 
483 rajveer 15323
    public getOrdersForTransaction_result() {
68 ashish 15324
    }
15325
 
483 rajveer 15326
    public getOrdersForTransaction_result(
15327
      List<Order> success,
68 ashish 15328
      TransactionServiceException ex)
15329
    {
15330
      this();
15331
      this.success = success;
15332
      this.ex = ex;
15333
    }
15334
 
15335
    /**
15336
     * Performs a deep copy on <i>other</i>.
15337
     */
483 rajveer 15338
    public getOrdersForTransaction_result(getOrdersForTransaction_result other) {
15339
      if (other.isSetSuccess()) {
15340
        List<Order> __this__success = new ArrayList<Order>();
15341
        for (Order other_element : other.success) {
15342
          __this__success.add(new Order(other_element));
15343
        }
15344
        this.success = __this__success;
15345
      }
68 ashish 15346
      if (other.isSetEx()) {
15347
        this.ex = new TransactionServiceException(other.ex);
15348
      }
15349
    }
15350
 
483 rajveer 15351
    public getOrdersForTransaction_result deepCopy() {
15352
      return new getOrdersForTransaction_result(this);
68 ashish 15353
    }
15354
 
15355
    @Deprecated
483 rajveer 15356
    public getOrdersForTransaction_result clone() {
15357
      return new getOrdersForTransaction_result(this);
68 ashish 15358
    }
15359
 
483 rajveer 15360
    public int getSuccessSize() {
15361
      return (this.success == null) ? 0 : this.success.size();
15362
    }
15363
 
15364
    public java.util.Iterator<Order> getSuccessIterator() {
15365
      return (this.success == null) ? null : this.success.iterator();
15366
    }
15367
 
15368
    public void addToSuccess(Order elem) {
15369
      if (this.success == null) {
15370
        this.success = new ArrayList<Order>();
15371
      }
15372
      this.success.add(elem);
15373
    }
15374
 
15375
    public List<Order> getSuccess() {
68 ashish 15376
      return this.success;
15377
    }
15378
 
483 rajveer 15379
    public getOrdersForTransaction_result setSuccess(List<Order> success) {
68 ashish 15380
      this.success = success;
15381
      return this;
15382
    }
15383
 
15384
    public void unsetSuccess() {
483 rajveer 15385
      this.success = null;
68 ashish 15386
    }
15387
 
15388
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
15389
    public boolean isSetSuccess() {
483 rajveer 15390
      return this.success != null;
68 ashish 15391
    }
15392
 
15393
    public void setSuccessIsSet(boolean value) {
483 rajveer 15394
      if (!value) {
15395
        this.success = null;
15396
      }
68 ashish 15397
    }
15398
 
15399
    public TransactionServiceException getEx() {
15400
      return this.ex;
15401
    }
15402
 
483 rajveer 15403
    public getOrdersForTransaction_result setEx(TransactionServiceException ex) {
68 ashish 15404
      this.ex = ex;
15405
      return this;
15406
    }
15407
 
15408
    public void unsetEx() {
15409
      this.ex = null;
15410
    }
15411
 
15412
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
15413
    public boolean isSetEx() {
15414
      return this.ex != null;
15415
    }
15416
 
15417
    public void setExIsSet(boolean value) {
15418
      if (!value) {
15419
        this.ex = null;
15420
      }
15421
    }
15422
 
15423
    public void setFieldValue(_Fields field, Object value) {
15424
      switch (field) {
15425
      case SUCCESS:
15426
        if (value == null) {
15427
          unsetSuccess();
15428
        } else {
483 rajveer 15429
          setSuccess((List<Order>)value);
68 ashish 15430
        }
15431
        break;
15432
 
15433
      case EX:
15434
        if (value == null) {
15435
          unsetEx();
15436
        } else {
15437
          setEx((TransactionServiceException)value);
15438
        }
15439
        break;
15440
 
15441
      }
15442
    }
15443
 
15444
    public void setFieldValue(int fieldID, Object value) {
15445
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15446
    }
15447
 
15448
    public Object getFieldValue(_Fields field) {
15449
      switch (field) {
15450
      case SUCCESS:
483 rajveer 15451
        return getSuccess();
68 ashish 15452
 
15453
      case EX:
15454
        return getEx();
15455
 
15456
      }
15457
      throw new IllegalStateException();
15458
    }
15459
 
15460
    public Object getFieldValue(int fieldId) {
15461
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15462
    }
15463
 
15464
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15465
    public boolean isSet(_Fields field) {
15466
      switch (field) {
15467
      case SUCCESS:
15468
        return isSetSuccess();
15469
      case EX:
15470
        return isSetEx();
15471
      }
15472
      throw new IllegalStateException();
15473
    }
15474
 
15475
    public boolean isSet(int fieldID) {
15476
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15477
    }
15478
 
15479
    @Override
15480
    public boolean equals(Object that) {
15481
      if (that == null)
15482
        return false;
483 rajveer 15483
      if (that instanceof getOrdersForTransaction_result)
15484
        return this.equals((getOrdersForTransaction_result)that);
68 ashish 15485
      return false;
15486
    }
15487
 
483 rajveer 15488
    public boolean equals(getOrdersForTransaction_result that) {
68 ashish 15489
      if (that == null)
15490
        return false;
15491
 
483 rajveer 15492
      boolean this_present_success = true && this.isSetSuccess();
15493
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 15494
      if (this_present_success || that_present_success) {
15495
        if (!(this_present_success && that_present_success))
15496
          return false;
483 rajveer 15497
        if (!this.success.equals(that.success))
68 ashish 15498
          return false;
15499
      }
15500
 
15501
      boolean this_present_ex = true && this.isSetEx();
15502
      boolean that_present_ex = true && that.isSetEx();
15503
      if (this_present_ex || that_present_ex) {
15504
        if (!(this_present_ex && that_present_ex))
15505
          return false;
15506
        if (!this.ex.equals(that.ex))
15507
          return false;
15508
      }
15509
 
15510
      return true;
15511
    }
15512
 
15513
    @Override
15514
    public int hashCode() {
15515
      return 0;
15516
    }
15517
 
483 rajveer 15518
    public int compareTo(getOrdersForTransaction_result other) {
68 ashish 15519
      if (!getClass().equals(other.getClass())) {
15520
        return getClass().getName().compareTo(other.getClass().getName());
15521
      }
15522
 
15523
      int lastComparison = 0;
483 rajveer 15524
      getOrdersForTransaction_result typedOther = (getOrdersForTransaction_result)other;
68 ashish 15525
 
15526
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
15527
      if (lastComparison != 0) {
15528
        return lastComparison;
15529
      }
15530
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
15531
      if (lastComparison != 0) {
15532
        return lastComparison;
15533
      }
15534
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
15535
      if (lastComparison != 0) {
15536
        return lastComparison;
15537
      }
15538
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
15539
      if (lastComparison != 0) {
15540
        return lastComparison;
15541
      }
15542
      return 0;
15543
    }
15544
 
15545
    public void read(TProtocol iprot) throws TException {
15546
      TField field;
15547
      iprot.readStructBegin();
15548
      while (true)
15549
      {
15550
        field = iprot.readFieldBegin();
15551
        if (field.type == TType.STOP) { 
15552
          break;
15553
        }
15554
        _Fields fieldId = _Fields.findByThriftId(field.id);
15555
        if (fieldId == null) {
15556
          TProtocolUtil.skip(iprot, field.type);
15557
        } else {
15558
          switch (fieldId) {
15559
            case SUCCESS:
483 rajveer 15560
              if (field.type == TType.LIST) {
15561
                {
1382 varun.gupt 15562
                  TList _list32 = iprot.readListBegin();
15563
                  this.success = new ArrayList<Order>(_list32.size);
15564
                  for (int _i33 = 0; _i33 < _list32.size; ++_i33)
483 rajveer 15565
                  {
1382 varun.gupt 15566
                    Order _elem34;
15567
                    _elem34 = new Order();
15568
                    _elem34.read(iprot);
15569
                    this.success.add(_elem34);
483 rajveer 15570
                  }
15571
                  iprot.readListEnd();
15572
                }
68 ashish 15573
              } else { 
15574
                TProtocolUtil.skip(iprot, field.type);
15575
              }
15576
              break;
15577
            case EX:
15578
              if (field.type == TType.STRUCT) {
15579
                this.ex = new TransactionServiceException();
15580
                this.ex.read(iprot);
15581
              } else { 
15582
                TProtocolUtil.skip(iprot, field.type);
15583
              }
15584
              break;
15585
          }
15586
          iprot.readFieldEnd();
15587
        }
15588
      }
15589
      iprot.readStructEnd();
15590
      validate();
15591
    }
15592
 
15593
    public void write(TProtocol oprot) throws TException {
15594
      oprot.writeStructBegin(STRUCT_DESC);
15595
 
15596
      if (this.isSetSuccess()) {
15597
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 15598
        {
15599
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 15600
          for (Order _iter35 : this.success)
483 rajveer 15601
          {
1382 varun.gupt 15602
            _iter35.write(oprot);
483 rajveer 15603
          }
15604
          oprot.writeListEnd();
15605
        }
68 ashish 15606
        oprot.writeFieldEnd();
15607
      } else if (this.isSetEx()) {
15608
        oprot.writeFieldBegin(EX_FIELD_DESC);
15609
        this.ex.write(oprot);
15610
        oprot.writeFieldEnd();
15611
      }
15612
      oprot.writeFieldStop();
15613
      oprot.writeStructEnd();
15614
    }
15615
 
15616
    @Override
15617
    public String toString() {
483 rajveer 15618
      StringBuilder sb = new StringBuilder("getOrdersForTransaction_result(");
68 ashish 15619
      boolean first = true;
15620
 
15621
      sb.append("success:");
483 rajveer 15622
      if (this.success == null) {
15623
        sb.append("null");
15624
      } else {
15625
        sb.append(this.success);
15626
      }
68 ashish 15627
      first = false;
15628
      if (!first) sb.append(", ");
15629
      sb.append("ex:");
15630
      if (this.ex == null) {
15631
        sb.append("null");
15632
      } else {
15633
        sb.append(this.ex);
15634
      }
15635
      first = false;
15636
      sb.append(")");
15637
      return sb.toString();
15638
    }
15639
 
15640
    public void validate() throws TException {
15641
      // check for required fields
15642
    }
15643
 
15644
  }
15645
 
483 rajveer 15646
  public static class getOrdersForCustomer_args implements TBase<getOrdersForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_args>   {
15647
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_args");
68 ashish 15648
 
483 rajveer 15649
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)1);
15650
    private static final TField FROM_DATE_FIELD_DESC = new TField("from_date", TType.I64, (short)2);
15651
    private static final TField TO_DATE_FIELD_DESC = new TField("to_date", TType.I64, (short)3);
15652
    private static final TField STATUS_FIELD_DESC = new TField("status", TType.I32, (short)4);
68 ashish 15653
 
483 rajveer 15654
    private long customerId;
15655
    private long from_date;
15656
    private long to_date;
15657
    private OrderStatus status;
68 ashish 15658
 
15659
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
15660
    public enum _Fields implements TFieldIdEnum {
483 rajveer 15661
      CUSTOMER_ID((short)1, "customerId"),
15662
      FROM_DATE((short)2, "from_date"),
15663
      TO_DATE((short)3, "to_date"),
15664
      /**
15665
       * 
15666
       * @see OrderStatus
15667
       */
15668
      STATUS((short)4, "status");
68 ashish 15669
 
15670
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
15671
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
15672
 
15673
      static {
15674
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
15675
          byId.put((int)field._thriftId, field);
15676
          byName.put(field.getFieldName(), field);
15677
        }
15678
      }
15679
 
15680
      /**
15681
       * Find the _Fields constant that matches fieldId, or null if its not found.
15682
       */
15683
      public static _Fields findByThriftId(int fieldId) {
15684
        return byId.get(fieldId);
15685
      }
15686
 
15687
      /**
15688
       * Find the _Fields constant that matches fieldId, throwing an exception
15689
       * if it is not found.
15690
       */
15691
      public static _Fields findByThriftIdOrThrow(int fieldId) {
15692
        _Fields fields = findByThriftId(fieldId);
15693
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
15694
        return fields;
15695
      }
15696
 
15697
      /**
15698
       * Find the _Fields constant that matches name, or null if its not found.
15699
       */
15700
      public static _Fields findByName(String name) {
15701
        return byName.get(name);
15702
      }
15703
 
15704
      private final short _thriftId;
15705
      private final String _fieldName;
15706
 
15707
      _Fields(short thriftId, String fieldName) {
15708
        _thriftId = thriftId;
15709
        _fieldName = fieldName;
15710
      }
15711
 
15712
      public short getThriftFieldId() {
15713
        return _thriftId;
15714
      }
15715
 
15716
      public String getFieldName() {
15717
        return _fieldName;
15718
      }
15719
    }
15720
 
15721
    // isset id assignments
483 rajveer 15722
    private static final int __CUSTOMERID_ISSET_ID = 0;
15723
    private static final int __FROM_DATE_ISSET_ID = 1;
15724
    private static final int __TO_DATE_ISSET_ID = 2;
68 ashish 15725
    private BitSet __isset_bit_vector = new BitSet(3);
15726
 
15727
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 15728
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
68 ashish 15729
          new FieldValueMetaData(TType.I64)));
483 rajveer 15730
      put(_Fields.FROM_DATE, new FieldMetaData("from_date", TFieldRequirementType.DEFAULT, 
68 ashish 15731
          new FieldValueMetaData(TType.I64)));
483 rajveer 15732
      put(_Fields.TO_DATE, new FieldMetaData("to_date", TFieldRequirementType.DEFAULT, 
68 ashish 15733
          new FieldValueMetaData(TType.I64)));
483 rajveer 15734
      put(_Fields.STATUS, new FieldMetaData("status", TFieldRequirementType.DEFAULT, 
15735
          new EnumMetaData(TType.ENUM, OrderStatus.class)));
68 ashish 15736
    }});
15737
 
15738
    static {
483 rajveer 15739
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_args.class, metaDataMap);
68 ashish 15740
    }
15741
 
483 rajveer 15742
    public getOrdersForCustomer_args() {
68 ashish 15743
    }
15744
 
483 rajveer 15745
    public getOrdersForCustomer_args(
15746
      long customerId,
15747
      long from_date,
15748
      long to_date,
15749
      OrderStatus status)
68 ashish 15750
    {
15751
      this();
483 rajveer 15752
      this.customerId = customerId;
15753
      setCustomerIdIsSet(true);
15754
      this.from_date = from_date;
15755
      setFrom_dateIsSet(true);
15756
      this.to_date = to_date;
15757
      setTo_dateIsSet(true);
15758
      this.status = status;
68 ashish 15759
    }
15760
 
15761
    /**
15762
     * Performs a deep copy on <i>other</i>.
15763
     */
483 rajveer 15764
    public getOrdersForCustomer_args(getOrdersForCustomer_args other) {
68 ashish 15765
      __isset_bit_vector.clear();
15766
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 15767
      this.customerId = other.customerId;
15768
      this.from_date = other.from_date;
15769
      this.to_date = other.to_date;
15770
      if (other.isSetStatus()) {
15771
        this.status = other.status;
15772
      }
68 ashish 15773
    }
15774
 
483 rajveer 15775
    public getOrdersForCustomer_args deepCopy() {
15776
      return new getOrdersForCustomer_args(this);
68 ashish 15777
    }
15778
 
15779
    @Deprecated
483 rajveer 15780
    public getOrdersForCustomer_args clone() {
15781
      return new getOrdersForCustomer_args(this);
68 ashish 15782
    }
15783
 
483 rajveer 15784
    public long getCustomerId() {
15785
      return this.customerId;
68 ashish 15786
    }
15787
 
483 rajveer 15788
    public getOrdersForCustomer_args setCustomerId(long customerId) {
15789
      this.customerId = customerId;
15790
      setCustomerIdIsSet(true);
68 ashish 15791
      return this;
15792
    }
15793
 
483 rajveer 15794
    public void unsetCustomerId() {
15795
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
68 ashish 15796
    }
15797
 
483 rajveer 15798
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
15799
    public boolean isSetCustomerId() {
15800
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
68 ashish 15801
    }
15802
 
483 rajveer 15803
    public void setCustomerIdIsSet(boolean value) {
15804
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
68 ashish 15805
    }
15806
 
483 rajveer 15807
    public long getFrom_date() {
15808
      return this.from_date;
68 ashish 15809
    }
15810
 
483 rajveer 15811
    public getOrdersForCustomer_args setFrom_date(long from_date) {
15812
      this.from_date = from_date;
15813
      setFrom_dateIsSet(true);
68 ashish 15814
      return this;
15815
    }
15816
 
483 rajveer 15817
    public void unsetFrom_date() {
15818
      __isset_bit_vector.clear(__FROM_DATE_ISSET_ID);
68 ashish 15819
    }
15820
 
483 rajveer 15821
    /** Returns true if field from_date is set (has been asigned a value) and false otherwise */
15822
    public boolean isSetFrom_date() {
15823
      return __isset_bit_vector.get(__FROM_DATE_ISSET_ID);
68 ashish 15824
    }
15825
 
483 rajveer 15826
    public void setFrom_dateIsSet(boolean value) {
15827
      __isset_bit_vector.set(__FROM_DATE_ISSET_ID, value);
68 ashish 15828
    }
15829
 
483 rajveer 15830
    public long getTo_date() {
15831
      return this.to_date;
68 ashish 15832
    }
15833
 
483 rajveer 15834
    public getOrdersForCustomer_args setTo_date(long to_date) {
15835
      this.to_date = to_date;
15836
      setTo_dateIsSet(true);
68 ashish 15837
      return this;
15838
    }
15839
 
483 rajveer 15840
    public void unsetTo_date() {
15841
      __isset_bit_vector.clear(__TO_DATE_ISSET_ID);
68 ashish 15842
    }
15843
 
483 rajveer 15844
    /** Returns true if field to_date is set (has been asigned a value) and false otherwise */
15845
    public boolean isSetTo_date() {
15846
      return __isset_bit_vector.get(__TO_DATE_ISSET_ID);
68 ashish 15847
    }
15848
 
483 rajveer 15849
    public void setTo_dateIsSet(boolean value) {
15850
      __isset_bit_vector.set(__TO_DATE_ISSET_ID, value);
68 ashish 15851
    }
15852
 
483 rajveer 15853
    /**
15854
     * 
15855
     * @see OrderStatus
15856
     */
15857
    public OrderStatus getStatus() {
15858
      return this.status;
15859
    }
15860
 
15861
    /**
15862
     * 
15863
     * @see OrderStatus
15864
     */
15865
    public getOrdersForCustomer_args setStatus(OrderStatus status) {
15866
      this.status = status;
15867
      return this;
15868
    }
15869
 
15870
    public void unsetStatus() {
15871
      this.status = null;
15872
    }
15873
 
15874
    /** Returns true if field status is set (has been asigned a value) and false otherwise */
15875
    public boolean isSetStatus() {
15876
      return this.status != null;
15877
    }
15878
 
15879
    public void setStatusIsSet(boolean value) {
15880
      if (!value) {
15881
        this.status = null;
15882
      }
15883
    }
15884
 
68 ashish 15885
    public void setFieldValue(_Fields field, Object value) {
15886
      switch (field) {
483 rajveer 15887
      case CUSTOMER_ID:
68 ashish 15888
        if (value == null) {
483 rajveer 15889
          unsetCustomerId();
68 ashish 15890
        } else {
483 rajveer 15891
          setCustomerId((Long)value);
68 ashish 15892
        }
15893
        break;
15894
 
483 rajveer 15895
      case FROM_DATE:
68 ashish 15896
        if (value == null) {
483 rajveer 15897
          unsetFrom_date();
68 ashish 15898
        } else {
483 rajveer 15899
          setFrom_date((Long)value);
68 ashish 15900
        }
15901
        break;
15902
 
483 rajveer 15903
      case TO_DATE:
68 ashish 15904
        if (value == null) {
483 rajveer 15905
          unsetTo_date();
68 ashish 15906
        } else {
483 rajveer 15907
          setTo_date((Long)value);
68 ashish 15908
        }
15909
        break;
15910
 
483 rajveer 15911
      case STATUS:
15912
        if (value == null) {
15913
          unsetStatus();
15914
        } else {
15915
          setStatus((OrderStatus)value);
15916
        }
15917
        break;
15918
 
68 ashish 15919
      }
15920
    }
15921
 
15922
    public void setFieldValue(int fieldID, Object value) {
15923
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
15924
    }
15925
 
15926
    public Object getFieldValue(_Fields field) {
15927
      switch (field) {
483 rajveer 15928
      case CUSTOMER_ID:
15929
        return new Long(getCustomerId());
68 ashish 15930
 
483 rajveer 15931
      case FROM_DATE:
15932
        return new Long(getFrom_date());
68 ashish 15933
 
483 rajveer 15934
      case TO_DATE:
15935
        return new Long(getTo_date());
68 ashish 15936
 
483 rajveer 15937
      case STATUS:
15938
        return getStatus();
15939
 
68 ashish 15940
      }
15941
      throw new IllegalStateException();
15942
    }
15943
 
15944
    public Object getFieldValue(int fieldId) {
15945
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
15946
    }
15947
 
15948
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
15949
    public boolean isSet(_Fields field) {
15950
      switch (field) {
483 rajveer 15951
      case CUSTOMER_ID:
15952
        return isSetCustomerId();
15953
      case FROM_DATE:
15954
        return isSetFrom_date();
15955
      case TO_DATE:
15956
        return isSetTo_date();
15957
      case STATUS:
15958
        return isSetStatus();
68 ashish 15959
      }
15960
      throw new IllegalStateException();
15961
    }
15962
 
15963
    public boolean isSet(int fieldID) {
15964
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
15965
    }
15966
 
15967
    @Override
15968
    public boolean equals(Object that) {
15969
      if (that == null)
15970
        return false;
483 rajveer 15971
      if (that instanceof getOrdersForCustomer_args)
15972
        return this.equals((getOrdersForCustomer_args)that);
68 ashish 15973
      return false;
15974
    }
15975
 
483 rajveer 15976
    public boolean equals(getOrdersForCustomer_args that) {
68 ashish 15977
      if (that == null)
15978
        return false;
15979
 
483 rajveer 15980
      boolean this_present_customerId = true;
15981
      boolean that_present_customerId = true;
15982
      if (this_present_customerId || that_present_customerId) {
15983
        if (!(this_present_customerId && that_present_customerId))
68 ashish 15984
          return false;
483 rajveer 15985
        if (this.customerId != that.customerId)
68 ashish 15986
          return false;
15987
      }
15988
 
483 rajveer 15989
      boolean this_present_from_date = true;
15990
      boolean that_present_from_date = true;
15991
      if (this_present_from_date || that_present_from_date) {
15992
        if (!(this_present_from_date && that_present_from_date))
68 ashish 15993
          return false;
483 rajveer 15994
        if (this.from_date != that.from_date)
68 ashish 15995
          return false;
15996
      }
15997
 
483 rajveer 15998
      boolean this_present_to_date = true;
15999
      boolean that_present_to_date = true;
16000
      if (this_present_to_date || that_present_to_date) {
16001
        if (!(this_present_to_date && that_present_to_date))
68 ashish 16002
          return false;
483 rajveer 16003
        if (this.to_date != that.to_date)
68 ashish 16004
          return false;
16005
      }
16006
 
483 rajveer 16007
      boolean this_present_status = true && this.isSetStatus();
16008
      boolean that_present_status = true && that.isSetStatus();
16009
      if (this_present_status || that_present_status) {
16010
        if (!(this_present_status && that_present_status))
16011
          return false;
16012
        if (!this.status.equals(that.status))
16013
          return false;
16014
      }
16015
 
68 ashish 16016
      return true;
16017
    }
16018
 
16019
    @Override
16020
    public int hashCode() {
16021
      return 0;
16022
    }
16023
 
483 rajveer 16024
    public int compareTo(getOrdersForCustomer_args other) {
68 ashish 16025
      if (!getClass().equals(other.getClass())) {
16026
        return getClass().getName().compareTo(other.getClass().getName());
16027
      }
16028
 
16029
      int lastComparison = 0;
483 rajveer 16030
      getOrdersForCustomer_args typedOther = (getOrdersForCustomer_args)other;
68 ashish 16031
 
483 rajveer 16032
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
68 ashish 16033
      if (lastComparison != 0) {
16034
        return lastComparison;
16035
      }
483 rajveer 16036
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
68 ashish 16037
      if (lastComparison != 0) {
16038
        return lastComparison;
16039
      }
483 rajveer 16040
      lastComparison = Boolean.valueOf(isSetFrom_date()).compareTo(isSetFrom_date());
68 ashish 16041
      if (lastComparison != 0) {
16042
        return lastComparison;
16043
      }
483 rajveer 16044
      lastComparison = TBaseHelper.compareTo(from_date, typedOther.from_date);
68 ashish 16045
      if (lastComparison != 0) {
16046
        return lastComparison;
16047
      }
483 rajveer 16048
      lastComparison = Boolean.valueOf(isSetTo_date()).compareTo(isSetTo_date());
68 ashish 16049
      if (lastComparison != 0) {
16050
        return lastComparison;
16051
      }
483 rajveer 16052
      lastComparison = TBaseHelper.compareTo(to_date, typedOther.to_date);
68 ashish 16053
      if (lastComparison != 0) {
16054
        return lastComparison;
16055
      }
483 rajveer 16056
      lastComparison = Boolean.valueOf(isSetStatus()).compareTo(isSetStatus());
16057
      if (lastComparison != 0) {
16058
        return lastComparison;
16059
      }
16060
      lastComparison = TBaseHelper.compareTo(status, typedOther.status);
16061
      if (lastComparison != 0) {
16062
        return lastComparison;
16063
      }
68 ashish 16064
      return 0;
16065
    }
16066
 
16067
    public void read(TProtocol iprot) throws TException {
16068
      TField field;
16069
      iprot.readStructBegin();
16070
      while (true)
16071
      {
16072
        field = iprot.readFieldBegin();
16073
        if (field.type == TType.STOP) { 
16074
          break;
16075
        }
16076
        _Fields fieldId = _Fields.findByThriftId(field.id);
16077
        if (fieldId == null) {
16078
          TProtocolUtil.skip(iprot, field.type);
16079
        } else {
16080
          switch (fieldId) {
483 rajveer 16081
            case CUSTOMER_ID:
68 ashish 16082
              if (field.type == TType.I64) {
483 rajveer 16083
                this.customerId = iprot.readI64();
16084
                setCustomerIdIsSet(true);
68 ashish 16085
              } else { 
16086
                TProtocolUtil.skip(iprot, field.type);
16087
              }
16088
              break;
483 rajveer 16089
            case FROM_DATE:
68 ashish 16090
              if (field.type == TType.I64) {
483 rajveer 16091
                this.from_date = iprot.readI64();
16092
                setFrom_dateIsSet(true);
68 ashish 16093
              } else { 
16094
                TProtocolUtil.skip(iprot, field.type);
16095
              }
16096
              break;
483 rajveer 16097
            case TO_DATE:
68 ashish 16098
              if (field.type == TType.I64) {
483 rajveer 16099
                this.to_date = iprot.readI64();
16100
                setTo_dateIsSet(true);
68 ashish 16101
              } else { 
16102
                TProtocolUtil.skip(iprot, field.type);
16103
              }
16104
              break;
483 rajveer 16105
            case STATUS:
16106
              if (field.type == TType.I32) {
16107
                this.status = OrderStatus.findByValue(iprot.readI32());
16108
              } else { 
16109
                TProtocolUtil.skip(iprot, field.type);
16110
              }
16111
              break;
68 ashish 16112
          }
16113
          iprot.readFieldEnd();
16114
        }
16115
      }
16116
      iprot.readStructEnd();
16117
      validate();
16118
    }
16119
 
16120
    public void write(TProtocol oprot) throws TException {
16121
      validate();
16122
 
16123
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16124
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
16125
      oprot.writeI64(this.customerId);
68 ashish 16126
      oprot.writeFieldEnd();
483 rajveer 16127
      oprot.writeFieldBegin(FROM_DATE_FIELD_DESC);
16128
      oprot.writeI64(this.from_date);
68 ashish 16129
      oprot.writeFieldEnd();
483 rajveer 16130
      oprot.writeFieldBegin(TO_DATE_FIELD_DESC);
16131
      oprot.writeI64(this.to_date);
68 ashish 16132
      oprot.writeFieldEnd();
483 rajveer 16133
      if (this.status != null) {
16134
        oprot.writeFieldBegin(STATUS_FIELD_DESC);
16135
        oprot.writeI32(this.status.getValue());
16136
        oprot.writeFieldEnd();
16137
      }
68 ashish 16138
      oprot.writeFieldStop();
16139
      oprot.writeStructEnd();
16140
    }
16141
 
16142
    @Override
16143
    public String toString() {
483 rajveer 16144
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_args(");
68 ashish 16145
      boolean first = true;
16146
 
483 rajveer 16147
      sb.append("customerId:");
16148
      sb.append(this.customerId);
68 ashish 16149
      first = false;
16150
      if (!first) sb.append(", ");
483 rajveer 16151
      sb.append("from_date:");
16152
      sb.append(this.from_date);
68 ashish 16153
      first = false;
16154
      if (!first) sb.append(", ");
483 rajveer 16155
      sb.append("to_date:");
16156
      sb.append(this.to_date);
68 ashish 16157
      first = false;
483 rajveer 16158
      if (!first) sb.append(", ");
16159
      sb.append("status:");
16160
      if (this.status == null) {
16161
        sb.append("null");
16162
      } else {
16163
        String status_name = status.name();
16164
        if (status_name != null) {
16165
          sb.append(status_name);
16166
          sb.append(" (");
16167
        }
16168
        sb.append(this.status);
16169
        if (status_name != null) {
16170
          sb.append(")");
16171
        }
16172
      }
16173
      first = false;
68 ashish 16174
      sb.append(")");
16175
      return sb.toString();
16176
    }
16177
 
16178
    public void validate() throws TException {
16179
      // check for required fields
16180
    }
16181
 
16182
  }
16183
 
483 rajveer 16184
  public static class getOrdersForCustomer_result implements TBase<getOrdersForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrdersForCustomer_result>   {
16185
    private static final TStruct STRUCT_DESC = new TStruct("getOrdersForCustomer_result");
68 ashish 16186
 
483 rajveer 16187
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 16188
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16189
 
483 rajveer 16190
    private List<Order> success;
68 ashish 16191
    private TransactionServiceException ex;
16192
 
16193
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16194
    public enum _Fields implements TFieldIdEnum {
16195
      SUCCESS((short)0, "success"),
16196
      EX((short)1, "ex");
16197
 
16198
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16199
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16200
 
16201
      static {
16202
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16203
          byId.put((int)field._thriftId, field);
16204
          byName.put(field.getFieldName(), field);
16205
        }
16206
      }
16207
 
16208
      /**
16209
       * Find the _Fields constant that matches fieldId, or null if its not found.
16210
       */
16211
      public static _Fields findByThriftId(int fieldId) {
16212
        return byId.get(fieldId);
16213
      }
16214
 
16215
      /**
16216
       * Find the _Fields constant that matches fieldId, throwing an exception
16217
       * if it is not found.
16218
       */
16219
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16220
        _Fields fields = findByThriftId(fieldId);
16221
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16222
        return fields;
16223
      }
16224
 
16225
      /**
16226
       * Find the _Fields constant that matches name, or null if its not found.
16227
       */
16228
      public static _Fields findByName(String name) {
16229
        return byName.get(name);
16230
      }
16231
 
16232
      private final short _thriftId;
16233
      private final String _fieldName;
16234
 
16235
      _Fields(short thriftId, String fieldName) {
16236
        _thriftId = thriftId;
16237
        _fieldName = fieldName;
16238
      }
16239
 
16240
      public short getThriftFieldId() {
16241
        return _thriftId;
16242
      }
16243
 
16244
      public String getFieldName() {
16245
        return _fieldName;
16246
      }
16247
    }
16248
 
16249
    // isset id assignments
16250
 
16251
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16252
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16253
          new ListMetaData(TType.LIST, 
16254
              new StructMetaData(TType.STRUCT, Order.class))));
68 ashish 16255
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16256
          new FieldValueMetaData(TType.STRUCT)));
16257
    }});
16258
 
16259
    static {
483 rajveer 16260
      FieldMetaData.addStructMetaDataMap(getOrdersForCustomer_result.class, metaDataMap);
68 ashish 16261
    }
16262
 
483 rajveer 16263
    public getOrdersForCustomer_result() {
68 ashish 16264
    }
16265
 
483 rajveer 16266
    public getOrdersForCustomer_result(
16267
      List<Order> success,
68 ashish 16268
      TransactionServiceException ex)
16269
    {
16270
      this();
16271
      this.success = success;
16272
      this.ex = ex;
16273
    }
16274
 
16275
    /**
16276
     * Performs a deep copy on <i>other</i>.
16277
     */
483 rajveer 16278
    public getOrdersForCustomer_result(getOrdersForCustomer_result other) {
16279
      if (other.isSetSuccess()) {
16280
        List<Order> __this__success = new ArrayList<Order>();
16281
        for (Order other_element : other.success) {
16282
          __this__success.add(new Order(other_element));
16283
        }
16284
        this.success = __this__success;
16285
      }
68 ashish 16286
      if (other.isSetEx()) {
16287
        this.ex = new TransactionServiceException(other.ex);
16288
      }
16289
    }
16290
 
483 rajveer 16291
    public getOrdersForCustomer_result deepCopy() {
16292
      return new getOrdersForCustomer_result(this);
68 ashish 16293
    }
16294
 
16295
    @Deprecated
483 rajveer 16296
    public getOrdersForCustomer_result clone() {
16297
      return new getOrdersForCustomer_result(this);
68 ashish 16298
    }
16299
 
483 rajveer 16300
    public int getSuccessSize() {
16301
      return (this.success == null) ? 0 : this.success.size();
16302
    }
16303
 
16304
    public java.util.Iterator<Order> getSuccessIterator() {
16305
      return (this.success == null) ? null : this.success.iterator();
16306
    }
16307
 
16308
    public void addToSuccess(Order elem) {
16309
      if (this.success == null) {
16310
        this.success = new ArrayList<Order>();
16311
      }
16312
      this.success.add(elem);
16313
    }
16314
 
16315
    public List<Order> getSuccess() {
68 ashish 16316
      return this.success;
16317
    }
16318
 
483 rajveer 16319
    public getOrdersForCustomer_result setSuccess(List<Order> success) {
68 ashish 16320
      this.success = success;
16321
      return this;
16322
    }
16323
 
16324
    public void unsetSuccess() {
483 rajveer 16325
      this.success = null;
68 ashish 16326
    }
16327
 
16328
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16329
    public boolean isSetSuccess() {
483 rajveer 16330
      return this.success != null;
68 ashish 16331
    }
16332
 
16333
    public void setSuccessIsSet(boolean value) {
483 rajveer 16334
      if (!value) {
16335
        this.success = null;
16336
      }
68 ashish 16337
    }
16338
 
16339
    public TransactionServiceException getEx() {
16340
      return this.ex;
16341
    }
16342
 
483 rajveer 16343
    public getOrdersForCustomer_result setEx(TransactionServiceException ex) {
68 ashish 16344
      this.ex = ex;
16345
      return this;
16346
    }
16347
 
16348
    public void unsetEx() {
16349
      this.ex = null;
16350
    }
16351
 
16352
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
16353
    public boolean isSetEx() {
16354
      return this.ex != null;
16355
    }
16356
 
16357
    public void setExIsSet(boolean value) {
16358
      if (!value) {
16359
        this.ex = null;
16360
      }
16361
    }
16362
 
16363
    public void setFieldValue(_Fields field, Object value) {
16364
      switch (field) {
16365
      case SUCCESS:
16366
        if (value == null) {
16367
          unsetSuccess();
16368
        } else {
483 rajveer 16369
          setSuccess((List<Order>)value);
68 ashish 16370
        }
16371
        break;
16372
 
16373
      case EX:
16374
        if (value == null) {
16375
          unsetEx();
16376
        } else {
16377
          setEx((TransactionServiceException)value);
16378
        }
16379
        break;
16380
 
16381
      }
16382
    }
16383
 
16384
    public void setFieldValue(int fieldID, Object value) {
16385
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16386
    }
16387
 
16388
    public Object getFieldValue(_Fields field) {
16389
      switch (field) {
16390
      case SUCCESS:
483 rajveer 16391
        return getSuccess();
68 ashish 16392
 
16393
      case EX:
16394
        return getEx();
16395
 
16396
      }
16397
      throw new IllegalStateException();
16398
    }
16399
 
16400
    public Object getFieldValue(int fieldId) {
16401
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16402
    }
16403
 
16404
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16405
    public boolean isSet(_Fields field) {
16406
      switch (field) {
16407
      case SUCCESS:
16408
        return isSetSuccess();
16409
      case EX:
16410
        return isSetEx();
16411
      }
16412
      throw new IllegalStateException();
16413
    }
16414
 
16415
    public boolean isSet(int fieldID) {
16416
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16417
    }
16418
 
16419
    @Override
16420
    public boolean equals(Object that) {
16421
      if (that == null)
16422
        return false;
483 rajveer 16423
      if (that instanceof getOrdersForCustomer_result)
16424
        return this.equals((getOrdersForCustomer_result)that);
68 ashish 16425
      return false;
16426
    }
16427
 
483 rajveer 16428
    public boolean equals(getOrdersForCustomer_result that) {
68 ashish 16429
      if (that == null)
16430
        return false;
16431
 
483 rajveer 16432
      boolean this_present_success = true && this.isSetSuccess();
16433
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 16434
      if (this_present_success || that_present_success) {
16435
        if (!(this_present_success && that_present_success))
16436
          return false;
483 rajveer 16437
        if (!this.success.equals(that.success))
68 ashish 16438
          return false;
16439
      }
16440
 
16441
      boolean this_present_ex = true && this.isSetEx();
16442
      boolean that_present_ex = true && that.isSetEx();
16443
      if (this_present_ex || that_present_ex) {
16444
        if (!(this_present_ex && that_present_ex))
16445
          return false;
16446
        if (!this.ex.equals(that.ex))
16447
          return false;
16448
      }
16449
 
16450
      return true;
16451
    }
16452
 
16453
    @Override
16454
    public int hashCode() {
16455
      return 0;
16456
    }
16457
 
483 rajveer 16458
    public int compareTo(getOrdersForCustomer_result other) {
68 ashish 16459
      if (!getClass().equals(other.getClass())) {
16460
        return getClass().getName().compareTo(other.getClass().getName());
16461
      }
16462
 
16463
      int lastComparison = 0;
483 rajveer 16464
      getOrdersForCustomer_result typedOther = (getOrdersForCustomer_result)other;
68 ashish 16465
 
16466
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
16467
      if (lastComparison != 0) {
16468
        return lastComparison;
16469
      }
16470
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
16471
      if (lastComparison != 0) {
16472
        return lastComparison;
16473
      }
16474
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
16475
      if (lastComparison != 0) {
16476
        return lastComparison;
16477
      }
16478
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
16479
      if (lastComparison != 0) {
16480
        return lastComparison;
16481
      }
16482
      return 0;
16483
    }
16484
 
16485
    public void read(TProtocol iprot) throws TException {
16486
      TField field;
16487
      iprot.readStructBegin();
16488
      while (true)
16489
      {
16490
        field = iprot.readFieldBegin();
16491
        if (field.type == TType.STOP) { 
16492
          break;
16493
        }
16494
        _Fields fieldId = _Fields.findByThriftId(field.id);
16495
        if (fieldId == null) {
16496
          TProtocolUtil.skip(iprot, field.type);
16497
        } else {
16498
          switch (fieldId) {
16499
            case SUCCESS:
483 rajveer 16500
              if (field.type == TType.LIST) {
16501
                {
1382 varun.gupt 16502
                  TList _list36 = iprot.readListBegin();
16503
                  this.success = new ArrayList<Order>(_list36.size);
16504
                  for (int _i37 = 0; _i37 < _list36.size; ++_i37)
483 rajveer 16505
                  {
1382 varun.gupt 16506
                    Order _elem38;
16507
                    _elem38 = new Order();
16508
                    _elem38.read(iprot);
16509
                    this.success.add(_elem38);
483 rajveer 16510
                  }
16511
                  iprot.readListEnd();
16512
                }
68 ashish 16513
              } else { 
16514
                TProtocolUtil.skip(iprot, field.type);
16515
              }
16516
              break;
16517
            case EX:
16518
              if (field.type == TType.STRUCT) {
16519
                this.ex = new TransactionServiceException();
16520
                this.ex.read(iprot);
16521
              } else { 
16522
                TProtocolUtil.skip(iprot, field.type);
16523
              }
16524
              break;
16525
          }
16526
          iprot.readFieldEnd();
16527
        }
16528
      }
16529
      iprot.readStructEnd();
16530
      validate();
16531
    }
16532
 
16533
    public void write(TProtocol oprot) throws TException {
16534
      oprot.writeStructBegin(STRUCT_DESC);
16535
 
16536
      if (this.isSetSuccess()) {
16537
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 16538
        {
16539
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 16540
          for (Order _iter39 : this.success)
483 rajveer 16541
          {
1382 varun.gupt 16542
            _iter39.write(oprot);
483 rajveer 16543
          }
16544
          oprot.writeListEnd();
16545
        }
68 ashish 16546
        oprot.writeFieldEnd();
16547
      } else if (this.isSetEx()) {
16548
        oprot.writeFieldBegin(EX_FIELD_DESC);
16549
        this.ex.write(oprot);
16550
        oprot.writeFieldEnd();
16551
      }
16552
      oprot.writeFieldStop();
16553
      oprot.writeStructEnd();
16554
    }
16555
 
16556
    @Override
16557
    public String toString() {
483 rajveer 16558
      StringBuilder sb = new StringBuilder("getOrdersForCustomer_result(");
68 ashish 16559
      boolean first = true;
16560
 
16561
      sb.append("success:");
483 rajveer 16562
      if (this.success == null) {
16563
        sb.append("null");
16564
      } else {
16565
        sb.append(this.success);
16566
      }
68 ashish 16567
      first = false;
16568
      if (!first) sb.append(", ");
16569
      sb.append("ex:");
16570
      if (this.ex == null) {
16571
        sb.append("null");
16572
      } else {
16573
        sb.append(this.ex);
16574
      }
16575
      first = false;
16576
      sb.append(")");
16577
      return sb.toString();
16578
    }
16579
 
16580
    public void validate() throws TException {
16581
      // check for required fields
16582
    }
16583
 
16584
  }
16585
 
483 rajveer 16586
  public static class createOrder_args implements TBase<createOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_args>   {
16587
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_args");
68 ashish 16588
 
483 rajveer 16589
    private static final TField ORDER_FIELD_DESC = new TField("order", TType.STRUCT, (short)1);
68 ashish 16590
 
483 rajveer 16591
    private Order order;
68 ashish 16592
 
16593
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16594
    public enum _Fields implements TFieldIdEnum {
483 rajveer 16595
      ORDER((short)1, "order");
68 ashish 16596
 
16597
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16598
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16599
 
16600
      static {
16601
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16602
          byId.put((int)field._thriftId, field);
16603
          byName.put(field.getFieldName(), field);
16604
        }
16605
      }
16606
 
16607
      /**
16608
       * Find the _Fields constant that matches fieldId, or null if its not found.
16609
       */
16610
      public static _Fields findByThriftId(int fieldId) {
16611
        return byId.get(fieldId);
16612
      }
16613
 
16614
      /**
16615
       * Find the _Fields constant that matches fieldId, throwing an exception
16616
       * if it is not found.
16617
       */
16618
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16619
        _Fields fields = findByThriftId(fieldId);
16620
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16621
        return fields;
16622
      }
16623
 
16624
      /**
16625
       * Find the _Fields constant that matches name, or null if its not found.
16626
       */
16627
      public static _Fields findByName(String name) {
16628
        return byName.get(name);
16629
      }
16630
 
16631
      private final short _thriftId;
16632
      private final String _fieldName;
16633
 
16634
      _Fields(short thriftId, String fieldName) {
16635
        _thriftId = thriftId;
16636
        _fieldName = fieldName;
16637
      }
16638
 
16639
      public short getThriftFieldId() {
16640
        return _thriftId;
16641
      }
16642
 
16643
      public String getFieldName() {
16644
        return _fieldName;
16645
      }
16646
    }
16647
 
16648
    // isset id assignments
16649
 
16650
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 16651
      put(_Fields.ORDER, new FieldMetaData("order", TFieldRequirementType.DEFAULT, 
16652
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 16653
    }});
16654
 
16655
    static {
483 rajveer 16656
      FieldMetaData.addStructMetaDataMap(createOrder_args.class, metaDataMap);
68 ashish 16657
    }
16658
 
483 rajveer 16659
    public createOrder_args() {
68 ashish 16660
    }
16661
 
483 rajveer 16662
    public createOrder_args(
16663
      Order order)
68 ashish 16664
    {
16665
      this();
483 rajveer 16666
      this.order = order;
68 ashish 16667
    }
16668
 
16669
    /**
16670
     * Performs a deep copy on <i>other</i>.
16671
     */
483 rajveer 16672
    public createOrder_args(createOrder_args other) {
16673
      if (other.isSetOrder()) {
16674
        this.order = new Order(other.order);
16675
      }
68 ashish 16676
    }
16677
 
483 rajveer 16678
    public createOrder_args deepCopy() {
16679
      return new createOrder_args(this);
68 ashish 16680
    }
16681
 
16682
    @Deprecated
483 rajveer 16683
    public createOrder_args clone() {
16684
      return new createOrder_args(this);
68 ashish 16685
    }
16686
 
483 rajveer 16687
    public Order getOrder() {
16688
      return this.order;
68 ashish 16689
    }
16690
 
483 rajveer 16691
    public createOrder_args setOrder(Order order) {
16692
      this.order = order;
68 ashish 16693
      return this;
16694
    }
16695
 
483 rajveer 16696
    public void unsetOrder() {
16697
      this.order = null;
68 ashish 16698
    }
16699
 
483 rajveer 16700
    /** Returns true if field order is set (has been asigned a value) and false otherwise */
16701
    public boolean isSetOrder() {
16702
      return this.order != null;
68 ashish 16703
    }
16704
 
483 rajveer 16705
    public void setOrderIsSet(boolean value) {
16706
      if (!value) {
16707
        this.order = null;
16708
      }
68 ashish 16709
    }
16710
 
16711
    public void setFieldValue(_Fields field, Object value) {
16712
      switch (field) {
483 rajveer 16713
      case ORDER:
68 ashish 16714
        if (value == null) {
483 rajveer 16715
          unsetOrder();
68 ashish 16716
        } else {
483 rajveer 16717
          setOrder((Order)value);
68 ashish 16718
        }
16719
        break;
16720
 
16721
      }
16722
    }
16723
 
16724
    public void setFieldValue(int fieldID, Object value) {
16725
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
16726
    }
16727
 
16728
    public Object getFieldValue(_Fields field) {
16729
      switch (field) {
483 rajveer 16730
      case ORDER:
16731
        return getOrder();
68 ashish 16732
 
16733
      }
16734
      throw new IllegalStateException();
16735
    }
16736
 
16737
    public Object getFieldValue(int fieldId) {
16738
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
16739
    }
16740
 
16741
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
16742
    public boolean isSet(_Fields field) {
16743
      switch (field) {
483 rajveer 16744
      case ORDER:
16745
        return isSetOrder();
68 ashish 16746
      }
16747
      throw new IllegalStateException();
16748
    }
16749
 
16750
    public boolean isSet(int fieldID) {
16751
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
16752
    }
16753
 
16754
    @Override
16755
    public boolean equals(Object that) {
16756
      if (that == null)
16757
        return false;
483 rajveer 16758
      if (that instanceof createOrder_args)
16759
        return this.equals((createOrder_args)that);
68 ashish 16760
      return false;
16761
    }
16762
 
483 rajveer 16763
    public boolean equals(createOrder_args that) {
68 ashish 16764
      if (that == null)
16765
        return false;
16766
 
483 rajveer 16767
      boolean this_present_order = true && this.isSetOrder();
16768
      boolean that_present_order = true && that.isSetOrder();
16769
      if (this_present_order || that_present_order) {
16770
        if (!(this_present_order && that_present_order))
68 ashish 16771
          return false;
483 rajveer 16772
        if (!this.order.equals(that.order))
68 ashish 16773
          return false;
16774
      }
16775
 
16776
      return true;
16777
    }
16778
 
16779
    @Override
16780
    public int hashCode() {
16781
      return 0;
16782
    }
16783
 
483 rajveer 16784
    public int compareTo(createOrder_args other) {
68 ashish 16785
      if (!getClass().equals(other.getClass())) {
16786
        return getClass().getName().compareTo(other.getClass().getName());
16787
      }
16788
 
16789
      int lastComparison = 0;
483 rajveer 16790
      createOrder_args typedOther = (createOrder_args)other;
68 ashish 16791
 
483 rajveer 16792
      lastComparison = Boolean.valueOf(isSetOrder()).compareTo(isSetOrder());
68 ashish 16793
      if (lastComparison != 0) {
16794
        return lastComparison;
16795
      }
483 rajveer 16796
      lastComparison = TBaseHelper.compareTo(order, typedOther.order);
68 ashish 16797
      if (lastComparison != 0) {
16798
        return lastComparison;
16799
      }
16800
      return 0;
16801
    }
16802
 
16803
    public void read(TProtocol iprot) throws TException {
16804
      TField field;
16805
      iprot.readStructBegin();
16806
      while (true)
16807
      {
16808
        field = iprot.readFieldBegin();
16809
        if (field.type == TType.STOP) { 
16810
          break;
16811
        }
16812
        _Fields fieldId = _Fields.findByThriftId(field.id);
16813
        if (fieldId == null) {
16814
          TProtocolUtil.skip(iprot, field.type);
16815
        } else {
16816
          switch (fieldId) {
483 rajveer 16817
            case ORDER:
16818
              if (field.type == TType.STRUCT) {
16819
                this.order = new Order();
16820
                this.order.read(iprot);
68 ashish 16821
              } else { 
16822
                TProtocolUtil.skip(iprot, field.type);
16823
              }
16824
              break;
16825
          }
16826
          iprot.readFieldEnd();
16827
        }
16828
      }
16829
      iprot.readStructEnd();
16830
      validate();
16831
    }
16832
 
16833
    public void write(TProtocol oprot) throws TException {
16834
      validate();
16835
 
16836
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 16837
      if (this.order != null) {
16838
        oprot.writeFieldBegin(ORDER_FIELD_DESC);
16839
        this.order.write(oprot);
16840
        oprot.writeFieldEnd();
16841
      }
68 ashish 16842
      oprot.writeFieldStop();
16843
      oprot.writeStructEnd();
16844
    }
16845
 
16846
    @Override
16847
    public String toString() {
483 rajveer 16848
      StringBuilder sb = new StringBuilder("createOrder_args(");
68 ashish 16849
      boolean first = true;
16850
 
483 rajveer 16851
      sb.append("order:");
16852
      if (this.order == null) {
16853
        sb.append("null");
16854
      } else {
16855
        sb.append(this.order);
16856
      }
68 ashish 16857
      first = false;
16858
      sb.append(")");
16859
      return sb.toString();
16860
    }
16861
 
16862
    public void validate() throws TException {
16863
      // check for required fields
16864
    }
16865
 
16866
  }
16867
 
483 rajveer 16868
  public static class createOrder_result implements TBase<createOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<createOrder_result>   {
16869
    private static final TStruct STRUCT_DESC = new TStruct("createOrder_result");
68 ashish 16870
 
483 rajveer 16871
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
68 ashish 16872
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
16873
 
483 rajveer 16874
    private long success;
68 ashish 16875
    private TransactionServiceException ex;
16876
 
16877
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
16878
    public enum _Fields implements TFieldIdEnum {
16879
      SUCCESS((short)0, "success"),
16880
      EX((short)1, "ex");
16881
 
16882
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
16883
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
16884
 
16885
      static {
16886
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
16887
          byId.put((int)field._thriftId, field);
16888
          byName.put(field.getFieldName(), field);
16889
        }
16890
      }
16891
 
16892
      /**
16893
       * Find the _Fields constant that matches fieldId, or null if its not found.
16894
       */
16895
      public static _Fields findByThriftId(int fieldId) {
16896
        return byId.get(fieldId);
16897
      }
16898
 
16899
      /**
16900
       * Find the _Fields constant that matches fieldId, throwing an exception
16901
       * if it is not found.
16902
       */
16903
      public static _Fields findByThriftIdOrThrow(int fieldId) {
16904
        _Fields fields = findByThriftId(fieldId);
16905
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
16906
        return fields;
16907
      }
16908
 
16909
      /**
16910
       * Find the _Fields constant that matches name, or null if its not found.
16911
       */
16912
      public static _Fields findByName(String name) {
16913
        return byName.get(name);
16914
      }
16915
 
16916
      private final short _thriftId;
16917
      private final String _fieldName;
16918
 
16919
      _Fields(short thriftId, String fieldName) {
16920
        _thriftId = thriftId;
16921
        _fieldName = fieldName;
16922
      }
16923
 
16924
      public short getThriftFieldId() {
16925
        return _thriftId;
16926
      }
16927
 
16928
      public String getFieldName() {
16929
        return _fieldName;
16930
      }
16931
    }
16932
 
16933
    // isset id assignments
16934
    private static final int __SUCCESS_ISSET_ID = 0;
16935
    private BitSet __isset_bit_vector = new BitSet(1);
16936
 
16937
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
16938
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 16939
          new FieldValueMetaData(TType.I64)));
68 ashish 16940
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
16941
          new FieldValueMetaData(TType.STRUCT)));
16942
    }});
16943
 
16944
    static {
483 rajveer 16945
      FieldMetaData.addStructMetaDataMap(createOrder_result.class, metaDataMap);
68 ashish 16946
    }
16947
 
483 rajveer 16948
    public createOrder_result() {
68 ashish 16949
    }
16950
 
483 rajveer 16951
    public createOrder_result(
16952
      long success,
68 ashish 16953
      TransactionServiceException ex)
16954
    {
16955
      this();
16956
      this.success = success;
16957
      setSuccessIsSet(true);
16958
      this.ex = ex;
16959
    }
16960
 
16961
    /**
16962
     * Performs a deep copy on <i>other</i>.
16963
     */
483 rajveer 16964
    public createOrder_result(createOrder_result other) {
68 ashish 16965
      __isset_bit_vector.clear();
16966
      __isset_bit_vector.or(other.__isset_bit_vector);
16967
      this.success = other.success;
16968
      if (other.isSetEx()) {
16969
        this.ex = new TransactionServiceException(other.ex);
16970
      }
16971
    }
16972
 
483 rajveer 16973
    public createOrder_result deepCopy() {
16974
      return new createOrder_result(this);
68 ashish 16975
    }
16976
 
16977
    @Deprecated
483 rajveer 16978
    public createOrder_result clone() {
16979
      return new createOrder_result(this);
68 ashish 16980
    }
16981
 
483 rajveer 16982
    public long getSuccess() {
68 ashish 16983
      return this.success;
16984
    }
16985
 
483 rajveer 16986
    public createOrder_result setSuccess(long success) {
68 ashish 16987
      this.success = success;
16988
      setSuccessIsSet(true);
16989
      return this;
16990
    }
16991
 
16992
    public void unsetSuccess() {
16993
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
16994
    }
16995
 
16996
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
16997
    public boolean isSetSuccess() {
16998
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
16999
    }
17000
 
17001
    public void setSuccessIsSet(boolean value) {
17002
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
17003
    }
17004
 
17005
    public TransactionServiceException getEx() {
17006
      return this.ex;
17007
    }
17008
 
483 rajveer 17009
    public createOrder_result setEx(TransactionServiceException ex) {
68 ashish 17010
      this.ex = ex;
17011
      return this;
17012
    }
17013
 
17014
    public void unsetEx() {
17015
      this.ex = null;
17016
    }
17017
 
17018
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17019
    public boolean isSetEx() {
17020
      return this.ex != null;
17021
    }
17022
 
17023
    public void setExIsSet(boolean value) {
17024
      if (!value) {
17025
        this.ex = null;
17026
      }
17027
    }
17028
 
17029
    public void setFieldValue(_Fields field, Object value) {
17030
      switch (field) {
17031
      case SUCCESS:
17032
        if (value == null) {
17033
          unsetSuccess();
17034
        } else {
483 rajveer 17035
          setSuccess((Long)value);
68 ashish 17036
        }
17037
        break;
17038
 
17039
      case EX:
17040
        if (value == null) {
17041
          unsetEx();
17042
        } else {
17043
          setEx((TransactionServiceException)value);
17044
        }
17045
        break;
17046
 
17047
      }
17048
    }
17049
 
17050
    public void setFieldValue(int fieldID, Object value) {
17051
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17052
    }
17053
 
17054
    public Object getFieldValue(_Fields field) {
17055
      switch (field) {
17056
      case SUCCESS:
483 rajveer 17057
        return new Long(getSuccess());
68 ashish 17058
 
17059
      case EX:
17060
        return getEx();
17061
 
17062
      }
17063
      throw new IllegalStateException();
17064
    }
17065
 
17066
    public Object getFieldValue(int fieldId) {
17067
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17068
    }
17069
 
17070
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17071
    public boolean isSet(_Fields field) {
17072
      switch (field) {
17073
      case SUCCESS:
17074
        return isSetSuccess();
17075
      case EX:
17076
        return isSetEx();
17077
      }
17078
      throw new IllegalStateException();
17079
    }
17080
 
17081
    public boolean isSet(int fieldID) {
17082
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17083
    }
17084
 
17085
    @Override
17086
    public boolean equals(Object that) {
17087
      if (that == null)
17088
        return false;
483 rajveer 17089
      if (that instanceof createOrder_result)
17090
        return this.equals((createOrder_result)that);
68 ashish 17091
      return false;
17092
    }
17093
 
483 rajveer 17094
    public boolean equals(createOrder_result that) {
68 ashish 17095
      if (that == null)
17096
        return false;
17097
 
17098
      boolean this_present_success = true;
17099
      boolean that_present_success = true;
17100
      if (this_present_success || that_present_success) {
17101
        if (!(this_present_success && that_present_success))
17102
          return false;
17103
        if (this.success != that.success)
17104
          return false;
17105
      }
17106
 
17107
      boolean this_present_ex = true && this.isSetEx();
17108
      boolean that_present_ex = true && that.isSetEx();
17109
      if (this_present_ex || that_present_ex) {
17110
        if (!(this_present_ex && that_present_ex))
17111
          return false;
17112
        if (!this.ex.equals(that.ex))
17113
          return false;
17114
      }
17115
 
17116
      return true;
17117
    }
17118
 
17119
    @Override
17120
    public int hashCode() {
17121
      return 0;
17122
    }
17123
 
483 rajveer 17124
    public int compareTo(createOrder_result other) {
68 ashish 17125
      if (!getClass().equals(other.getClass())) {
17126
        return getClass().getName().compareTo(other.getClass().getName());
17127
      }
17128
 
17129
      int lastComparison = 0;
483 rajveer 17130
      createOrder_result typedOther = (createOrder_result)other;
68 ashish 17131
 
17132
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17133
      if (lastComparison != 0) {
17134
        return lastComparison;
17135
      }
17136
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17137
      if (lastComparison != 0) {
17138
        return lastComparison;
17139
      }
17140
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17141
      if (lastComparison != 0) {
17142
        return lastComparison;
17143
      }
17144
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17145
      if (lastComparison != 0) {
17146
        return lastComparison;
17147
      }
17148
      return 0;
17149
    }
17150
 
17151
    public void read(TProtocol iprot) throws TException {
17152
      TField field;
17153
      iprot.readStructBegin();
17154
      while (true)
17155
      {
17156
        field = iprot.readFieldBegin();
17157
        if (field.type == TType.STOP) { 
17158
          break;
17159
        }
17160
        _Fields fieldId = _Fields.findByThriftId(field.id);
17161
        if (fieldId == null) {
17162
          TProtocolUtil.skip(iprot, field.type);
17163
        } else {
17164
          switch (fieldId) {
17165
            case SUCCESS:
483 rajveer 17166
              if (field.type == TType.I64) {
17167
                this.success = iprot.readI64();
68 ashish 17168
                setSuccessIsSet(true);
17169
              } else { 
17170
                TProtocolUtil.skip(iprot, field.type);
17171
              }
17172
              break;
17173
            case EX:
17174
              if (field.type == TType.STRUCT) {
17175
                this.ex = new TransactionServiceException();
17176
                this.ex.read(iprot);
17177
              } else { 
17178
                TProtocolUtil.skip(iprot, field.type);
17179
              }
17180
              break;
17181
          }
17182
          iprot.readFieldEnd();
17183
        }
17184
      }
17185
      iprot.readStructEnd();
17186
      validate();
17187
    }
17188
 
17189
    public void write(TProtocol oprot) throws TException {
17190
      oprot.writeStructBegin(STRUCT_DESC);
17191
 
17192
      if (this.isSetSuccess()) {
17193
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17194
        oprot.writeI64(this.success);
68 ashish 17195
        oprot.writeFieldEnd();
17196
      } else if (this.isSetEx()) {
17197
        oprot.writeFieldBegin(EX_FIELD_DESC);
17198
        this.ex.write(oprot);
17199
        oprot.writeFieldEnd();
17200
      }
17201
      oprot.writeFieldStop();
17202
      oprot.writeStructEnd();
17203
    }
17204
 
17205
    @Override
17206
    public String toString() {
483 rajveer 17207
      StringBuilder sb = new StringBuilder("createOrder_result(");
68 ashish 17208
      boolean first = true;
17209
 
17210
      sb.append("success:");
17211
      sb.append(this.success);
17212
      first = false;
17213
      if (!first) sb.append(", ");
17214
      sb.append("ex:");
17215
      if (this.ex == null) {
17216
        sb.append("null");
17217
      } else {
17218
        sb.append(this.ex);
17219
      }
17220
      first = false;
17221
      sb.append(")");
17222
      return sb.toString();
17223
    }
17224
 
17225
    public void validate() throws TException {
17226
      // check for required fields
17227
    }
17228
 
17229
  }
17230
 
483 rajveer 17231
  public static class getOrder_args implements TBase<getOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_args>   {
17232
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_args");
68 ashish 17233
 
483 rajveer 17234
    private static final TField ID_FIELD_DESC = new TField("id", TType.I64, (short)1);
68 ashish 17235
 
483 rajveer 17236
    private long id;
68 ashish 17237
 
17238
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17239
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17240
      ID((short)1, "id");
68 ashish 17241
 
17242
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17243
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17244
 
17245
      static {
17246
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17247
          byId.put((int)field._thriftId, field);
17248
          byName.put(field.getFieldName(), field);
17249
        }
17250
      }
17251
 
17252
      /**
17253
       * Find the _Fields constant that matches fieldId, or null if its not found.
17254
       */
17255
      public static _Fields findByThriftId(int fieldId) {
17256
        return byId.get(fieldId);
17257
      }
17258
 
17259
      /**
17260
       * Find the _Fields constant that matches fieldId, throwing an exception
17261
       * if it is not found.
17262
       */
17263
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17264
        _Fields fields = findByThriftId(fieldId);
17265
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17266
        return fields;
17267
      }
17268
 
17269
      /**
17270
       * Find the _Fields constant that matches name, or null if its not found.
17271
       */
17272
      public static _Fields findByName(String name) {
17273
        return byName.get(name);
17274
      }
17275
 
17276
      private final short _thriftId;
17277
      private final String _fieldName;
17278
 
17279
      _Fields(short thriftId, String fieldName) {
17280
        _thriftId = thriftId;
17281
        _fieldName = fieldName;
17282
      }
17283
 
17284
      public short getThriftFieldId() {
17285
        return _thriftId;
17286
      }
17287
 
17288
      public String getFieldName() {
17289
        return _fieldName;
17290
      }
17291
    }
17292
 
17293
    // isset id assignments
483 rajveer 17294
    private static final int __ID_ISSET_ID = 0;
17295
    private BitSet __isset_bit_vector = new BitSet(1);
68 ashish 17296
 
17297
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17298
      put(_Fields.ID, new FieldMetaData("id", TFieldRequirementType.DEFAULT, 
68 ashish 17299
          new FieldValueMetaData(TType.I64)));
17300
    }});
17301
 
17302
    static {
483 rajveer 17303
      FieldMetaData.addStructMetaDataMap(getOrder_args.class, metaDataMap);
68 ashish 17304
    }
17305
 
483 rajveer 17306
    public getOrder_args() {
68 ashish 17307
    }
17308
 
483 rajveer 17309
    public getOrder_args(
17310
      long id)
68 ashish 17311
    {
17312
      this();
483 rajveer 17313
      this.id = id;
17314
      setIdIsSet(true);
68 ashish 17315
    }
17316
 
17317
    /**
17318
     * Performs a deep copy on <i>other</i>.
17319
     */
483 rajveer 17320
    public getOrder_args(getOrder_args other) {
68 ashish 17321
      __isset_bit_vector.clear();
17322
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17323
      this.id = other.id;
68 ashish 17324
    }
17325
 
483 rajveer 17326
    public getOrder_args deepCopy() {
17327
      return new getOrder_args(this);
68 ashish 17328
    }
17329
 
17330
    @Deprecated
483 rajveer 17331
    public getOrder_args clone() {
17332
      return new getOrder_args(this);
68 ashish 17333
    }
17334
 
483 rajveer 17335
    public long getId() {
17336
      return this.id;
68 ashish 17337
    }
17338
 
483 rajveer 17339
    public getOrder_args setId(long id) {
17340
      this.id = id;
17341
      setIdIsSet(true);
68 ashish 17342
      return this;
17343
    }
17344
 
483 rajveer 17345
    public void unsetId() {
17346
      __isset_bit_vector.clear(__ID_ISSET_ID);
68 ashish 17347
    }
17348
 
483 rajveer 17349
    /** Returns true if field id is set (has been asigned a value) and false otherwise */
17350
    public boolean isSetId() {
17351
      return __isset_bit_vector.get(__ID_ISSET_ID);
68 ashish 17352
    }
17353
 
483 rajveer 17354
    public void setIdIsSet(boolean value) {
17355
      __isset_bit_vector.set(__ID_ISSET_ID, value);
68 ashish 17356
    }
17357
 
17358
    public void setFieldValue(_Fields field, Object value) {
17359
      switch (field) {
483 rajveer 17360
      case ID:
68 ashish 17361
        if (value == null) {
483 rajveer 17362
          unsetId();
68 ashish 17363
        } else {
483 rajveer 17364
          setId((Long)value);
68 ashish 17365
        }
17366
        break;
17367
 
17368
      }
17369
    }
17370
 
17371
    public void setFieldValue(int fieldID, Object value) {
17372
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17373
    }
17374
 
17375
    public Object getFieldValue(_Fields field) {
17376
      switch (field) {
483 rajveer 17377
      case ID:
17378
        return new Long(getId());
68 ashish 17379
 
17380
      }
17381
      throw new IllegalStateException();
17382
    }
17383
 
17384
    public Object getFieldValue(int fieldId) {
17385
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17386
    }
17387
 
17388
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17389
    public boolean isSet(_Fields field) {
17390
      switch (field) {
483 rajveer 17391
      case ID:
17392
        return isSetId();
68 ashish 17393
      }
17394
      throw new IllegalStateException();
17395
    }
17396
 
17397
    public boolean isSet(int fieldID) {
17398
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17399
    }
17400
 
17401
    @Override
17402
    public boolean equals(Object that) {
17403
      if (that == null)
17404
        return false;
483 rajveer 17405
      if (that instanceof getOrder_args)
17406
        return this.equals((getOrder_args)that);
68 ashish 17407
      return false;
17408
    }
17409
 
483 rajveer 17410
    public boolean equals(getOrder_args that) {
68 ashish 17411
      if (that == null)
17412
        return false;
17413
 
483 rajveer 17414
      boolean this_present_id = true;
17415
      boolean that_present_id = true;
17416
      if (this_present_id || that_present_id) {
17417
        if (!(this_present_id && that_present_id))
68 ashish 17418
          return false;
483 rajveer 17419
        if (this.id != that.id)
68 ashish 17420
          return false;
17421
      }
17422
 
17423
      return true;
17424
    }
17425
 
17426
    @Override
17427
    public int hashCode() {
17428
      return 0;
17429
    }
17430
 
483 rajveer 17431
    public int compareTo(getOrder_args other) {
68 ashish 17432
      if (!getClass().equals(other.getClass())) {
17433
        return getClass().getName().compareTo(other.getClass().getName());
17434
      }
17435
 
17436
      int lastComparison = 0;
483 rajveer 17437
      getOrder_args typedOther = (getOrder_args)other;
68 ashish 17438
 
483 rajveer 17439
      lastComparison = Boolean.valueOf(isSetId()).compareTo(isSetId());
68 ashish 17440
      if (lastComparison != 0) {
17441
        return lastComparison;
17442
      }
483 rajveer 17443
      lastComparison = TBaseHelper.compareTo(id, typedOther.id);
68 ashish 17444
      if (lastComparison != 0) {
17445
        return lastComparison;
17446
      }
17447
      return 0;
17448
    }
17449
 
17450
    public void read(TProtocol iprot) throws TException {
17451
      TField field;
17452
      iprot.readStructBegin();
17453
      while (true)
17454
      {
17455
        field = iprot.readFieldBegin();
17456
        if (field.type == TType.STOP) { 
17457
          break;
17458
        }
17459
        _Fields fieldId = _Fields.findByThriftId(field.id);
17460
        if (fieldId == null) {
17461
          TProtocolUtil.skip(iprot, field.type);
17462
        } else {
17463
          switch (fieldId) {
483 rajveer 17464
            case ID:
68 ashish 17465
              if (field.type == TType.I64) {
483 rajveer 17466
                this.id = iprot.readI64();
17467
                setIdIsSet(true);
68 ashish 17468
              } else { 
17469
                TProtocolUtil.skip(iprot, field.type);
17470
              }
17471
              break;
17472
          }
17473
          iprot.readFieldEnd();
17474
        }
17475
      }
17476
      iprot.readStructEnd();
17477
      validate();
17478
    }
17479
 
17480
    public void write(TProtocol oprot) throws TException {
17481
      validate();
17482
 
17483
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 17484
      oprot.writeFieldBegin(ID_FIELD_DESC);
17485
      oprot.writeI64(this.id);
68 ashish 17486
      oprot.writeFieldEnd();
17487
      oprot.writeFieldStop();
17488
      oprot.writeStructEnd();
17489
    }
17490
 
17491
    @Override
17492
    public String toString() {
483 rajveer 17493
      StringBuilder sb = new StringBuilder("getOrder_args(");
68 ashish 17494
      boolean first = true;
17495
 
483 rajveer 17496
      sb.append("id:");
17497
      sb.append(this.id);
68 ashish 17498
      first = false;
17499
      sb.append(")");
17500
      return sb.toString();
17501
    }
17502
 
17503
    public void validate() throws TException {
17504
      // check for required fields
17505
    }
17506
 
17507
  }
17508
 
483 rajveer 17509
  public static class getOrder_result implements TBase<getOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrder_result>   {
17510
    private static final TStruct STRUCT_DESC = new TStruct("getOrder_result");
68 ashish 17511
 
483 rajveer 17512
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
68 ashish 17513
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
17514
 
483 rajveer 17515
    private Order success;
68 ashish 17516
    private TransactionServiceException ex;
17517
 
17518
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17519
    public enum _Fields implements TFieldIdEnum {
17520
      SUCCESS((short)0, "success"),
17521
      EX((short)1, "ex");
17522
 
17523
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17524
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17525
 
17526
      static {
17527
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17528
          byId.put((int)field._thriftId, field);
17529
          byName.put(field.getFieldName(), field);
17530
        }
17531
      }
17532
 
17533
      /**
17534
       * Find the _Fields constant that matches fieldId, or null if its not found.
17535
       */
17536
      public static _Fields findByThriftId(int fieldId) {
17537
        return byId.get(fieldId);
17538
      }
17539
 
17540
      /**
17541
       * Find the _Fields constant that matches fieldId, throwing an exception
17542
       * if it is not found.
17543
       */
17544
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17545
        _Fields fields = findByThriftId(fieldId);
17546
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17547
        return fields;
17548
      }
17549
 
17550
      /**
17551
       * Find the _Fields constant that matches name, or null if its not found.
17552
       */
17553
      public static _Fields findByName(String name) {
17554
        return byName.get(name);
17555
      }
17556
 
17557
      private final short _thriftId;
17558
      private final String _fieldName;
17559
 
17560
      _Fields(short thriftId, String fieldName) {
17561
        _thriftId = thriftId;
17562
        _fieldName = fieldName;
17563
      }
17564
 
17565
      public short getThriftFieldId() {
17566
        return _thriftId;
17567
      }
17568
 
17569
      public String getFieldName() {
17570
        return _fieldName;
17571
      }
17572
    }
17573
 
17574
    // isset id assignments
17575
 
17576
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
17577
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 17578
          new StructMetaData(TType.STRUCT, Order.class)));
68 ashish 17579
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
17580
          new FieldValueMetaData(TType.STRUCT)));
17581
    }});
17582
 
17583
    static {
483 rajveer 17584
      FieldMetaData.addStructMetaDataMap(getOrder_result.class, metaDataMap);
68 ashish 17585
    }
17586
 
483 rajveer 17587
    public getOrder_result() {
68 ashish 17588
    }
17589
 
483 rajveer 17590
    public getOrder_result(
17591
      Order success,
68 ashish 17592
      TransactionServiceException ex)
17593
    {
17594
      this();
17595
      this.success = success;
17596
      this.ex = ex;
17597
    }
17598
 
17599
    /**
17600
     * Performs a deep copy on <i>other</i>.
17601
     */
483 rajveer 17602
    public getOrder_result(getOrder_result other) {
17603
      if (other.isSetSuccess()) {
17604
        this.success = new Order(other.success);
17605
      }
68 ashish 17606
      if (other.isSetEx()) {
17607
        this.ex = new TransactionServiceException(other.ex);
17608
      }
17609
    }
17610
 
483 rajveer 17611
    public getOrder_result deepCopy() {
17612
      return new getOrder_result(this);
68 ashish 17613
    }
17614
 
17615
    @Deprecated
483 rajveer 17616
    public getOrder_result clone() {
17617
      return new getOrder_result(this);
68 ashish 17618
    }
17619
 
483 rajveer 17620
    public Order getSuccess() {
68 ashish 17621
      return this.success;
17622
    }
17623
 
483 rajveer 17624
    public getOrder_result setSuccess(Order success) {
68 ashish 17625
      this.success = success;
17626
      return this;
17627
    }
17628
 
17629
    public void unsetSuccess() {
483 rajveer 17630
      this.success = null;
68 ashish 17631
    }
17632
 
17633
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
17634
    public boolean isSetSuccess() {
483 rajveer 17635
      return this.success != null;
68 ashish 17636
    }
17637
 
17638
    public void setSuccessIsSet(boolean value) {
483 rajveer 17639
      if (!value) {
17640
        this.success = null;
17641
      }
68 ashish 17642
    }
17643
 
17644
    public TransactionServiceException getEx() {
17645
      return this.ex;
17646
    }
17647
 
483 rajveer 17648
    public getOrder_result setEx(TransactionServiceException ex) {
68 ashish 17649
      this.ex = ex;
17650
      return this;
17651
    }
17652
 
17653
    public void unsetEx() {
17654
      this.ex = null;
17655
    }
17656
 
17657
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
17658
    public boolean isSetEx() {
17659
      return this.ex != null;
17660
    }
17661
 
17662
    public void setExIsSet(boolean value) {
17663
      if (!value) {
17664
        this.ex = null;
17665
      }
17666
    }
17667
 
17668
    public void setFieldValue(_Fields field, Object value) {
17669
      switch (field) {
17670
      case SUCCESS:
17671
        if (value == null) {
17672
          unsetSuccess();
17673
        } else {
483 rajveer 17674
          setSuccess((Order)value);
68 ashish 17675
        }
17676
        break;
17677
 
17678
      case EX:
17679
        if (value == null) {
17680
          unsetEx();
17681
        } else {
17682
          setEx((TransactionServiceException)value);
17683
        }
17684
        break;
17685
 
17686
      }
17687
    }
17688
 
17689
    public void setFieldValue(int fieldID, Object value) {
17690
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
17691
    }
17692
 
17693
    public Object getFieldValue(_Fields field) {
17694
      switch (field) {
17695
      case SUCCESS:
483 rajveer 17696
        return getSuccess();
68 ashish 17697
 
17698
      case EX:
17699
        return getEx();
17700
 
17701
      }
17702
      throw new IllegalStateException();
17703
    }
17704
 
17705
    public Object getFieldValue(int fieldId) {
17706
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
17707
    }
17708
 
17709
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
17710
    public boolean isSet(_Fields field) {
17711
      switch (field) {
17712
      case SUCCESS:
17713
        return isSetSuccess();
17714
      case EX:
17715
        return isSetEx();
17716
      }
17717
      throw new IllegalStateException();
17718
    }
17719
 
17720
    public boolean isSet(int fieldID) {
17721
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
17722
    }
17723
 
17724
    @Override
17725
    public boolean equals(Object that) {
17726
      if (that == null)
17727
        return false;
483 rajveer 17728
      if (that instanceof getOrder_result)
17729
        return this.equals((getOrder_result)that);
68 ashish 17730
      return false;
17731
    }
17732
 
483 rajveer 17733
    public boolean equals(getOrder_result that) {
68 ashish 17734
      if (that == null)
17735
        return false;
17736
 
483 rajveer 17737
      boolean this_present_success = true && this.isSetSuccess();
17738
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 17739
      if (this_present_success || that_present_success) {
17740
        if (!(this_present_success && that_present_success))
17741
          return false;
483 rajveer 17742
        if (!this.success.equals(that.success))
68 ashish 17743
          return false;
17744
      }
17745
 
17746
      boolean this_present_ex = true && this.isSetEx();
17747
      boolean that_present_ex = true && that.isSetEx();
17748
      if (this_present_ex || that_present_ex) {
17749
        if (!(this_present_ex && that_present_ex))
17750
          return false;
17751
        if (!this.ex.equals(that.ex))
17752
          return false;
17753
      }
17754
 
17755
      return true;
17756
    }
17757
 
17758
    @Override
17759
    public int hashCode() {
17760
      return 0;
17761
    }
17762
 
483 rajveer 17763
    public int compareTo(getOrder_result other) {
68 ashish 17764
      if (!getClass().equals(other.getClass())) {
17765
        return getClass().getName().compareTo(other.getClass().getName());
17766
      }
17767
 
17768
      int lastComparison = 0;
483 rajveer 17769
      getOrder_result typedOther = (getOrder_result)other;
68 ashish 17770
 
17771
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
17772
      if (lastComparison != 0) {
17773
        return lastComparison;
17774
      }
17775
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
17776
      if (lastComparison != 0) {
17777
        return lastComparison;
17778
      }
17779
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
17780
      if (lastComparison != 0) {
17781
        return lastComparison;
17782
      }
17783
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
17784
      if (lastComparison != 0) {
17785
        return lastComparison;
17786
      }
17787
      return 0;
17788
    }
17789
 
17790
    public void read(TProtocol iprot) throws TException {
17791
      TField field;
17792
      iprot.readStructBegin();
17793
      while (true)
17794
      {
17795
        field = iprot.readFieldBegin();
17796
        if (field.type == TType.STOP) { 
17797
          break;
17798
        }
17799
        _Fields fieldId = _Fields.findByThriftId(field.id);
17800
        if (fieldId == null) {
17801
          TProtocolUtil.skip(iprot, field.type);
17802
        } else {
17803
          switch (fieldId) {
17804
            case SUCCESS:
483 rajveer 17805
              if (field.type == TType.STRUCT) {
17806
                this.success = new Order();
17807
                this.success.read(iprot);
68 ashish 17808
              } else { 
17809
                TProtocolUtil.skip(iprot, field.type);
17810
              }
17811
              break;
17812
            case EX:
17813
              if (field.type == TType.STRUCT) {
17814
                this.ex = new TransactionServiceException();
17815
                this.ex.read(iprot);
17816
              } else { 
17817
                TProtocolUtil.skip(iprot, field.type);
17818
              }
17819
              break;
17820
          }
17821
          iprot.readFieldEnd();
17822
        }
17823
      }
17824
      iprot.readStructEnd();
17825
      validate();
17826
    }
17827
 
17828
    public void write(TProtocol oprot) throws TException {
17829
      oprot.writeStructBegin(STRUCT_DESC);
17830
 
17831
      if (this.isSetSuccess()) {
17832
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 17833
        this.success.write(oprot);
68 ashish 17834
        oprot.writeFieldEnd();
17835
      } else if (this.isSetEx()) {
17836
        oprot.writeFieldBegin(EX_FIELD_DESC);
17837
        this.ex.write(oprot);
17838
        oprot.writeFieldEnd();
17839
      }
17840
      oprot.writeFieldStop();
17841
      oprot.writeStructEnd();
17842
    }
17843
 
17844
    @Override
17845
    public String toString() {
483 rajveer 17846
      StringBuilder sb = new StringBuilder("getOrder_result(");
68 ashish 17847
      boolean first = true;
17848
 
17849
      sb.append("success:");
483 rajveer 17850
      if (this.success == null) {
17851
        sb.append("null");
17852
      } else {
17853
        sb.append(this.success);
17854
      }
68 ashish 17855
      first = false;
17856
      if (!first) sb.append(", ");
17857
      sb.append("ex:");
17858
      if (this.ex == null) {
17859
        sb.append("null");
17860
      } else {
17861
        sb.append(this.ex);
17862
      }
17863
      first = false;
17864
      sb.append(")");
17865
      return sb.toString();
17866
    }
17867
 
17868
    public void validate() throws TException {
17869
      // check for required fields
17870
    }
17871
 
17872
  }
17873
 
483 rajveer 17874
  public static class getLineItemsForOrder_args implements TBase<getLineItemsForOrder_args._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_args>   {
17875
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_args");
68 ashish 17876
 
483 rajveer 17877
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
68 ashish 17878
 
483 rajveer 17879
    private long orderId;
68 ashish 17880
 
17881
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
17882
    public enum _Fields implements TFieldIdEnum {
483 rajveer 17883
      ORDER_ID((short)1, "orderId");
68 ashish 17884
 
17885
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
17886
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
17887
 
17888
      static {
17889
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
17890
          byId.put((int)field._thriftId, field);
17891
          byName.put(field.getFieldName(), field);
17892
        }
17893
      }
17894
 
17895
      /**
17896
       * Find the _Fields constant that matches fieldId, or null if its not found.
17897
       */
17898
      public static _Fields findByThriftId(int fieldId) {
17899
        return byId.get(fieldId);
17900
      }
17901
 
17902
      /**
17903
       * Find the _Fields constant that matches fieldId, throwing an exception
17904
       * if it is not found.
17905
       */
17906
      public static _Fields findByThriftIdOrThrow(int fieldId) {
17907
        _Fields fields = findByThriftId(fieldId);
17908
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
17909
        return fields;
17910
      }
17911
 
17912
      /**
17913
       * Find the _Fields constant that matches name, or null if its not found.
17914
       */
17915
      public static _Fields findByName(String name) {
17916
        return byName.get(name);
17917
      }
17918
 
17919
      private final short _thriftId;
17920
      private final String _fieldName;
17921
 
17922
      _Fields(short thriftId, String fieldName) {
17923
        _thriftId = thriftId;
17924
        _fieldName = fieldName;
17925
      }
17926
 
17927
      public short getThriftFieldId() {
17928
        return _thriftId;
17929
      }
17930
 
17931
      public String getFieldName() {
17932
        return _fieldName;
17933
      }
17934
    }
17935
 
17936
    // isset id assignments
483 rajveer 17937
    private static final int __ORDERID_ISSET_ID = 0;
68 ashish 17938
    private BitSet __isset_bit_vector = new BitSet(1);
17939
 
17940
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 17941
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
68 ashish 17942
          new FieldValueMetaData(TType.I64)));
17943
    }});
17944
 
17945
    static {
483 rajveer 17946
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_args.class, metaDataMap);
68 ashish 17947
    }
17948
 
483 rajveer 17949
    public getLineItemsForOrder_args() {
68 ashish 17950
    }
17951
 
483 rajveer 17952
    public getLineItemsForOrder_args(
17953
      long orderId)
68 ashish 17954
    {
17955
      this();
483 rajveer 17956
      this.orderId = orderId;
17957
      setOrderIdIsSet(true);
68 ashish 17958
    }
17959
 
17960
    /**
17961
     * Performs a deep copy on <i>other</i>.
17962
     */
483 rajveer 17963
    public getLineItemsForOrder_args(getLineItemsForOrder_args other) {
68 ashish 17964
      __isset_bit_vector.clear();
17965
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 17966
      this.orderId = other.orderId;
68 ashish 17967
    }
17968
 
483 rajveer 17969
    public getLineItemsForOrder_args deepCopy() {
17970
      return new getLineItemsForOrder_args(this);
68 ashish 17971
    }
17972
 
17973
    @Deprecated
483 rajveer 17974
    public getLineItemsForOrder_args clone() {
17975
      return new getLineItemsForOrder_args(this);
68 ashish 17976
    }
17977
 
483 rajveer 17978
    public long getOrderId() {
17979
      return this.orderId;
68 ashish 17980
    }
17981
 
483 rajveer 17982
    public getLineItemsForOrder_args setOrderId(long orderId) {
17983
      this.orderId = orderId;
17984
      setOrderIdIsSet(true);
68 ashish 17985
      return this;
17986
    }
17987
 
483 rajveer 17988
    public void unsetOrderId() {
17989
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
68 ashish 17990
    }
17991
 
483 rajveer 17992
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
17993
    public boolean isSetOrderId() {
17994
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
68 ashish 17995
    }
17996
 
483 rajveer 17997
    public void setOrderIdIsSet(boolean value) {
17998
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
68 ashish 17999
    }
18000
 
18001
    public void setFieldValue(_Fields field, Object value) {
18002
      switch (field) {
483 rajveer 18003
      case ORDER_ID:
68 ashish 18004
        if (value == null) {
483 rajveer 18005
          unsetOrderId();
68 ashish 18006
        } else {
483 rajveer 18007
          setOrderId((Long)value);
68 ashish 18008
        }
18009
        break;
18010
 
18011
      }
18012
    }
18013
 
18014
    public void setFieldValue(int fieldID, Object value) {
18015
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18016
    }
18017
 
18018
    public Object getFieldValue(_Fields field) {
18019
      switch (field) {
483 rajveer 18020
      case ORDER_ID:
18021
        return new Long(getOrderId());
68 ashish 18022
 
18023
      }
18024
      throw new IllegalStateException();
18025
    }
18026
 
18027
    public Object getFieldValue(int fieldId) {
18028
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18029
    }
18030
 
18031
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18032
    public boolean isSet(_Fields field) {
18033
      switch (field) {
483 rajveer 18034
      case ORDER_ID:
18035
        return isSetOrderId();
68 ashish 18036
      }
18037
      throw new IllegalStateException();
18038
    }
18039
 
18040
    public boolean isSet(int fieldID) {
18041
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18042
    }
18043
 
18044
    @Override
18045
    public boolean equals(Object that) {
18046
      if (that == null)
18047
        return false;
483 rajveer 18048
      if (that instanceof getLineItemsForOrder_args)
18049
        return this.equals((getLineItemsForOrder_args)that);
68 ashish 18050
      return false;
18051
    }
18052
 
483 rajveer 18053
    public boolean equals(getLineItemsForOrder_args that) {
68 ashish 18054
      if (that == null)
18055
        return false;
18056
 
483 rajveer 18057
      boolean this_present_orderId = true;
18058
      boolean that_present_orderId = true;
18059
      if (this_present_orderId || that_present_orderId) {
18060
        if (!(this_present_orderId && that_present_orderId))
68 ashish 18061
          return false;
483 rajveer 18062
        if (this.orderId != that.orderId)
68 ashish 18063
          return false;
18064
      }
18065
 
18066
      return true;
18067
    }
18068
 
18069
    @Override
18070
    public int hashCode() {
18071
      return 0;
18072
    }
18073
 
483 rajveer 18074
    public int compareTo(getLineItemsForOrder_args other) {
68 ashish 18075
      if (!getClass().equals(other.getClass())) {
18076
        return getClass().getName().compareTo(other.getClass().getName());
18077
      }
18078
 
18079
      int lastComparison = 0;
483 rajveer 18080
      getLineItemsForOrder_args typedOther = (getLineItemsForOrder_args)other;
68 ashish 18081
 
483 rajveer 18082
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
68 ashish 18083
      if (lastComparison != 0) {
18084
        return lastComparison;
18085
      }
483 rajveer 18086
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
68 ashish 18087
      if (lastComparison != 0) {
18088
        return lastComparison;
18089
      }
18090
      return 0;
18091
    }
18092
 
18093
    public void read(TProtocol iprot) throws TException {
18094
      TField field;
18095
      iprot.readStructBegin();
18096
      while (true)
18097
      {
18098
        field = iprot.readFieldBegin();
18099
        if (field.type == TType.STOP) { 
18100
          break;
18101
        }
18102
        _Fields fieldId = _Fields.findByThriftId(field.id);
18103
        if (fieldId == null) {
18104
          TProtocolUtil.skip(iprot, field.type);
18105
        } else {
18106
          switch (fieldId) {
483 rajveer 18107
            case ORDER_ID:
68 ashish 18108
              if (field.type == TType.I64) {
483 rajveer 18109
                this.orderId = iprot.readI64();
18110
                setOrderIdIsSet(true);
68 ashish 18111
              } else { 
18112
                TProtocolUtil.skip(iprot, field.type);
18113
              }
18114
              break;
18115
          }
18116
          iprot.readFieldEnd();
18117
        }
18118
      }
18119
      iprot.readStructEnd();
18120
      validate();
18121
    }
18122
 
18123
    public void write(TProtocol oprot) throws TException {
18124
      validate();
18125
 
18126
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 18127
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18128
      oprot.writeI64(this.orderId);
68 ashish 18129
      oprot.writeFieldEnd();
18130
      oprot.writeFieldStop();
18131
      oprot.writeStructEnd();
18132
    }
18133
 
18134
    @Override
18135
    public String toString() {
483 rajveer 18136
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_args(");
68 ashish 18137
      boolean first = true;
18138
 
483 rajveer 18139
      sb.append("orderId:");
18140
      sb.append(this.orderId);
68 ashish 18141
      first = false;
18142
      sb.append(")");
18143
      return sb.toString();
18144
    }
18145
 
18146
    public void validate() throws TException {
18147
      // check for required fields
18148
    }
18149
 
18150
  }
18151
 
483 rajveer 18152
  public static class getLineItemsForOrder_result implements TBase<getLineItemsForOrder_result._Fields>, java.io.Serializable, Cloneable, Comparable<getLineItemsForOrder_result>   {
18153
    private static final TStruct STRUCT_DESC = new TStruct("getLineItemsForOrder_result");
68 ashish 18154
 
483 rajveer 18155
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
68 ashish 18156
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18157
 
483 rajveer 18158
    private List<LineItem> success;
68 ashish 18159
    private TransactionServiceException ex;
18160
 
18161
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18162
    public enum _Fields implements TFieldIdEnum {
18163
      SUCCESS((short)0, "success"),
18164
      EX((short)1, "ex");
18165
 
18166
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18167
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18168
 
18169
      static {
18170
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18171
          byId.put((int)field._thriftId, field);
18172
          byName.put(field.getFieldName(), field);
18173
        }
18174
      }
18175
 
18176
      /**
18177
       * Find the _Fields constant that matches fieldId, or null if its not found.
18178
       */
18179
      public static _Fields findByThriftId(int fieldId) {
18180
        return byId.get(fieldId);
18181
      }
18182
 
18183
      /**
18184
       * Find the _Fields constant that matches fieldId, throwing an exception
18185
       * if it is not found.
18186
       */
18187
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18188
        _Fields fields = findByThriftId(fieldId);
18189
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18190
        return fields;
18191
      }
18192
 
18193
      /**
18194
       * Find the _Fields constant that matches name, or null if its not found.
18195
       */
18196
      public static _Fields findByName(String name) {
18197
        return byName.get(name);
18198
      }
18199
 
18200
      private final short _thriftId;
18201
      private final String _fieldName;
18202
 
18203
      _Fields(short thriftId, String fieldName) {
18204
        _thriftId = thriftId;
18205
        _fieldName = fieldName;
18206
      }
18207
 
18208
      public short getThriftFieldId() {
18209
        return _thriftId;
18210
      }
18211
 
18212
      public String getFieldName() {
18213
        return _fieldName;
18214
      }
18215
    }
18216
 
18217
    // isset id assignments
18218
 
18219
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18220
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
483 rajveer 18221
          new ListMetaData(TType.LIST, 
18222
              new StructMetaData(TType.STRUCT, LineItem.class))));
68 ashish 18223
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18224
          new FieldValueMetaData(TType.STRUCT)));
18225
    }});
18226
 
18227
    static {
483 rajveer 18228
      FieldMetaData.addStructMetaDataMap(getLineItemsForOrder_result.class, metaDataMap);
68 ashish 18229
    }
18230
 
483 rajveer 18231
    public getLineItemsForOrder_result() {
68 ashish 18232
    }
18233
 
483 rajveer 18234
    public getLineItemsForOrder_result(
18235
      List<LineItem> success,
68 ashish 18236
      TransactionServiceException ex)
18237
    {
18238
      this();
18239
      this.success = success;
18240
      this.ex = ex;
18241
    }
18242
 
18243
    /**
18244
     * Performs a deep copy on <i>other</i>.
18245
     */
483 rajveer 18246
    public getLineItemsForOrder_result(getLineItemsForOrder_result other) {
18247
      if (other.isSetSuccess()) {
18248
        List<LineItem> __this__success = new ArrayList<LineItem>();
18249
        for (LineItem other_element : other.success) {
18250
          __this__success.add(new LineItem(other_element));
18251
        }
18252
        this.success = __this__success;
18253
      }
68 ashish 18254
      if (other.isSetEx()) {
18255
        this.ex = new TransactionServiceException(other.ex);
18256
      }
18257
    }
18258
 
483 rajveer 18259
    public getLineItemsForOrder_result deepCopy() {
18260
      return new getLineItemsForOrder_result(this);
68 ashish 18261
    }
18262
 
18263
    @Deprecated
483 rajveer 18264
    public getLineItemsForOrder_result clone() {
18265
      return new getLineItemsForOrder_result(this);
68 ashish 18266
    }
18267
 
483 rajveer 18268
    public int getSuccessSize() {
18269
      return (this.success == null) ? 0 : this.success.size();
18270
    }
18271
 
18272
    public java.util.Iterator<LineItem> getSuccessIterator() {
18273
      return (this.success == null) ? null : this.success.iterator();
18274
    }
18275
 
18276
    public void addToSuccess(LineItem elem) {
18277
      if (this.success == null) {
18278
        this.success = new ArrayList<LineItem>();
18279
      }
18280
      this.success.add(elem);
18281
    }
18282
 
18283
    public List<LineItem> getSuccess() {
68 ashish 18284
      return this.success;
18285
    }
18286
 
483 rajveer 18287
    public getLineItemsForOrder_result setSuccess(List<LineItem> success) {
68 ashish 18288
      this.success = success;
18289
      return this;
18290
    }
18291
 
18292
    public void unsetSuccess() {
483 rajveer 18293
      this.success = null;
68 ashish 18294
    }
18295
 
18296
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
18297
    public boolean isSetSuccess() {
483 rajveer 18298
      return this.success != null;
68 ashish 18299
    }
18300
 
18301
    public void setSuccessIsSet(boolean value) {
483 rajveer 18302
      if (!value) {
18303
        this.success = null;
18304
      }
68 ashish 18305
    }
18306
 
18307
    public TransactionServiceException getEx() {
18308
      return this.ex;
18309
    }
18310
 
483 rajveer 18311
    public getLineItemsForOrder_result setEx(TransactionServiceException ex) {
68 ashish 18312
      this.ex = ex;
18313
      return this;
18314
    }
18315
 
18316
    public void unsetEx() {
18317
      this.ex = null;
18318
    }
18319
 
18320
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
18321
    public boolean isSetEx() {
18322
      return this.ex != null;
18323
    }
18324
 
18325
    public void setExIsSet(boolean value) {
18326
      if (!value) {
18327
        this.ex = null;
18328
      }
18329
    }
18330
 
18331
    public void setFieldValue(_Fields field, Object value) {
18332
      switch (field) {
18333
      case SUCCESS:
18334
        if (value == null) {
18335
          unsetSuccess();
18336
        } else {
483 rajveer 18337
          setSuccess((List<LineItem>)value);
68 ashish 18338
        }
18339
        break;
18340
 
18341
      case EX:
18342
        if (value == null) {
18343
          unsetEx();
18344
        } else {
18345
          setEx((TransactionServiceException)value);
18346
        }
18347
        break;
18348
 
18349
      }
18350
    }
18351
 
18352
    public void setFieldValue(int fieldID, Object value) {
18353
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18354
    }
18355
 
18356
    public Object getFieldValue(_Fields field) {
18357
      switch (field) {
18358
      case SUCCESS:
483 rajveer 18359
        return getSuccess();
68 ashish 18360
 
18361
      case EX:
18362
        return getEx();
18363
 
18364
      }
18365
      throw new IllegalStateException();
18366
    }
18367
 
18368
    public Object getFieldValue(int fieldId) {
18369
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18370
    }
18371
 
18372
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18373
    public boolean isSet(_Fields field) {
18374
      switch (field) {
18375
      case SUCCESS:
18376
        return isSetSuccess();
18377
      case EX:
18378
        return isSetEx();
18379
      }
18380
      throw new IllegalStateException();
18381
    }
18382
 
18383
    public boolean isSet(int fieldID) {
18384
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18385
    }
18386
 
18387
    @Override
18388
    public boolean equals(Object that) {
18389
      if (that == null)
18390
        return false;
483 rajveer 18391
      if (that instanceof getLineItemsForOrder_result)
18392
        return this.equals((getLineItemsForOrder_result)that);
68 ashish 18393
      return false;
18394
    }
18395
 
483 rajveer 18396
    public boolean equals(getLineItemsForOrder_result that) {
68 ashish 18397
      if (that == null)
18398
        return false;
18399
 
483 rajveer 18400
      boolean this_present_success = true && this.isSetSuccess();
18401
      boolean that_present_success = true && that.isSetSuccess();
68 ashish 18402
      if (this_present_success || that_present_success) {
18403
        if (!(this_present_success && that_present_success))
18404
          return false;
483 rajveer 18405
        if (!this.success.equals(that.success))
68 ashish 18406
          return false;
18407
      }
18408
 
18409
      boolean this_present_ex = true && this.isSetEx();
18410
      boolean that_present_ex = true && that.isSetEx();
18411
      if (this_present_ex || that_present_ex) {
18412
        if (!(this_present_ex && that_present_ex))
18413
          return false;
18414
        if (!this.ex.equals(that.ex))
18415
          return false;
18416
      }
18417
 
18418
      return true;
18419
    }
18420
 
18421
    @Override
18422
    public int hashCode() {
18423
      return 0;
18424
    }
18425
 
483 rajveer 18426
    public int compareTo(getLineItemsForOrder_result other) {
68 ashish 18427
      if (!getClass().equals(other.getClass())) {
18428
        return getClass().getName().compareTo(other.getClass().getName());
18429
      }
18430
 
18431
      int lastComparison = 0;
483 rajveer 18432
      getLineItemsForOrder_result typedOther = (getLineItemsForOrder_result)other;
68 ashish 18433
 
18434
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
18435
      if (lastComparison != 0) {
18436
        return lastComparison;
18437
      }
18438
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
18439
      if (lastComparison != 0) {
18440
        return lastComparison;
18441
      }
18442
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
18443
      if (lastComparison != 0) {
18444
        return lastComparison;
18445
      }
18446
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
18447
      if (lastComparison != 0) {
18448
        return lastComparison;
18449
      }
18450
      return 0;
18451
    }
18452
 
18453
    public void read(TProtocol iprot) throws TException {
18454
      TField field;
18455
      iprot.readStructBegin();
18456
      while (true)
18457
      {
18458
        field = iprot.readFieldBegin();
18459
        if (field.type == TType.STOP) { 
18460
          break;
18461
        }
18462
        _Fields fieldId = _Fields.findByThriftId(field.id);
18463
        if (fieldId == null) {
18464
          TProtocolUtil.skip(iprot, field.type);
18465
        } else {
18466
          switch (fieldId) {
18467
            case SUCCESS:
483 rajveer 18468
              if (field.type == TType.LIST) {
18469
                {
1382 varun.gupt 18470
                  TList _list40 = iprot.readListBegin();
18471
                  this.success = new ArrayList<LineItem>(_list40.size);
18472
                  for (int _i41 = 0; _i41 < _list40.size; ++_i41)
483 rajveer 18473
                  {
1382 varun.gupt 18474
                    LineItem _elem42;
18475
                    _elem42 = new LineItem();
18476
                    _elem42.read(iprot);
18477
                    this.success.add(_elem42);
483 rajveer 18478
                  }
18479
                  iprot.readListEnd();
18480
                }
68 ashish 18481
              } else { 
18482
                TProtocolUtil.skip(iprot, field.type);
18483
              }
18484
              break;
18485
            case EX:
18486
              if (field.type == TType.STRUCT) {
18487
                this.ex = new TransactionServiceException();
18488
                this.ex.read(iprot);
18489
              } else { 
18490
                TProtocolUtil.skip(iprot, field.type);
18491
              }
18492
              break;
18493
          }
18494
          iprot.readFieldEnd();
18495
        }
18496
      }
18497
      iprot.readStructEnd();
18498
      validate();
18499
    }
18500
 
18501
    public void write(TProtocol oprot) throws TException {
18502
      oprot.writeStructBegin(STRUCT_DESC);
18503
 
18504
      if (this.isSetSuccess()) {
18505
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
483 rajveer 18506
        {
18507
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 18508
          for (LineItem _iter43 : this.success)
483 rajveer 18509
          {
1382 varun.gupt 18510
            _iter43.write(oprot);
483 rajveer 18511
          }
18512
          oprot.writeListEnd();
18513
        }
68 ashish 18514
        oprot.writeFieldEnd();
18515
      } else if (this.isSetEx()) {
18516
        oprot.writeFieldBegin(EX_FIELD_DESC);
18517
        this.ex.write(oprot);
18518
        oprot.writeFieldEnd();
18519
      }
18520
      oprot.writeFieldStop();
18521
      oprot.writeStructEnd();
18522
    }
18523
 
18524
    @Override
18525
    public String toString() {
483 rajveer 18526
      StringBuilder sb = new StringBuilder("getLineItemsForOrder_result(");
68 ashish 18527
      boolean first = true;
18528
 
18529
      sb.append("success:");
483 rajveer 18530
      if (this.success == null) {
18531
        sb.append("null");
18532
      } else {
18533
        sb.append(this.success);
18534
      }
68 ashish 18535
      first = false;
18536
      if (!first) sb.append(", ");
18537
      sb.append("ex:");
18538
      if (this.ex == null) {
18539
        sb.append("null");
18540
      } else {
18541
        sb.append(this.ex);
18542
      }
18543
      first = false;
18544
      sb.append(")");
18545
      return sb.toString();
18546
    }
18547
 
18548
    public void validate() throws TException {
18549
      // check for required fields
18550
    }
18551
 
18552
  }
18553
 
1529 ankur.sing 18554
  public static class getOrderForCustomer_args implements TBase<getOrderForCustomer_args._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_args>   {
18555
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_args");
18556
 
18557
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
18558
    private static final TField CUSTOMER_ID_FIELD_DESC = new TField("customerId", TType.I64, (short)2);
18559
 
18560
    private long orderId;
18561
    private long customerId;
18562
 
18563
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18564
    public enum _Fields implements TFieldIdEnum {
18565
      ORDER_ID((short)1, "orderId"),
18566
      CUSTOMER_ID((short)2, "customerId");
18567
 
18568
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18569
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18570
 
18571
      static {
18572
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18573
          byId.put((int)field._thriftId, field);
18574
          byName.put(field.getFieldName(), field);
18575
        }
18576
      }
18577
 
18578
      /**
18579
       * Find the _Fields constant that matches fieldId, or null if its not found.
18580
       */
18581
      public static _Fields findByThriftId(int fieldId) {
18582
        return byId.get(fieldId);
18583
      }
18584
 
18585
      /**
18586
       * Find the _Fields constant that matches fieldId, throwing an exception
18587
       * if it is not found.
18588
       */
18589
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18590
        _Fields fields = findByThriftId(fieldId);
18591
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18592
        return fields;
18593
      }
18594
 
18595
      /**
18596
       * Find the _Fields constant that matches name, or null if its not found.
18597
       */
18598
      public static _Fields findByName(String name) {
18599
        return byName.get(name);
18600
      }
18601
 
18602
      private final short _thriftId;
18603
      private final String _fieldName;
18604
 
18605
      _Fields(short thriftId, String fieldName) {
18606
        _thriftId = thriftId;
18607
        _fieldName = fieldName;
18608
      }
18609
 
18610
      public short getThriftFieldId() {
18611
        return _thriftId;
18612
      }
18613
 
18614
      public String getFieldName() {
18615
        return _fieldName;
18616
      }
18617
    }
18618
 
18619
    // isset id assignments
18620
    private static final int __ORDERID_ISSET_ID = 0;
18621
    private static final int __CUSTOMERID_ISSET_ID = 1;
18622
    private BitSet __isset_bit_vector = new BitSet(2);
18623
 
18624
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18625
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
18626
          new FieldValueMetaData(TType.I64)));
18627
      put(_Fields.CUSTOMER_ID, new FieldMetaData("customerId", TFieldRequirementType.DEFAULT, 
18628
          new FieldValueMetaData(TType.I64)));
18629
    }});
18630
 
18631
    static {
18632
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_args.class, metaDataMap);
18633
    }
18634
 
18635
    public getOrderForCustomer_args() {
18636
    }
18637
 
18638
    public getOrderForCustomer_args(
18639
      long orderId,
18640
      long customerId)
18641
    {
18642
      this();
18643
      this.orderId = orderId;
18644
      setOrderIdIsSet(true);
18645
      this.customerId = customerId;
18646
      setCustomerIdIsSet(true);
18647
    }
18648
 
18649
    /**
18650
     * Performs a deep copy on <i>other</i>.
18651
     */
18652
    public getOrderForCustomer_args(getOrderForCustomer_args other) {
18653
      __isset_bit_vector.clear();
18654
      __isset_bit_vector.or(other.__isset_bit_vector);
18655
      this.orderId = other.orderId;
18656
      this.customerId = other.customerId;
18657
    }
18658
 
18659
    public getOrderForCustomer_args deepCopy() {
18660
      return new getOrderForCustomer_args(this);
18661
    }
18662
 
18663
    @Deprecated
18664
    public getOrderForCustomer_args clone() {
18665
      return new getOrderForCustomer_args(this);
18666
    }
18667
 
18668
    public long getOrderId() {
18669
      return this.orderId;
18670
    }
18671
 
18672
    public getOrderForCustomer_args setOrderId(long orderId) {
18673
      this.orderId = orderId;
18674
      setOrderIdIsSet(true);
18675
      return this;
18676
    }
18677
 
18678
    public void unsetOrderId() {
18679
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
18680
    }
18681
 
18682
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
18683
    public boolean isSetOrderId() {
18684
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
18685
    }
18686
 
18687
    public void setOrderIdIsSet(boolean value) {
18688
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
18689
    }
18690
 
18691
    public long getCustomerId() {
18692
      return this.customerId;
18693
    }
18694
 
18695
    public getOrderForCustomer_args setCustomerId(long customerId) {
18696
      this.customerId = customerId;
18697
      setCustomerIdIsSet(true);
18698
      return this;
18699
    }
18700
 
18701
    public void unsetCustomerId() {
18702
      __isset_bit_vector.clear(__CUSTOMERID_ISSET_ID);
18703
    }
18704
 
18705
    /** Returns true if field customerId is set (has been asigned a value) and false otherwise */
18706
    public boolean isSetCustomerId() {
18707
      return __isset_bit_vector.get(__CUSTOMERID_ISSET_ID);
18708
    }
18709
 
18710
    public void setCustomerIdIsSet(boolean value) {
18711
      __isset_bit_vector.set(__CUSTOMERID_ISSET_ID, value);
18712
    }
18713
 
18714
    public void setFieldValue(_Fields field, Object value) {
18715
      switch (field) {
18716
      case ORDER_ID:
18717
        if (value == null) {
18718
          unsetOrderId();
18719
        } else {
18720
          setOrderId((Long)value);
18721
        }
18722
        break;
18723
 
18724
      case CUSTOMER_ID:
18725
        if (value == null) {
18726
          unsetCustomerId();
18727
        } else {
18728
          setCustomerId((Long)value);
18729
        }
18730
        break;
18731
 
18732
      }
18733
    }
18734
 
18735
    public void setFieldValue(int fieldID, Object value) {
18736
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
18737
    }
18738
 
18739
    public Object getFieldValue(_Fields field) {
18740
      switch (field) {
18741
      case ORDER_ID:
18742
        return new Long(getOrderId());
18743
 
18744
      case CUSTOMER_ID:
18745
        return new Long(getCustomerId());
18746
 
18747
      }
18748
      throw new IllegalStateException();
18749
    }
18750
 
18751
    public Object getFieldValue(int fieldId) {
18752
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
18753
    }
18754
 
18755
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
18756
    public boolean isSet(_Fields field) {
18757
      switch (field) {
18758
      case ORDER_ID:
18759
        return isSetOrderId();
18760
      case CUSTOMER_ID:
18761
        return isSetCustomerId();
18762
      }
18763
      throw new IllegalStateException();
18764
    }
18765
 
18766
    public boolean isSet(int fieldID) {
18767
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
18768
    }
18769
 
18770
    @Override
18771
    public boolean equals(Object that) {
18772
      if (that == null)
18773
        return false;
18774
      if (that instanceof getOrderForCustomer_args)
18775
        return this.equals((getOrderForCustomer_args)that);
18776
      return false;
18777
    }
18778
 
18779
    public boolean equals(getOrderForCustomer_args that) {
18780
      if (that == null)
18781
        return false;
18782
 
18783
      boolean this_present_orderId = true;
18784
      boolean that_present_orderId = true;
18785
      if (this_present_orderId || that_present_orderId) {
18786
        if (!(this_present_orderId && that_present_orderId))
18787
          return false;
18788
        if (this.orderId != that.orderId)
18789
          return false;
18790
      }
18791
 
18792
      boolean this_present_customerId = true;
18793
      boolean that_present_customerId = true;
18794
      if (this_present_customerId || that_present_customerId) {
18795
        if (!(this_present_customerId && that_present_customerId))
18796
          return false;
18797
        if (this.customerId != that.customerId)
18798
          return false;
18799
      }
18800
 
18801
      return true;
18802
    }
18803
 
18804
    @Override
18805
    public int hashCode() {
18806
      return 0;
18807
    }
18808
 
18809
    public int compareTo(getOrderForCustomer_args other) {
18810
      if (!getClass().equals(other.getClass())) {
18811
        return getClass().getName().compareTo(other.getClass().getName());
18812
      }
18813
 
18814
      int lastComparison = 0;
18815
      getOrderForCustomer_args typedOther = (getOrderForCustomer_args)other;
18816
 
18817
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
18818
      if (lastComparison != 0) {
18819
        return lastComparison;
18820
      }
18821
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
18822
      if (lastComparison != 0) {
18823
        return lastComparison;
18824
      }
18825
      lastComparison = Boolean.valueOf(isSetCustomerId()).compareTo(isSetCustomerId());
18826
      if (lastComparison != 0) {
18827
        return lastComparison;
18828
      }
18829
      lastComparison = TBaseHelper.compareTo(customerId, typedOther.customerId);
18830
      if (lastComparison != 0) {
18831
        return lastComparison;
18832
      }
18833
      return 0;
18834
    }
18835
 
18836
    public void read(TProtocol iprot) throws TException {
18837
      TField field;
18838
      iprot.readStructBegin();
18839
      while (true)
18840
      {
18841
        field = iprot.readFieldBegin();
18842
        if (field.type == TType.STOP) { 
18843
          break;
18844
        }
18845
        _Fields fieldId = _Fields.findByThriftId(field.id);
18846
        if (fieldId == null) {
18847
          TProtocolUtil.skip(iprot, field.type);
18848
        } else {
18849
          switch (fieldId) {
18850
            case ORDER_ID:
18851
              if (field.type == TType.I64) {
18852
                this.orderId = iprot.readI64();
18853
                setOrderIdIsSet(true);
18854
              } else { 
18855
                TProtocolUtil.skip(iprot, field.type);
18856
              }
18857
              break;
18858
            case CUSTOMER_ID:
18859
              if (field.type == TType.I64) {
18860
                this.customerId = iprot.readI64();
18861
                setCustomerIdIsSet(true);
18862
              } else { 
18863
                TProtocolUtil.skip(iprot, field.type);
18864
              }
18865
              break;
18866
          }
18867
          iprot.readFieldEnd();
18868
        }
18869
      }
18870
      iprot.readStructEnd();
18871
      validate();
18872
    }
18873
 
18874
    public void write(TProtocol oprot) throws TException {
18875
      validate();
18876
 
18877
      oprot.writeStructBegin(STRUCT_DESC);
18878
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
18879
      oprot.writeI64(this.orderId);
18880
      oprot.writeFieldEnd();
18881
      oprot.writeFieldBegin(CUSTOMER_ID_FIELD_DESC);
18882
      oprot.writeI64(this.customerId);
18883
      oprot.writeFieldEnd();
18884
      oprot.writeFieldStop();
18885
      oprot.writeStructEnd();
18886
    }
18887
 
18888
    @Override
18889
    public String toString() {
18890
      StringBuilder sb = new StringBuilder("getOrderForCustomer_args(");
18891
      boolean first = true;
18892
 
18893
      sb.append("orderId:");
18894
      sb.append(this.orderId);
18895
      first = false;
18896
      if (!first) sb.append(", ");
18897
      sb.append("customerId:");
18898
      sb.append(this.customerId);
18899
      first = false;
18900
      sb.append(")");
18901
      return sb.toString();
18902
    }
18903
 
18904
    public void validate() throws TException {
18905
      // check for required fields
18906
    }
18907
 
18908
  }
18909
 
18910
  public static class getOrderForCustomer_result implements TBase<getOrderForCustomer_result._Fields>, java.io.Serializable, Cloneable, Comparable<getOrderForCustomer_result>   {
18911
    private static final TStruct STRUCT_DESC = new TStruct("getOrderForCustomer_result");
18912
 
18913
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.STRUCT, (short)0);
18914
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
18915
 
18916
    private Order success;
18917
    private TransactionServiceException ex;
18918
 
18919
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
18920
    public enum _Fields implements TFieldIdEnum {
18921
      SUCCESS((short)0, "success"),
18922
      EX((short)1, "ex");
18923
 
18924
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
18925
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
18926
 
18927
      static {
18928
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
18929
          byId.put((int)field._thriftId, field);
18930
          byName.put(field.getFieldName(), field);
18931
        }
18932
      }
18933
 
18934
      /**
18935
       * Find the _Fields constant that matches fieldId, or null if its not found.
18936
       */
18937
      public static _Fields findByThriftId(int fieldId) {
18938
        return byId.get(fieldId);
18939
      }
18940
 
18941
      /**
18942
       * Find the _Fields constant that matches fieldId, throwing an exception
18943
       * if it is not found.
18944
       */
18945
      public static _Fields findByThriftIdOrThrow(int fieldId) {
18946
        _Fields fields = findByThriftId(fieldId);
18947
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
18948
        return fields;
18949
      }
18950
 
18951
      /**
18952
       * Find the _Fields constant that matches name, or null if its not found.
18953
       */
18954
      public static _Fields findByName(String name) {
18955
        return byName.get(name);
18956
      }
18957
 
18958
      private final short _thriftId;
18959
      private final String _fieldName;
18960
 
18961
      _Fields(short thriftId, String fieldName) {
18962
        _thriftId = thriftId;
18963
        _fieldName = fieldName;
18964
      }
18965
 
18966
      public short getThriftFieldId() {
18967
        return _thriftId;
18968
      }
18969
 
18970
      public String getFieldName() {
18971
        return _fieldName;
18972
      }
18973
    }
18974
 
18975
    // isset id assignments
18976
 
18977
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
18978
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
18979
          new StructMetaData(TType.STRUCT, Order.class)));
18980
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
18981
          new FieldValueMetaData(TType.STRUCT)));
18982
    }});
18983
 
18984
    static {
18985
      FieldMetaData.addStructMetaDataMap(getOrderForCustomer_result.class, metaDataMap);
18986
    }
18987
 
18988
    public getOrderForCustomer_result() {
18989
    }
18990
 
18991
    public getOrderForCustomer_result(
18992
      Order success,
18993
      TransactionServiceException ex)
18994
    {
18995
      this();
18996
      this.success = success;
18997
      this.ex = ex;
18998
    }
18999
 
19000
    /**
19001
     * Performs a deep copy on <i>other</i>.
19002
     */
19003
    public getOrderForCustomer_result(getOrderForCustomer_result other) {
19004
      if (other.isSetSuccess()) {
19005
        this.success = new Order(other.success);
19006
      }
19007
      if (other.isSetEx()) {
19008
        this.ex = new TransactionServiceException(other.ex);
19009
      }
19010
    }
19011
 
19012
    public getOrderForCustomer_result deepCopy() {
19013
      return new getOrderForCustomer_result(this);
19014
    }
19015
 
19016
    @Deprecated
19017
    public getOrderForCustomer_result clone() {
19018
      return new getOrderForCustomer_result(this);
19019
    }
19020
 
19021
    public Order getSuccess() {
19022
      return this.success;
19023
    }
19024
 
19025
    public getOrderForCustomer_result setSuccess(Order success) {
19026
      this.success = success;
19027
      return this;
19028
    }
19029
 
19030
    public void unsetSuccess() {
19031
      this.success = null;
19032
    }
19033
 
19034
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19035
    public boolean isSetSuccess() {
19036
      return this.success != null;
19037
    }
19038
 
19039
    public void setSuccessIsSet(boolean value) {
19040
      if (!value) {
19041
        this.success = null;
19042
      }
19043
    }
19044
 
19045
    public TransactionServiceException getEx() {
19046
      return this.ex;
19047
    }
19048
 
19049
    public getOrderForCustomer_result setEx(TransactionServiceException ex) {
19050
      this.ex = ex;
19051
      return this;
19052
    }
19053
 
19054
    public void unsetEx() {
19055
      this.ex = null;
19056
    }
19057
 
19058
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19059
    public boolean isSetEx() {
19060
      return this.ex != null;
19061
    }
19062
 
19063
    public void setExIsSet(boolean value) {
19064
      if (!value) {
19065
        this.ex = null;
19066
      }
19067
    }
19068
 
19069
    public void setFieldValue(_Fields field, Object value) {
19070
      switch (field) {
19071
      case SUCCESS:
19072
        if (value == null) {
19073
          unsetSuccess();
19074
        } else {
19075
          setSuccess((Order)value);
19076
        }
19077
        break;
19078
 
19079
      case EX:
19080
        if (value == null) {
19081
          unsetEx();
19082
        } else {
19083
          setEx((TransactionServiceException)value);
19084
        }
19085
        break;
19086
 
19087
      }
19088
    }
19089
 
19090
    public void setFieldValue(int fieldID, Object value) {
19091
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19092
    }
19093
 
19094
    public Object getFieldValue(_Fields field) {
19095
      switch (field) {
19096
      case SUCCESS:
19097
        return getSuccess();
19098
 
19099
      case EX:
19100
        return getEx();
19101
 
19102
      }
19103
      throw new IllegalStateException();
19104
    }
19105
 
19106
    public Object getFieldValue(int fieldId) {
19107
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19108
    }
19109
 
19110
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19111
    public boolean isSet(_Fields field) {
19112
      switch (field) {
19113
      case SUCCESS:
19114
        return isSetSuccess();
19115
      case EX:
19116
        return isSetEx();
19117
      }
19118
      throw new IllegalStateException();
19119
    }
19120
 
19121
    public boolean isSet(int fieldID) {
19122
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19123
    }
19124
 
19125
    @Override
19126
    public boolean equals(Object that) {
19127
      if (that == null)
19128
        return false;
19129
      if (that instanceof getOrderForCustomer_result)
19130
        return this.equals((getOrderForCustomer_result)that);
19131
      return false;
19132
    }
19133
 
19134
    public boolean equals(getOrderForCustomer_result that) {
19135
      if (that == null)
19136
        return false;
19137
 
19138
      boolean this_present_success = true && this.isSetSuccess();
19139
      boolean that_present_success = true && that.isSetSuccess();
19140
      if (this_present_success || that_present_success) {
19141
        if (!(this_present_success && that_present_success))
19142
          return false;
19143
        if (!this.success.equals(that.success))
19144
          return false;
19145
      }
19146
 
19147
      boolean this_present_ex = true && this.isSetEx();
19148
      boolean that_present_ex = true && that.isSetEx();
19149
      if (this_present_ex || that_present_ex) {
19150
        if (!(this_present_ex && that_present_ex))
19151
          return false;
19152
        if (!this.ex.equals(that.ex))
19153
          return false;
19154
      }
19155
 
19156
      return true;
19157
    }
19158
 
19159
    @Override
19160
    public int hashCode() {
19161
      return 0;
19162
    }
19163
 
19164
    public int compareTo(getOrderForCustomer_result other) {
19165
      if (!getClass().equals(other.getClass())) {
19166
        return getClass().getName().compareTo(other.getClass().getName());
19167
      }
19168
 
19169
      int lastComparison = 0;
19170
      getOrderForCustomer_result typedOther = (getOrderForCustomer_result)other;
19171
 
19172
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19173
      if (lastComparison != 0) {
19174
        return lastComparison;
19175
      }
19176
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19177
      if (lastComparison != 0) {
19178
        return lastComparison;
19179
      }
19180
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19181
      if (lastComparison != 0) {
19182
        return lastComparison;
19183
      }
19184
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19185
      if (lastComparison != 0) {
19186
        return lastComparison;
19187
      }
19188
      return 0;
19189
    }
19190
 
19191
    public void read(TProtocol iprot) throws TException {
19192
      TField field;
19193
      iprot.readStructBegin();
19194
      while (true)
19195
      {
19196
        field = iprot.readFieldBegin();
19197
        if (field.type == TType.STOP) { 
19198
          break;
19199
        }
19200
        _Fields fieldId = _Fields.findByThriftId(field.id);
19201
        if (fieldId == null) {
19202
          TProtocolUtil.skip(iprot, field.type);
19203
        } else {
19204
          switch (fieldId) {
19205
            case SUCCESS:
19206
              if (field.type == TType.STRUCT) {
19207
                this.success = new Order();
19208
                this.success.read(iprot);
19209
              } else { 
19210
                TProtocolUtil.skip(iprot, field.type);
19211
              }
19212
              break;
19213
            case EX:
19214
              if (field.type == TType.STRUCT) {
19215
                this.ex = new TransactionServiceException();
19216
                this.ex.read(iprot);
19217
              } else { 
19218
                TProtocolUtil.skip(iprot, field.type);
19219
              }
19220
              break;
19221
          }
19222
          iprot.readFieldEnd();
19223
        }
19224
      }
19225
      iprot.readStructEnd();
19226
      validate();
19227
    }
19228
 
19229
    public void write(TProtocol oprot) throws TException {
19230
      oprot.writeStructBegin(STRUCT_DESC);
19231
 
19232
      if (this.isSetSuccess()) {
19233
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19234
        this.success.write(oprot);
19235
        oprot.writeFieldEnd();
19236
      } else if (this.isSetEx()) {
19237
        oprot.writeFieldBegin(EX_FIELD_DESC);
19238
        this.ex.write(oprot);
19239
        oprot.writeFieldEnd();
19240
      }
19241
      oprot.writeFieldStop();
19242
      oprot.writeStructEnd();
19243
    }
19244
 
19245
    @Override
19246
    public String toString() {
19247
      StringBuilder sb = new StringBuilder("getOrderForCustomer_result(");
19248
      boolean first = true;
19249
 
19250
      sb.append("success:");
19251
      if (this.success == null) {
19252
        sb.append("null");
19253
      } else {
19254
        sb.append(this.success);
19255
      }
19256
      first = false;
19257
      if (!first) sb.append(", ");
19258
      sb.append("ex:");
19259
      if (this.ex == null) {
19260
        sb.append("null");
19261
      } else {
19262
        sb.append(this.ex);
19263
      }
19264
      first = false;
19265
      sb.append(")");
19266
      return sb.toString();
19267
    }
19268
 
19269
    public void validate() throws TException {
19270
      // check for required fields
19271
    }
19272
 
19273
  }
19274
 
1221 chandransh 19275
  public static class batchOrders_args implements TBase<batchOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_args>   {
19276
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_args");
19277
 
19278
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
19279
 
19280
    private long warehouseId;
19281
 
19282
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19283
    public enum _Fields implements TFieldIdEnum {
19284
      WAREHOUSE_ID((short)1, "warehouseId");
19285
 
19286
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19287
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19288
 
19289
      static {
19290
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19291
          byId.put((int)field._thriftId, field);
19292
          byName.put(field.getFieldName(), field);
19293
        }
19294
      }
19295
 
19296
      /**
19297
       * Find the _Fields constant that matches fieldId, or null if its not found.
19298
       */
19299
      public static _Fields findByThriftId(int fieldId) {
19300
        return byId.get(fieldId);
19301
      }
19302
 
19303
      /**
19304
       * Find the _Fields constant that matches fieldId, throwing an exception
19305
       * if it is not found.
19306
       */
19307
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19308
        _Fields fields = findByThriftId(fieldId);
19309
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19310
        return fields;
19311
      }
19312
 
19313
      /**
19314
       * Find the _Fields constant that matches name, or null if its not found.
19315
       */
19316
      public static _Fields findByName(String name) {
19317
        return byName.get(name);
19318
      }
19319
 
19320
      private final short _thriftId;
19321
      private final String _fieldName;
19322
 
19323
      _Fields(short thriftId, String fieldName) {
19324
        _thriftId = thriftId;
19325
        _fieldName = fieldName;
19326
      }
19327
 
19328
      public short getThriftFieldId() {
19329
        return _thriftId;
19330
      }
19331
 
19332
      public String getFieldName() {
19333
        return _fieldName;
19334
      }
19335
    }
19336
 
19337
    // isset id assignments
19338
    private static final int __WAREHOUSEID_ISSET_ID = 0;
19339
    private BitSet __isset_bit_vector = new BitSet(1);
19340
 
19341
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19342
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
19343
          new FieldValueMetaData(TType.I64)));
19344
    }});
19345
 
19346
    static {
19347
      FieldMetaData.addStructMetaDataMap(batchOrders_args.class, metaDataMap);
19348
    }
19349
 
19350
    public batchOrders_args() {
19351
    }
19352
 
19353
    public batchOrders_args(
19354
      long warehouseId)
19355
    {
19356
      this();
19357
      this.warehouseId = warehouseId;
19358
      setWarehouseIdIsSet(true);
19359
    }
19360
 
19361
    /**
19362
     * Performs a deep copy on <i>other</i>.
19363
     */
19364
    public batchOrders_args(batchOrders_args other) {
19365
      __isset_bit_vector.clear();
19366
      __isset_bit_vector.or(other.__isset_bit_vector);
19367
      this.warehouseId = other.warehouseId;
19368
    }
19369
 
19370
    public batchOrders_args deepCopy() {
19371
      return new batchOrders_args(this);
19372
    }
19373
 
19374
    @Deprecated
19375
    public batchOrders_args clone() {
19376
      return new batchOrders_args(this);
19377
    }
19378
 
19379
    public long getWarehouseId() {
19380
      return this.warehouseId;
19381
    }
19382
 
19383
    public batchOrders_args setWarehouseId(long warehouseId) {
19384
      this.warehouseId = warehouseId;
19385
      setWarehouseIdIsSet(true);
19386
      return this;
19387
    }
19388
 
19389
    public void unsetWarehouseId() {
19390
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
19391
    }
19392
 
19393
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
19394
    public boolean isSetWarehouseId() {
19395
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
19396
    }
19397
 
19398
    public void setWarehouseIdIsSet(boolean value) {
19399
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
19400
    }
19401
 
19402
    public void setFieldValue(_Fields field, Object value) {
19403
      switch (field) {
19404
      case WAREHOUSE_ID:
19405
        if (value == null) {
19406
          unsetWarehouseId();
19407
        } else {
19408
          setWarehouseId((Long)value);
19409
        }
19410
        break;
19411
 
19412
      }
19413
    }
19414
 
19415
    public void setFieldValue(int fieldID, Object value) {
19416
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19417
    }
19418
 
19419
    public Object getFieldValue(_Fields field) {
19420
      switch (field) {
19421
      case WAREHOUSE_ID:
19422
        return new Long(getWarehouseId());
19423
 
19424
      }
19425
      throw new IllegalStateException();
19426
    }
19427
 
19428
    public Object getFieldValue(int fieldId) {
19429
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19430
    }
19431
 
19432
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19433
    public boolean isSet(_Fields field) {
19434
      switch (field) {
19435
      case WAREHOUSE_ID:
19436
        return isSetWarehouseId();
19437
      }
19438
      throw new IllegalStateException();
19439
    }
19440
 
19441
    public boolean isSet(int fieldID) {
19442
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19443
    }
19444
 
19445
    @Override
19446
    public boolean equals(Object that) {
19447
      if (that == null)
19448
        return false;
19449
      if (that instanceof batchOrders_args)
19450
        return this.equals((batchOrders_args)that);
19451
      return false;
19452
    }
19453
 
19454
    public boolean equals(batchOrders_args that) {
19455
      if (that == null)
19456
        return false;
19457
 
19458
      boolean this_present_warehouseId = true;
19459
      boolean that_present_warehouseId = true;
19460
      if (this_present_warehouseId || that_present_warehouseId) {
19461
        if (!(this_present_warehouseId && that_present_warehouseId))
19462
          return false;
19463
        if (this.warehouseId != that.warehouseId)
19464
          return false;
19465
      }
19466
 
19467
      return true;
19468
    }
19469
 
19470
    @Override
19471
    public int hashCode() {
19472
      return 0;
19473
    }
19474
 
19475
    public int compareTo(batchOrders_args other) {
19476
      if (!getClass().equals(other.getClass())) {
19477
        return getClass().getName().compareTo(other.getClass().getName());
19478
      }
19479
 
19480
      int lastComparison = 0;
19481
      batchOrders_args typedOther = (batchOrders_args)other;
19482
 
19483
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
19484
      if (lastComparison != 0) {
19485
        return lastComparison;
19486
      }
19487
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
19488
      if (lastComparison != 0) {
19489
        return lastComparison;
19490
      }
19491
      return 0;
19492
    }
19493
 
19494
    public void read(TProtocol iprot) throws TException {
19495
      TField field;
19496
      iprot.readStructBegin();
19497
      while (true)
19498
      {
19499
        field = iprot.readFieldBegin();
19500
        if (field.type == TType.STOP) { 
19501
          break;
19502
        }
19503
        _Fields fieldId = _Fields.findByThriftId(field.id);
19504
        if (fieldId == null) {
19505
          TProtocolUtil.skip(iprot, field.type);
19506
        } else {
19507
          switch (fieldId) {
19508
            case WAREHOUSE_ID:
19509
              if (field.type == TType.I64) {
19510
                this.warehouseId = iprot.readI64();
19511
                setWarehouseIdIsSet(true);
19512
              } else { 
19513
                TProtocolUtil.skip(iprot, field.type);
19514
              }
19515
              break;
19516
          }
19517
          iprot.readFieldEnd();
19518
        }
19519
      }
19520
      iprot.readStructEnd();
19521
      validate();
19522
    }
19523
 
19524
    public void write(TProtocol oprot) throws TException {
19525
      validate();
19526
 
19527
      oprot.writeStructBegin(STRUCT_DESC);
19528
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
19529
      oprot.writeI64(this.warehouseId);
19530
      oprot.writeFieldEnd();
19531
      oprot.writeFieldStop();
19532
      oprot.writeStructEnd();
19533
    }
19534
 
19535
    @Override
19536
    public String toString() {
19537
      StringBuilder sb = new StringBuilder("batchOrders_args(");
19538
      boolean first = true;
19539
 
19540
      sb.append("warehouseId:");
19541
      sb.append(this.warehouseId);
19542
      first = false;
19543
      sb.append(")");
19544
      return sb.toString();
19545
    }
19546
 
19547
    public void validate() throws TException {
19548
      // check for required fields
19549
    }
19550
 
19551
  }
19552
 
19553
  public static class batchOrders_result implements TBase<batchOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<batchOrders_result>   {
19554
    private static final TStruct STRUCT_DESC = new TStruct("batchOrders_result");
19555
 
19556
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
19557
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
19558
 
19559
    private List<Order> success;
19560
    private TransactionServiceException ex;
19561
 
19562
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19563
    public enum _Fields implements TFieldIdEnum {
19564
      SUCCESS((short)0, "success"),
19565
      EX((short)1, "ex");
19566
 
19567
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19568
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19569
 
19570
      static {
19571
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19572
          byId.put((int)field._thriftId, field);
19573
          byName.put(field.getFieldName(), field);
19574
        }
19575
      }
19576
 
19577
      /**
19578
       * Find the _Fields constant that matches fieldId, or null if its not found.
19579
       */
19580
      public static _Fields findByThriftId(int fieldId) {
19581
        return byId.get(fieldId);
19582
      }
19583
 
19584
      /**
19585
       * Find the _Fields constant that matches fieldId, throwing an exception
19586
       * if it is not found.
19587
       */
19588
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19589
        _Fields fields = findByThriftId(fieldId);
19590
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19591
        return fields;
19592
      }
19593
 
19594
      /**
19595
       * Find the _Fields constant that matches name, or null if its not found.
19596
       */
19597
      public static _Fields findByName(String name) {
19598
        return byName.get(name);
19599
      }
19600
 
19601
      private final short _thriftId;
19602
      private final String _fieldName;
19603
 
19604
      _Fields(short thriftId, String fieldName) {
19605
        _thriftId = thriftId;
19606
        _fieldName = fieldName;
19607
      }
19608
 
19609
      public short getThriftFieldId() {
19610
        return _thriftId;
19611
      }
19612
 
19613
      public String getFieldName() {
19614
        return _fieldName;
19615
      }
19616
    }
19617
 
19618
    // isset id assignments
19619
 
19620
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
19621
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
19622
          new ListMetaData(TType.LIST, 
19623
              new StructMetaData(TType.STRUCT, Order.class))));
19624
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
19625
          new FieldValueMetaData(TType.STRUCT)));
19626
    }});
19627
 
19628
    static {
19629
      FieldMetaData.addStructMetaDataMap(batchOrders_result.class, metaDataMap);
19630
    }
19631
 
19632
    public batchOrders_result() {
19633
    }
19634
 
19635
    public batchOrders_result(
19636
      List<Order> success,
19637
      TransactionServiceException ex)
19638
    {
19639
      this();
19640
      this.success = success;
19641
      this.ex = ex;
19642
    }
19643
 
19644
    /**
19645
     * Performs a deep copy on <i>other</i>.
19646
     */
19647
    public batchOrders_result(batchOrders_result other) {
19648
      if (other.isSetSuccess()) {
19649
        List<Order> __this__success = new ArrayList<Order>();
19650
        for (Order other_element : other.success) {
19651
          __this__success.add(new Order(other_element));
19652
        }
19653
        this.success = __this__success;
19654
      }
19655
      if (other.isSetEx()) {
19656
        this.ex = new TransactionServiceException(other.ex);
19657
      }
19658
    }
19659
 
19660
    public batchOrders_result deepCopy() {
19661
      return new batchOrders_result(this);
19662
    }
19663
 
19664
    @Deprecated
19665
    public batchOrders_result clone() {
19666
      return new batchOrders_result(this);
19667
    }
19668
 
19669
    public int getSuccessSize() {
19670
      return (this.success == null) ? 0 : this.success.size();
19671
    }
19672
 
19673
    public java.util.Iterator<Order> getSuccessIterator() {
19674
      return (this.success == null) ? null : this.success.iterator();
19675
    }
19676
 
19677
    public void addToSuccess(Order elem) {
19678
      if (this.success == null) {
19679
        this.success = new ArrayList<Order>();
19680
      }
19681
      this.success.add(elem);
19682
    }
19683
 
19684
    public List<Order> getSuccess() {
19685
      return this.success;
19686
    }
19687
 
19688
    public batchOrders_result setSuccess(List<Order> success) {
19689
      this.success = success;
19690
      return this;
19691
    }
19692
 
19693
    public void unsetSuccess() {
19694
      this.success = null;
19695
    }
19696
 
19697
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
19698
    public boolean isSetSuccess() {
19699
      return this.success != null;
19700
    }
19701
 
19702
    public void setSuccessIsSet(boolean value) {
19703
      if (!value) {
19704
        this.success = null;
19705
      }
19706
    }
19707
 
19708
    public TransactionServiceException getEx() {
19709
      return this.ex;
19710
    }
19711
 
19712
    public batchOrders_result setEx(TransactionServiceException ex) {
19713
      this.ex = ex;
19714
      return this;
19715
    }
19716
 
19717
    public void unsetEx() {
19718
      this.ex = null;
19719
    }
19720
 
19721
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
19722
    public boolean isSetEx() {
19723
      return this.ex != null;
19724
    }
19725
 
19726
    public void setExIsSet(boolean value) {
19727
      if (!value) {
19728
        this.ex = null;
19729
      }
19730
    }
19731
 
19732
    public void setFieldValue(_Fields field, Object value) {
19733
      switch (field) {
19734
      case SUCCESS:
19735
        if (value == null) {
19736
          unsetSuccess();
19737
        } else {
19738
          setSuccess((List<Order>)value);
19739
        }
19740
        break;
19741
 
19742
      case EX:
19743
        if (value == null) {
19744
          unsetEx();
19745
        } else {
19746
          setEx((TransactionServiceException)value);
19747
        }
19748
        break;
19749
 
19750
      }
19751
    }
19752
 
19753
    public void setFieldValue(int fieldID, Object value) {
19754
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
19755
    }
19756
 
19757
    public Object getFieldValue(_Fields field) {
19758
      switch (field) {
19759
      case SUCCESS:
19760
        return getSuccess();
19761
 
19762
      case EX:
19763
        return getEx();
19764
 
19765
      }
19766
      throw new IllegalStateException();
19767
    }
19768
 
19769
    public Object getFieldValue(int fieldId) {
19770
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
19771
    }
19772
 
19773
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
19774
    public boolean isSet(_Fields field) {
19775
      switch (field) {
19776
      case SUCCESS:
19777
        return isSetSuccess();
19778
      case EX:
19779
        return isSetEx();
19780
      }
19781
      throw new IllegalStateException();
19782
    }
19783
 
19784
    public boolean isSet(int fieldID) {
19785
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
19786
    }
19787
 
19788
    @Override
19789
    public boolean equals(Object that) {
19790
      if (that == null)
19791
        return false;
19792
      if (that instanceof batchOrders_result)
19793
        return this.equals((batchOrders_result)that);
19794
      return false;
19795
    }
19796
 
19797
    public boolean equals(batchOrders_result that) {
19798
      if (that == null)
19799
        return false;
19800
 
19801
      boolean this_present_success = true && this.isSetSuccess();
19802
      boolean that_present_success = true && that.isSetSuccess();
19803
      if (this_present_success || that_present_success) {
19804
        if (!(this_present_success && that_present_success))
19805
          return false;
19806
        if (!this.success.equals(that.success))
19807
          return false;
19808
      }
19809
 
19810
      boolean this_present_ex = true && this.isSetEx();
19811
      boolean that_present_ex = true && that.isSetEx();
19812
      if (this_present_ex || that_present_ex) {
19813
        if (!(this_present_ex && that_present_ex))
19814
          return false;
19815
        if (!this.ex.equals(that.ex))
19816
          return false;
19817
      }
19818
 
19819
      return true;
19820
    }
19821
 
19822
    @Override
19823
    public int hashCode() {
19824
      return 0;
19825
    }
19826
 
19827
    public int compareTo(batchOrders_result other) {
19828
      if (!getClass().equals(other.getClass())) {
19829
        return getClass().getName().compareTo(other.getClass().getName());
19830
      }
19831
 
19832
      int lastComparison = 0;
19833
      batchOrders_result typedOther = (batchOrders_result)other;
19834
 
19835
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
19836
      if (lastComparison != 0) {
19837
        return lastComparison;
19838
      }
19839
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
19840
      if (lastComparison != 0) {
19841
        return lastComparison;
19842
      }
19843
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
19844
      if (lastComparison != 0) {
19845
        return lastComparison;
19846
      }
19847
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
19848
      if (lastComparison != 0) {
19849
        return lastComparison;
19850
      }
19851
      return 0;
19852
    }
19853
 
19854
    public void read(TProtocol iprot) throws TException {
19855
      TField field;
19856
      iprot.readStructBegin();
19857
      while (true)
19858
      {
19859
        field = iprot.readFieldBegin();
19860
        if (field.type == TType.STOP) { 
19861
          break;
19862
        }
19863
        _Fields fieldId = _Fields.findByThriftId(field.id);
19864
        if (fieldId == null) {
19865
          TProtocolUtil.skip(iprot, field.type);
19866
        } else {
19867
          switch (fieldId) {
19868
            case SUCCESS:
19869
              if (field.type == TType.LIST) {
19870
                {
1382 varun.gupt 19871
                  TList _list44 = iprot.readListBegin();
19872
                  this.success = new ArrayList<Order>(_list44.size);
19873
                  for (int _i45 = 0; _i45 < _list44.size; ++_i45)
1221 chandransh 19874
                  {
1382 varun.gupt 19875
                    Order _elem46;
19876
                    _elem46 = new Order();
19877
                    _elem46.read(iprot);
19878
                    this.success.add(_elem46);
1221 chandransh 19879
                  }
19880
                  iprot.readListEnd();
19881
                }
19882
              } else { 
19883
                TProtocolUtil.skip(iprot, field.type);
19884
              }
19885
              break;
19886
            case EX:
19887
              if (field.type == TType.STRUCT) {
19888
                this.ex = new TransactionServiceException();
19889
                this.ex.read(iprot);
19890
              } else { 
19891
                TProtocolUtil.skip(iprot, field.type);
19892
              }
19893
              break;
19894
          }
19895
          iprot.readFieldEnd();
19896
        }
19897
      }
19898
      iprot.readStructEnd();
19899
      validate();
19900
    }
19901
 
19902
    public void write(TProtocol oprot) throws TException {
19903
      oprot.writeStructBegin(STRUCT_DESC);
19904
 
19905
      if (this.isSetSuccess()) {
19906
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
19907
        {
19908
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 19909
          for (Order _iter47 : this.success)
1221 chandransh 19910
          {
1382 varun.gupt 19911
            _iter47.write(oprot);
1221 chandransh 19912
          }
19913
          oprot.writeListEnd();
19914
        }
19915
        oprot.writeFieldEnd();
19916
      } else if (this.isSetEx()) {
19917
        oprot.writeFieldBegin(EX_FIELD_DESC);
19918
        this.ex.write(oprot);
19919
        oprot.writeFieldEnd();
19920
      }
19921
      oprot.writeFieldStop();
19922
      oprot.writeStructEnd();
19923
    }
19924
 
19925
    @Override
19926
    public String toString() {
19927
      StringBuilder sb = new StringBuilder("batchOrders_result(");
19928
      boolean first = true;
19929
 
19930
      sb.append("success:");
19931
      if (this.success == null) {
19932
        sb.append("null");
19933
      } else {
19934
        sb.append(this.success);
19935
      }
19936
      first = false;
19937
      if (!first) sb.append(", ");
19938
      sb.append("ex:");
19939
      if (this.ex == null) {
19940
        sb.append("null");
19941
      } else {
19942
        sb.append(this.ex);
19943
      }
19944
      first = false;
19945
      sb.append(")");
19946
      return sb.toString();
19947
    }
19948
 
19949
    public void validate() throws TException {
19950
      // check for required fields
19951
    }
19952
 
19953
  }
19954
 
1209 chandransh 19955
  public static class markOrderAsOutOfStock_args implements TBase<markOrderAsOutOfStock_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_args>   {
19956
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_args");
19957
 
19958
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
19959
 
19960
    private long orderId;
19961
 
19962
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
19963
    public enum _Fields implements TFieldIdEnum {
19964
      ORDER_ID((short)1, "orderId");
19965
 
19966
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
19967
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
19968
 
19969
      static {
19970
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
19971
          byId.put((int)field._thriftId, field);
19972
          byName.put(field.getFieldName(), field);
19973
        }
19974
      }
19975
 
19976
      /**
19977
       * Find the _Fields constant that matches fieldId, or null if its not found.
19978
       */
19979
      public static _Fields findByThriftId(int fieldId) {
19980
        return byId.get(fieldId);
19981
      }
19982
 
19983
      /**
19984
       * Find the _Fields constant that matches fieldId, throwing an exception
19985
       * if it is not found.
19986
       */
19987
      public static _Fields findByThriftIdOrThrow(int fieldId) {
19988
        _Fields fields = findByThriftId(fieldId);
19989
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
19990
        return fields;
19991
      }
19992
 
19993
      /**
19994
       * Find the _Fields constant that matches name, or null if its not found.
19995
       */
19996
      public static _Fields findByName(String name) {
19997
        return byName.get(name);
19998
      }
19999
 
20000
      private final short _thriftId;
20001
      private final String _fieldName;
20002
 
20003
      _Fields(short thriftId, String fieldName) {
20004
        _thriftId = thriftId;
20005
        _fieldName = fieldName;
20006
      }
20007
 
20008
      public short getThriftFieldId() {
20009
        return _thriftId;
20010
      }
20011
 
20012
      public String getFieldName() {
20013
        return _fieldName;
20014
      }
20015
    }
20016
 
20017
    // isset id assignments
20018
    private static final int __ORDERID_ISSET_ID = 0;
20019
    private BitSet __isset_bit_vector = new BitSet(1);
20020
 
20021
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20022
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
20023
          new FieldValueMetaData(TType.I64)));
20024
    }});
20025
 
20026
    static {
20027
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_args.class, metaDataMap);
20028
    }
20029
 
20030
    public markOrderAsOutOfStock_args() {
20031
    }
20032
 
20033
    public markOrderAsOutOfStock_args(
20034
      long orderId)
20035
    {
20036
      this();
20037
      this.orderId = orderId;
20038
      setOrderIdIsSet(true);
20039
    }
20040
 
20041
    /**
20042
     * Performs a deep copy on <i>other</i>.
20043
     */
20044
    public markOrderAsOutOfStock_args(markOrderAsOutOfStock_args other) {
20045
      __isset_bit_vector.clear();
20046
      __isset_bit_vector.or(other.__isset_bit_vector);
20047
      this.orderId = other.orderId;
20048
    }
20049
 
20050
    public markOrderAsOutOfStock_args deepCopy() {
20051
      return new markOrderAsOutOfStock_args(this);
20052
    }
20053
 
20054
    @Deprecated
20055
    public markOrderAsOutOfStock_args clone() {
20056
      return new markOrderAsOutOfStock_args(this);
20057
    }
20058
 
20059
    public long getOrderId() {
20060
      return this.orderId;
20061
    }
20062
 
20063
    public markOrderAsOutOfStock_args setOrderId(long orderId) {
20064
      this.orderId = orderId;
20065
      setOrderIdIsSet(true);
20066
      return this;
20067
    }
20068
 
20069
    public void unsetOrderId() {
20070
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
20071
    }
20072
 
20073
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
20074
    public boolean isSetOrderId() {
20075
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
20076
    }
20077
 
20078
    public void setOrderIdIsSet(boolean value) {
20079
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
20080
    }
20081
 
20082
    public void setFieldValue(_Fields field, Object value) {
20083
      switch (field) {
20084
      case ORDER_ID:
20085
        if (value == null) {
20086
          unsetOrderId();
20087
        } else {
20088
          setOrderId((Long)value);
20089
        }
20090
        break;
20091
 
20092
      }
20093
    }
20094
 
20095
    public void setFieldValue(int fieldID, Object value) {
20096
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20097
    }
20098
 
20099
    public Object getFieldValue(_Fields field) {
20100
      switch (field) {
20101
      case ORDER_ID:
20102
        return new Long(getOrderId());
20103
 
20104
      }
20105
      throw new IllegalStateException();
20106
    }
20107
 
20108
    public Object getFieldValue(int fieldId) {
20109
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20110
    }
20111
 
20112
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20113
    public boolean isSet(_Fields field) {
20114
      switch (field) {
20115
      case ORDER_ID:
20116
        return isSetOrderId();
20117
      }
20118
      throw new IllegalStateException();
20119
    }
20120
 
20121
    public boolean isSet(int fieldID) {
20122
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20123
    }
20124
 
20125
    @Override
20126
    public boolean equals(Object that) {
20127
      if (that == null)
20128
        return false;
20129
      if (that instanceof markOrderAsOutOfStock_args)
20130
        return this.equals((markOrderAsOutOfStock_args)that);
20131
      return false;
20132
    }
20133
 
20134
    public boolean equals(markOrderAsOutOfStock_args that) {
20135
      if (that == null)
20136
        return false;
20137
 
20138
      boolean this_present_orderId = true;
20139
      boolean that_present_orderId = true;
20140
      if (this_present_orderId || that_present_orderId) {
20141
        if (!(this_present_orderId && that_present_orderId))
20142
          return false;
20143
        if (this.orderId != that.orderId)
20144
          return false;
20145
      }
20146
 
20147
      return true;
20148
    }
20149
 
20150
    @Override
20151
    public int hashCode() {
20152
      return 0;
20153
    }
20154
 
20155
    public int compareTo(markOrderAsOutOfStock_args other) {
20156
      if (!getClass().equals(other.getClass())) {
20157
        return getClass().getName().compareTo(other.getClass().getName());
20158
      }
20159
 
20160
      int lastComparison = 0;
20161
      markOrderAsOutOfStock_args typedOther = (markOrderAsOutOfStock_args)other;
20162
 
20163
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
20164
      if (lastComparison != 0) {
20165
        return lastComparison;
20166
      }
20167
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
20168
      if (lastComparison != 0) {
20169
        return lastComparison;
20170
      }
20171
      return 0;
20172
    }
20173
 
20174
    public void read(TProtocol iprot) throws TException {
20175
      TField field;
20176
      iprot.readStructBegin();
20177
      while (true)
20178
      {
20179
        field = iprot.readFieldBegin();
20180
        if (field.type == TType.STOP) { 
20181
          break;
20182
        }
20183
        _Fields fieldId = _Fields.findByThriftId(field.id);
20184
        if (fieldId == null) {
20185
          TProtocolUtil.skip(iprot, field.type);
20186
        } else {
20187
          switch (fieldId) {
20188
            case ORDER_ID:
20189
              if (field.type == TType.I64) {
20190
                this.orderId = iprot.readI64();
20191
                setOrderIdIsSet(true);
20192
              } else { 
20193
                TProtocolUtil.skip(iprot, field.type);
20194
              }
20195
              break;
20196
          }
20197
          iprot.readFieldEnd();
20198
        }
20199
      }
20200
      iprot.readStructEnd();
20201
      validate();
20202
    }
20203
 
20204
    public void write(TProtocol oprot) throws TException {
20205
      validate();
20206
 
20207
      oprot.writeStructBegin(STRUCT_DESC);
20208
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
20209
      oprot.writeI64(this.orderId);
20210
      oprot.writeFieldEnd();
20211
      oprot.writeFieldStop();
20212
      oprot.writeStructEnd();
20213
    }
20214
 
20215
    @Override
20216
    public String toString() {
20217
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_args(");
20218
      boolean first = true;
20219
 
20220
      sb.append("orderId:");
20221
      sb.append(this.orderId);
20222
      first = false;
20223
      sb.append(")");
20224
      return sb.toString();
20225
    }
20226
 
20227
    public void validate() throws TException {
20228
      // check for required fields
20229
    }
20230
 
20231
  }
20232
 
20233
  public static class markOrderAsOutOfStock_result implements TBase<markOrderAsOutOfStock_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrderAsOutOfStock_result>   {
20234
    private static final TStruct STRUCT_DESC = new TStruct("markOrderAsOutOfStock_result");
20235
 
20236
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20237
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20238
 
20239
    private boolean success;
20240
    private TransactionServiceException ex;
20241
 
20242
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20243
    public enum _Fields implements TFieldIdEnum {
20244
      SUCCESS((short)0, "success"),
20245
      EX((short)1, "ex");
20246
 
20247
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20248
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20249
 
20250
      static {
20251
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20252
          byId.put((int)field._thriftId, field);
20253
          byName.put(field.getFieldName(), field);
20254
        }
20255
      }
20256
 
20257
      /**
20258
       * Find the _Fields constant that matches fieldId, or null if its not found.
20259
       */
20260
      public static _Fields findByThriftId(int fieldId) {
20261
        return byId.get(fieldId);
20262
      }
20263
 
20264
      /**
20265
       * Find the _Fields constant that matches fieldId, throwing an exception
20266
       * if it is not found.
20267
       */
20268
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20269
        _Fields fields = findByThriftId(fieldId);
20270
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20271
        return fields;
20272
      }
20273
 
20274
      /**
20275
       * Find the _Fields constant that matches name, or null if its not found.
20276
       */
20277
      public static _Fields findByName(String name) {
20278
        return byName.get(name);
20279
      }
20280
 
20281
      private final short _thriftId;
20282
      private final String _fieldName;
20283
 
20284
      _Fields(short thriftId, String fieldName) {
20285
        _thriftId = thriftId;
20286
        _fieldName = fieldName;
20287
      }
20288
 
20289
      public short getThriftFieldId() {
20290
        return _thriftId;
20291
      }
20292
 
20293
      public String getFieldName() {
20294
        return _fieldName;
20295
      }
20296
    }
20297
 
20298
    // isset id assignments
20299
    private static final int __SUCCESS_ISSET_ID = 0;
20300
    private BitSet __isset_bit_vector = new BitSet(1);
20301
 
20302
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20303
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
20304
          new FieldValueMetaData(TType.BOOL)));
20305
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
20306
          new FieldValueMetaData(TType.STRUCT)));
20307
    }});
20308
 
20309
    static {
20310
      FieldMetaData.addStructMetaDataMap(markOrderAsOutOfStock_result.class, metaDataMap);
20311
    }
20312
 
20313
    public markOrderAsOutOfStock_result() {
20314
    }
20315
 
20316
    public markOrderAsOutOfStock_result(
20317
      boolean success,
20318
      TransactionServiceException ex)
20319
    {
20320
      this();
20321
      this.success = success;
20322
      setSuccessIsSet(true);
20323
      this.ex = ex;
20324
    }
20325
 
20326
    /**
20327
     * Performs a deep copy on <i>other</i>.
20328
     */
20329
    public markOrderAsOutOfStock_result(markOrderAsOutOfStock_result other) {
20330
      __isset_bit_vector.clear();
20331
      __isset_bit_vector.or(other.__isset_bit_vector);
20332
      this.success = other.success;
20333
      if (other.isSetEx()) {
20334
        this.ex = new TransactionServiceException(other.ex);
20335
      }
20336
    }
20337
 
20338
    public markOrderAsOutOfStock_result deepCopy() {
20339
      return new markOrderAsOutOfStock_result(this);
20340
    }
20341
 
20342
    @Deprecated
20343
    public markOrderAsOutOfStock_result clone() {
20344
      return new markOrderAsOutOfStock_result(this);
20345
    }
20346
 
20347
    public boolean isSuccess() {
20348
      return this.success;
20349
    }
20350
 
20351
    public markOrderAsOutOfStock_result setSuccess(boolean success) {
20352
      this.success = success;
20353
      setSuccessIsSet(true);
20354
      return this;
20355
    }
20356
 
20357
    public void unsetSuccess() {
20358
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
20359
    }
20360
 
20361
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
20362
    public boolean isSetSuccess() {
20363
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
20364
    }
20365
 
20366
    public void setSuccessIsSet(boolean value) {
20367
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
20368
    }
20369
 
20370
    public TransactionServiceException getEx() {
20371
      return this.ex;
20372
    }
20373
 
20374
    public markOrderAsOutOfStock_result setEx(TransactionServiceException ex) {
20375
      this.ex = ex;
20376
      return this;
20377
    }
20378
 
20379
    public void unsetEx() {
20380
      this.ex = null;
20381
    }
20382
 
20383
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
20384
    public boolean isSetEx() {
20385
      return this.ex != null;
20386
    }
20387
 
20388
    public void setExIsSet(boolean value) {
20389
      if (!value) {
20390
        this.ex = null;
20391
      }
20392
    }
20393
 
20394
    public void setFieldValue(_Fields field, Object value) {
20395
      switch (field) {
20396
      case SUCCESS:
20397
        if (value == null) {
20398
          unsetSuccess();
20399
        } else {
20400
          setSuccess((Boolean)value);
20401
        }
20402
        break;
20403
 
20404
      case EX:
20405
        if (value == null) {
20406
          unsetEx();
20407
        } else {
20408
          setEx((TransactionServiceException)value);
20409
        }
20410
        break;
20411
 
20412
      }
20413
    }
20414
 
20415
    public void setFieldValue(int fieldID, Object value) {
20416
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20417
    }
20418
 
20419
    public Object getFieldValue(_Fields field) {
20420
      switch (field) {
20421
      case SUCCESS:
20422
        return new Boolean(isSuccess());
20423
 
20424
      case EX:
20425
        return getEx();
20426
 
20427
      }
20428
      throw new IllegalStateException();
20429
    }
20430
 
20431
    public Object getFieldValue(int fieldId) {
20432
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20433
    }
20434
 
20435
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20436
    public boolean isSet(_Fields field) {
20437
      switch (field) {
20438
      case SUCCESS:
20439
        return isSetSuccess();
20440
      case EX:
20441
        return isSetEx();
20442
      }
20443
      throw new IllegalStateException();
20444
    }
20445
 
20446
    public boolean isSet(int fieldID) {
20447
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20448
    }
20449
 
20450
    @Override
20451
    public boolean equals(Object that) {
20452
      if (that == null)
20453
        return false;
20454
      if (that instanceof markOrderAsOutOfStock_result)
20455
        return this.equals((markOrderAsOutOfStock_result)that);
20456
      return false;
20457
    }
20458
 
20459
    public boolean equals(markOrderAsOutOfStock_result that) {
20460
      if (that == null)
20461
        return false;
20462
 
20463
      boolean this_present_success = true;
20464
      boolean that_present_success = true;
20465
      if (this_present_success || that_present_success) {
20466
        if (!(this_present_success && that_present_success))
20467
          return false;
20468
        if (this.success != that.success)
20469
          return false;
20470
      }
20471
 
20472
      boolean this_present_ex = true && this.isSetEx();
20473
      boolean that_present_ex = true && that.isSetEx();
20474
      if (this_present_ex || that_present_ex) {
20475
        if (!(this_present_ex && that_present_ex))
20476
          return false;
20477
        if (!this.ex.equals(that.ex))
20478
          return false;
20479
      }
20480
 
20481
      return true;
20482
    }
20483
 
20484
    @Override
20485
    public int hashCode() {
20486
      return 0;
20487
    }
20488
 
20489
    public int compareTo(markOrderAsOutOfStock_result other) {
20490
      if (!getClass().equals(other.getClass())) {
20491
        return getClass().getName().compareTo(other.getClass().getName());
20492
      }
20493
 
20494
      int lastComparison = 0;
20495
      markOrderAsOutOfStock_result typedOther = (markOrderAsOutOfStock_result)other;
20496
 
20497
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
20498
      if (lastComparison != 0) {
20499
        return lastComparison;
20500
      }
20501
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
20502
      if (lastComparison != 0) {
20503
        return lastComparison;
20504
      }
20505
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
20506
      if (lastComparison != 0) {
20507
        return lastComparison;
20508
      }
20509
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
20510
      if (lastComparison != 0) {
20511
        return lastComparison;
20512
      }
20513
      return 0;
20514
    }
20515
 
20516
    public void read(TProtocol iprot) throws TException {
20517
      TField field;
20518
      iprot.readStructBegin();
20519
      while (true)
20520
      {
20521
        field = iprot.readFieldBegin();
20522
        if (field.type == TType.STOP) { 
20523
          break;
20524
        }
20525
        _Fields fieldId = _Fields.findByThriftId(field.id);
20526
        if (fieldId == null) {
20527
          TProtocolUtil.skip(iprot, field.type);
20528
        } else {
20529
          switch (fieldId) {
20530
            case SUCCESS:
20531
              if (field.type == TType.BOOL) {
20532
                this.success = iprot.readBool();
20533
                setSuccessIsSet(true);
20534
              } else { 
20535
                TProtocolUtil.skip(iprot, field.type);
20536
              }
20537
              break;
20538
            case EX:
20539
              if (field.type == TType.STRUCT) {
20540
                this.ex = new TransactionServiceException();
20541
                this.ex.read(iprot);
20542
              } else { 
20543
                TProtocolUtil.skip(iprot, field.type);
20544
              }
20545
              break;
20546
          }
20547
          iprot.readFieldEnd();
20548
        }
20549
      }
20550
      iprot.readStructEnd();
20551
      validate();
20552
    }
20553
 
20554
    public void write(TProtocol oprot) throws TException {
20555
      oprot.writeStructBegin(STRUCT_DESC);
20556
 
20557
      if (this.isSetSuccess()) {
20558
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
20559
        oprot.writeBool(this.success);
20560
        oprot.writeFieldEnd();
20561
      } else if (this.isSetEx()) {
20562
        oprot.writeFieldBegin(EX_FIELD_DESC);
20563
        this.ex.write(oprot);
20564
        oprot.writeFieldEnd();
20565
      }
20566
      oprot.writeFieldStop();
20567
      oprot.writeStructEnd();
20568
    }
20569
 
20570
    @Override
20571
    public String toString() {
20572
      StringBuilder sb = new StringBuilder("markOrderAsOutOfStock_result(");
20573
      boolean first = true;
20574
 
20575
      sb.append("success:");
20576
      sb.append(this.success);
20577
      first = false;
20578
      if (!first) sb.append(", ");
20579
      sb.append("ex:");
20580
      if (this.ex == null) {
20581
        sb.append("null");
20582
      } else {
20583
        sb.append(this.ex);
20584
      }
20585
      first = false;
20586
      sb.append(")");
20587
      return sb.toString();
20588
    }
20589
 
20590
    public void validate() throws TException {
20591
      // check for required fields
20592
    }
20593
 
20594
  }
20595
 
758 chandransh 20596
  public static class markOrdersAsManifested_args implements TBase<markOrdersAsManifested_args._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_args>   {
20597
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_args");
20598
 
20599
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)1);
20600
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)2);
20601
 
20602
    private long warehouseId;
20603
    private long providerId;
20604
 
20605
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20606
    public enum _Fields implements TFieldIdEnum {
20607
      WAREHOUSE_ID((short)1, "warehouseId"),
20608
      PROVIDER_ID((short)2, "providerId");
20609
 
20610
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20611
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20612
 
20613
      static {
20614
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20615
          byId.put((int)field._thriftId, field);
20616
          byName.put(field.getFieldName(), field);
20617
        }
20618
      }
20619
 
20620
      /**
20621
       * Find the _Fields constant that matches fieldId, or null if its not found.
20622
       */
20623
      public static _Fields findByThriftId(int fieldId) {
20624
        return byId.get(fieldId);
20625
      }
20626
 
20627
      /**
20628
       * Find the _Fields constant that matches fieldId, throwing an exception
20629
       * if it is not found.
20630
       */
20631
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20632
        _Fields fields = findByThriftId(fieldId);
20633
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20634
        return fields;
20635
      }
20636
 
20637
      /**
20638
       * Find the _Fields constant that matches name, or null if its not found.
20639
       */
20640
      public static _Fields findByName(String name) {
20641
        return byName.get(name);
20642
      }
20643
 
20644
      private final short _thriftId;
20645
      private final String _fieldName;
20646
 
20647
      _Fields(short thriftId, String fieldName) {
20648
        _thriftId = thriftId;
20649
        _fieldName = fieldName;
20650
      }
20651
 
20652
      public short getThriftFieldId() {
20653
        return _thriftId;
20654
      }
20655
 
20656
      public String getFieldName() {
20657
        return _fieldName;
20658
      }
20659
    }
20660
 
20661
    // isset id assignments
20662
    private static final int __WAREHOUSEID_ISSET_ID = 0;
20663
    private static final int __PROVIDERID_ISSET_ID = 1;
20664
    private BitSet __isset_bit_vector = new BitSet(2);
20665
 
20666
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
20667
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
20668
          new FieldValueMetaData(TType.I64)));
20669
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
20670
          new FieldValueMetaData(TType.I64)));
20671
    }});
20672
 
20673
    static {
20674
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_args.class, metaDataMap);
20675
    }
20676
 
20677
    public markOrdersAsManifested_args() {
20678
    }
20679
 
20680
    public markOrdersAsManifested_args(
20681
      long warehouseId,
20682
      long providerId)
20683
    {
20684
      this();
20685
      this.warehouseId = warehouseId;
20686
      setWarehouseIdIsSet(true);
20687
      this.providerId = providerId;
20688
      setProviderIdIsSet(true);
20689
    }
20690
 
20691
    /**
20692
     * Performs a deep copy on <i>other</i>.
20693
     */
20694
    public markOrdersAsManifested_args(markOrdersAsManifested_args other) {
20695
      __isset_bit_vector.clear();
20696
      __isset_bit_vector.or(other.__isset_bit_vector);
20697
      this.warehouseId = other.warehouseId;
20698
      this.providerId = other.providerId;
20699
    }
20700
 
20701
    public markOrdersAsManifested_args deepCopy() {
20702
      return new markOrdersAsManifested_args(this);
20703
    }
20704
 
20705
    @Deprecated
20706
    public markOrdersAsManifested_args clone() {
20707
      return new markOrdersAsManifested_args(this);
20708
    }
20709
 
20710
    public long getWarehouseId() {
20711
      return this.warehouseId;
20712
    }
20713
 
20714
    public markOrdersAsManifested_args setWarehouseId(long warehouseId) {
20715
      this.warehouseId = warehouseId;
20716
      setWarehouseIdIsSet(true);
20717
      return this;
20718
    }
20719
 
20720
    public void unsetWarehouseId() {
20721
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
20722
    }
20723
 
20724
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
20725
    public boolean isSetWarehouseId() {
20726
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
20727
    }
20728
 
20729
    public void setWarehouseIdIsSet(boolean value) {
20730
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
20731
    }
20732
 
20733
    public long getProviderId() {
20734
      return this.providerId;
20735
    }
20736
 
20737
    public markOrdersAsManifested_args setProviderId(long providerId) {
20738
      this.providerId = providerId;
20739
      setProviderIdIsSet(true);
20740
      return this;
20741
    }
20742
 
20743
    public void unsetProviderId() {
20744
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
20745
    }
20746
 
20747
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
20748
    public boolean isSetProviderId() {
20749
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
20750
    }
20751
 
20752
    public void setProviderIdIsSet(boolean value) {
20753
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
20754
    }
20755
 
20756
    public void setFieldValue(_Fields field, Object value) {
20757
      switch (field) {
20758
      case WAREHOUSE_ID:
20759
        if (value == null) {
20760
          unsetWarehouseId();
20761
        } else {
20762
          setWarehouseId((Long)value);
20763
        }
20764
        break;
20765
 
20766
      case PROVIDER_ID:
20767
        if (value == null) {
20768
          unsetProviderId();
20769
        } else {
20770
          setProviderId((Long)value);
20771
        }
20772
        break;
20773
 
20774
      }
20775
    }
20776
 
20777
    public void setFieldValue(int fieldID, Object value) {
20778
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
20779
    }
20780
 
20781
    public Object getFieldValue(_Fields field) {
20782
      switch (field) {
20783
      case WAREHOUSE_ID:
20784
        return new Long(getWarehouseId());
20785
 
20786
      case PROVIDER_ID:
20787
        return new Long(getProviderId());
20788
 
20789
      }
20790
      throw new IllegalStateException();
20791
    }
20792
 
20793
    public Object getFieldValue(int fieldId) {
20794
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
20795
    }
20796
 
20797
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
20798
    public boolean isSet(_Fields field) {
20799
      switch (field) {
20800
      case WAREHOUSE_ID:
20801
        return isSetWarehouseId();
20802
      case PROVIDER_ID:
20803
        return isSetProviderId();
20804
      }
20805
      throw new IllegalStateException();
20806
    }
20807
 
20808
    public boolean isSet(int fieldID) {
20809
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
20810
    }
20811
 
20812
    @Override
20813
    public boolean equals(Object that) {
20814
      if (that == null)
20815
        return false;
20816
      if (that instanceof markOrdersAsManifested_args)
20817
        return this.equals((markOrdersAsManifested_args)that);
20818
      return false;
20819
    }
20820
 
20821
    public boolean equals(markOrdersAsManifested_args that) {
20822
      if (that == null)
20823
        return false;
20824
 
20825
      boolean this_present_warehouseId = true;
20826
      boolean that_present_warehouseId = true;
20827
      if (this_present_warehouseId || that_present_warehouseId) {
20828
        if (!(this_present_warehouseId && that_present_warehouseId))
20829
          return false;
20830
        if (this.warehouseId != that.warehouseId)
20831
          return false;
20832
      }
20833
 
20834
      boolean this_present_providerId = true;
20835
      boolean that_present_providerId = true;
20836
      if (this_present_providerId || that_present_providerId) {
20837
        if (!(this_present_providerId && that_present_providerId))
20838
          return false;
20839
        if (this.providerId != that.providerId)
20840
          return false;
20841
      }
20842
 
20843
      return true;
20844
    }
20845
 
20846
    @Override
20847
    public int hashCode() {
20848
      return 0;
20849
    }
20850
 
20851
    public int compareTo(markOrdersAsManifested_args other) {
20852
      if (!getClass().equals(other.getClass())) {
20853
        return getClass().getName().compareTo(other.getClass().getName());
20854
      }
20855
 
20856
      int lastComparison = 0;
20857
      markOrdersAsManifested_args typedOther = (markOrdersAsManifested_args)other;
20858
 
20859
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
20860
      if (lastComparison != 0) {
20861
        return lastComparison;
20862
      }
20863
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
20864
      if (lastComparison != 0) {
20865
        return lastComparison;
20866
      }
20867
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
20868
      if (lastComparison != 0) {
20869
        return lastComparison;
20870
      }
20871
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
20872
      if (lastComparison != 0) {
20873
        return lastComparison;
20874
      }
20875
      return 0;
20876
    }
20877
 
20878
    public void read(TProtocol iprot) throws TException {
20879
      TField field;
20880
      iprot.readStructBegin();
20881
      while (true)
20882
      {
20883
        field = iprot.readFieldBegin();
20884
        if (field.type == TType.STOP) { 
20885
          break;
20886
        }
20887
        _Fields fieldId = _Fields.findByThriftId(field.id);
20888
        if (fieldId == null) {
20889
          TProtocolUtil.skip(iprot, field.type);
20890
        } else {
20891
          switch (fieldId) {
20892
            case WAREHOUSE_ID:
20893
              if (field.type == TType.I64) {
20894
                this.warehouseId = iprot.readI64();
20895
                setWarehouseIdIsSet(true);
20896
              } else { 
20897
                TProtocolUtil.skip(iprot, field.type);
20898
              }
20899
              break;
20900
            case PROVIDER_ID:
20901
              if (field.type == TType.I64) {
20902
                this.providerId = iprot.readI64();
20903
                setProviderIdIsSet(true);
20904
              } else { 
20905
                TProtocolUtil.skip(iprot, field.type);
20906
              }
20907
              break;
20908
          }
20909
          iprot.readFieldEnd();
20910
        }
20911
      }
20912
      iprot.readStructEnd();
20913
      validate();
20914
    }
20915
 
20916
    public void write(TProtocol oprot) throws TException {
20917
      validate();
20918
 
20919
      oprot.writeStructBegin(STRUCT_DESC);
20920
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
20921
      oprot.writeI64(this.warehouseId);
20922
      oprot.writeFieldEnd();
20923
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
20924
      oprot.writeI64(this.providerId);
20925
      oprot.writeFieldEnd();
20926
      oprot.writeFieldStop();
20927
      oprot.writeStructEnd();
20928
    }
20929
 
20930
    @Override
20931
    public String toString() {
20932
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_args(");
20933
      boolean first = true;
20934
 
20935
      sb.append("warehouseId:");
20936
      sb.append(this.warehouseId);
20937
      first = false;
20938
      if (!first) sb.append(", ");
20939
      sb.append("providerId:");
20940
      sb.append(this.providerId);
20941
      first = false;
20942
      sb.append(")");
20943
      return sb.toString();
20944
    }
20945
 
20946
    public void validate() throws TException {
20947
      // check for required fields
20948
    }
20949
 
20950
  }
20951
 
20952
  public static class markOrdersAsManifested_result implements TBase<markOrdersAsManifested_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsManifested_result>   {
20953
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsManifested_result");
20954
 
20955
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.BOOL, (short)0);
20956
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
20957
 
20958
    private boolean success;
20959
    private TransactionServiceException ex;
20960
 
20961
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
20962
    public enum _Fields implements TFieldIdEnum {
20963
      SUCCESS((short)0, "success"),
20964
      EX((short)1, "ex");
20965
 
20966
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
20967
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
20968
 
20969
      static {
20970
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
20971
          byId.put((int)field._thriftId, field);
20972
          byName.put(field.getFieldName(), field);
20973
        }
20974
      }
20975
 
20976
      /**
20977
       * Find the _Fields constant that matches fieldId, or null if its not found.
20978
       */
20979
      public static _Fields findByThriftId(int fieldId) {
20980
        return byId.get(fieldId);
20981
      }
20982
 
20983
      /**
20984
       * Find the _Fields constant that matches fieldId, throwing an exception
20985
       * if it is not found.
20986
       */
20987
      public static _Fields findByThriftIdOrThrow(int fieldId) {
20988
        _Fields fields = findByThriftId(fieldId);
20989
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
20990
        return fields;
20991
      }
20992
 
20993
      /**
20994
       * Find the _Fields constant that matches name, or null if its not found.
20995
       */
20996
      public static _Fields findByName(String name) {
20997
        return byName.get(name);
20998
      }
20999
 
21000
      private final short _thriftId;
21001
      private final String _fieldName;
21002
 
21003
      _Fields(short thriftId, String fieldName) {
21004
        _thriftId = thriftId;
21005
        _fieldName = fieldName;
21006
      }
21007
 
21008
      public short getThriftFieldId() {
21009
        return _thriftId;
21010
      }
21011
 
21012
      public String getFieldName() {
21013
        return _fieldName;
21014
      }
21015
    }
21016
 
21017
    // isset id assignments
21018
    private static final int __SUCCESS_ISSET_ID = 0;
21019
    private BitSet __isset_bit_vector = new BitSet(1);
21020
 
21021
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21022
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21023
          new FieldValueMetaData(TType.BOOL)));
21024
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21025
          new FieldValueMetaData(TType.STRUCT)));
21026
    }});
21027
 
21028
    static {
21029
      FieldMetaData.addStructMetaDataMap(markOrdersAsManifested_result.class, metaDataMap);
21030
    }
21031
 
21032
    public markOrdersAsManifested_result() {
21033
    }
21034
 
21035
    public markOrdersAsManifested_result(
21036
      boolean success,
21037
      TransactionServiceException ex)
21038
    {
21039
      this();
21040
      this.success = success;
21041
      setSuccessIsSet(true);
21042
      this.ex = ex;
21043
    }
21044
 
21045
    /**
21046
     * Performs a deep copy on <i>other</i>.
21047
     */
21048
    public markOrdersAsManifested_result(markOrdersAsManifested_result other) {
21049
      __isset_bit_vector.clear();
21050
      __isset_bit_vector.or(other.__isset_bit_vector);
21051
      this.success = other.success;
21052
      if (other.isSetEx()) {
21053
        this.ex = new TransactionServiceException(other.ex);
21054
      }
21055
    }
21056
 
21057
    public markOrdersAsManifested_result deepCopy() {
21058
      return new markOrdersAsManifested_result(this);
21059
    }
21060
 
21061
    @Deprecated
21062
    public markOrdersAsManifested_result clone() {
21063
      return new markOrdersAsManifested_result(this);
21064
    }
21065
 
21066
    public boolean isSuccess() {
21067
      return this.success;
21068
    }
21069
 
21070
    public markOrdersAsManifested_result setSuccess(boolean success) {
21071
      this.success = success;
21072
      setSuccessIsSet(true);
21073
      return this;
21074
    }
21075
 
21076
    public void unsetSuccess() {
21077
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
21078
    }
21079
 
21080
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21081
    public boolean isSetSuccess() {
21082
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
21083
    }
21084
 
21085
    public void setSuccessIsSet(boolean value) {
21086
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
21087
    }
21088
 
21089
    public TransactionServiceException getEx() {
21090
      return this.ex;
21091
    }
21092
 
21093
    public markOrdersAsManifested_result setEx(TransactionServiceException ex) {
21094
      this.ex = ex;
21095
      return this;
21096
    }
21097
 
21098
    public void unsetEx() {
21099
      this.ex = null;
21100
    }
21101
 
21102
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21103
    public boolean isSetEx() {
21104
      return this.ex != null;
21105
    }
21106
 
21107
    public void setExIsSet(boolean value) {
21108
      if (!value) {
21109
        this.ex = null;
21110
      }
21111
    }
21112
 
21113
    public void setFieldValue(_Fields field, Object value) {
21114
      switch (field) {
21115
      case SUCCESS:
21116
        if (value == null) {
21117
          unsetSuccess();
21118
        } else {
21119
          setSuccess((Boolean)value);
21120
        }
21121
        break;
21122
 
21123
      case EX:
21124
        if (value == null) {
21125
          unsetEx();
21126
        } else {
21127
          setEx((TransactionServiceException)value);
21128
        }
21129
        break;
21130
 
21131
      }
21132
    }
21133
 
21134
    public void setFieldValue(int fieldID, Object value) {
21135
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21136
    }
21137
 
21138
    public Object getFieldValue(_Fields field) {
21139
      switch (field) {
21140
      case SUCCESS:
21141
        return new Boolean(isSuccess());
21142
 
21143
      case EX:
21144
        return getEx();
21145
 
21146
      }
21147
      throw new IllegalStateException();
21148
    }
21149
 
21150
    public Object getFieldValue(int fieldId) {
21151
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21152
    }
21153
 
21154
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21155
    public boolean isSet(_Fields field) {
21156
      switch (field) {
21157
      case SUCCESS:
21158
        return isSetSuccess();
21159
      case EX:
21160
        return isSetEx();
21161
      }
21162
      throw new IllegalStateException();
21163
    }
21164
 
21165
    public boolean isSet(int fieldID) {
21166
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21167
    }
21168
 
21169
    @Override
21170
    public boolean equals(Object that) {
21171
      if (that == null)
21172
        return false;
21173
      if (that instanceof markOrdersAsManifested_result)
21174
        return this.equals((markOrdersAsManifested_result)that);
21175
      return false;
21176
    }
21177
 
21178
    public boolean equals(markOrdersAsManifested_result that) {
21179
      if (that == null)
21180
        return false;
21181
 
21182
      boolean this_present_success = true;
21183
      boolean that_present_success = true;
21184
      if (this_present_success || that_present_success) {
21185
        if (!(this_present_success && that_present_success))
21186
          return false;
21187
        if (this.success != that.success)
21188
          return false;
21189
      }
21190
 
21191
      boolean this_present_ex = true && this.isSetEx();
21192
      boolean that_present_ex = true && that.isSetEx();
21193
      if (this_present_ex || that_present_ex) {
21194
        if (!(this_present_ex && that_present_ex))
21195
          return false;
21196
        if (!this.ex.equals(that.ex))
21197
          return false;
21198
      }
21199
 
21200
      return true;
21201
    }
21202
 
21203
    @Override
21204
    public int hashCode() {
21205
      return 0;
21206
    }
21207
 
21208
    public int compareTo(markOrdersAsManifested_result other) {
21209
      if (!getClass().equals(other.getClass())) {
21210
        return getClass().getName().compareTo(other.getClass().getName());
21211
      }
21212
 
21213
      int lastComparison = 0;
21214
      markOrdersAsManifested_result typedOther = (markOrdersAsManifested_result)other;
21215
 
21216
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21217
      if (lastComparison != 0) {
21218
        return lastComparison;
21219
      }
21220
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21221
      if (lastComparison != 0) {
21222
        return lastComparison;
21223
      }
21224
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21225
      if (lastComparison != 0) {
21226
        return lastComparison;
21227
      }
21228
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21229
      if (lastComparison != 0) {
21230
        return lastComparison;
21231
      }
21232
      return 0;
21233
    }
21234
 
21235
    public void read(TProtocol iprot) throws TException {
21236
      TField field;
21237
      iprot.readStructBegin();
21238
      while (true)
21239
      {
21240
        field = iprot.readFieldBegin();
21241
        if (field.type == TType.STOP) { 
21242
          break;
21243
        }
21244
        _Fields fieldId = _Fields.findByThriftId(field.id);
21245
        if (fieldId == null) {
21246
          TProtocolUtil.skip(iprot, field.type);
21247
        } else {
21248
          switch (fieldId) {
21249
            case SUCCESS:
21250
              if (field.type == TType.BOOL) {
21251
                this.success = iprot.readBool();
21252
                setSuccessIsSet(true);
21253
              } else { 
21254
                TProtocolUtil.skip(iprot, field.type);
21255
              }
21256
              break;
21257
            case EX:
21258
              if (field.type == TType.STRUCT) {
21259
                this.ex = new TransactionServiceException();
21260
                this.ex.read(iprot);
21261
              } else { 
21262
                TProtocolUtil.skip(iprot, field.type);
21263
              }
21264
              break;
21265
          }
21266
          iprot.readFieldEnd();
21267
        }
21268
      }
21269
      iprot.readStructEnd();
21270
      validate();
21271
    }
21272
 
21273
    public void write(TProtocol oprot) throws TException {
21274
      oprot.writeStructBegin(STRUCT_DESC);
21275
 
21276
      if (this.isSetSuccess()) {
21277
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
21278
        oprot.writeBool(this.success);
21279
        oprot.writeFieldEnd();
21280
      } else if (this.isSetEx()) {
21281
        oprot.writeFieldBegin(EX_FIELD_DESC);
21282
        this.ex.write(oprot);
21283
        oprot.writeFieldEnd();
21284
      }
21285
      oprot.writeFieldStop();
21286
      oprot.writeStructEnd();
21287
    }
21288
 
21289
    @Override
21290
    public String toString() {
21291
      StringBuilder sb = new StringBuilder("markOrdersAsManifested_result(");
21292
      boolean first = true;
21293
 
21294
      sb.append("success:");
21295
      sb.append(this.success);
21296
      first = false;
21297
      if (!first) sb.append(", ");
21298
      sb.append("ex:");
21299
      if (this.ex == null) {
21300
        sb.append("null");
21301
      } else {
21302
        sb.append(this.ex);
21303
      }
21304
      first = false;
21305
      sb.append(")");
21306
      return sb.toString();
21307
    }
21308
 
21309
    public void validate() throws TException {
21310
      // check for required fields
21311
    }
21312
 
21313
  }
21314
 
1114 chandransh 21315
  public static class markOrdersAsPickedUp_args implements TBase<markOrdersAsPickedUp_args._Fields>, java.io.Serializable, Cloneable   {
21316
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_args");
21317
 
21318
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
21319
    private static final TField PICKUP_DETAILS_FIELD_DESC = new TField("pickupDetails", TType.MAP, (short)2);
21320
 
21321
    private long providerId;
1245 chandransh 21322
    private Map<String,String> pickupDetails;
1114 chandransh 21323
 
21324
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21325
    public enum _Fields implements TFieldIdEnum {
21326
      PROVIDER_ID((short)1, "providerId"),
21327
      PICKUP_DETAILS((short)2, "pickupDetails");
21328
 
21329
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21330
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21331
 
21332
      static {
21333
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21334
          byId.put((int)field._thriftId, field);
21335
          byName.put(field.getFieldName(), field);
21336
        }
21337
      }
21338
 
21339
      /**
21340
       * Find the _Fields constant that matches fieldId, or null if its not found.
21341
       */
21342
      public static _Fields findByThriftId(int fieldId) {
21343
        return byId.get(fieldId);
21344
      }
21345
 
21346
      /**
21347
       * Find the _Fields constant that matches fieldId, throwing an exception
21348
       * if it is not found.
21349
       */
21350
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21351
        _Fields fields = findByThriftId(fieldId);
21352
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21353
        return fields;
21354
      }
21355
 
21356
      /**
21357
       * Find the _Fields constant that matches name, or null if its not found.
21358
       */
21359
      public static _Fields findByName(String name) {
21360
        return byName.get(name);
21361
      }
21362
 
21363
      private final short _thriftId;
21364
      private final String _fieldName;
21365
 
21366
      _Fields(short thriftId, String fieldName) {
21367
        _thriftId = thriftId;
21368
        _fieldName = fieldName;
21369
      }
21370
 
21371
      public short getThriftFieldId() {
21372
        return _thriftId;
21373
      }
21374
 
21375
      public String getFieldName() {
21376
        return _fieldName;
21377
      }
21378
    }
21379
 
21380
    // isset id assignments
21381
    private static final int __PROVIDERID_ISSET_ID = 0;
21382
    private BitSet __isset_bit_vector = new BitSet(1);
21383
 
21384
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21385
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
21386
          new FieldValueMetaData(TType.I64)));
21387
      put(_Fields.PICKUP_DETAILS, new FieldMetaData("pickupDetails", TFieldRequirementType.DEFAULT, 
21388
          new MapMetaData(TType.MAP, 
21389
              new FieldValueMetaData(TType.STRING), 
1245 chandransh 21390
              new FieldValueMetaData(TType.STRING))));
1114 chandransh 21391
    }});
21392
 
21393
    static {
21394
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_args.class, metaDataMap);
21395
    }
21396
 
21397
    public markOrdersAsPickedUp_args() {
21398
    }
21399
 
21400
    public markOrdersAsPickedUp_args(
21401
      long providerId,
1245 chandransh 21402
      Map<String,String> pickupDetails)
1114 chandransh 21403
    {
21404
      this();
21405
      this.providerId = providerId;
21406
      setProviderIdIsSet(true);
21407
      this.pickupDetails = pickupDetails;
21408
    }
21409
 
21410
    /**
21411
     * Performs a deep copy on <i>other</i>.
21412
     */
21413
    public markOrdersAsPickedUp_args(markOrdersAsPickedUp_args other) {
21414
      __isset_bit_vector.clear();
21415
      __isset_bit_vector.or(other.__isset_bit_vector);
21416
      this.providerId = other.providerId;
21417
      if (other.isSetPickupDetails()) {
1245 chandransh 21418
        Map<String,String> __this__pickupDetails = new HashMap<String,String>();
21419
        for (Map.Entry<String, String> other_element : other.pickupDetails.entrySet()) {
1114 chandransh 21420
 
21421
          String other_element_key = other_element.getKey();
1245 chandransh 21422
          String other_element_value = other_element.getValue();
1114 chandransh 21423
 
21424
          String __this__pickupDetails_copy_key = other_element_key;
21425
 
1245 chandransh 21426
          String __this__pickupDetails_copy_value = other_element_value;
1114 chandransh 21427
 
21428
          __this__pickupDetails.put(__this__pickupDetails_copy_key, __this__pickupDetails_copy_value);
21429
        }
21430
        this.pickupDetails = __this__pickupDetails;
21431
      }
21432
    }
21433
 
21434
    public markOrdersAsPickedUp_args deepCopy() {
21435
      return new markOrdersAsPickedUp_args(this);
21436
    }
21437
 
21438
    @Deprecated
21439
    public markOrdersAsPickedUp_args clone() {
21440
      return new markOrdersAsPickedUp_args(this);
21441
    }
21442
 
21443
    public long getProviderId() {
21444
      return this.providerId;
21445
    }
21446
 
21447
    public markOrdersAsPickedUp_args setProviderId(long providerId) {
21448
      this.providerId = providerId;
21449
      setProviderIdIsSet(true);
21450
      return this;
21451
    }
21452
 
21453
    public void unsetProviderId() {
21454
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
21455
    }
21456
 
21457
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
21458
    public boolean isSetProviderId() {
21459
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
21460
    }
21461
 
21462
    public void setProviderIdIsSet(boolean value) {
21463
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
21464
    }
21465
 
21466
    public int getPickupDetailsSize() {
21467
      return (this.pickupDetails == null) ? 0 : this.pickupDetails.size();
21468
    }
21469
 
1245 chandransh 21470
    public void putToPickupDetails(String key, String val) {
1114 chandransh 21471
      if (this.pickupDetails == null) {
1245 chandransh 21472
        this.pickupDetails = new HashMap<String,String>();
1114 chandransh 21473
      }
21474
      this.pickupDetails.put(key, val);
21475
    }
21476
 
1245 chandransh 21477
    public Map<String,String> getPickupDetails() {
1114 chandransh 21478
      return this.pickupDetails;
21479
    }
21480
 
1245 chandransh 21481
    public markOrdersAsPickedUp_args setPickupDetails(Map<String,String> pickupDetails) {
1114 chandransh 21482
      this.pickupDetails = pickupDetails;
21483
      return this;
21484
    }
21485
 
21486
    public void unsetPickupDetails() {
21487
      this.pickupDetails = null;
21488
    }
21489
 
21490
    /** Returns true if field pickupDetails is set (has been asigned a value) and false otherwise */
21491
    public boolean isSetPickupDetails() {
21492
      return this.pickupDetails != null;
21493
    }
21494
 
21495
    public void setPickupDetailsIsSet(boolean value) {
21496
      if (!value) {
21497
        this.pickupDetails = null;
21498
      }
21499
    }
21500
 
21501
    public void setFieldValue(_Fields field, Object value) {
21502
      switch (field) {
21503
      case PROVIDER_ID:
21504
        if (value == null) {
21505
          unsetProviderId();
21506
        } else {
21507
          setProviderId((Long)value);
21508
        }
21509
        break;
21510
 
21511
      case PICKUP_DETAILS:
21512
        if (value == null) {
21513
          unsetPickupDetails();
21514
        } else {
1245 chandransh 21515
          setPickupDetails((Map<String,String>)value);
1114 chandransh 21516
        }
21517
        break;
21518
 
21519
      }
21520
    }
21521
 
21522
    public void setFieldValue(int fieldID, Object value) {
21523
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21524
    }
21525
 
21526
    public Object getFieldValue(_Fields field) {
21527
      switch (field) {
21528
      case PROVIDER_ID:
21529
        return new Long(getProviderId());
21530
 
21531
      case PICKUP_DETAILS:
21532
        return getPickupDetails();
21533
 
21534
      }
21535
      throw new IllegalStateException();
21536
    }
21537
 
21538
    public Object getFieldValue(int fieldId) {
21539
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21540
    }
21541
 
21542
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21543
    public boolean isSet(_Fields field) {
21544
      switch (field) {
21545
      case PROVIDER_ID:
21546
        return isSetProviderId();
21547
      case PICKUP_DETAILS:
21548
        return isSetPickupDetails();
21549
      }
21550
      throw new IllegalStateException();
21551
    }
21552
 
21553
    public boolean isSet(int fieldID) {
21554
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21555
    }
21556
 
21557
    @Override
21558
    public boolean equals(Object that) {
21559
      if (that == null)
21560
        return false;
21561
      if (that instanceof markOrdersAsPickedUp_args)
21562
        return this.equals((markOrdersAsPickedUp_args)that);
21563
      return false;
21564
    }
21565
 
21566
    public boolean equals(markOrdersAsPickedUp_args that) {
21567
      if (that == null)
21568
        return false;
21569
 
21570
      boolean this_present_providerId = true;
21571
      boolean that_present_providerId = true;
21572
      if (this_present_providerId || that_present_providerId) {
21573
        if (!(this_present_providerId && that_present_providerId))
21574
          return false;
21575
        if (this.providerId != that.providerId)
21576
          return false;
21577
      }
21578
 
21579
      boolean this_present_pickupDetails = true && this.isSetPickupDetails();
21580
      boolean that_present_pickupDetails = true && that.isSetPickupDetails();
21581
      if (this_present_pickupDetails || that_present_pickupDetails) {
21582
        if (!(this_present_pickupDetails && that_present_pickupDetails))
21583
          return false;
21584
        if (!this.pickupDetails.equals(that.pickupDetails))
21585
          return false;
21586
      }
21587
 
21588
      return true;
21589
    }
21590
 
21591
    @Override
21592
    public int hashCode() {
21593
      return 0;
21594
    }
21595
 
21596
    public void read(TProtocol iprot) throws TException {
21597
      TField field;
21598
      iprot.readStructBegin();
21599
      while (true)
21600
      {
21601
        field = iprot.readFieldBegin();
21602
        if (field.type == TType.STOP) { 
21603
          break;
21604
        }
21605
        _Fields fieldId = _Fields.findByThriftId(field.id);
21606
        if (fieldId == null) {
21607
          TProtocolUtil.skip(iprot, field.type);
21608
        } else {
21609
          switch (fieldId) {
21610
            case PROVIDER_ID:
21611
              if (field.type == TType.I64) {
21612
                this.providerId = iprot.readI64();
21613
                setProviderIdIsSet(true);
21614
              } else { 
21615
                TProtocolUtil.skip(iprot, field.type);
21616
              }
21617
              break;
21618
            case PICKUP_DETAILS:
21619
              if (field.type == TType.MAP) {
21620
                {
1382 varun.gupt 21621
                  TMap _map48 = iprot.readMapBegin();
21622
                  this.pickupDetails = new HashMap<String,String>(2*_map48.size);
21623
                  for (int _i49 = 0; _i49 < _map48.size; ++_i49)
1114 chandransh 21624
                  {
1382 varun.gupt 21625
                    String _key50;
21626
                    String _val51;
21627
                    _key50 = iprot.readString();
21628
                    _val51 = iprot.readString();
21629
                    this.pickupDetails.put(_key50, _val51);
1114 chandransh 21630
                  }
21631
                  iprot.readMapEnd();
21632
                }
21633
              } else { 
21634
                TProtocolUtil.skip(iprot, field.type);
21635
              }
21636
              break;
21637
          }
21638
          iprot.readFieldEnd();
21639
        }
21640
      }
21641
      iprot.readStructEnd();
21642
      validate();
21643
    }
21644
 
21645
    public void write(TProtocol oprot) throws TException {
21646
      validate();
21647
 
21648
      oprot.writeStructBegin(STRUCT_DESC);
21649
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
21650
      oprot.writeI64(this.providerId);
21651
      oprot.writeFieldEnd();
21652
      if (this.pickupDetails != null) {
21653
        oprot.writeFieldBegin(PICKUP_DETAILS_FIELD_DESC);
21654
        {
1245 chandransh 21655
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.pickupDetails.size()));
1382 varun.gupt 21656
          for (Map.Entry<String, String> _iter52 : this.pickupDetails.entrySet())
1114 chandransh 21657
          {
1382 varun.gupt 21658
            oprot.writeString(_iter52.getKey());
21659
            oprot.writeString(_iter52.getValue());
1114 chandransh 21660
          }
21661
          oprot.writeMapEnd();
21662
        }
21663
        oprot.writeFieldEnd();
21664
      }
21665
      oprot.writeFieldStop();
21666
      oprot.writeStructEnd();
21667
    }
21668
 
21669
    @Override
21670
    public String toString() {
21671
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_args(");
21672
      boolean first = true;
21673
 
21674
      sb.append("providerId:");
21675
      sb.append(this.providerId);
21676
      first = false;
21677
      if (!first) sb.append(", ");
21678
      sb.append("pickupDetails:");
21679
      if (this.pickupDetails == null) {
21680
        sb.append("null");
21681
      } else {
21682
        sb.append(this.pickupDetails);
21683
      }
21684
      first = false;
21685
      sb.append(")");
21686
      return sb.toString();
21687
    }
21688
 
21689
    public void validate() throws TException {
21690
      // check for required fields
21691
    }
21692
 
21693
  }
21694
 
21695
  public static class markOrdersAsPickedUp_result implements TBase<markOrdersAsPickedUp_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsPickedUp_result>   {
21696
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsPickedUp_result");
21697
 
21698
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
21699
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
21700
 
21701
    private List<Order> success;
21702
    private TransactionServiceException ex;
21703
 
21704
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
21705
    public enum _Fields implements TFieldIdEnum {
21706
      SUCCESS((short)0, "success"),
21707
      EX((short)1, "ex");
21708
 
21709
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
21710
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
21711
 
21712
      static {
21713
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
21714
          byId.put((int)field._thriftId, field);
21715
          byName.put(field.getFieldName(), field);
21716
        }
21717
      }
21718
 
21719
      /**
21720
       * Find the _Fields constant that matches fieldId, or null if its not found.
21721
       */
21722
      public static _Fields findByThriftId(int fieldId) {
21723
        return byId.get(fieldId);
21724
      }
21725
 
21726
      /**
21727
       * Find the _Fields constant that matches fieldId, throwing an exception
21728
       * if it is not found.
21729
       */
21730
      public static _Fields findByThriftIdOrThrow(int fieldId) {
21731
        _Fields fields = findByThriftId(fieldId);
21732
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
21733
        return fields;
21734
      }
21735
 
21736
      /**
21737
       * Find the _Fields constant that matches name, or null if its not found.
21738
       */
21739
      public static _Fields findByName(String name) {
21740
        return byName.get(name);
21741
      }
21742
 
21743
      private final short _thriftId;
21744
      private final String _fieldName;
21745
 
21746
      _Fields(short thriftId, String fieldName) {
21747
        _thriftId = thriftId;
21748
        _fieldName = fieldName;
21749
      }
21750
 
21751
      public short getThriftFieldId() {
21752
        return _thriftId;
21753
      }
21754
 
21755
      public String getFieldName() {
21756
        return _fieldName;
21757
      }
21758
    }
21759
 
21760
    // isset id assignments
21761
 
21762
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
21763
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
21764
          new ListMetaData(TType.LIST, 
21765
              new StructMetaData(TType.STRUCT, Order.class))));
21766
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
21767
          new FieldValueMetaData(TType.STRUCT)));
21768
    }});
21769
 
21770
    static {
21771
      FieldMetaData.addStructMetaDataMap(markOrdersAsPickedUp_result.class, metaDataMap);
21772
    }
21773
 
21774
    public markOrdersAsPickedUp_result() {
21775
    }
21776
 
21777
    public markOrdersAsPickedUp_result(
21778
      List<Order> success,
21779
      TransactionServiceException ex)
21780
    {
21781
      this();
21782
      this.success = success;
21783
      this.ex = ex;
21784
    }
21785
 
21786
    /**
21787
     * Performs a deep copy on <i>other</i>.
21788
     */
21789
    public markOrdersAsPickedUp_result(markOrdersAsPickedUp_result other) {
21790
      if (other.isSetSuccess()) {
21791
        List<Order> __this__success = new ArrayList<Order>();
21792
        for (Order other_element : other.success) {
21793
          __this__success.add(new Order(other_element));
21794
        }
21795
        this.success = __this__success;
21796
      }
21797
      if (other.isSetEx()) {
21798
        this.ex = new TransactionServiceException(other.ex);
21799
      }
21800
    }
21801
 
21802
    public markOrdersAsPickedUp_result deepCopy() {
21803
      return new markOrdersAsPickedUp_result(this);
21804
    }
21805
 
21806
    @Deprecated
21807
    public markOrdersAsPickedUp_result clone() {
21808
      return new markOrdersAsPickedUp_result(this);
21809
    }
21810
 
21811
    public int getSuccessSize() {
21812
      return (this.success == null) ? 0 : this.success.size();
21813
    }
21814
 
21815
    public java.util.Iterator<Order> getSuccessIterator() {
21816
      return (this.success == null) ? null : this.success.iterator();
21817
    }
21818
 
21819
    public void addToSuccess(Order elem) {
21820
      if (this.success == null) {
21821
        this.success = new ArrayList<Order>();
21822
      }
21823
      this.success.add(elem);
21824
    }
21825
 
21826
    public List<Order> getSuccess() {
21827
      return this.success;
21828
    }
21829
 
21830
    public markOrdersAsPickedUp_result setSuccess(List<Order> success) {
21831
      this.success = success;
21832
      return this;
21833
    }
21834
 
21835
    public void unsetSuccess() {
21836
      this.success = null;
21837
    }
21838
 
21839
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
21840
    public boolean isSetSuccess() {
21841
      return this.success != null;
21842
    }
21843
 
21844
    public void setSuccessIsSet(boolean value) {
21845
      if (!value) {
21846
        this.success = null;
21847
      }
21848
    }
21849
 
21850
    public TransactionServiceException getEx() {
21851
      return this.ex;
21852
    }
21853
 
21854
    public markOrdersAsPickedUp_result setEx(TransactionServiceException ex) {
21855
      this.ex = ex;
21856
      return this;
21857
    }
21858
 
21859
    public void unsetEx() {
21860
      this.ex = null;
21861
    }
21862
 
21863
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
21864
    public boolean isSetEx() {
21865
      return this.ex != null;
21866
    }
21867
 
21868
    public void setExIsSet(boolean value) {
21869
      if (!value) {
21870
        this.ex = null;
21871
      }
21872
    }
21873
 
21874
    public void setFieldValue(_Fields field, Object value) {
21875
      switch (field) {
21876
      case SUCCESS:
21877
        if (value == null) {
21878
          unsetSuccess();
21879
        } else {
21880
          setSuccess((List<Order>)value);
21881
        }
21882
        break;
21883
 
21884
      case EX:
21885
        if (value == null) {
21886
          unsetEx();
21887
        } else {
21888
          setEx((TransactionServiceException)value);
21889
        }
21890
        break;
21891
 
21892
      }
21893
    }
21894
 
21895
    public void setFieldValue(int fieldID, Object value) {
21896
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
21897
    }
21898
 
21899
    public Object getFieldValue(_Fields field) {
21900
      switch (field) {
21901
      case SUCCESS:
21902
        return getSuccess();
21903
 
21904
      case EX:
21905
        return getEx();
21906
 
21907
      }
21908
      throw new IllegalStateException();
21909
    }
21910
 
21911
    public Object getFieldValue(int fieldId) {
21912
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
21913
    }
21914
 
21915
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
21916
    public boolean isSet(_Fields field) {
21917
      switch (field) {
21918
      case SUCCESS:
21919
        return isSetSuccess();
21920
      case EX:
21921
        return isSetEx();
21922
      }
21923
      throw new IllegalStateException();
21924
    }
21925
 
21926
    public boolean isSet(int fieldID) {
21927
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
21928
    }
21929
 
21930
    @Override
21931
    public boolean equals(Object that) {
21932
      if (that == null)
21933
        return false;
21934
      if (that instanceof markOrdersAsPickedUp_result)
21935
        return this.equals((markOrdersAsPickedUp_result)that);
21936
      return false;
21937
    }
21938
 
21939
    public boolean equals(markOrdersAsPickedUp_result that) {
21940
      if (that == null)
21941
        return false;
21942
 
21943
      boolean this_present_success = true && this.isSetSuccess();
21944
      boolean that_present_success = true && that.isSetSuccess();
21945
      if (this_present_success || that_present_success) {
21946
        if (!(this_present_success && that_present_success))
21947
          return false;
21948
        if (!this.success.equals(that.success))
21949
          return false;
21950
      }
21951
 
21952
      boolean this_present_ex = true && this.isSetEx();
21953
      boolean that_present_ex = true && that.isSetEx();
21954
      if (this_present_ex || that_present_ex) {
21955
        if (!(this_present_ex && that_present_ex))
21956
          return false;
21957
        if (!this.ex.equals(that.ex))
21958
          return false;
21959
      }
21960
 
21961
      return true;
21962
    }
21963
 
21964
    @Override
21965
    public int hashCode() {
21966
      return 0;
21967
    }
21968
 
21969
    public int compareTo(markOrdersAsPickedUp_result other) {
21970
      if (!getClass().equals(other.getClass())) {
21971
        return getClass().getName().compareTo(other.getClass().getName());
21972
      }
21973
 
21974
      int lastComparison = 0;
21975
      markOrdersAsPickedUp_result typedOther = (markOrdersAsPickedUp_result)other;
21976
 
21977
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
21978
      if (lastComparison != 0) {
21979
        return lastComparison;
21980
      }
21981
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
21982
      if (lastComparison != 0) {
21983
        return lastComparison;
21984
      }
21985
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
21986
      if (lastComparison != 0) {
21987
        return lastComparison;
21988
      }
21989
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
21990
      if (lastComparison != 0) {
21991
        return lastComparison;
21992
      }
21993
      return 0;
21994
    }
21995
 
21996
    public void read(TProtocol iprot) throws TException {
21997
      TField field;
21998
      iprot.readStructBegin();
21999
      while (true)
22000
      {
22001
        field = iprot.readFieldBegin();
22002
        if (field.type == TType.STOP) { 
22003
          break;
22004
        }
22005
        _Fields fieldId = _Fields.findByThriftId(field.id);
22006
        if (fieldId == null) {
22007
          TProtocolUtil.skip(iprot, field.type);
22008
        } else {
22009
          switch (fieldId) {
22010
            case SUCCESS:
22011
              if (field.type == TType.LIST) {
22012
                {
1382 varun.gupt 22013
                  TList _list53 = iprot.readListBegin();
22014
                  this.success = new ArrayList<Order>(_list53.size);
22015
                  for (int _i54 = 0; _i54 < _list53.size; ++_i54)
1114 chandransh 22016
                  {
1382 varun.gupt 22017
                    Order _elem55;
22018
                    _elem55 = new Order();
22019
                    _elem55.read(iprot);
22020
                    this.success.add(_elem55);
1114 chandransh 22021
                  }
22022
                  iprot.readListEnd();
22023
                }
22024
              } else { 
22025
                TProtocolUtil.skip(iprot, field.type);
22026
              }
22027
              break;
22028
            case EX:
22029
              if (field.type == TType.STRUCT) {
22030
                this.ex = new TransactionServiceException();
22031
                this.ex.read(iprot);
22032
              } else { 
22033
                TProtocolUtil.skip(iprot, field.type);
22034
              }
22035
              break;
22036
          }
22037
          iprot.readFieldEnd();
22038
        }
22039
      }
22040
      iprot.readStructEnd();
22041
      validate();
22042
    }
22043
 
22044
    public void write(TProtocol oprot) throws TException {
22045
      oprot.writeStructBegin(STRUCT_DESC);
22046
 
22047
      if (this.isSetSuccess()) {
22048
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
22049
        {
22050
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1382 varun.gupt 22051
          for (Order _iter56 : this.success)
1114 chandransh 22052
          {
1382 varun.gupt 22053
            _iter56.write(oprot);
1114 chandransh 22054
          }
22055
          oprot.writeListEnd();
22056
        }
22057
        oprot.writeFieldEnd();
22058
      } else if (this.isSetEx()) {
22059
        oprot.writeFieldBegin(EX_FIELD_DESC);
22060
        this.ex.write(oprot);
22061
        oprot.writeFieldEnd();
22062
      }
22063
      oprot.writeFieldStop();
22064
      oprot.writeStructEnd();
22065
    }
22066
 
22067
    @Override
22068
    public String toString() {
22069
      StringBuilder sb = new StringBuilder("markOrdersAsPickedUp_result(");
22070
      boolean first = true;
22071
 
22072
      sb.append("success:");
22073
      if (this.success == null) {
22074
        sb.append("null");
22075
      } else {
22076
        sb.append(this.success);
22077
      }
22078
      first = false;
22079
      if (!first) sb.append(", ");
22080
      sb.append("ex:");
22081
      if (this.ex == null) {
22082
        sb.append("null");
22083
      } else {
22084
        sb.append(this.ex);
22085
      }
22086
      first = false;
22087
      sb.append(")");
22088
      return sb.toString();
22089
    }
22090
 
22091
    public void validate() throws TException {
22092
      // check for required fields
22093
    }
22094
 
22095
  }
22096
 
1133 chandransh 22097
  public static class markOrdersAsDelivered_args implements TBase<markOrdersAsDelivered_args._Fields>, java.io.Serializable, Cloneable   {
22098
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_args");
22099
 
22100
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22101
    private static final TField DELIVERED_ORDERS_FIELD_DESC = new TField("deliveredOrders", TType.MAP, (short)2);
22102
 
22103
    private long providerId;
22104
    private Map<String,String> deliveredOrders;
22105
 
22106
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22107
    public enum _Fields implements TFieldIdEnum {
22108
      PROVIDER_ID((short)1, "providerId"),
22109
      DELIVERED_ORDERS((short)2, "deliveredOrders");
22110
 
22111
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22112
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22113
 
22114
      static {
22115
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22116
          byId.put((int)field._thriftId, field);
22117
          byName.put(field.getFieldName(), field);
22118
        }
22119
      }
22120
 
22121
      /**
22122
       * Find the _Fields constant that matches fieldId, or null if its not found.
22123
       */
22124
      public static _Fields findByThriftId(int fieldId) {
22125
        return byId.get(fieldId);
22126
      }
22127
 
22128
      /**
22129
       * Find the _Fields constant that matches fieldId, throwing an exception
22130
       * if it is not found.
22131
       */
22132
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22133
        _Fields fields = findByThriftId(fieldId);
22134
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22135
        return fields;
22136
      }
22137
 
22138
      /**
22139
       * Find the _Fields constant that matches name, or null if its not found.
22140
       */
22141
      public static _Fields findByName(String name) {
22142
        return byName.get(name);
22143
      }
22144
 
22145
      private final short _thriftId;
22146
      private final String _fieldName;
22147
 
22148
      _Fields(short thriftId, String fieldName) {
22149
        _thriftId = thriftId;
22150
        _fieldName = fieldName;
22151
      }
22152
 
22153
      public short getThriftFieldId() {
22154
        return _thriftId;
22155
      }
22156
 
22157
      public String getFieldName() {
22158
        return _fieldName;
22159
      }
22160
    }
22161
 
22162
    // isset id assignments
22163
    private static final int __PROVIDERID_ISSET_ID = 0;
22164
    private BitSet __isset_bit_vector = new BitSet(1);
22165
 
22166
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22167
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22168
          new FieldValueMetaData(TType.I64)));
22169
      put(_Fields.DELIVERED_ORDERS, new FieldMetaData("deliveredOrders", TFieldRequirementType.DEFAULT, 
22170
          new MapMetaData(TType.MAP, 
22171
              new FieldValueMetaData(TType.STRING), 
22172
              new FieldValueMetaData(TType.STRING))));
22173
    }});
22174
 
22175
    static {
22176
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_args.class, metaDataMap);
22177
    }
22178
 
22179
    public markOrdersAsDelivered_args() {
22180
    }
22181
 
22182
    public markOrdersAsDelivered_args(
22183
      long providerId,
22184
      Map<String,String> deliveredOrders)
22185
    {
22186
      this();
22187
      this.providerId = providerId;
22188
      setProviderIdIsSet(true);
22189
      this.deliveredOrders = deliveredOrders;
22190
    }
22191
 
22192
    /**
22193
     * Performs a deep copy on <i>other</i>.
22194
     */
22195
    public markOrdersAsDelivered_args(markOrdersAsDelivered_args other) {
22196
      __isset_bit_vector.clear();
22197
      __isset_bit_vector.or(other.__isset_bit_vector);
22198
      this.providerId = other.providerId;
22199
      if (other.isSetDeliveredOrders()) {
22200
        Map<String,String> __this__deliveredOrders = new HashMap<String,String>();
22201
        for (Map.Entry<String, String> other_element : other.deliveredOrders.entrySet()) {
22202
 
22203
          String other_element_key = other_element.getKey();
22204
          String other_element_value = other_element.getValue();
22205
 
22206
          String __this__deliveredOrders_copy_key = other_element_key;
22207
 
22208
          String __this__deliveredOrders_copy_value = other_element_value;
22209
 
22210
          __this__deliveredOrders.put(__this__deliveredOrders_copy_key, __this__deliveredOrders_copy_value);
22211
        }
22212
        this.deliveredOrders = __this__deliveredOrders;
22213
      }
22214
    }
22215
 
22216
    public markOrdersAsDelivered_args deepCopy() {
22217
      return new markOrdersAsDelivered_args(this);
22218
    }
22219
 
22220
    @Deprecated
22221
    public markOrdersAsDelivered_args clone() {
22222
      return new markOrdersAsDelivered_args(this);
22223
    }
22224
 
22225
    public long getProviderId() {
22226
      return this.providerId;
22227
    }
22228
 
22229
    public markOrdersAsDelivered_args setProviderId(long providerId) {
22230
      this.providerId = providerId;
22231
      setProviderIdIsSet(true);
22232
      return this;
22233
    }
22234
 
22235
    public void unsetProviderId() {
22236
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22237
    }
22238
 
22239
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22240
    public boolean isSetProviderId() {
22241
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22242
    }
22243
 
22244
    public void setProviderIdIsSet(boolean value) {
22245
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22246
    }
22247
 
22248
    public int getDeliveredOrdersSize() {
22249
      return (this.deliveredOrders == null) ? 0 : this.deliveredOrders.size();
22250
    }
22251
 
22252
    public void putToDeliveredOrders(String key, String val) {
22253
      if (this.deliveredOrders == null) {
22254
        this.deliveredOrders = new HashMap<String,String>();
22255
      }
22256
      this.deliveredOrders.put(key, val);
22257
    }
22258
 
22259
    public Map<String,String> getDeliveredOrders() {
22260
      return this.deliveredOrders;
22261
    }
22262
 
22263
    public markOrdersAsDelivered_args setDeliveredOrders(Map<String,String> deliveredOrders) {
22264
      this.deliveredOrders = deliveredOrders;
22265
      return this;
22266
    }
22267
 
22268
    public void unsetDeliveredOrders() {
22269
      this.deliveredOrders = null;
22270
    }
22271
 
22272
    /** Returns true if field deliveredOrders is set (has been asigned a value) and false otherwise */
22273
    public boolean isSetDeliveredOrders() {
22274
      return this.deliveredOrders != null;
22275
    }
22276
 
22277
    public void setDeliveredOrdersIsSet(boolean value) {
22278
      if (!value) {
22279
        this.deliveredOrders = null;
22280
      }
22281
    }
22282
 
22283
    public void setFieldValue(_Fields field, Object value) {
22284
      switch (field) {
22285
      case PROVIDER_ID:
22286
        if (value == null) {
22287
          unsetProviderId();
22288
        } else {
22289
          setProviderId((Long)value);
22290
        }
22291
        break;
22292
 
22293
      case DELIVERED_ORDERS:
22294
        if (value == null) {
22295
          unsetDeliveredOrders();
22296
        } else {
22297
          setDeliveredOrders((Map<String,String>)value);
22298
        }
22299
        break;
22300
 
22301
      }
22302
    }
22303
 
22304
    public void setFieldValue(int fieldID, Object value) {
22305
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22306
    }
22307
 
22308
    public Object getFieldValue(_Fields field) {
22309
      switch (field) {
22310
      case PROVIDER_ID:
22311
        return new Long(getProviderId());
22312
 
22313
      case DELIVERED_ORDERS:
22314
        return getDeliveredOrders();
22315
 
22316
      }
22317
      throw new IllegalStateException();
22318
    }
22319
 
22320
    public Object getFieldValue(int fieldId) {
22321
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22322
    }
22323
 
22324
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22325
    public boolean isSet(_Fields field) {
22326
      switch (field) {
22327
      case PROVIDER_ID:
22328
        return isSetProviderId();
22329
      case DELIVERED_ORDERS:
22330
        return isSetDeliveredOrders();
22331
      }
22332
      throw new IllegalStateException();
22333
    }
22334
 
22335
    public boolean isSet(int fieldID) {
22336
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22337
    }
22338
 
22339
    @Override
22340
    public boolean equals(Object that) {
22341
      if (that == null)
22342
        return false;
22343
      if (that instanceof markOrdersAsDelivered_args)
22344
        return this.equals((markOrdersAsDelivered_args)that);
22345
      return false;
22346
    }
22347
 
22348
    public boolean equals(markOrdersAsDelivered_args that) {
22349
      if (that == null)
22350
        return false;
22351
 
22352
      boolean this_present_providerId = true;
22353
      boolean that_present_providerId = true;
22354
      if (this_present_providerId || that_present_providerId) {
22355
        if (!(this_present_providerId && that_present_providerId))
22356
          return false;
22357
        if (this.providerId != that.providerId)
22358
          return false;
22359
      }
22360
 
22361
      boolean this_present_deliveredOrders = true && this.isSetDeliveredOrders();
22362
      boolean that_present_deliveredOrders = true && that.isSetDeliveredOrders();
22363
      if (this_present_deliveredOrders || that_present_deliveredOrders) {
22364
        if (!(this_present_deliveredOrders && that_present_deliveredOrders))
22365
          return false;
22366
        if (!this.deliveredOrders.equals(that.deliveredOrders))
22367
          return false;
22368
      }
22369
 
22370
      return true;
22371
    }
22372
 
22373
    @Override
22374
    public int hashCode() {
22375
      return 0;
22376
    }
22377
 
22378
    public void read(TProtocol iprot) throws TException {
22379
      TField field;
22380
      iprot.readStructBegin();
22381
      while (true)
22382
      {
22383
        field = iprot.readFieldBegin();
22384
        if (field.type == TType.STOP) { 
22385
          break;
22386
        }
22387
        _Fields fieldId = _Fields.findByThriftId(field.id);
22388
        if (fieldId == null) {
22389
          TProtocolUtil.skip(iprot, field.type);
22390
        } else {
22391
          switch (fieldId) {
22392
            case PROVIDER_ID:
22393
              if (field.type == TType.I64) {
22394
                this.providerId = iprot.readI64();
22395
                setProviderIdIsSet(true);
22396
              } else { 
22397
                TProtocolUtil.skip(iprot, field.type);
22398
              }
22399
              break;
22400
            case DELIVERED_ORDERS:
22401
              if (field.type == TType.MAP) {
22402
                {
1382 varun.gupt 22403
                  TMap _map57 = iprot.readMapBegin();
22404
                  this.deliveredOrders = new HashMap<String,String>(2*_map57.size);
22405
                  for (int _i58 = 0; _i58 < _map57.size; ++_i58)
1133 chandransh 22406
                  {
1382 varun.gupt 22407
                    String _key59;
22408
                    String _val60;
22409
                    _key59 = iprot.readString();
22410
                    _val60 = iprot.readString();
22411
                    this.deliveredOrders.put(_key59, _val60);
1133 chandransh 22412
                  }
22413
                  iprot.readMapEnd();
22414
                }
22415
              } else { 
22416
                TProtocolUtil.skip(iprot, field.type);
22417
              }
22418
              break;
22419
          }
22420
          iprot.readFieldEnd();
22421
        }
22422
      }
22423
      iprot.readStructEnd();
22424
      validate();
22425
    }
22426
 
22427
    public void write(TProtocol oprot) throws TException {
22428
      validate();
22429
 
22430
      oprot.writeStructBegin(STRUCT_DESC);
22431
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
22432
      oprot.writeI64(this.providerId);
22433
      oprot.writeFieldEnd();
22434
      if (this.deliveredOrders != null) {
22435
        oprot.writeFieldBegin(DELIVERED_ORDERS_FIELD_DESC);
22436
        {
22437
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.deliveredOrders.size()));
1382 varun.gupt 22438
          for (Map.Entry<String, String> _iter61 : this.deliveredOrders.entrySet())
1133 chandransh 22439
          {
1382 varun.gupt 22440
            oprot.writeString(_iter61.getKey());
22441
            oprot.writeString(_iter61.getValue());
1133 chandransh 22442
          }
22443
          oprot.writeMapEnd();
22444
        }
22445
        oprot.writeFieldEnd();
22446
      }
22447
      oprot.writeFieldStop();
22448
      oprot.writeStructEnd();
22449
    }
22450
 
22451
    @Override
22452
    public String toString() {
22453
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_args(");
22454
      boolean first = true;
22455
 
22456
      sb.append("providerId:");
22457
      sb.append(this.providerId);
22458
      first = false;
22459
      if (!first) sb.append(", ");
22460
      sb.append("deliveredOrders:");
22461
      if (this.deliveredOrders == null) {
22462
        sb.append("null");
22463
      } else {
22464
        sb.append(this.deliveredOrders);
22465
      }
22466
      first = false;
22467
      sb.append(")");
22468
      return sb.toString();
22469
    }
22470
 
22471
    public void validate() throws TException {
22472
      // check for required fields
22473
    }
22474
 
22475
  }
22476
 
22477
  public static class markOrdersAsDelivered_result implements TBase<markOrdersAsDelivered_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsDelivered_result>   {
22478
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsDelivered_result");
22479
 
22480
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
22481
 
22482
    private TransactionServiceException ex;
22483
 
22484
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22485
    public enum _Fields implements TFieldIdEnum {
22486
      EX((short)1, "ex");
22487
 
22488
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22489
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22490
 
22491
      static {
22492
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22493
          byId.put((int)field._thriftId, field);
22494
          byName.put(field.getFieldName(), field);
22495
        }
22496
      }
22497
 
22498
      /**
22499
       * Find the _Fields constant that matches fieldId, or null if its not found.
22500
       */
22501
      public static _Fields findByThriftId(int fieldId) {
22502
        return byId.get(fieldId);
22503
      }
22504
 
22505
      /**
22506
       * Find the _Fields constant that matches fieldId, throwing an exception
22507
       * if it is not found.
22508
       */
22509
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22510
        _Fields fields = findByThriftId(fieldId);
22511
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22512
        return fields;
22513
      }
22514
 
22515
      /**
22516
       * Find the _Fields constant that matches name, or null if its not found.
22517
       */
22518
      public static _Fields findByName(String name) {
22519
        return byName.get(name);
22520
      }
22521
 
22522
      private final short _thriftId;
22523
      private final String _fieldName;
22524
 
22525
      _Fields(short thriftId, String fieldName) {
22526
        _thriftId = thriftId;
22527
        _fieldName = fieldName;
22528
      }
22529
 
22530
      public short getThriftFieldId() {
22531
        return _thriftId;
22532
      }
22533
 
22534
      public String getFieldName() {
22535
        return _fieldName;
22536
      }
22537
    }
22538
 
22539
    // isset id assignments
22540
 
22541
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22542
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
22543
          new FieldValueMetaData(TType.STRUCT)));
22544
    }});
22545
 
22546
    static {
22547
      FieldMetaData.addStructMetaDataMap(markOrdersAsDelivered_result.class, metaDataMap);
22548
    }
22549
 
22550
    public markOrdersAsDelivered_result() {
22551
    }
22552
 
22553
    public markOrdersAsDelivered_result(
22554
      TransactionServiceException ex)
22555
    {
22556
      this();
22557
      this.ex = ex;
22558
    }
22559
 
22560
    /**
22561
     * Performs a deep copy on <i>other</i>.
22562
     */
22563
    public markOrdersAsDelivered_result(markOrdersAsDelivered_result other) {
22564
      if (other.isSetEx()) {
22565
        this.ex = new TransactionServiceException(other.ex);
22566
      }
22567
    }
22568
 
22569
    public markOrdersAsDelivered_result deepCopy() {
22570
      return new markOrdersAsDelivered_result(this);
22571
    }
22572
 
22573
    @Deprecated
22574
    public markOrdersAsDelivered_result clone() {
22575
      return new markOrdersAsDelivered_result(this);
22576
    }
22577
 
22578
    public TransactionServiceException getEx() {
22579
      return this.ex;
22580
    }
22581
 
22582
    public markOrdersAsDelivered_result setEx(TransactionServiceException ex) {
22583
      this.ex = ex;
22584
      return this;
22585
    }
22586
 
22587
    public void unsetEx() {
22588
      this.ex = null;
22589
    }
22590
 
22591
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
22592
    public boolean isSetEx() {
22593
      return this.ex != null;
22594
    }
22595
 
22596
    public void setExIsSet(boolean value) {
22597
      if (!value) {
22598
        this.ex = null;
22599
      }
22600
    }
22601
 
22602
    public void setFieldValue(_Fields field, Object value) {
22603
      switch (field) {
22604
      case EX:
22605
        if (value == null) {
22606
          unsetEx();
22607
        } else {
22608
          setEx((TransactionServiceException)value);
22609
        }
22610
        break;
22611
 
22612
      }
22613
    }
22614
 
22615
    public void setFieldValue(int fieldID, Object value) {
22616
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22617
    }
22618
 
22619
    public Object getFieldValue(_Fields field) {
22620
      switch (field) {
22621
      case EX:
22622
        return getEx();
22623
 
22624
      }
22625
      throw new IllegalStateException();
22626
    }
22627
 
22628
    public Object getFieldValue(int fieldId) {
22629
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22630
    }
22631
 
22632
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22633
    public boolean isSet(_Fields field) {
22634
      switch (field) {
22635
      case EX:
22636
        return isSetEx();
22637
      }
22638
      throw new IllegalStateException();
22639
    }
22640
 
22641
    public boolean isSet(int fieldID) {
22642
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22643
    }
22644
 
22645
    @Override
22646
    public boolean equals(Object that) {
22647
      if (that == null)
22648
        return false;
22649
      if (that instanceof markOrdersAsDelivered_result)
22650
        return this.equals((markOrdersAsDelivered_result)that);
22651
      return false;
22652
    }
22653
 
22654
    public boolean equals(markOrdersAsDelivered_result that) {
22655
      if (that == null)
22656
        return false;
22657
 
22658
      boolean this_present_ex = true && this.isSetEx();
22659
      boolean that_present_ex = true && that.isSetEx();
22660
      if (this_present_ex || that_present_ex) {
22661
        if (!(this_present_ex && that_present_ex))
22662
          return false;
22663
        if (!this.ex.equals(that.ex))
22664
          return false;
22665
      }
22666
 
22667
      return true;
22668
    }
22669
 
22670
    @Override
22671
    public int hashCode() {
22672
      return 0;
22673
    }
22674
 
22675
    public int compareTo(markOrdersAsDelivered_result other) {
22676
      if (!getClass().equals(other.getClass())) {
22677
        return getClass().getName().compareTo(other.getClass().getName());
22678
      }
22679
 
22680
      int lastComparison = 0;
22681
      markOrdersAsDelivered_result typedOther = (markOrdersAsDelivered_result)other;
22682
 
22683
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
22684
      if (lastComparison != 0) {
22685
        return lastComparison;
22686
      }
22687
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
22688
      if (lastComparison != 0) {
22689
        return lastComparison;
22690
      }
22691
      return 0;
22692
    }
22693
 
22694
    public void read(TProtocol iprot) throws TException {
22695
      TField field;
22696
      iprot.readStructBegin();
22697
      while (true)
22698
      {
22699
        field = iprot.readFieldBegin();
22700
        if (field.type == TType.STOP) { 
22701
          break;
22702
        }
22703
        _Fields fieldId = _Fields.findByThriftId(field.id);
22704
        if (fieldId == null) {
22705
          TProtocolUtil.skip(iprot, field.type);
22706
        } else {
22707
          switch (fieldId) {
22708
            case EX:
22709
              if (field.type == TType.STRUCT) {
22710
                this.ex = new TransactionServiceException();
22711
                this.ex.read(iprot);
22712
              } else { 
22713
                TProtocolUtil.skip(iprot, field.type);
22714
              }
22715
              break;
22716
          }
22717
          iprot.readFieldEnd();
22718
        }
22719
      }
22720
      iprot.readStructEnd();
22721
      validate();
22722
    }
22723
 
22724
    public void write(TProtocol oprot) throws TException {
22725
      oprot.writeStructBegin(STRUCT_DESC);
22726
 
22727
      if (this.isSetEx()) {
22728
        oprot.writeFieldBegin(EX_FIELD_DESC);
22729
        this.ex.write(oprot);
22730
        oprot.writeFieldEnd();
22731
      }
22732
      oprot.writeFieldStop();
22733
      oprot.writeStructEnd();
22734
    }
22735
 
22736
    @Override
22737
    public String toString() {
22738
      StringBuilder sb = new StringBuilder("markOrdersAsDelivered_result(");
22739
      boolean first = true;
22740
 
22741
      sb.append("ex:");
22742
      if (this.ex == null) {
22743
        sb.append("null");
22744
      } else {
22745
        sb.append(this.ex);
22746
      }
22747
      first = false;
22748
      sb.append(")");
22749
      return sb.toString();
22750
    }
22751
 
22752
    public void validate() throws TException {
22753
      // check for required fields
22754
    }
22755
 
22756
  }
22757
 
22758
  public static class markOrdersAsFailed_args implements TBase<markOrdersAsFailed_args._Fields>, java.io.Serializable, Cloneable   {
22759
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_args");
22760
 
22761
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
22762
    private static final TField RETURNED_ORDERS_FIELD_DESC = new TField("returnedOrders", TType.MAP, (short)2);
22763
 
22764
    private long providerId;
22765
    private Map<String,String> returnedOrders;
22766
 
22767
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
22768
    public enum _Fields implements TFieldIdEnum {
22769
      PROVIDER_ID((short)1, "providerId"),
22770
      RETURNED_ORDERS((short)2, "returnedOrders");
22771
 
22772
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
22773
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
22774
 
22775
      static {
22776
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
22777
          byId.put((int)field._thriftId, field);
22778
          byName.put(field.getFieldName(), field);
22779
        }
22780
      }
22781
 
22782
      /**
22783
       * Find the _Fields constant that matches fieldId, or null if its not found.
22784
       */
22785
      public static _Fields findByThriftId(int fieldId) {
22786
        return byId.get(fieldId);
22787
      }
22788
 
22789
      /**
22790
       * Find the _Fields constant that matches fieldId, throwing an exception
22791
       * if it is not found.
22792
       */
22793
      public static _Fields findByThriftIdOrThrow(int fieldId) {
22794
        _Fields fields = findByThriftId(fieldId);
22795
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
22796
        return fields;
22797
      }
22798
 
22799
      /**
22800
       * Find the _Fields constant that matches name, or null if its not found.
22801
       */
22802
      public static _Fields findByName(String name) {
22803
        return byName.get(name);
22804
      }
22805
 
22806
      private final short _thriftId;
22807
      private final String _fieldName;
22808
 
22809
      _Fields(short thriftId, String fieldName) {
22810
        _thriftId = thriftId;
22811
        _fieldName = fieldName;
22812
      }
22813
 
22814
      public short getThriftFieldId() {
22815
        return _thriftId;
22816
      }
22817
 
22818
      public String getFieldName() {
22819
        return _fieldName;
22820
      }
22821
    }
22822
 
22823
    // isset id assignments
22824
    private static final int __PROVIDERID_ISSET_ID = 0;
22825
    private BitSet __isset_bit_vector = new BitSet(1);
22826
 
22827
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
22828
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
22829
          new FieldValueMetaData(TType.I64)));
22830
      put(_Fields.RETURNED_ORDERS, new FieldMetaData("returnedOrders", TFieldRequirementType.DEFAULT, 
22831
          new MapMetaData(TType.MAP, 
22832
              new FieldValueMetaData(TType.STRING), 
22833
              new FieldValueMetaData(TType.STRING))));
22834
    }});
22835
 
22836
    static {
22837
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_args.class, metaDataMap);
22838
    }
22839
 
22840
    public markOrdersAsFailed_args() {
22841
    }
22842
 
22843
    public markOrdersAsFailed_args(
22844
      long providerId,
22845
      Map<String,String> returnedOrders)
22846
    {
22847
      this();
22848
      this.providerId = providerId;
22849
      setProviderIdIsSet(true);
22850
      this.returnedOrders = returnedOrders;
22851
    }
22852
 
22853
    /**
22854
     * Performs a deep copy on <i>other</i>.
22855
     */
22856
    public markOrdersAsFailed_args(markOrdersAsFailed_args other) {
22857
      __isset_bit_vector.clear();
22858
      __isset_bit_vector.or(other.__isset_bit_vector);
22859
      this.providerId = other.providerId;
22860
      if (other.isSetReturnedOrders()) {
22861
        Map<String,String> __this__returnedOrders = new HashMap<String,String>();
22862
        for (Map.Entry<String, String> other_element : other.returnedOrders.entrySet()) {
22863
 
22864
          String other_element_key = other_element.getKey();
22865
          String other_element_value = other_element.getValue();
22866
 
22867
          String __this__returnedOrders_copy_key = other_element_key;
22868
 
22869
          String __this__returnedOrders_copy_value = other_element_value;
22870
 
22871
          __this__returnedOrders.put(__this__returnedOrders_copy_key, __this__returnedOrders_copy_value);
22872
        }
22873
        this.returnedOrders = __this__returnedOrders;
22874
      }
22875
    }
22876
 
22877
    public markOrdersAsFailed_args deepCopy() {
22878
      return new markOrdersAsFailed_args(this);
22879
    }
22880
 
22881
    @Deprecated
22882
    public markOrdersAsFailed_args clone() {
22883
      return new markOrdersAsFailed_args(this);
22884
    }
22885
 
22886
    public long getProviderId() {
22887
      return this.providerId;
22888
    }
22889
 
22890
    public markOrdersAsFailed_args setProviderId(long providerId) {
22891
      this.providerId = providerId;
22892
      setProviderIdIsSet(true);
22893
      return this;
22894
    }
22895
 
22896
    public void unsetProviderId() {
22897
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
22898
    }
22899
 
22900
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
22901
    public boolean isSetProviderId() {
22902
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
22903
    }
22904
 
22905
    public void setProviderIdIsSet(boolean value) {
22906
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
22907
    }
22908
 
22909
    public int getReturnedOrdersSize() {
22910
      return (this.returnedOrders == null) ? 0 : this.returnedOrders.size();
22911
    }
22912
 
22913
    public void putToReturnedOrders(String key, String val) {
22914
      if (this.returnedOrders == null) {
22915
        this.returnedOrders = new HashMap<String,String>();
22916
      }
22917
      this.returnedOrders.put(key, val);
22918
    }
22919
 
22920
    public Map<String,String> getReturnedOrders() {
22921
      return this.returnedOrders;
22922
    }
22923
 
22924
    public markOrdersAsFailed_args setReturnedOrders(Map<String,String> returnedOrders) {
22925
      this.returnedOrders = returnedOrders;
22926
      return this;
22927
    }
22928
 
22929
    public void unsetReturnedOrders() {
22930
      this.returnedOrders = null;
22931
    }
22932
 
22933
    /** Returns true if field returnedOrders is set (has been asigned a value) and false otherwise */
22934
    public boolean isSetReturnedOrders() {
22935
      return this.returnedOrders != null;
22936
    }
22937
 
22938
    public void setReturnedOrdersIsSet(boolean value) {
22939
      if (!value) {
22940
        this.returnedOrders = null;
22941
      }
22942
    }
22943
 
22944
    public void setFieldValue(_Fields field, Object value) {
22945
      switch (field) {
22946
      case PROVIDER_ID:
22947
        if (value == null) {
22948
          unsetProviderId();
22949
        } else {
22950
          setProviderId((Long)value);
22951
        }
22952
        break;
22953
 
22954
      case RETURNED_ORDERS:
22955
        if (value == null) {
22956
          unsetReturnedOrders();
22957
        } else {
22958
          setReturnedOrders((Map<String,String>)value);
22959
        }
22960
        break;
22961
 
22962
      }
22963
    }
22964
 
22965
    public void setFieldValue(int fieldID, Object value) {
22966
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
22967
    }
22968
 
22969
    public Object getFieldValue(_Fields field) {
22970
      switch (field) {
22971
      case PROVIDER_ID:
22972
        return new Long(getProviderId());
22973
 
22974
      case RETURNED_ORDERS:
22975
        return getReturnedOrders();
22976
 
22977
      }
22978
      throw new IllegalStateException();
22979
    }
22980
 
22981
    public Object getFieldValue(int fieldId) {
22982
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
22983
    }
22984
 
22985
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
22986
    public boolean isSet(_Fields field) {
22987
      switch (field) {
22988
      case PROVIDER_ID:
22989
        return isSetProviderId();
22990
      case RETURNED_ORDERS:
22991
        return isSetReturnedOrders();
22992
      }
22993
      throw new IllegalStateException();
22994
    }
22995
 
22996
    public boolean isSet(int fieldID) {
22997
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
22998
    }
22999
 
23000
    @Override
23001
    public boolean equals(Object that) {
23002
      if (that == null)
23003
        return false;
23004
      if (that instanceof markOrdersAsFailed_args)
23005
        return this.equals((markOrdersAsFailed_args)that);
23006
      return false;
23007
    }
23008
 
23009
    public boolean equals(markOrdersAsFailed_args that) {
23010
      if (that == null)
23011
        return false;
23012
 
23013
      boolean this_present_providerId = true;
23014
      boolean that_present_providerId = true;
23015
      if (this_present_providerId || that_present_providerId) {
23016
        if (!(this_present_providerId && that_present_providerId))
23017
          return false;
23018
        if (this.providerId != that.providerId)
23019
          return false;
23020
      }
23021
 
23022
      boolean this_present_returnedOrders = true && this.isSetReturnedOrders();
23023
      boolean that_present_returnedOrders = true && that.isSetReturnedOrders();
23024
      if (this_present_returnedOrders || that_present_returnedOrders) {
23025
        if (!(this_present_returnedOrders && that_present_returnedOrders))
23026
          return false;
23027
        if (!this.returnedOrders.equals(that.returnedOrders))
23028
          return false;
23029
      }
23030
 
23031
      return true;
23032
    }
23033
 
23034
    @Override
23035
    public int hashCode() {
23036
      return 0;
23037
    }
23038
 
23039
    public void read(TProtocol iprot) throws TException {
23040
      TField field;
23041
      iprot.readStructBegin();
23042
      while (true)
23043
      {
23044
        field = iprot.readFieldBegin();
23045
        if (field.type == TType.STOP) { 
23046
          break;
23047
        }
23048
        _Fields fieldId = _Fields.findByThriftId(field.id);
23049
        if (fieldId == null) {
23050
          TProtocolUtil.skip(iprot, field.type);
23051
        } else {
23052
          switch (fieldId) {
23053
            case PROVIDER_ID:
23054
              if (field.type == TType.I64) {
23055
                this.providerId = iprot.readI64();
23056
                setProviderIdIsSet(true);
23057
              } else { 
23058
                TProtocolUtil.skip(iprot, field.type);
23059
              }
23060
              break;
23061
            case RETURNED_ORDERS:
23062
              if (field.type == TType.MAP) {
23063
                {
1382 varun.gupt 23064
                  TMap _map62 = iprot.readMapBegin();
23065
                  this.returnedOrders = new HashMap<String,String>(2*_map62.size);
23066
                  for (int _i63 = 0; _i63 < _map62.size; ++_i63)
1133 chandransh 23067
                  {
1382 varun.gupt 23068
                    String _key64;
23069
                    String _val65;
23070
                    _key64 = iprot.readString();
23071
                    _val65 = iprot.readString();
23072
                    this.returnedOrders.put(_key64, _val65);
1133 chandransh 23073
                  }
23074
                  iprot.readMapEnd();
23075
                }
23076
              } else { 
23077
                TProtocolUtil.skip(iprot, field.type);
23078
              }
23079
              break;
23080
          }
23081
          iprot.readFieldEnd();
23082
        }
23083
      }
23084
      iprot.readStructEnd();
23085
      validate();
23086
    }
23087
 
23088
    public void write(TProtocol oprot) throws TException {
23089
      validate();
23090
 
23091
      oprot.writeStructBegin(STRUCT_DESC);
23092
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23093
      oprot.writeI64(this.providerId);
23094
      oprot.writeFieldEnd();
23095
      if (this.returnedOrders != null) {
23096
        oprot.writeFieldBegin(RETURNED_ORDERS_FIELD_DESC);
23097
        {
23098
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.returnedOrders.size()));
1382 varun.gupt 23099
          for (Map.Entry<String, String> _iter66 : this.returnedOrders.entrySet())
1133 chandransh 23100
          {
1382 varun.gupt 23101
            oprot.writeString(_iter66.getKey());
23102
            oprot.writeString(_iter66.getValue());
1133 chandransh 23103
          }
23104
          oprot.writeMapEnd();
23105
        }
23106
        oprot.writeFieldEnd();
23107
      }
23108
      oprot.writeFieldStop();
23109
      oprot.writeStructEnd();
23110
    }
23111
 
23112
    @Override
23113
    public String toString() {
23114
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_args(");
23115
      boolean first = true;
23116
 
23117
      sb.append("providerId:");
23118
      sb.append(this.providerId);
23119
      first = false;
23120
      if (!first) sb.append(", ");
23121
      sb.append("returnedOrders:");
23122
      if (this.returnedOrders == null) {
23123
        sb.append("null");
23124
      } else {
23125
        sb.append(this.returnedOrders);
23126
      }
23127
      first = false;
23128
      sb.append(")");
23129
      return sb.toString();
23130
    }
23131
 
23132
    public void validate() throws TException {
23133
      // check for required fields
23134
    }
23135
 
23136
  }
23137
 
23138
  public static class markOrdersAsFailed_result implements TBase<markOrdersAsFailed_result._Fields>, java.io.Serializable, Cloneable, Comparable<markOrdersAsFailed_result>   {
23139
    private static final TStruct STRUCT_DESC = new TStruct("markOrdersAsFailed_result");
23140
 
23141
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23142
 
23143
    private TransactionServiceException ex;
23144
 
23145
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23146
    public enum _Fields implements TFieldIdEnum {
23147
      EX((short)1, "ex");
23148
 
23149
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23150
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23151
 
23152
      static {
23153
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23154
          byId.put((int)field._thriftId, field);
23155
          byName.put(field.getFieldName(), field);
23156
        }
23157
      }
23158
 
23159
      /**
23160
       * Find the _Fields constant that matches fieldId, or null if its not found.
23161
       */
23162
      public static _Fields findByThriftId(int fieldId) {
23163
        return byId.get(fieldId);
23164
      }
23165
 
23166
      /**
23167
       * Find the _Fields constant that matches fieldId, throwing an exception
23168
       * if it is not found.
23169
       */
23170
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23171
        _Fields fields = findByThriftId(fieldId);
23172
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23173
        return fields;
23174
      }
23175
 
23176
      /**
23177
       * Find the _Fields constant that matches name, or null if its not found.
23178
       */
23179
      public static _Fields findByName(String name) {
23180
        return byName.get(name);
23181
      }
23182
 
23183
      private final short _thriftId;
23184
      private final String _fieldName;
23185
 
23186
      _Fields(short thriftId, String fieldName) {
23187
        _thriftId = thriftId;
23188
        _fieldName = fieldName;
23189
      }
23190
 
23191
      public short getThriftFieldId() {
23192
        return _thriftId;
23193
      }
23194
 
23195
      public String getFieldName() {
23196
        return _fieldName;
23197
      }
23198
    }
23199
 
23200
    // isset id assignments
23201
 
23202
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23203
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23204
          new FieldValueMetaData(TType.STRUCT)));
23205
    }});
23206
 
23207
    static {
23208
      FieldMetaData.addStructMetaDataMap(markOrdersAsFailed_result.class, metaDataMap);
23209
    }
23210
 
23211
    public markOrdersAsFailed_result() {
23212
    }
23213
 
23214
    public markOrdersAsFailed_result(
23215
      TransactionServiceException ex)
23216
    {
23217
      this();
23218
      this.ex = ex;
23219
    }
23220
 
23221
    /**
23222
     * Performs a deep copy on <i>other</i>.
23223
     */
23224
    public markOrdersAsFailed_result(markOrdersAsFailed_result other) {
23225
      if (other.isSetEx()) {
23226
        this.ex = new TransactionServiceException(other.ex);
23227
      }
23228
    }
23229
 
23230
    public markOrdersAsFailed_result deepCopy() {
23231
      return new markOrdersAsFailed_result(this);
23232
    }
23233
 
23234
    @Deprecated
23235
    public markOrdersAsFailed_result clone() {
23236
      return new markOrdersAsFailed_result(this);
23237
    }
23238
 
23239
    public TransactionServiceException getEx() {
23240
      return this.ex;
23241
    }
23242
 
23243
    public markOrdersAsFailed_result setEx(TransactionServiceException ex) {
23244
      this.ex = ex;
23245
      return this;
23246
    }
23247
 
23248
    public void unsetEx() {
23249
      this.ex = null;
23250
    }
23251
 
23252
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23253
    public boolean isSetEx() {
23254
      return this.ex != null;
23255
    }
23256
 
23257
    public void setExIsSet(boolean value) {
23258
      if (!value) {
23259
        this.ex = null;
23260
      }
23261
    }
23262
 
23263
    public void setFieldValue(_Fields field, Object value) {
23264
      switch (field) {
23265
      case EX:
23266
        if (value == null) {
23267
          unsetEx();
23268
        } else {
23269
          setEx((TransactionServiceException)value);
23270
        }
23271
        break;
23272
 
23273
      }
23274
    }
23275
 
23276
    public void setFieldValue(int fieldID, Object value) {
23277
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23278
    }
23279
 
23280
    public Object getFieldValue(_Fields field) {
23281
      switch (field) {
23282
      case EX:
23283
        return getEx();
23284
 
23285
      }
23286
      throw new IllegalStateException();
23287
    }
23288
 
23289
    public Object getFieldValue(int fieldId) {
23290
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23291
    }
23292
 
23293
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23294
    public boolean isSet(_Fields field) {
23295
      switch (field) {
23296
      case EX:
23297
        return isSetEx();
23298
      }
23299
      throw new IllegalStateException();
23300
    }
23301
 
23302
    public boolean isSet(int fieldID) {
23303
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23304
    }
23305
 
23306
    @Override
23307
    public boolean equals(Object that) {
23308
      if (that == null)
23309
        return false;
23310
      if (that instanceof markOrdersAsFailed_result)
23311
        return this.equals((markOrdersAsFailed_result)that);
23312
      return false;
23313
    }
23314
 
23315
    public boolean equals(markOrdersAsFailed_result that) {
23316
      if (that == null)
23317
        return false;
23318
 
23319
      boolean this_present_ex = true && this.isSetEx();
23320
      boolean that_present_ex = true && that.isSetEx();
23321
      if (this_present_ex || that_present_ex) {
23322
        if (!(this_present_ex && that_present_ex))
23323
          return false;
23324
        if (!this.ex.equals(that.ex))
23325
          return false;
23326
      }
23327
 
23328
      return true;
23329
    }
23330
 
23331
    @Override
23332
    public int hashCode() {
23333
      return 0;
23334
    }
23335
 
23336
    public int compareTo(markOrdersAsFailed_result other) {
23337
      if (!getClass().equals(other.getClass())) {
23338
        return getClass().getName().compareTo(other.getClass().getName());
23339
      }
23340
 
23341
      int lastComparison = 0;
23342
      markOrdersAsFailed_result typedOther = (markOrdersAsFailed_result)other;
23343
 
23344
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
23345
      if (lastComparison != 0) {
23346
        return lastComparison;
23347
      }
23348
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
23349
      if (lastComparison != 0) {
23350
        return lastComparison;
23351
      }
23352
      return 0;
23353
    }
23354
 
23355
    public void read(TProtocol iprot) throws TException {
23356
      TField field;
23357
      iprot.readStructBegin();
23358
      while (true)
23359
      {
23360
        field = iprot.readFieldBegin();
23361
        if (field.type == TType.STOP) { 
23362
          break;
23363
        }
23364
        _Fields fieldId = _Fields.findByThriftId(field.id);
23365
        if (fieldId == null) {
23366
          TProtocolUtil.skip(iprot, field.type);
23367
        } else {
23368
          switch (fieldId) {
23369
            case EX:
23370
              if (field.type == TType.STRUCT) {
23371
                this.ex = new TransactionServiceException();
23372
                this.ex.read(iprot);
23373
              } else { 
23374
                TProtocolUtil.skip(iprot, field.type);
23375
              }
23376
              break;
23377
          }
23378
          iprot.readFieldEnd();
23379
        }
23380
      }
23381
      iprot.readStructEnd();
23382
      validate();
23383
    }
23384
 
23385
    public void write(TProtocol oprot) throws TException {
23386
      oprot.writeStructBegin(STRUCT_DESC);
23387
 
23388
      if (this.isSetEx()) {
23389
        oprot.writeFieldBegin(EX_FIELD_DESC);
23390
        this.ex.write(oprot);
23391
        oprot.writeFieldEnd();
23392
      }
23393
      oprot.writeFieldStop();
23394
      oprot.writeStructEnd();
23395
    }
23396
 
23397
    @Override
23398
    public String toString() {
23399
      StringBuilder sb = new StringBuilder("markOrdersAsFailed_result(");
23400
      boolean first = true;
23401
 
23402
      sb.append("ex:");
23403
      if (this.ex == null) {
23404
        sb.append("null");
23405
      } else {
23406
        sb.append(this.ex);
23407
      }
23408
      first = false;
23409
      sb.append(")");
23410
      return sb.toString();
23411
    }
23412
 
23413
    public void validate() throws TException {
23414
      // check for required fields
23415
    }
23416
 
23417
  }
23418
 
1245 chandransh 23419
  public static class updateNonDeliveryReason_args implements TBase<updateNonDeliveryReason_args._Fields>, java.io.Serializable, Cloneable   {
23420
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_args");
23421
 
23422
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
23423
    private static final TField UNDELIVERED_ORDERS_FIELD_DESC = new TField("undeliveredOrders", TType.MAP, (short)2);
23424
 
23425
    private long providerId;
23426
    private Map<String,String> undeliveredOrders;
23427
 
23428
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23429
    public enum _Fields implements TFieldIdEnum {
23430
      PROVIDER_ID((short)1, "providerId"),
23431
      UNDELIVERED_ORDERS((short)2, "undeliveredOrders");
23432
 
23433
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23434
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23435
 
23436
      static {
23437
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23438
          byId.put((int)field._thriftId, field);
23439
          byName.put(field.getFieldName(), field);
23440
        }
23441
      }
23442
 
23443
      /**
23444
       * Find the _Fields constant that matches fieldId, or null if its not found.
23445
       */
23446
      public static _Fields findByThriftId(int fieldId) {
23447
        return byId.get(fieldId);
23448
      }
23449
 
23450
      /**
23451
       * Find the _Fields constant that matches fieldId, throwing an exception
23452
       * if it is not found.
23453
       */
23454
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23455
        _Fields fields = findByThriftId(fieldId);
23456
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23457
        return fields;
23458
      }
23459
 
23460
      /**
23461
       * Find the _Fields constant that matches name, or null if its not found.
23462
       */
23463
      public static _Fields findByName(String name) {
23464
        return byName.get(name);
23465
      }
23466
 
23467
      private final short _thriftId;
23468
      private final String _fieldName;
23469
 
23470
      _Fields(short thriftId, String fieldName) {
23471
        _thriftId = thriftId;
23472
        _fieldName = fieldName;
23473
      }
23474
 
23475
      public short getThriftFieldId() {
23476
        return _thriftId;
23477
      }
23478
 
23479
      public String getFieldName() {
23480
        return _fieldName;
23481
      }
23482
    }
23483
 
23484
    // isset id assignments
23485
    private static final int __PROVIDERID_ISSET_ID = 0;
23486
    private BitSet __isset_bit_vector = new BitSet(1);
23487
 
23488
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23489
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
23490
          new FieldValueMetaData(TType.I64)));
23491
      put(_Fields.UNDELIVERED_ORDERS, new FieldMetaData("undeliveredOrders", TFieldRequirementType.DEFAULT, 
23492
          new MapMetaData(TType.MAP, 
23493
              new FieldValueMetaData(TType.STRING), 
23494
              new FieldValueMetaData(TType.STRING))));
23495
    }});
23496
 
23497
    static {
23498
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_args.class, metaDataMap);
23499
    }
23500
 
23501
    public updateNonDeliveryReason_args() {
23502
    }
23503
 
23504
    public updateNonDeliveryReason_args(
23505
      long providerId,
23506
      Map<String,String> undeliveredOrders)
23507
    {
23508
      this();
23509
      this.providerId = providerId;
23510
      setProviderIdIsSet(true);
23511
      this.undeliveredOrders = undeliveredOrders;
23512
    }
23513
 
23514
    /**
23515
     * Performs a deep copy on <i>other</i>.
23516
     */
23517
    public updateNonDeliveryReason_args(updateNonDeliveryReason_args other) {
23518
      __isset_bit_vector.clear();
23519
      __isset_bit_vector.or(other.__isset_bit_vector);
23520
      this.providerId = other.providerId;
23521
      if (other.isSetUndeliveredOrders()) {
23522
        Map<String,String> __this__undeliveredOrders = new HashMap<String,String>();
23523
        for (Map.Entry<String, String> other_element : other.undeliveredOrders.entrySet()) {
23524
 
23525
          String other_element_key = other_element.getKey();
23526
          String other_element_value = other_element.getValue();
23527
 
23528
          String __this__undeliveredOrders_copy_key = other_element_key;
23529
 
23530
          String __this__undeliveredOrders_copy_value = other_element_value;
23531
 
23532
          __this__undeliveredOrders.put(__this__undeliveredOrders_copy_key, __this__undeliveredOrders_copy_value);
23533
        }
23534
        this.undeliveredOrders = __this__undeliveredOrders;
23535
      }
23536
    }
23537
 
23538
    public updateNonDeliveryReason_args deepCopy() {
23539
      return new updateNonDeliveryReason_args(this);
23540
    }
23541
 
23542
    @Deprecated
23543
    public updateNonDeliveryReason_args clone() {
23544
      return new updateNonDeliveryReason_args(this);
23545
    }
23546
 
23547
    public long getProviderId() {
23548
      return this.providerId;
23549
    }
23550
 
23551
    public updateNonDeliveryReason_args setProviderId(long providerId) {
23552
      this.providerId = providerId;
23553
      setProviderIdIsSet(true);
23554
      return this;
23555
    }
23556
 
23557
    public void unsetProviderId() {
23558
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
23559
    }
23560
 
23561
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
23562
    public boolean isSetProviderId() {
23563
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
23564
    }
23565
 
23566
    public void setProviderIdIsSet(boolean value) {
23567
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
23568
    }
23569
 
23570
    public int getUndeliveredOrdersSize() {
23571
      return (this.undeliveredOrders == null) ? 0 : this.undeliveredOrders.size();
23572
    }
23573
 
23574
    public void putToUndeliveredOrders(String key, String val) {
23575
      if (this.undeliveredOrders == null) {
23576
        this.undeliveredOrders = new HashMap<String,String>();
23577
      }
23578
      this.undeliveredOrders.put(key, val);
23579
    }
23580
 
23581
    public Map<String,String> getUndeliveredOrders() {
23582
      return this.undeliveredOrders;
23583
    }
23584
 
23585
    public updateNonDeliveryReason_args setUndeliveredOrders(Map<String,String> undeliveredOrders) {
23586
      this.undeliveredOrders = undeliveredOrders;
23587
      return this;
23588
    }
23589
 
23590
    public void unsetUndeliveredOrders() {
23591
      this.undeliveredOrders = null;
23592
    }
23593
 
23594
    /** Returns true if field undeliveredOrders is set (has been asigned a value) and false otherwise */
23595
    public boolean isSetUndeliveredOrders() {
23596
      return this.undeliveredOrders != null;
23597
    }
23598
 
23599
    public void setUndeliveredOrdersIsSet(boolean value) {
23600
      if (!value) {
23601
        this.undeliveredOrders = null;
23602
      }
23603
    }
23604
 
23605
    public void setFieldValue(_Fields field, Object value) {
23606
      switch (field) {
23607
      case PROVIDER_ID:
23608
        if (value == null) {
23609
          unsetProviderId();
23610
        } else {
23611
          setProviderId((Long)value);
23612
        }
23613
        break;
23614
 
23615
      case UNDELIVERED_ORDERS:
23616
        if (value == null) {
23617
          unsetUndeliveredOrders();
23618
        } else {
23619
          setUndeliveredOrders((Map<String,String>)value);
23620
        }
23621
        break;
23622
 
23623
      }
23624
    }
23625
 
23626
    public void setFieldValue(int fieldID, Object value) {
23627
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23628
    }
23629
 
23630
    public Object getFieldValue(_Fields field) {
23631
      switch (field) {
23632
      case PROVIDER_ID:
23633
        return new Long(getProviderId());
23634
 
23635
      case UNDELIVERED_ORDERS:
23636
        return getUndeliveredOrders();
23637
 
23638
      }
23639
      throw new IllegalStateException();
23640
    }
23641
 
23642
    public Object getFieldValue(int fieldId) {
23643
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23644
    }
23645
 
23646
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23647
    public boolean isSet(_Fields field) {
23648
      switch (field) {
23649
      case PROVIDER_ID:
23650
        return isSetProviderId();
23651
      case UNDELIVERED_ORDERS:
23652
        return isSetUndeliveredOrders();
23653
      }
23654
      throw new IllegalStateException();
23655
    }
23656
 
23657
    public boolean isSet(int fieldID) {
23658
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23659
    }
23660
 
23661
    @Override
23662
    public boolean equals(Object that) {
23663
      if (that == null)
23664
        return false;
23665
      if (that instanceof updateNonDeliveryReason_args)
23666
        return this.equals((updateNonDeliveryReason_args)that);
23667
      return false;
23668
    }
23669
 
23670
    public boolean equals(updateNonDeliveryReason_args that) {
23671
      if (that == null)
23672
        return false;
23673
 
23674
      boolean this_present_providerId = true;
23675
      boolean that_present_providerId = true;
23676
      if (this_present_providerId || that_present_providerId) {
23677
        if (!(this_present_providerId && that_present_providerId))
23678
          return false;
23679
        if (this.providerId != that.providerId)
23680
          return false;
23681
      }
23682
 
23683
      boolean this_present_undeliveredOrders = true && this.isSetUndeliveredOrders();
23684
      boolean that_present_undeliveredOrders = true && that.isSetUndeliveredOrders();
23685
      if (this_present_undeliveredOrders || that_present_undeliveredOrders) {
23686
        if (!(this_present_undeliveredOrders && that_present_undeliveredOrders))
23687
          return false;
23688
        if (!this.undeliveredOrders.equals(that.undeliveredOrders))
23689
          return false;
23690
      }
23691
 
23692
      return true;
23693
    }
23694
 
23695
    @Override
23696
    public int hashCode() {
23697
      return 0;
23698
    }
23699
 
23700
    public void read(TProtocol iprot) throws TException {
23701
      TField field;
23702
      iprot.readStructBegin();
23703
      while (true)
23704
      {
23705
        field = iprot.readFieldBegin();
23706
        if (field.type == TType.STOP) { 
23707
          break;
23708
        }
23709
        _Fields fieldId = _Fields.findByThriftId(field.id);
23710
        if (fieldId == null) {
23711
          TProtocolUtil.skip(iprot, field.type);
23712
        } else {
23713
          switch (fieldId) {
23714
            case PROVIDER_ID:
23715
              if (field.type == TType.I64) {
23716
                this.providerId = iprot.readI64();
23717
                setProviderIdIsSet(true);
23718
              } else { 
23719
                TProtocolUtil.skip(iprot, field.type);
23720
              }
23721
              break;
23722
            case UNDELIVERED_ORDERS:
23723
              if (field.type == TType.MAP) {
23724
                {
1382 varun.gupt 23725
                  TMap _map67 = iprot.readMapBegin();
23726
                  this.undeliveredOrders = new HashMap<String,String>(2*_map67.size);
23727
                  for (int _i68 = 0; _i68 < _map67.size; ++_i68)
1245 chandransh 23728
                  {
1382 varun.gupt 23729
                    String _key69;
23730
                    String _val70;
23731
                    _key69 = iprot.readString();
23732
                    _val70 = iprot.readString();
23733
                    this.undeliveredOrders.put(_key69, _val70);
1245 chandransh 23734
                  }
23735
                  iprot.readMapEnd();
23736
                }
23737
              } else { 
23738
                TProtocolUtil.skip(iprot, field.type);
23739
              }
23740
              break;
23741
          }
23742
          iprot.readFieldEnd();
23743
        }
23744
      }
23745
      iprot.readStructEnd();
23746
      validate();
23747
    }
23748
 
23749
    public void write(TProtocol oprot) throws TException {
23750
      validate();
23751
 
23752
      oprot.writeStructBegin(STRUCT_DESC);
23753
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
23754
      oprot.writeI64(this.providerId);
23755
      oprot.writeFieldEnd();
23756
      if (this.undeliveredOrders != null) {
23757
        oprot.writeFieldBegin(UNDELIVERED_ORDERS_FIELD_DESC);
23758
        {
23759
          oprot.writeMapBegin(new TMap(TType.STRING, TType.STRING, this.undeliveredOrders.size()));
1382 varun.gupt 23760
          for (Map.Entry<String, String> _iter71 : this.undeliveredOrders.entrySet())
1245 chandransh 23761
          {
1382 varun.gupt 23762
            oprot.writeString(_iter71.getKey());
23763
            oprot.writeString(_iter71.getValue());
1245 chandransh 23764
          }
23765
          oprot.writeMapEnd();
23766
        }
23767
        oprot.writeFieldEnd();
23768
      }
23769
      oprot.writeFieldStop();
23770
      oprot.writeStructEnd();
23771
    }
23772
 
23773
    @Override
23774
    public String toString() {
23775
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_args(");
23776
      boolean first = true;
23777
 
23778
      sb.append("providerId:");
23779
      sb.append(this.providerId);
23780
      first = false;
23781
      if (!first) sb.append(", ");
23782
      sb.append("undeliveredOrders:");
23783
      if (this.undeliveredOrders == null) {
23784
        sb.append("null");
23785
      } else {
23786
        sb.append(this.undeliveredOrders);
23787
      }
23788
      first = false;
23789
      sb.append(")");
23790
      return sb.toString();
23791
    }
23792
 
23793
    public void validate() throws TException {
23794
      // check for required fields
23795
    }
23796
 
23797
  }
23798
 
23799
  public static class updateNonDeliveryReason_result implements TBase<updateNonDeliveryReason_result._Fields>, java.io.Serializable, Cloneable, Comparable<updateNonDeliveryReason_result>   {
23800
    private static final TStruct STRUCT_DESC = new TStruct("updateNonDeliveryReason_result");
23801
 
23802
    private static final TField EX_FIELD_DESC = new TField("ex", TType.STRUCT, (short)1);
23803
 
23804
    private TransactionServiceException ex;
23805
 
23806
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
23807
    public enum _Fields implements TFieldIdEnum {
23808
      EX((short)1, "ex");
23809
 
23810
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
23811
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
23812
 
23813
      static {
23814
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
23815
          byId.put((int)field._thriftId, field);
23816
          byName.put(field.getFieldName(), field);
23817
        }
23818
      }
23819
 
23820
      /**
23821
       * Find the _Fields constant that matches fieldId, or null if its not found.
23822
       */
23823
      public static _Fields findByThriftId(int fieldId) {
23824
        return byId.get(fieldId);
23825
      }
23826
 
23827
      /**
23828
       * Find the _Fields constant that matches fieldId, throwing an exception
23829
       * if it is not found.
23830
       */
23831
      public static _Fields findByThriftIdOrThrow(int fieldId) {
23832
        _Fields fields = findByThriftId(fieldId);
23833
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
23834
        return fields;
23835
      }
23836
 
23837
      /**
23838
       * Find the _Fields constant that matches name, or null if its not found.
23839
       */
23840
      public static _Fields findByName(String name) {
23841
        return byName.get(name);
23842
      }
23843
 
23844
      private final short _thriftId;
23845
      private final String _fieldName;
23846
 
23847
      _Fields(short thriftId, String fieldName) {
23848
        _thriftId = thriftId;
23849
        _fieldName = fieldName;
23850
      }
23851
 
23852
      public short getThriftFieldId() {
23853
        return _thriftId;
23854
      }
23855
 
23856
      public String getFieldName() {
23857
        return _fieldName;
23858
      }
23859
    }
23860
 
23861
    // isset id assignments
23862
 
23863
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
23864
      put(_Fields.EX, new FieldMetaData("ex", TFieldRequirementType.DEFAULT, 
23865
          new FieldValueMetaData(TType.STRUCT)));
23866
    }});
23867
 
23868
    static {
23869
      FieldMetaData.addStructMetaDataMap(updateNonDeliveryReason_result.class, metaDataMap);
23870
    }
23871
 
23872
    public updateNonDeliveryReason_result() {
23873
    }
23874
 
23875
    public updateNonDeliveryReason_result(
23876
      TransactionServiceException ex)
23877
    {
23878
      this();
23879
      this.ex = ex;
23880
    }
23881
 
23882
    /**
23883
     * Performs a deep copy on <i>other</i>.
23884
     */
23885
    public updateNonDeliveryReason_result(updateNonDeliveryReason_result other) {
23886
      if (other.isSetEx()) {
23887
        this.ex = new TransactionServiceException(other.ex);
23888
      }
23889
    }
23890
 
23891
    public updateNonDeliveryReason_result deepCopy() {
23892
      return new updateNonDeliveryReason_result(this);
23893
    }
23894
 
23895
    @Deprecated
23896
    public updateNonDeliveryReason_result clone() {
23897
      return new updateNonDeliveryReason_result(this);
23898
    }
23899
 
23900
    public TransactionServiceException getEx() {
23901
      return this.ex;
23902
    }
23903
 
23904
    public updateNonDeliveryReason_result setEx(TransactionServiceException ex) {
23905
      this.ex = ex;
23906
      return this;
23907
    }
23908
 
23909
    public void unsetEx() {
23910
      this.ex = null;
23911
    }
23912
 
23913
    /** Returns true if field ex is set (has been asigned a value) and false otherwise */
23914
    public boolean isSetEx() {
23915
      return this.ex != null;
23916
    }
23917
 
23918
    public void setExIsSet(boolean value) {
23919
      if (!value) {
23920
        this.ex = null;
23921
      }
23922
    }
23923
 
23924
    public void setFieldValue(_Fields field, Object value) {
23925
      switch (field) {
23926
      case EX:
23927
        if (value == null) {
23928
          unsetEx();
23929
        } else {
23930
          setEx((TransactionServiceException)value);
23931
        }
23932
        break;
23933
 
23934
      }
23935
    }
23936
 
23937
    public void setFieldValue(int fieldID, Object value) {
23938
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
23939
    }
23940
 
23941
    public Object getFieldValue(_Fields field) {
23942
      switch (field) {
23943
      case EX:
23944
        return getEx();
23945
 
23946
      }
23947
      throw new IllegalStateException();
23948
    }
23949
 
23950
    public Object getFieldValue(int fieldId) {
23951
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
23952
    }
23953
 
23954
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
23955
    public boolean isSet(_Fields field) {
23956
      switch (field) {
23957
      case EX:
23958
        return isSetEx();
23959
      }
23960
      throw new IllegalStateException();
23961
    }
23962
 
23963
    public boolean isSet(int fieldID) {
23964
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
23965
    }
23966
 
23967
    @Override
23968
    public boolean equals(Object that) {
23969
      if (that == null)
23970
        return false;
23971
      if (that instanceof updateNonDeliveryReason_result)
23972
        return this.equals((updateNonDeliveryReason_result)that);
23973
      return false;
23974
    }
23975
 
23976
    public boolean equals(updateNonDeliveryReason_result that) {
23977
      if (that == null)
23978
        return false;
23979
 
23980
      boolean this_present_ex = true && this.isSetEx();
23981
      boolean that_present_ex = true && that.isSetEx();
23982
      if (this_present_ex || that_present_ex) {
23983
        if (!(this_present_ex && that_present_ex))
23984
          return false;
23985
        if (!this.ex.equals(that.ex))
23986
          return false;
23987
      }
23988
 
23989
      return true;
23990
    }
23991
 
23992
    @Override
23993
    public int hashCode() {
23994
      return 0;
23995
    }
23996
 
23997
    public int compareTo(updateNonDeliveryReason_result other) {
23998
      if (!getClass().equals(other.getClass())) {
23999
        return getClass().getName().compareTo(other.getClass().getName());
24000
      }
24001
 
24002
      int lastComparison = 0;
24003
      updateNonDeliveryReason_result typedOther = (updateNonDeliveryReason_result)other;
24004
 
24005
      lastComparison = Boolean.valueOf(isSetEx()).compareTo(isSetEx());
24006
      if (lastComparison != 0) {
24007
        return lastComparison;
24008
      }
24009
      lastComparison = TBaseHelper.compareTo(ex, typedOther.ex);
24010
      if (lastComparison != 0) {
24011
        return lastComparison;
24012
      }
24013
      return 0;
24014
    }
24015
 
24016
    public void read(TProtocol iprot) throws TException {
24017
      TField field;
24018
      iprot.readStructBegin();
24019
      while (true)
24020
      {
24021
        field = iprot.readFieldBegin();
24022
        if (field.type == TType.STOP) { 
24023
          break;
24024
        }
24025
        _Fields fieldId = _Fields.findByThriftId(field.id);
24026
        if (fieldId == null) {
24027
          TProtocolUtil.skip(iprot, field.type);
24028
        } else {
24029
          switch (fieldId) {
24030
            case EX:
24031
              if (field.type == TType.STRUCT) {
24032
                this.ex = new TransactionServiceException();
24033
                this.ex.read(iprot);
24034
              } else { 
24035
                TProtocolUtil.skip(iprot, field.type);
24036
              }
24037
              break;
24038
          }
24039
          iprot.readFieldEnd();
24040
        }
24041
      }
24042
      iprot.readStructEnd();
24043
      validate();
24044
    }
24045
 
24046
    public void write(TProtocol oprot) throws TException {
24047
      oprot.writeStructBegin(STRUCT_DESC);
24048
 
24049
      if (this.isSetEx()) {
24050
        oprot.writeFieldBegin(EX_FIELD_DESC);
24051
        this.ex.write(oprot);
24052
        oprot.writeFieldEnd();
24053
      }
24054
      oprot.writeFieldStop();
24055
      oprot.writeStructEnd();
24056
    }
24057
 
24058
    @Override
24059
    public String toString() {
24060
      StringBuilder sb = new StringBuilder("updateNonDeliveryReason_result(");
24061
      boolean first = true;
24062
 
24063
      sb.append("ex:");
24064
      if (this.ex == null) {
24065
        sb.append("null");
24066
      } else {
24067
        sb.append(this.ex);
24068
      }
24069
      first = false;
24070
      sb.append(")");
24071
      return sb.toString();
24072
    }
24073
 
24074
    public void validate() throws TException {
24075
      // check for required fields
24076
    }
24077
 
24078
  }
24079
 
1406 ankur.sing 24080
  public static class getUndeliveredOrders_args implements TBase<getUndeliveredOrders_args._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_args>   {
24081
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_args");
24082
 
24083
    private static final TField PROVIDER_ID_FIELD_DESC = new TField("providerId", TType.I64, (short)1);
24084
    private static final TField WAREHOUSE_ID_FIELD_DESC = new TField("warehouseId", TType.I64, (short)2);
24085
 
24086
    private long providerId;
24087
    private long warehouseId;
24088
 
24089
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24090
    public enum _Fields implements TFieldIdEnum {
24091
      PROVIDER_ID((short)1, "providerId"),
24092
      WAREHOUSE_ID((short)2, "warehouseId");
24093
 
24094
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24095
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24096
 
24097
      static {
24098
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24099
          byId.put((int)field._thriftId, field);
24100
          byName.put(field.getFieldName(), field);
24101
        }
24102
      }
24103
 
24104
      /**
24105
       * Find the _Fields constant that matches fieldId, or null if its not found.
24106
       */
24107
      public static _Fields findByThriftId(int fieldId) {
24108
        return byId.get(fieldId);
24109
      }
24110
 
24111
      /**
24112
       * Find the _Fields constant that matches fieldId, throwing an exception
24113
       * if it is not found.
24114
       */
24115
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24116
        _Fields fields = findByThriftId(fieldId);
24117
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24118
        return fields;
24119
      }
24120
 
24121
      /**
24122
       * Find the _Fields constant that matches name, or null if its not found.
24123
       */
24124
      public static _Fields findByName(String name) {
24125
        return byName.get(name);
24126
      }
24127
 
24128
      private final short _thriftId;
24129
      private final String _fieldName;
24130
 
24131
      _Fields(short thriftId, String fieldName) {
24132
        _thriftId = thriftId;
24133
        _fieldName = fieldName;
24134
      }
24135
 
24136
      public short getThriftFieldId() {
24137
        return _thriftId;
24138
      }
24139
 
24140
      public String getFieldName() {
24141
        return _fieldName;
24142
      }
24143
    }
24144
 
24145
    // isset id assignments
24146
    private static final int __PROVIDERID_ISSET_ID = 0;
24147
    private static final int __WAREHOUSEID_ISSET_ID = 1;
24148
    private BitSet __isset_bit_vector = new BitSet(2);
24149
 
24150
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24151
      put(_Fields.PROVIDER_ID, new FieldMetaData("providerId", TFieldRequirementType.DEFAULT, 
24152
          new FieldValueMetaData(TType.I64)));
24153
      put(_Fields.WAREHOUSE_ID, new FieldMetaData("warehouseId", TFieldRequirementType.DEFAULT, 
24154
          new FieldValueMetaData(TType.I64)));
24155
    }});
24156
 
24157
    static {
24158
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_args.class, metaDataMap);
24159
    }
24160
 
24161
    public getUndeliveredOrders_args() {
24162
    }
24163
 
24164
    public getUndeliveredOrders_args(
24165
      long providerId,
24166
      long warehouseId)
24167
    {
24168
      this();
24169
      this.providerId = providerId;
24170
      setProviderIdIsSet(true);
24171
      this.warehouseId = warehouseId;
24172
      setWarehouseIdIsSet(true);
24173
    }
24174
 
24175
    /**
24176
     * Performs a deep copy on <i>other</i>.
24177
     */
24178
    public getUndeliveredOrders_args(getUndeliveredOrders_args other) {
24179
      __isset_bit_vector.clear();
24180
      __isset_bit_vector.or(other.__isset_bit_vector);
24181
      this.providerId = other.providerId;
24182
      this.warehouseId = other.warehouseId;
24183
    }
24184
 
24185
    public getUndeliveredOrders_args deepCopy() {
24186
      return new getUndeliveredOrders_args(this);
24187
    }
24188
 
24189
    @Deprecated
24190
    public getUndeliveredOrders_args clone() {
24191
      return new getUndeliveredOrders_args(this);
24192
    }
24193
 
24194
    public long getProviderId() {
24195
      return this.providerId;
24196
    }
24197
 
24198
    public getUndeliveredOrders_args setProviderId(long providerId) {
24199
      this.providerId = providerId;
24200
      setProviderIdIsSet(true);
24201
      return this;
24202
    }
24203
 
24204
    public void unsetProviderId() {
24205
      __isset_bit_vector.clear(__PROVIDERID_ISSET_ID);
24206
    }
24207
 
24208
    /** Returns true if field providerId is set (has been asigned a value) and false otherwise */
24209
    public boolean isSetProviderId() {
24210
      return __isset_bit_vector.get(__PROVIDERID_ISSET_ID);
24211
    }
24212
 
24213
    public void setProviderIdIsSet(boolean value) {
24214
      __isset_bit_vector.set(__PROVIDERID_ISSET_ID, value);
24215
    }
24216
 
24217
    public long getWarehouseId() {
24218
      return this.warehouseId;
24219
    }
24220
 
24221
    public getUndeliveredOrders_args setWarehouseId(long warehouseId) {
24222
      this.warehouseId = warehouseId;
24223
      setWarehouseIdIsSet(true);
24224
      return this;
24225
    }
24226
 
24227
    public void unsetWarehouseId() {
24228
      __isset_bit_vector.clear(__WAREHOUSEID_ISSET_ID);
24229
    }
24230
 
24231
    /** Returns true if field warehouseId is set (has been asigned a value) and false otherwise */
24232
    public boolean isSetWarehouseId() {
24233
      return __isset_bit_vector.get(__WAREHOUSEID_ISSET_ID);
24234
    }
24235
 
24236
    public void setWarehouseIdIsSet(boolean value) {
24237
      __isset_bit_vector.set(__WAREHOUSEID_ISSET_ID, value);
24238
    }
24239
 
24240
    public void setFieldValue(_Fields field, Object value) {
24241
      switch (field) {
24242
      case PROVIDER_ID:
24243
        if (value == null) {
24244
          unsetProviderId();
24245
        } else {
24246
          setProviderId((Long)value);
24247
        }
24248
        break;
24249
 
24250
      case WAREHOUSE_ID:
24251
        if (value == null) {
24252
          unsetWarehouseId();
24253
        } else {
24254
          setWarehouseId((Long)value);
24255
        }
24256
        break;
24257
 
24258
      }
24259
    }
24260
 
24261
    public void setFieldValue(int fieldID, Object value) {
24262
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24263
    }
24264
 
24265
    public Object getFieldValue(_Fields field) {
24266
      switch (field) {
24267
      case PROVIDER_ID:
24268
        return new Long(getProviderId());
24269
 
24270
      case WAREHOUSE_ID:
24271
        return new Long(getWarehouseId());
24272
 
24273
      }
24274
      throw new IllegalStateException();
24275
    }
24276
 
24277
    public Object getFieldValue(int fieldId) {
24278
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24279
    }
24280
 
24281
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24282
    public boolean isSet(_Fields field) {
24283
      switch (field) {
24284
      case PROVIDER_ID:
24285
        return isSetProviderId();
24286
      case WAREHOUSE_ID:
24287
        return isSetWarehouseId();
24288
      }
24289
      throw new IllegalStateException();
24290
    }
24291
 
24292
    public boolean isSet(int fieldID) {
24293
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24294
    }
24295
 
24296
    @Override
24297
    public boolean equals(Object that) {
24298
      if (that == null)
24299
        return false;
24300
      if (that instanceof getUndeliveredOrders_args)
24301
        return this.equals((getUndeliveredOrders_args)that);
24302
      return false;
24303
    }
24304
 
24305
    public boolean equals(getUndeliveredOrders_args that) {
24306
      if (that == null)
24307
        return false;
24308
 
24309
      boolean this_present_providerId = true;
24310
      boolean that_present_providerId = true;
24311
      if (this_present_providerId || that_present_providerId) {
24312
        if (!(this_present_providerId && that_present_providerId))
24313
          return false;
24314
        if (this.providerId != that.providerId)
24315
          return false;
24316
      }
24317
 
24318
      boolean this_present_warehouseId = true;
24319
      boolean that_present_warehouseId = true;
24320
      if (this_present_warehouseId || that_present_warehouseId) {
24321
        if (!(this_present_warehouseId && that_present_warehouseId))
24322
          return false;
24323
        if (this.warehouseId != that.warehouseId)
24324
          return false;
24325
      }
24326
 
24327
      return true;
24328
    }
24329
 
24330
    @Override
24331
    public int hashCode() {
24332
      return 0;
24333
    }
24334
 
24335
    public int compareTo(getUndeliveredOrders_args other) {
24336
      if (!getClass().equals(other.getClass())) {
24337
        return getClass().getName().compareTo(other.getClass().getName());
24338
      }
24339
 
24340
      int lastComparison = 0;
24341
      getUndeliveredOrders_args typedOther = (getUndeliveredOrders_args)other;
24342
 
24343
      lastComparison = Boolean.valueOf(isSetProviderId()).compareTo(isSetProviderId());
24344
      if (lastComparison != 0) {
24345
        return lastComparison;
24346
      }
24347
      lastComparison = TBaseHelper.compareTo(providerId, typedOther.providerId);
24348
      if (lastComparison != 0) {
24349
        return lastComparison;
24350
      }
24351
      lastComparison = Boolean.valueOf(isSetWarehouseId()).compareTo(isSetWarehouseId());
24352
      if (lastComparison != 0) {
24353
        return lastComparison;
24354
      }
24355
      lastComparison = TBaseHelper.compareTo(warehouseId, typedOther.warehouseId);
24356
      if (lastComparison != 0) {
24357
        return lastComparison;
24358
      }
24359
      return 0;
24360
    }
24361
 
24362
    public void read(TProtocol iprot) throws TException {
24363
      TField field;
24364
      iprot.readStructBegin();
24365
      while (true)
24366
      {
24367
        field = iprot.readFieldBegin();
24368
        if (field.type == TType.STOP) { 
24369
          break;
24370
        }
24371
        _Fields fieldId = _Fields.findByThriftId(field.id);
24372
        if (fieldId == null) {
24373
          TProtocolUtil.skip(iprot, field.type);
24374
        } else {
24375
          switch (fieldId) {
24376
            case PROVIDER_ID:
24377
              if (field.type == TType.I64) {
24378
                this.providerId = iprot.readI64();
24379
                setProviderIdIsSet(true);
24380
              } else { 
24381
                TProtocolUtil.skip(iprot, field.type);
24382
              }
24383
              break;
24384
            case WAREHOUSE_ID:
24385
              if (field.type == TType.I64) {
24386
                this.warehouseId = iprot.readI64();
24387
                setWarehouseIdIsSet(true);
24388
              } else { 
24389
                TProtocolUtil.skip(iprot, field.type);
24390
              }
24391
              break;
24392
          }
24393
          iprot.readFieldEnd();
24394
        }
24395
      }
24396
      iprot.readStructEnd();
24397
      validate();
24398
    }
24399
 
24400
    public void write(TProtocol oprot) throws TException {
24401
      validate();
24402
 
24403
      oprot.writeStructBegin(STRUCT_DESC);
24404
      oprot.writeFieldBegin(PROVIDER_ID_FIELD_DESC);
24405
      oprot.writeI64(this.providerId);
24406
      oprot.writeFieldEnd();
24407
      oprot.writeFieldBegin(WAREHOUSE_ID_FIELD_DESC);
24408
      oprot.writeI64(this.warehouseId);
24409
      oprot.writeFieldEnd();
24410
      oprot.writeFieldStop();
24411
      oprot.writeStructEnd();
24412
    }
24413
 
24414
    @Override
24415
    public String toString() {
24416
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_args(");
24417
      boolean first = true;
24418
 
24419
      sb.append("providerId:");
24420
      sb.append(this.providerId);
24421
      first = false;
24422
      if (!first) sb.append(", ");
24423
      sb.append("warehouseId:");
24424
      sb.append(this.warehouseId);
24425
      first = false;
24426
      sb.append(")");
24427
      return sb.toString();
24428
    }
24429
 
24430
    public void validate() throws TException {
24431
      // check for required fields
24432
    }
24433
 
24434
  }
24435
 
24436
  public static class getUndeliveredOrders_result implements TBase<getUndeliveredOrders_result._Fields>, java.io.Serializable, Cloneable, Comparable<getUndeliveredOrders_result>   {
24437
    private static final TStruct STRUCT_DESC = new TStruct("getUndeliveredOrders_result");
24438
 
24439
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
24440
 
24441
    private List<Order> success;
24442
 
24443
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24444
    public enum _Fields implements TFieldIdEnum {
24445
      SUCCESS((short)0, "success");
24446
 
24447
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24448
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24449
 
24450
      static {
24451
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24452
          byId.put((int)field._thriftId, field);
24453
          byName.put(field.getFieldName(), field);
24454
        }
24455
      }
24456
 
24457
      /**
24458
       * Find the _Fields constant that matches fieldId, or null if its not found.
24459
       */
24460
      public static _Fields findByThriftId(int fieldId) {
24461
        return byId.get(fieldId);
24462
      }
24463
 
24464
      /**
24465
       * Find the _Fields constant that matches fieldId, throwing an exception
24466
       * if it is not found.
24467
       */
24468
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24469
        _Fields fields = findByThriftId(fieldId);
24470
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24471
        return fields;
24472
      }
24473
 
24474
      /**
24475
       * Find the _Fields constant that matches name, or null if its not found.
24476
       */
24477
      public static _Fields findByName(String name) {
24478
        return byName.get(name);
24479
      }
24480
 
24481
      private final short _thriftId;
24482
      private final String _fieldName;
24483
 
24484
      _Fields(short thriftId, String fieldName) {
24485
        _thriftId = thriftId;
24486
        _fieldName = fieldName;
24487
      }
24488
 
24489
      public short getThriftFieldId() {
24490
        return _thriftId;
24491
      }
24492
 
24493
      public String getFieldName() {
24494
        return _fieldName;
24495
      }
24496
    }
24497
 
24498
    // isset id assignments
24499
 
24500
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
24501
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
24502
          new ListMetaData(TType.LIST, 
24503
              new StructMetaData(TType.STRUCT, Order.class))));
24504
    }});
24505
 
24506
    static {
24507
      FieldMetaData.addStructMetaDataMap(getUndeliveredOrders_result.class, metaDataMap);
24508
    }
24509
 
24510
    public getUndeliveredOrders_result() {
24511
    }
24512
 
24513
    public getUndeliveredOrders_result(
24514
      List<Order> success)
24515
    {
24516
      this();
24517
      this.success = success;
24518
    }
24519
 
24520
    /**
24521
     * Performs a deep copy on <i>other</i>.
24522
     */
24523
    public getUndeliveredOrders_result(getUndeliveredOrders_result other) {
24524
      if (other.isSetSuccess()) {
24525
        List<Order> __this__success = new ArrayList<Order>();
24526
        for (Order other_element : other.success) {
24527
          __this__success.add(new Order(other_element));
24528
        }
24529
        this.success = __this__success;
24530
      }
24531
    }
24532
 
24533
    public getUndeliveredOrders_result deepCopy() {
24534
      return new getUndeliveredOrders_result(this);
24535
    }
24536
 
24537
    @Deprecated
24538
    public getUndeliveredOrders_result clone() {
24539
      return new getUndeliveredOrders_result(this);
24540
    }
24541
 
24542
    public int getSuccessSize() {
24543
      return (this.success == null) ? 0 : this.success.size();
24544
    }
24545
 
24546
    public java.util.Iterator<Order> getSuccessIterator() {
24547
      return (this.success == null) ? null : this.success.iterator();
24548
    }
24549
 
24550
    public void addToSuccess(Order elem) {
24551
      if (this.success == null) {
24552
        this.success = new ArrayList<Order>();
24553
      }
24554
      this.success.add(elem);
24555
    }
24556
 
24557
    public List<Order> getSuccess() {
24558
      return this.success;
24559
    }
24560
 
24561
    public getUndeliveredOrders_result setSuccess(List<Order> success) {
24562
      this.success = success;
24563
      return this;
24564
    }
24565
 
24566
    public void unsetSuccess() {
24567
      this.success = null;
24568
    }
24569
 
24570
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
24571
    public boolean isSetSuccess() {
24572
      return this.success != null;
24573
    }
24574
 
24575
    public void setSuccessIsSet(boolean value) {
24576
      if (!value) {
24577
        this.success = null;
24578
      }
24579
    }
24580
 
24581
    public void setFieldValue(_Fields field, Object value) {
24582
      switch (field) {
24583
      case SUCCESS:
24584
        if (value == null) {
24585
          unsetSuccess();
24586
        } else {
24587
          setSuccess((List<Order>)value);
24588
        }
24589
        break;
24590
 
24591
      }
24592
    }
24593
 
24594
    public void setFieldValue(int fieldID, Object value) {
24595
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24596
    }
24597
 
24598
    public Object getFieldValue(_Fields field) {
24599
      switch (field) {
24600
      case SUCCESS:
24601
        return getSuccess();
24602
 
24603
      }
24604
      throw new IllegalStateException();
24605
    }
24606
 
24607
    public Object getFieldValue(int fieldId) {
24608
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24609
    }
24610
 
24611
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24612
    public boolean isSet(_Fields field) {
24613
      switch (field) {
24614
      case SUCCESS:
24615
        return isSetSuccess();
24616
      }
24617
      throw new IllegalStateException();
24618
    }
24619
 
24620
    public boolean isSet(int fieldID) {
24621
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24622
    }
24623
 
24624
    @Override
24625
    public boolean equals(Object that) {
24626
      if (that == null)
24627
        return false;
24628
      if (that instanceof getUndeliveredOrders_result)
24629
        return this.equals((getUndeliveredOrders_result)that);
24630
      return false;
24631
    }
24632
 
24633
    public boolean equals(getUndeliveredOrders_result that) {
24634
      if (that == null)
24635
        return false;
24636
 
24637
      boolean this_present_success = true && this.isSetSuccess();
24638
      boolean that_present_success = true && that.isSetSuccess();
24639
      if (this_present_success || that_present_success) {
24640
        if (!(this_present_success && that_present_success))
24641
          return false;
24642
        if (!this.success.equals(that.success))
24643
          return false;
24644
      }
24645
 
24646
      return true;
24647
    }
24648
 
24649
    @Override
24650
    public int hashCode() {
24651
      return 0;
24652
    }
24653
 
24654
    public int compareTo(getUndeliveredOrders_result other) {
24655
      if (!getClass().equals(other.getClass())) {
24656
        return getClass().getName().compareTo(other.getClass().getName());
24657
      }
24658
 
24659
      int lastComparison = 0;
24660
      getUndeliveredOrders_result typedOther = (getUndeliveredOrders_result)other;
24661
 
24662
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
24663
      if (lastComparison != 0) {
24664
        return lastComparison;
24665
      }
24666
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
24667
      if (lastComparison != 0) {
24668
        return lastComparison;
24669
      }
24670
      return 0;
24671
    }
24672
 
24673
    public void read(TProtocol iprot) throws TException {
24674
      TField field;
24675
      iprot.readStructBegin();
24676
      while (true)
24677
      {
24678
        field = iprot.readFieldBegin();
24679
        if (field.type == TType.STOP) { 
24680
          break;
24681
        }
24682
        _Fields fieldId = _Fields.findByThriftId(field.id);
24683
        if (fieldId == null) {
24684
          TProtocolUtil.skip(iprot, field.type);
24685
        } else {
24686
          switch (fieldId) {
24687
            case SUCCESS:
24688
              if (field.type == TType.LIST) {
24689
                {
24690
                  TList _list72 = iprot.readListBegin();
24691
                  this.success = new ArrayList<Order>(_list72.size);
24692
                  for (int _i73 = 0; _i73 < _list72.size; ++_i73)
24693
                  {
24694
                    Order _elem74;
24695
                    _elem74 = new Order();
24696
                    _elem74.read(iprot);
24697
                    this.success.add(_elem74);
24698
                  }
24699
                  iprot.readListEnd();
24700
                }
24701
              } else { 
24702
                TProtocolUtil.skip(iprot, field.type);
24703
              }
24704
              break;
24705
          }
24706
          iprot.readFieldEnd();
24707
        }
24708
      }
24709
      iprot.readStructEnd();
24710
      validate();
24711
    }
24712
 
24713
    public void write(TProtocol oprot) throws TException {
24714
      oprot.writeStructBegin(STRUCT_DESC);
24715
 
24716
      if (this.isSetSuccess()) {
24717
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
24718
        {
24719
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
24720
          for (Order _iter75 : this.success)
24721
          {
24722
            _iter75.write(oprot);
24723
          }
24724
          oprot.writeListEnd();
24725
        }
24726
        oprot.writeFieldEnd();
24727
      }
24728
      oprot.writeFieldStop();
24729
      oprot.writeStructEnd();
24730
    }
24731
 
24732
    @Override
24733
    public String toString() {
24734
      StringBuilder sb = new StringBuilder("getUndeliveredOrders_result(");
24735
      boolean first = true;
24736
 
24737
      sb.append("success:");
24738
      if (this.success == null) {
24739
        sb.append("null");
24740
      } else {
24741
        sb.append(this.success);
24742
      }
24743
      first = false;
24744
      sb.append(")");
24745
      return sb.toString();
24746
    }
24747
 
24748
    public void validate() throws TException {
24749
      // check for required fields
24750
    }
24751
 
24752
  }
24753
 
305 ashish 24754
  public static class getAlerts_args implements TBase<getAlerts_args._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_args>   {
24755
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_args");
24756
 
483 rajveer 24757
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 24758
    private static final TField VALID_FIELD_DESC = new TField("valid", TType.BOOL, (short)2);
24759
 
483 rajveer 24760
    private long orderId;
305 ashish 24761
    private boolean valid;
24762
 
24763
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
24764
    public enum _Fields implements TFieldIdEnum {
483 rajveer 24765
      ORDER_ID((short)1, "orderId"),
305 ashish 24766
      VALID((short)2, "valid");
24767
 
24768
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
24769
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
24770
 
24771
      static {
24772
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
24773
          byId.put((int)field._thriftId, field);
24774
          byName.put(field.getFieldName(), field);
24775
        }
24776
      }
24777
 
24778
      /**
24779
       * Find the _Fields constant that matches fieldId, or null if its not found.
24780
       */
24781
      public static _Fields findByThriftId(int fieldId) {
24782
        return byId.get(fieldId);
24783
      }
24784
 
24785
      /**
24786
       * Find the _Fields constant that matches fieldId, throwing an exception
24787
       * if it is not found.
24788
       */
24789
      public static _Fields findByThriftIdOrThrow(int fieldId) {
24790
        _Fields fields = findByThriftId(fieldId);
24791
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
24792
        return fields;
24793
      }
24794
 
24795
      /**
24796
       * Find the _Fields constant that matches name, or null if its not found.
24797
       */
24798
      public static _Fields findByName(String name) {
24799
        return byName.get(name);
24800
      }
24801
 
24802
      private final short _thriftId;
24803
      private final String _fieldName;
24804
 
24805
      _Fields(short thriftId, String fieldName) {
24806
        _thriftId = thriftId;
24807
        _fieldName = fieldName;
24808
      }
24809
 
24810
      public short getThriftFieldId() {
24811
        return _thriftId;
24812
      }
24813
 
24814
      public String getFieldName() {
24815
        return _fieldName;
24816
      }
24817
    }
24818
 
24819
    // isset id assignments
483 rajveer 24820
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 24821
    private static final int __VALID_ISSET_ID = 1;
24822
    private BitSet __isset_bit_vector = new BitSet(2);
24823
 
24824
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 24825
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 24826
          new FieldValueMetaData(TType.I64)));
24827
      put(_Fields.VALID, new FieldMetaData("valid", TFieldRequirementType.DEFAULT, 
24828
          new FieldValueMetaData(TType.BOOL)));
24829
    }});
24830
 
24831
    static {
24832
      FieldMetaData.addStructMetaDataMap(getAlerts_args.class, metaDataMap);
24833
    }
24834
 
24835
    public getAlerts_args() {
24836
    }
24837
 
24838
    public getAlerts_args(
483 rajveer 24839
      long orderId,
305 ashish 24840
      boolean valid)
24841
    {
24842
      this();
483 rajveer 24843
      this.orderId = orderId;
24844
      setOrderIdIsSet(true);
305 ashish 24845
      this.valid = valid;
24846
      setValidIsSet(true);
24847
    }
24848
 
24849
    /**
24850
     * Performs a deep copy on <i>other</i>.
24851
     */
24852
    public getAlerts_args(getAlerts_args other) {
24853
      __isset_bit_vector.clear();
24854
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 24855
      this.orderId = other.orderId;
305 ashish 24856
      this.valid = other.valid;
24857
    }
24858
 
24859
    public getAlerts_args deepCopy() {
24860
      return new getAlerts_args(this);
24861
    }
24862
 
24863
    @Deprecated
24864
    public getAlerts_args clone() {
24865
      return new getAlerts_args(this);
24866
    }
24867
 
483 rajveer 24868
    public long getOrderId() {
24869
      return this.orderId;
305 ashish 24870
    }
24871
 
483 rajveer 24872
    public getAlerts_args setOrderId(long orderId) {
24873
      this.orderId = orderId;
24874
      setOrderIdIsSet(true);
305 ashish 24875
      return this;
24876
    }
24877
 
483 rajveer 24878
    public void unsetOrderId() {
24879
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 24880
    }
24881
 
483 rajveer 24882
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
24883
    public boolean isSetOrderId() {
24884
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 24885
    }
24886
 
483 rajveer 24887
    public void setOrderIdIsSet(boolean value) {
24888
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 24889
    }
24890
 
24891
    public boolean isValid() {
24892
      return this.valid;
24893
    }
24894
 
24895
    public getAlerts_args setValid(boolean valid) {
24896
      this.valid = valid;
24897
      setValidIsSet(true);
24898
      return this;
24899
    }
24900
 
24901
    public void unsetValid() {
24902
      __isset_bit_vector.clear(__VALID_ISSET_ID);
24903
    }
24904
 
24905
    /** Returns true if field valid is set (has been asigned a value) and false otherwise */
24906
    public boolean isSetValid() {
24907
      return __isset_bit_vector.get(__VALID_ISSET_ID);
24908
    }
24909
 
24910
    public void setValidIsSet(boolean value) {
24911
      __isset_bit_vector.set(__VALID_ISSET_ID, value);
24912
    }
24913
 
24914
    public void setFieldValue(_Fields field, Object value) {
24915
      switch (field) {
483 rajveer 24916
      case ORDER_ID:
305 ashish 24917
        if (value == null) {
483 rajveer 24918
          unsetOrderId();
305 ashish 24919
        } else {
483 rajveer 24920
          setOrderId((Long)value);
305 ashish 24921
        }
24922
        break;
24923
 
24924
      case VALID:
24925
        if (value == null) {
24926
          unsetValid();
24927
        } else {
24928
          setValid((Boolean)value);
24929
        }
24930
        break;
24931
 
24932
      }
24933
    }
24934
 
24935
    public void setFieldValue(int fieldID, Object value) {
24936
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
24937
    }
24938
 
24939
    public Object getFieldValue(_Fields field) {
24940
      switch (field) {
483 rajveer 24941
      case ORDER_ID:
24942
        return new Long(getOrderId());
305 ashish 24943
 
24944
      case VALID:
24945
        return new Boolean(isValid());
24946
 
24947
      }
24948
      throw new IllegalStateException();
24949
    }
24950
 
24951
    public Object getFieldValue(int fieldId) {
24952
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
24953
    }
24954
 
24955
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
24956
    public boolean isSet(_Fields field) {
24957
      switch (field) {
483 rajveer 24958
      case ORDER_ID:
24959
        return isSetOrderId();
305 ashish 24960
      case VALID:
24961
        return isSetValid();
24962
      }
24963
      throw new IllegalStateException();
24964
    }
24965
 
24966
    public boolean isSet(int fieldID) {
24967
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
24968
    }
24969
 
24970
    @Override
24971
    public boolean equals(Object that) {
24972
      if (that == null)
24973
        return false;
24974
      if (that instanceof getAlerts_args)
24975
        return this.equals((getAlerts_args)that);
24976
      return false;
24977
    }
24978
 
24979
    public boolean equals(getAlerts_args that) {
24980
      if (that == null)
24981
        return false;
24982
 
483 rajveer 24983
      boolean this_present_orderId = true;
24984
      boolean that_present_orderId = true;
24985
      if (this_present_orderId || that_present_orderId) {
24986
        if (!(this_present_orderId && that_present_orderId))
305 ashish 24987
          return false;
483 rajveer 24988
        if (this.orderId != that.orderId)
305 ashish 24989
          return false;
24990
      }
24991
 
24992
      boolean this_present_valid = true;
24993
      boolean that_present_valid = true;
24994
      if (this_present_valid || that_present_valid) {
24995
        if (!(this_present_valid && that_present_valid))
24996
          return false;
24997
        if (this.valid != that.valid)
24998
          return false;
24999
      }
25000
 
25001
      return true;
25002
    }
25003
 
25004
    @Override
25005
    public int hashCode() {
25006
      return 0;
25007
    }
25008
 
25009
    public int compareTo(getAlerts_args other) {
25010
      if (!getClass().equals(other.getClass())) {
25011
        return getClass().getName().compareTo(other.getClass().getName());
25012
      }
25013
 
25014
      int lastComparison = 0;
25015
      getAlerts_args typedOther = (getAlerts_args)other;
25016
 
483 rajveer 25017
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25018
      if (lastComparison != 0) {
25019
        return lastComparison;
25020
      }
483 rajveer 25021
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25022
      if (lastComparison != 0) {
25023
        return lastComparison;
25024
      }
25025
      lastComparison = Boolean.valueOf(isSetValid()).compareTo(isSetValid());
25026
      if (lastComparison != 0) {
25027
        return lastComparison;
25028
      }
25029
      lastComparison = TBaseHelper.compareTo(valid, typedOther.valid);
25030
      if (lastComparison != 0) {
25031
        return lastComparison;
25032
      }
25033
      return 0;
25034
    }
25035
 
25036
    public void read(TProtocol iprot) throws TException {
25037
      TField field;
25038
      iprot.readStructBegin();
25039
      while (true)
25040
      {
25041
        field = iprot.readFieldBegin();
25042
        if (field.type == TType.STOP) { 
25043
          break;
25044
        }
25045
        _Fields fieldId = _Fields.findByThriftId(field.id);
25046
        if (fieldId == null) {
25047
          TProtocolUtil.skip(iprot, field.type);
25048
        } else {
25049
          switch (fieldId) {
483 rajveer 25050
            case ORDER_ID:
305 ashish 25051
              if (field.type == TType.I64) {
483 rajveer 25052
                this.orderId = iprot.readI64();
25053
                setOrderIdIsSet(true);
305 ashish 25054
              } else { 
25055
                TProtocolUtil.skip(iprot, field.type);
25056
              }
25057
              break;
25058
            case VALID:
25059
              if (field.type == TType.BOOL) {
25060
                this.valid = iprot.readBool();
25061
                setValidIsSet(true);
25062
              } else { 
25063
                TProtocolUtil.skip(iprot, field.type);
25064
              }
25065
              break;
25066
          }
25067
          iprot.readFieldEnd();
25068
        }
25069
      }
25070
      iprot.readStructEnd();
25071
      validate();
25072
    }
25073
 
25074
    public void write(TProtocol oprot) throws TException {
25075
      validate();
25076
 
25077
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25078
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25079
      oprot.writeI64(this.orderId);
305 ashish 25080
      oprot.writeFieldEnd();
25081
      oprot.writeFieldBegin(VALID_FIELD_DESC);
25082
      oprot.writeBool(this.valid);
25083
      oprot.writeFieldEnd();
25084
      oprot.writeFieldStop();
25085
      oprot.writeStructEnd();
25086
    }
25087
 
25088
    @Override
25089
    public String toString() {
25090
      StringBuilder sb = new StringBuilder("getAlerts_args(");
25091
      boolean first = true;
25092
 
483 rajveer 25093
      sb.append("orderId:");
25094
      sb.append(this.orderId);
305 ashish 25095
      first = false;
25096
      if (!first) sb.append(", ");
25097
      sb.append("valid:");
25098
      sb.append(this.valid);
25099
      first = false;
25100
      sb.append(")");
25101
      return sb.toString();
25102
    }
25103
 
25104
    public void validate() throws TException {
25105
      // check for required fields
25106
    }
25107
 
25108
  }
25109
 
25110
  public static class getAlerts_result implements TBase<getAlerts_result._Fields>, java.io.Serializable, Cloneable, Comparable<getAlerts_result>   {
25111
    private static final TStruct STRUCT_DESC = new TStruct("getAlerts_result");
25112
 
25113
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.LIST, (short)0);
25114
 
25115
    private List<Alert> success;
25116
 
25117
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25118
    public enum _Fields implements TFieldIdEnum {
25119
      SUCCESS((short)0, "success");
25120
 
25121
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25122
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25123
 
25124
      static {
25125
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25126
          byId.put((int)field._thriftId, field);
25127
          byName.put(field.getFieldName(), field);
25128
        }
25129
      }
25130
 
25131
      /**
25132
       * Find the _Fields constant that matches fieldId, or null if its not found.
25133
       */
25134
      public static _Fields findByThriftId(int fieldId) {
25135
        return byId.get(fieldId);
25136
      }
25137
 
25138
      /**
25139
       * Find the _Fields constant that matches fieldId, throwing an exception
25140
       * if it is not found.
25141
       */
25142
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25143
        _Fields fields = findByThriftId(fieldId);
25144
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25145
        return fields;
25146
      }
25147
 
25148
      /**
25149
       * Find the _Fields constant that matches name, or null if its not found.
25150
       */
25151
      public static _Fields findByName(String name) {
25152
        return byName.get(name);
25153
      }
25154
 
25155
      private final short _thriftId;
25156
      private final String _fieldName;
25157
 
25158
      _Fields(short thriftId, String fieldName) {
25159
        _thriftId = thriftId;
25160
        _fieldName = fieldName;
25161
      }
25162
 
25163
      public short getThriftFieldId() {
25164
        return _thriftId;
25165
      }
25166
 
25167
      public String getFieldName() {
25168
        return _fieldName;
25169
      }
25170
    }
25171
 
25172
    // isset id assignments
25173
 
25174
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
25175
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
25176
          new ListMetaData(TType.LIST, 
25177
              new StructMetaData(TType.STRUCT, Alert.class))));
25178
    }});
25179
 
25180
    static {
25181
      FieldMetaData.addStructMetaDataMap(getAlerts_result.class, metaDataMap);
25182
    }
25183
 
25184
    public getAlerts_result() {
25185
    }
25186
 
25187
    public getAlerts_result(
25188
      List<Alert> success)
25189
    {
25190
      this();
25191
      this.success = success;
25192
    }
25193
 
25194
    /**
25195
     * Performs a deep copy on <i>other</i>.
25196
     */
25197
    public getAlerts_result(getAlerts_result other) {
25198
      if (other.isSetSuccess()) {
25199
        List<Alert> __this__success = new ArrayList<Alert>();
25200
        for (Alert other_element : other.success) {
25201
          __this__success.add(new Alert(other_element));
25202
        }
25203
        this.success = __this__success;
25204
      }
25205
    }
25206
 
25207
    public getAlerts_result deepCopy() {
25208
      return new getAlerts_result(this);
25209
    }
25210
 
25211
    @Deprecated
25212
    public getAlerts_result clone() {
25213
      return new getAlerts_result(this);
25214
    }
25215
 
25216
    public int getSuccessSize() {
25217
      return (this.success == null) ? 0 : this.success.size();
25218
    }
25219
 
25220
    public java.util.Iterator<Alert> getSuccessIterator() {
25221
      return (this.success == null) ? null : this.success.iterator();
25222
    }
25223
 
25224
    public void addToSuccess(Alert elem) {
25225
      if (this.success == null) {
25226
        this.success = new ArrayList<Alert>();
25227
      }
25228
      this.success.add(elem);
25229
    }
25230
 
25231
    public List<Alert> getSuccess() {
25232
      return this.success;
25233
    }
25234
 
25235
    public getAlerts_result setSuccess(List<Alert> success) {
25236
      this.success = success;
25237
      return this;
25238
    }
25239
 
25240
    public void unsetSuccess() {
25241
      this.success = null;
25242
    }
25243
 
25244
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
25245
    public boolean isSetSuccess() {
25246
      return this.success != null;
25247
    }
25248
 
25249
    public void setSuccessIsSet(boolean value) {
25250
      if (!value) {
25251
        this.success = null;
25252
      }
25253
    }
25254
 
25255
    public void setFieldValue(_Fields field, Object value) {
25256
      switch (field) {
25257
      case SUCCESS:
25258
        if (value == null) {
25259
          unsetSuccess();
25260
        } else {
25261
          setSuccess((List<Alert>)value);
25262
        }
25263
        break;
25264
 
25265
      }
25266
    }
25267
 
25268
    public void setFieldValue(int fieldID, Object value) {
25269
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25270
    }
25271
 
25272
    public Object getFieldValue(_Fields field) {
25273
      switch (field) {
25274
      case SUCCESS:
25275
        return getSuccess();
25276
 
25277
      }
25278
      throw new IllegalStateException();
25279
    }
25280
 
25281
    public Object getFieldValue(int fieldId) {
25282
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25283
    }
25284
 
25285
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25286
    public boolean isSet(_Fields field) {
25287
      switch (field) {
25288
      case SUCCESS:
25289
        return isSetSuccess();
25290
      }
25291
      throw new IllegalStateException();
25292
    }
25293
 
25294
    public boolean isSet(int fieldID) {
25295
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25296
    }
25297
 
25298
    @Override
25299
    public boolean equals(Object that) {
25300
      if (that == null)
25301
        return false;
25302
      if (that instanceof getAlerts_result)
25303
        return this.equals((getAlerts_result)that);
25304
      return false;
25305
    }
25306
 
25307
    public boolean equals(getAlerts_result that) {
25308
      if (that == null)
25309
        return false;
25310
 
25311
      boolean this_present_success = true && this.isSetSuccess();
25312
      boolean that_present_success = true && that.isSetSuccess();
25313
      if (this_present_success || that_present_success) {
25314
        if (!(this_present_success && that_present_success))
25315
          return false;
25316
        if (!this.success.equals(that.success))
25317
          return false;
25318
      }
25319
 
25320
      return true;
25321
    }
25322
 
25323
    @Override
25324
    public int hashCode() {
25325
      return 0;
25326
    }
25327
 
25328
    public int compareTo(getAlerts_result other) {
25329
      if (!getClass().equals(other.getClass())) {
25330
        return getClass().getName().compareTo(other.getClass().getName());
25331
      }
25332
 
25333
      int lastComparison = 0;
25334
      getAlerts_result typedOther = (getAlerts_result)other;
25335
 
25336
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
25337
      if (lastComparison != 0) {
25338
        return lastComparison;
25339
      }
25340
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
25341
      if (lastComparison != 0) {
25342
        return lastComparison;
25343
      }
25344
      return 0;
25345
    }
25346
 
25347
    public void read(TProtocol iprot) throws TException {
25348
      TField field;
25349
      iprot.readStructBegin();
25350
      while (true)
25351
      {
25352
        field = iprot.readFieldBegin();
25353
        if (field.type == TType.STOP) { 
25354
          break;
25355
        }
25356
        _Fields fieldId = _Fields.findByThriftId(field.id);
25357
        if (fieldId == null) {
25358
          TProtocolUtil.skip(iprot, field.type);
25359
        } else {
25360
          switch (fieldId) {
25361
            case SUCCESS:
25362
              if (field.type == TType.LIST) {
25363
                {
1406 ankur.sing 25364
                  TList _list76 = iprot.readListBegin();
25365
                  this.success = new ArrayList<Alert>(_list76.size);
25366
                  for (int _i77 = 0; _i77 < _list76.size; ++_i77)
305 ashish 25367
                  {
1406 ankur.sing 25368
                    Alert _elem78;
25369
                    _elem78 = new Alert();
25370
                    _elem78.read(iprot);
25371
                    this.success.add(_elem78);
305 ashish 25372
                  }
25373
                  iprot.readListEnd();
25374
                }
25375
              } else { 
25376
                TProtocolUtil.skip(iprot, field.type);
25377
              }
25378
              break;
25379
          }
25380
          iprot.readFieldEnd();
25381
        }
25382
      }
25383
      iprot.readStructEnd();
25384
      validate();
25385
    }
25386
 
25387
    public void write(TProtocol oprot) throws TException {
25388
      oprot.writeStructBegin(STRUCT_DESC);
25389
 
25390
      if (this.isSetSuccess()) {
25391
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
25392
        {
25393
          oprot.writeListBegin(new TList(TType.STRUCT, this.success.size()));
1406 ankur.sing 25394
          for (Alert _iter79 : this.success)
305 ashish 25395
          {
1406 ankur.sing 25396
            _iter79.write(oprot);
305 ashish 25397
          }
25398
          oprot.writeListEnd();
25399
        }
25400
        oprot.writeFieldEnd();
25401
      }
25402
      oprot.writeFieldStop();
25403
      oprot.writeStructEnd();
25404
    }
25405
 
25406
    @Override
25407
    public String toString() {
25408
      StringBuilder sb = new StringBuilder("getAlerts_result(");
25409
      boolean first = true;
25410
 
25411
      sb.append("success:");
25412
      if (this.success == null) {
25413
        sb.append("null");
25414
      } else {
25415
        sb.append(this.success);
25416
      }
25417
      first = false;
25418
      sb.append(")");
25419
      return sb.toString();
25420
    }
25421
 
25422
    public void validate() throws TException {
25423
      // check for required fields
25424
    }
25425
 
25426
  }
25427
 
25428
  public static class setAlert_args implements TBase<setAlert_args._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_args>   {
25429
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_args");
25430
 
483 rajveer 25431
    private static final TField ORDER_ID_FIELD_DESC = new TField("orderId", TType.I64, (short)1);
305 ashish 25432
    private static final TField UNSET_FIELD_DESC = new TField("unset", TType.BOOL, (short)2);
25433
    private static final TField TYPE_FIELD_DESC = new TField("type", TType.I64, (short)3);
25434
    private static final TField COMMENT_FIELD_DESC = new TField("comment", TType.STRING, (short)4);
25435
 
483 rajveer 25436
    private long orderId;
305 ashish 25437
    private boolean unset;
25438
    private long type;
25439
    private String comment;
25440
 
25441
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25442
    public enum _Fields implements TFieldIdEnum {
483 rajveer 25443
      ORDER_ID((short)1, "orderId"),
305 ashish 25444
      UNSET((short)2, "unset"),
25445
      TYPE((short)3, "type"),
25446
      COMMENT((short)4, "comment");
25447
 
25448
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25449
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25450
 
25451
      static {
25452
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25453
          byId.put((int)field._thriftId, field);
25454
          byName.put(field.getFieldName(), field);
25455
        }
25456
      }
25457
 
25458
      /**
25459
       * Find the _Fields constant that matches fieldId, or null if its not found.
25460
       */
25461
      public static _Fields findByThriftId(int fieldId) {
25462
        return byId.get(fieldId);
25463
      }
25464
 
25465
      /**
25466
       * Find the _Fields constant that matches fieldId, throwing an exception
25467
       * if it is not found.
25468
       */
25469
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25470
        _Fields fields = findByThriftId(fieldId);
25471
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25472
        return fields;
25473
      }
25474
 
25475
      /**
25476
       * Find the _Fields constant that matches name, or null if its not found.
25477
       */
25478
      public static _Fields findByName(String name) {
25479
        return byName.get(name);
25480
      }
25481
 
25482
      private final short _thriftId;
25483
      private final String _fieldName;
25484
 
25485
      _Fields(short thriftId, String fieldName) {
25486
        _thriftId = thriftId;
25487
        _fieldName = fieldName;
25488
      }
25489
 
25490
      public short getThriftFieldId() {
25491
        return _thriftId;
25492
      }
25493
 
25494
      public String getFieldName() {
25495
        return _fieldName;
25496
      }
25497
    }
25498
 
25499
    // isset id assignments
483 rajveer 25500
    private static final int __ORDERID_ISSET_ID = 0;
305 ashish 25501
    private static final int __UNSET_ISSET_ID = 1;
25502
    private static final int __TYPE_ISSET_ID = 2;
25503
    private BitSet __isset_bit_vector = new BitSet(3);
25504
 
25505
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
483 rajveer 25506
      put(_Fields.ORDER_ID, new FieldMetaData("orderId", TFieldRequirementType.DEFAULT, 
305 ashish 25507
          new FieldValueMetaData(TType.I64)));
25508
      put(_Fields.UNSET, new FieldMetaData("unset", TFieldRequirementType.DEFAULT, 
25509
          new FieldValueMetaData(TType.BOOL)));
25510
      put(_Fields.TYPE, new FieldMetaData("type", TFieldRequirementType.DEFAULT, 
25511
          new FieldValueMetaData(TType.I64)));
25512
      put(_Fields.COMMENT, new FieldMetaData("comment", TFieldRequirementType.DEFAULT, 
25513
          new FieldValueMetaData(TType.STRING)));
25514
    }});
25515
 
25516
    static {
25517
      FieldMetaData.addStructMetaDataMap(setAlert_args.class, metaDataMap);
25518
    }
25519
 
25520
    public setAlert_args() {
25521
    }
25522
 
25523
    public setAlert_args(
483 rajveer 25524
      long orderId,
305 ashish 25525
      boolean unset,
25526
      long type,
25527
      String comment)
25528
    {
25529
      this();
483 rajveer 25530
      this.orderId = orderId;
25531
      setOrderIdIsSet(true);
305 ashish 25532
      this.unset = unset;
25533
      setUnsetIsSet(true);
25534
      this.type = type;
25535
      setTypeIsSet(true);
25536
      this.comment = comment;
25537
    }
25538
 
25539
    /**
25540
     * Performs a deep copy on <i>other</i>.
25541
     */
25542
    public setAlert_args(setAlert_args other) {
25543
      __isset_bit_vector.clear();
25544
      __isset_bit_vector.or(other.__isset_bit_vector);
483 rajveer 25545
      this.orderId = other.orderId;
305 ashish 25546
      this.unset = other.unset;
25547
      this.type = other.type;
25548
      if (other.isSetComment()) {
25549
        this.comment = other.comment;
25550
      }
25551
    }
25552
 
25553
    public setAlert_args deepCopy() {
25554
      return new setAlert_args(this);
25555
    }
25556
 
25557
    @Deprecated
25558
    public setAlert_args clone() {
25559
      return new setAlert_args(this);
25560
    }
25561
 
483 rajveer 25562
    public long getOrderId() {
25563
      return this.orderId;
305 ashish 25564
    }
25565
 
483 rajveer 25566
    public setAlert_args setOrderId(long orderId) {
25567
      this.orderId = orderId;
25568
      setOrderIdIsSet(true);
305 ashish 25569
      return this;
25570
    }
25571
 
483 rajveer 25572
    public void unsetOrderId() {
25573
      __isset_bit_vector.clear(__ORDERID_ISSET_ID);
305 ashish 25574
    }
25575
 
483 rajveer 25576
    /** Returns true if field orderId is set (has been asigned a value) and false otherwise */
25577
    public boolean isSetOrderId() {
25578
      return __isset_bit_vector.get(__ORDERID_ISSET_ID);
305 ashish 25579
    }
25580
 
483 rajveer 25581
    public void setOrderIdIsSet(boolean value) {
25582
      __isset_bit_vector.set(__ORDERID_ISSET_ID, value);
305 ashish 25583
    }
25584
 
25585
    public boolean isUnset() {
25586
      return this.unset;
25587
    }
25588
 
25589
    public setAlert_args setUnset(boolean unset) {
25590
      this.unset = unset;
25591
      setUnsetIsSet(true);
25592
      return this;
25593
    }
25594
 
25595
    public void unsetUnset() {
25596
      __isset_bit_vector.clear(__UNSET_ISSET_ID);
25597
    }
25598
 
25599
    /** Returns true if field unset is set (has been asigned a value) and false otherwise */
25600
    public boolean isSetUnset() {
25601
      return __isset_bit_vector.get(__UNSET_ISSET_ID);
25602
    }
25603
 
25604
    public void setUnsetIsSet(boolean value) {
25605
      __isset_bit_vector.set(__UNSET_ISSET_ID, value);
25606
    }
25607
 
25608
    public long getType() {
25609
      return this.type;
25610
    }
25611
 
25612
    public setAlert_args setType(long type) {
25613
      this.type = type;
25614
      setTypeIsSet(true);
25615
      return this;
25616
    }
25617
 
25618
    public void unsetType() {
25619
      __isset_bit_vector.clear(__TYPE_ISSET_ID);
25620
    }
25621
 
25622
    /** Returns true if field type is set (has been asigned a value) and false otherwise */
25623
    public boolean isSetType() {
25624
      return __isset_bit_vector.get(__TYPE_ISSET_ID);
25625
    }
25626
 
25627
    public void setTypeIsSet(boolean value) {
25628
      __isset_bit_vector.set(__TYPE_ISSET_ID, value);
25629
    }
25630
 
25631
    public String getComment() {
25632
      return this.comment;
25633
    }
25634
 
25635
    public setAlert_args setComment(String comment) {
25636
      this.comment = comment;
25637
      return this;
25638
    }
25639
 
25640
    public void unsetComment() {
25641
      this.comment = null;
25642
    }
25643
 
25644
    /** Returns true if field comment is set (has been asigned a value) and false otherwise */
25645
    public boolean isSetComment() {
25646
      return this.comment != null;
25647
    }
25648
 
25649
    public void setCommentIsSet(boolean value) {
25650
      if (!value) {
25651
        this.comment = null;
25652
      }
25653
    }
25654
 
25655
    public void setFieldValue(_Fields field, Object value) {
25656
      switch (field) {
483 rajveer 25657
      case ORDER_ID:
305 ashish 25658
        if (value == null) {
483 rajveer 25659
          unsetOrderId();
305 ashish 25660
        } else {
483 rajveer 25661
          setOrderId((Long)value);
305 ashish 25662
        }
25663
        break;
25664
 
25665
      case UNSET:
25666
        if (value == null) {
25667
          unsetUnset();
25668
        } else {
25669
          setUnset((Boolean)value);
25670
        }
25671
        break;
25672
 
25673
      case TYPE:
25674
        if (value == null) {
25675
          unsetType();
25676
        } else {
25677
          setType((Long)value);
25678
        }
25679
        break;
25680
 
25681
      case COMMENT:
25682
        if (value == null) {
25683
          unsetComment();
25684
        } else {
25685
          setComment((String)value);
25686
        }
25687
        break;
25688
 
25689
      }
25690
    }
25691
 
25692
    public void setFieldValue(int fieldID, Object value) {
25693
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
25694
    }
25695
 
25696
    public Object getFieldValue(_Fields field) {
25697
      switch (field) {
483 rajveer 25698
      case ORDER_ID:
25699
        return new Long(getOrderId());
305 ashish 25700
 
25701
      case UNSET:
25702
        return new Boolean(isUnset());
25703
 
25704
      case TYPE:
25705
        return new Long(getType());
25706
 
25707
      case COMMENT:
25708
        return getComment();
25709
 
25710
      }
25711
      throw new IllegalStateException();
25712
    }
25713
 
25714
    public Object getFieldValue(int fieldId) {
25715
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
25716
    }
25717
 
25718
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
25719
    public boolean isSet(_Fields field) {
25720
      switch (field) {
483 rajveer 25721
      case ORDER_ID:
25722
        return isSetOrderId();
305 ashish 25723
      case UNSET:
25724
        return isSetUnset();
25725
      case TYPE:
25726
        return isSetType();
25727
      case COMMENT:
25728
        return isSetComment();
25729
      }
25730
      throw new IllegalStateException();
25731
    }
25732
 
25733
    public boolean isSet(int fieldID) {
25734
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
25735
    }
25736
 
25737
    @Override
25738
    public boolean equals(Object that) {
25739
      if (that == null)
25740
        return false;
25741
      if (that instanceof setAlert_args)
25742
        return this.equals((setAlert_args)that);
25743
      return false;
25744
    }
25745
 
25746
    public boolean equals(setAlert_args that) {
25747
      if (that == null)
25748
        return false;
25749
 
483 rajveer 25750
      boolean this_present_orderId = true;
25751
      boolean that_present_orderId = true;
25752
      if (this_present_orderId || that_present_orderId) {
25753
        if (!(this_present_orderId && that_present_orderId))
305 ashish 25754
          return false;
483 rajveer 25755
        if (this.orderId != that.orderId)
305 ashish 25756
          return false;
25757
      }
25758
 
25759
      boolean this_present_unset = true;
25760
      boolean that_present_unset = true;
25761
      if (this_present_unset || that_present_unset) {
25762
        if (!(this_present_unset && that_present_unset))
25763
          return false;
25764
        if (this.unset != that.unset)
25765
          return false;
25766
      }
25767
 
25768
      boolean this_present_type = true;
25769
      boolean that_present_type = true;
25770
      if (this_present_type || that_present_type) {
25771
        if (!(this_present_type && that_present_type))
25772
          return false;
25773
        if (this.type != that.type)
25774
          return false;
25775
      }
25776
 
25777
      boolean this_present_comment = true && this.isSetComment();
25778
      boolean that_present_comment = true && that.isSetComment();
25779
      if (this_present_comment || that_present_comment) {
25780
        if (!(this_present_comment && that_present_comment))
25781
          return false;
25782
        if (!this.comment.equals(that.comment))
25783
          return false;
25784
      }
25785
 
25786
      return true;
25787
    }
25788
 
25789
    @Override
25790
    public int hashCode() {
25791
      return 0;
25792
    }
25793
 
25794
    public int compareTo(setAlert_args other) {
25795
      if (!getClass().equals(other.getClass())) {
25796
        return getClass().getName().compareTo(other.getClass().getName());
25797
      }
25798
 
25799
      int lastComparison = 0;
25800
      setAlert_args typedOther = (setAlert_args)other;
25801
 
483 rajveer 25802
      lastComparison = Boolean.valueOf(isSetOrderId()).compareTo(isSetOrderId());
305 ashish 25803
      if (lastComparison != 0) {
25804
        return lastComparison;
25805
      }
483 rajveer 25806
      lastComparison = TBaseHelper.compareTo(orderId, typedOther.orderId);
305 ashish 25807
      if (lastComparison != 0) {
25808
        return lastComparison;
25809
      }
25810
      lastComparison = Boolean.valueOf(isSetUnset()).compareTo(isSetUnset());
25811
      if (lastComparison != 0) {
25812
        return lastComparison;
25813
      }
25814
      lastComparison = TBaseHelper.compareTo(unset, typedOther.unset);
25815
      if (lastComparison != 0) {
25816
        return lastComparison;
25817
      }
25818
      lastComparison = Boolean.valueOf(isSetType()).compareTo(isSetType());
25819
      if (lastComparison != 0) {
25820
        return lastComparison;
25821
      }
25822
      lastComparison = TBaseHelper.compareTo(type, typedOther.type);
25823
      if (lastComparison != 0) {
25824
        return lastComparison;
25825
      }
25826
      lastComparison = Boolean.valueOf(isSetComment()).compareTo(isSetComment());
25827
      if (lastComparison != 0) {
25828
        return lastComparison;
25829
      }
25830
      lastComparison = TBaseHelper.compareTo(comment, typedOther.comment);
25831
      if (lastComparison != 0) {
25832
        return lastComparison;
25833
      }
25834
      return 0;
25835
    }
25836
 
25837
    public void read(TProtocol iprot) throws TException {
25838
      TField field;
25839
      iprot.readStructBegin();
25840
      while (true)
25841
      {
25842
        field = iprot.readFieldBegin();
25843
        if (field.type == TType.STOP) { 
25844
          break;
25845
        }
25846
        _Fields fieldId = _Fields.findByThriftId(field.id);
25847
        if (fieldId == null) {
25848
          TProtocolUtil.skip(iprot, field.type);
25849
        } else {
25850
          switch (fieldId) {
483 rajveer 25851
            case ORDER_ID:
305 ashish 25852
              if (field.type == TType.I64) {
483 rajveer 25853
                this.orderId = iprot.readI64();
25854
                setOrderIdIsSet(true);
305 ashish 25855
              } else { 
25856
                TProtocolUtil.skip(iprot, field.type);
25857
              }
25858
              break;
25859
            case UNSET:
25860
              if (field.type == TType.BOOL) {
25861
                this.unset = iprot.readBool();
25862
                setUnsetIsSet(true);
25863
              } else { 
25864
                TProtocolUtil.skip(iprot, field.type);
25865
              }
25866
              break;
25867
            case TYPE:
25868
              if (field.type == TType.I64) {
25869
                this.type = iprot.readI64();
25870
                setTypeIsSet(true);
25871
              } else { 
25872
                TProtocolUtil.skip(iprot, field.type);
25873
              }
25874
              break;
25875
            case COMMENT:
25876
              if (field.type == TType.STRING) {
25877
                this.comment = iprot.readString();
25878
              } else { 
25879
                TProtocolUtil.skip(iprot, field.type);
25880
              }
25881
              break;
25882
          }
25883
          iprot.readFieldEnd();
25884
        }
25885
      }
25886
      iprot.readStructEnd();
25887
      validate();
25888
    }
25889
 
25890
    public void write(TProtocol oprot) throws TException {
25891
      validate();
25892
 
25893
      oprot.writeStructBegin(STRUCT_DESC);
483 rajveer 25894
      oprot.writeFieldBegin(ORDER_ID_FIELD_DESC);
25895
      oprot.writeI64(this.orderId);
305 ashish 25896
      oprot.writeFieldEnd();
25897
      oprot.writeFieldBegin(UNSET_FIELD_DESC);
25898
      oprot.writeBool(this.unset);
25899
      oprot.writeFieldEnd();
25900
      oprot.writeFieldBegin(TYPE_FIELD_DESC);
25901
      oprot.writeI64(this.type);
25902
      oprot.writeFieldEnd();
25903
      if (this.comment != null) {
25904
        oprot.writeFieldBegin(COMMENT_FIELD_DESC);
25905
        oprot.writeString(this.comment);
25906
        oprot.writeFieldEnd();
25907
      }
25908
      oprot.writeFieldStop();
25909
      oprot.writeStructEnd();
25910
    }
25911
 
25912
    @Override
25913
    public String toString() {
25914
      StringBuilder sb = new StringBuilder("setAlert_args(");
25915
      boolean first = true;
25916
 
483 rajveer 25917
      sb.append("orderId:");
25918
      sb.append(this.orderId);
305 ashish 25919
      first = false;
25920
      if (!first) sb.append(", ");
25921
      sb.append("unset:");
25922
      sb.append(this.unset);
25923
      first = false;
25924
      if (!first) sb.append(", ");
25925
      sb.append("type:");
25926
      sb.append(this.type);
25927
      first = false;
25928
      if (!first) sb.append(", ");
25929
      sb.append("comment:");
25930
      if (this.comment == null) {
25931
        sb.append("null");
25932
      } else {
25933
        sb.append(this.comment);
25934
      }
25935
      first = false;
25936
      sb.append(")");
25937
      return sb.toString();
25938
    }
25939
 
25940
    public void validate() throws TException {
25941
      // check for required fields
25942
    }
25943
 
25944
  }
25945
 
25946
  public static class setAlert_result implements TBase<setAlert_result._Fields>, java.io.Serializable, Cloneable, Comparable<setAlert_result>   {
25947
    private static final TStruct STRUCT_DESC = new TStruct("setAlert_result");
25948
 
25949
 
25950
 
25951
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
25952
    public enum _Fields implements TFieldIdEnum {
25953
;
25954
 
25955
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
25956
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
25957
 
25958
      static {
25959
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
25960
          byId.put((int)field._thriftId, field);
25961
          byName.put(field.getFieldName(), field);
25962
        }
25963
      }
25964
 
25965
      /**
25966
       * Find the _Fields constant that matches fieldId, or null if its not found.
25967
       */
25968
      public static _Fields findByThriftId(int fieldId) {
25969
        return byId.get(fieldId);
25970
      }
25971
 
25972
      /**
25973
       * Find the _Fields constant that matches fieldId, throwing an exception
25974
       * if it is not found.
25975
       */
25976
      public static _Fields findByThriftIdOrThrow(int fieldId) {
25977
        _Fields fields = findByThriftId(fieldId);
25978
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
25979
        return fields;
25980
      }
25981
 
25982
      /**
25983
       * Find the _Fields constant that matches name, or null if its not found.
25984
       */
25985
      public static _Fields findByName(String name) {
25986
        return byName.get(name);
25987
      }
25988
 
25989
      private final short _thriftId;
25990
      private final String _fieldName;
25991
 
25992
      _Fields(short thriftId, String fieldName) {
25993
        _thriftId = thriftId;
25994
        _fieldName = fieldName;
25995
      }
25996
 
25997
      public short getThriftFieldId() {
25998
        return _thriftId;
25999
      }
26000
 
26001
      public String getFieldName() {
26002
        return _fieldName;
26003
      }
26004
    }
26005
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26006
    }});
26007
 
26008
    static {
26009
      FieldMetaData.addStructMetaDataMap(setAlert_result.class, metaDataMap);
26010
    }
26011
 
26012
    public setAlert_result() {
26013
    }
26014
 
26015
    /**
26016
     * Performs a deep copy on <i>other</i>.
26017
     */
26018
    public setAlert_result(setAlert_result other) {
26019
    }
26020
 
26021
    public setAlert_result deepCopy() {
26022
      return new setAlert_result(this);
26023
    }
26024
 
26025
    @Deprecated
26026
    public setAlert_result clone() {
26027
      return new setAlert_result(this);
26028
    }
26029
 
26030
    public void setFieldValue(_Fields field, Object value) {
26031
      switch (field) {
26032
      }
26033
    }
26034
 
26035
    public void setFieldValue(int fieldID, Object value) {
26036
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26037
    }
26038
 
26039
    public Object getFieldValue(_Fields field) {
26040
      switch (field) {
26041
      }
26042
      throw new IllegalStateException();
26043
    }
26044
 
26045
    public Object getFieldValue(int fieldId) {
26046
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26047
    }
26048
 
26049
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26050
    public boolean isSet(_Fields field) {
26051
      switch (field) {
26052
      }
26053
      throw new IllegalStateException();
26054
    }
26055
 
26056
    public boolean isSet(int fieldID) {
26057
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26058
    }
26059
 
26060
    @Override
26061
    public boolean equals(Object that) {
26062
      if (that == null)
26063
        return false;
26064
      if (that instanceof setAlert_result)
26065
        return this.equals((setAlert_result)that);
26066
      return false;
26067
    }
26068
 
26069
    public boolean equals(setAlert_result that) {
26070
      if (that == null)
26071
        return false;
26072
 
26073
      return true;
26074
    }
26075
 
26076
    @Override
26077
    public int hashCode() {
26078
      return 0;
26079
    }
26080
 
26081
    public int compareTo(setAlert_result other) {
26082
      if (!getClass().equals(other.getClass())) {
26083
        return getClass().getName().compareTo(other.getClass().getName());
26084
      }
26085
 
26086
      int lastComparison = 0;
26087
      setAlert_result typedOther = (setAlert_result)other;
26088
 
26089
      return 0;
26090
    }
26091
 
26092
    public void read(TProtocol iprot) throws TException {
26093
      TField field;
26094
      iprot.readStructBegin();
26095
      while (true)
26096
      {
26097
        field = iprot.readFieldBegin();
26098
        if (field.type == TType.STOP) { 
26099
          break;
26100
        }
26101
        _Fields fieldId = _Fields.findByThriftId(field.id);
26102
        if (fieldId == null) {
26103
          TProtocolUtil.skip(iprot, field.type);
26104
        } else {
26105
          switch (fieldId) {
26106
          }
26107
          iprot.readFieldEnd();
26108
        }
26109
      }
26110
      iprot.readStructEnd();
26111
      validate();
26112
    }
26113
 
26114
    public void write(TProtocol oprot) throws TException {
26115
      oprot.writeStructBegin(STRUCT_DESC);
26116
 
26117
      oprot.writeFieldStop();
26118
      oprot.writeStructEnd();
26119
    }
26120
 
26121
    @Override
26122
    public String toString() {
26123
      StringBuilder sb = new StringBuilder("setAlert_result(");
26124
      boolean first = true;
26125
 
26126
      sb.append(")");
26127
      return sb.toString();
26128
    }
26129
 
26130
    public void validate() throws TException {
26131
      // check for required fields
26132
    }
26133
 
26134
  }
26135
 
1598 ankur.sing 26136
  public static class getValidOrderCount_args implements TBase<getValidOrderCount_args._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_args>   {
26137
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_args");
26138
 
26139
 
26140
 
26141
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26142
    public enum _Fields implements TFieldIdEnum {
26143
;
26144
 
26145
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26146
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26147
 
26148
      static {
26149
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26150
          byId.put((int)field._thriftId, field);
26151
          byName.put(field.getFieldName(), field);
26152
        }
26153
      }
26154
 
26155
      /**
26156
       * Find the _Fields constant that matches fieldId, or null if its not found.
26157
       */
26158
      public static _Fields findByThriftId(int fieldId) {
26159
        return byId.get(fieldId);
26160
      }
26161
 
26162
      /**
26163
       * Find the _Fields constant that matches fieldId, throwing an exception
26164
       * if it is not found.
26165
       */
26166
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26167
        _Fields fields = findByThriftId(fieldId);
26168
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26169
        return fields;
26170
      }
26171
 
26172
      /**
26173
       * Find the _Fields constant that matches name, or null if its not found.
26174
       */
26175
      public static _Fields findByName(String name) {
26176
        return byName.get(name);
26177
      }
26178
 
26179
      private final short _thriftId;
26180
      private final String _fieldName;
26181
 
26182
      _Fields(short thriftId, String fieldName) {
26183
        _thriftId = thriftId;
26184
        _fieldName = fieldName;
26185
      }
26186
 
26187
      public short getThriftFieldId() {
26188
        return _thriftId;
26189
      }
26190
 
26191
      public String getFieldName() {
26192
        return _fieldName;
26193
      }
26194
    }
26195
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26196
    }});
26197
 
26198
    static {
26199
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_args.class, metaDataMap);
26200
    }
26201
 
26202
    public getValidOrderCount_args() {
26203
    }
26204
 
26205
    /**
26206
     * Performs a deep copy on <i>other</i>.
26207
     */
26208
    public getValidOrderCount_args(getValidOrderCount_args other) {
26209
    }
26210
 
26211
    public getValidOrderCount_args deepCopy() {
26212
      return new getValidOrderCount_args(this);
26213
    }
26214
 
26215
    @Deprecated
26216
    public getValidOrderCount_args clone() {
26217
      return new getValidOrderCount_args(this);
26218
    }
26219
 
26220
    public void setFieldValue(_Fields field, Object value) {
26221
      switch (field) {
26222
      }
26223
    }
26224
 
26225
    public void setFieldValue(int fieldID, Object value) {
26226
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26227
    }
26228
 
26229
    public Object getFieldValue(_Fields field) {
26230
      switch (field) {
26231
      }
26232
      throw new IllegalStateException();
26233
    }
26234
 
26235
    public Object getFieldValue(int fieldId) {
26236
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26237
    }
26238
 
26239
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26240
    public boolean isSet(_Fields field) {
26241
      switch (field) {
26242
      }
26243
      throw new IllegalStateException();
26244
    }
26245
 
26246
    public boolean isSet(int fieldID) {
26247
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26248
    }
26249
 
26250
    @Override
26251
    public boolean equals(Object that) {
26252
      if (that == null)
26253
        return false;
26254
      if (that instanceof getValidOrderCount_args)
26255
        return this.equals((getValidOrderCount_args)that);
26256
      return false;
26257
    }
26258
 
26259
    public boolean equals(getValidOrderCount_args that) {
26260
      if (that == null)
26261
        return false;
26262
 
26263
      return true;
26264
    }
26265
 
26266
    @Override
26267
    public int hashCode() {
26268
      return 0;
26269
    }
26270
 
26271
    public int compareTo(getValidOrderCount_args other) {
26272
      if (!getClass().equals(other.getClass())) {
26273
        return getClass().getName().compareTo(other.getClass().getName());
26274
      }
26275
 
26276
      int lastComparison = 0;
26277
      getValidOrderCount_args typedOther = (getValidOrderCount_args)other;
26278
 
26279
      return 0;
26280
    }
26281
 
26282
    public void read(TProtocol iprot) throws TException {
26283
      TField field;
26284
      iprot.readStructBegin();
26285
      while (true)
26286
      {
26287
        field = iprot.readFieldBegin();
26288
        if (field.type == TType.STOP) { 
26289
          break;
26290
        }
26291
        _Fields fieldId = _Fields.findByThriftId(field.id);
26292
        if (fieldId == null) {
26293
          TProtocolUtil.skip(iprot, field.type);
26294
        } else {
26295
          switch (fieldId) {
26296
          }
26297
          iprot.readFieldEnd();
26298
        }
26299
      }
26300
      iprot.readStructEnd();
26301
      validate();
26302
    }
26303
 
26304
    public void write(TProtocol oprot) throws TException {
26305
      validate();
26306
 
26307
      oprot.writeStructBegin(STRUCT_DESC);
26308
      oprot.writeFieldStop();
26309
      oprot.writeStructEnd();
26310
    }
26311
 
26312
    @Override
26313
    public String toString() {
26314
      StringBuilder sb = new StringBuilder("getValidOrderCount_args(");
26315
      boolean first = true;
26316
 
26317
      sb.append(")");
26318
      return sb.toString();
26319
    }
26320
 
26321
    public void validate() throws TException {
26322
      // check for required fields
26323
    }
26324
 
26325
  }
26326
 
26327
  public static class getValidOrderCount_result implements TBase<getValidOrderCount_result._Fields>, java.io.Serializable, Cloneable, Comparable<getValidOrderCount_result>   {
26328
    private static final TStruct STRUCT_DESC = new TStruct("getValidOrderCount_result");
26329
 
26330
    private static final TField SUCCESS_FIELD_DESC = new TField("success", TType.I64, (short)0);
26331
 
26332
    private long success;
26333
 
26334
    /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
26335
    public enum _Fields implements TFieldIdEnum {
26336
      SUCCESS((short)0, "success");
26337
 
26338
      private static final Map<Integer, _Fields> byId = new HashMap<Integer, _Fields>();
26339
      private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
26340
 
26341
      static {
26342
        for (_Fields field : EnumSet.allOf(_Fields.class)) {
26343
          byId.put((int)field._thriftId, field);
26344
          byName.put(field.getFieldName(), field);
26345
        }
26346
      }
26347
 
26348
      /**
26349
       * Find the _Fields constant that matches fieldId, or null if its not found.
26350
       */
26351
      public static _Fields findByThriftId(int fieldId) {
26352
        return byId.get(fieldId);
26353
      }
26354
 
26355
      /**
26356
       * Find the _Fields constant that matches fieldId, throwing an exception
26357
       * if it is not found.
26358
       */
26359
      public static _Fields findByThriftIdOrThrow(int fieldId) {
26360
        _Fields fields = findByThriftId(fieldId);
26361
        if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
26362
        return fields;
26363
      }
26364
 
26365
      /**
26366
       * Find the _Fields constant that matches name, or null if its not found.
26367
       */
26368
      public static _Fields findByName(String name) {
26369
        return byName.get(name);
26370
      }
26371
 
26372
      private final short _thriftId;
26373
      private final String _fieldName;
26374
 
26375
      _Fields(short thriftId, String fieldName) {
26376
        _thriftId = thriftId;
26377
        _fieldName = fieldName;
26378
      }
26379
 
26380
      public short getThriftFieldId() {
26381
        return _thriftId;
26382
      }
26383
 
26384
      public String getFieldName() {
26385
        return _fieldName;
26386
      }
26387
    }
26388
 
26389
    // isset id assignments
26390
    private static final int __SUCCESS_ISSET_ID = 0;
26391
    private BitSet __isset_bit_vector = new BitSet(1);
26392
 
26393
    public static final Map<_Fields, FieldMetaData> metaDataMap = Collections.unmodifiableMap(new EnumMap<_Fields, FieldMetaData>(_Fields.class) {{
26394
      put(_Fields.SUCCESS, new FieldMetaData("success", TFieldRequirementType.DEFAULT, 
26395
          new FieldValueMetaData(TType.I64)));
26396
    }});
26397
 
26398
    static {
26399
      FieldMetaData.addStructMetaDataMap(getValidOrderCount_result.class, metaDataMap);
26400
    }
26401
 
26402
    public getValidOrderCount_result() {
26403
    }
26404
 
26405
    public getValidOrderCount_result(
26406
      long success)
26407
    {
26408
      this();
26409
      this.success = success;
26410
      setSuccessIsSet(true);
26411
    }
26412
 
26413
    /**
26414
     * Performs a deep copy on <i>other</i>.
26415
     */
26416
    public getValidOrderCount_result(getValidOrderCount_result other) {
26417
      __isset_bit_vector.clear();
26418
      __isset_bit_vector.or(other.__isset_bit_vector);
26419
      this.success = other.success;
26420
    }
26421
 
26422
    public getValidOrderCount_result deepCopy() {
26423
      return new getValidOrderCount_result(this);
26424
    }
26425
 
26426
    @Deprecated
26427
    public getValidOrderCount_result clone() {
26428
      return new getValidOrderCount_result(this);
26429
    }
26430
 
26431
    public long getSuccess() {
26432
      return this.success;
26433
    }
26434
 
26435
    public getValidOrderCount_result setSuccess(long success) {
26436
      this.success = success;
26437
      setSuccessIsSet(true);
26438
      return this;
26439
    }
26440
 
26441
    public void unsetSuccess() {
26442
      __isset_bit_vector.clear(__SUCCESS_ISSET_ID);
26443
    }
26444
 
26445
    /** Returns true if field success is set (has been asigned a value) and false otherwise */
26446
    public boolean isSetSuccess() {
26447
      return __isset_bit_vector.get(__SUCCESS_ISSET_ID);
26448
    }
26449
 
26450
    public void setSuccessIsSet(boolean value) {
26451
      __isset_bit_vector.set(__SUCCESS_ISSET_ID, value);
26452
    }
26453
 
26454
    public void setFieldValue(_Fields field, Object value) {
26455
      switch (field) {
26456
      case SUCCESS:
26457
        if (value == null) {
26458
          unsetSuccess();
26459
        } else {
26460
          setSuccess((Long)value);
26461
        }
26462
        break;
26463
 
26464
      }
26465
    }
26466
 
26467
    public void setFieldValue(int fieldID, Object value) {
26468
      setFieldValue(_Fields.findByThriftIdOrThrow(fieldID), value);
26469
    }
26470
 
26471
    public Object getFieldValue(_Fields field) {
26472
      switch (field) {
26473
      case SUCCESS:
26474
        return new Long(getSuccess());
26475
 
26476
      }
26477
      throw new IllegalStateException();
26478
    }
26479
 
26480
    public Object getFieldValue(int fieldId) {
26481
      return getFieldValue(_Fields.findByThriftIdOrThrow(fieldId));
26482
    }
26483
 
26484
    /** Returns true if field corresponding to fieldID is set (has been asigned a value) and false otherwise */
26485
    public boolean isSet(_Fields field) {
26486
      switch (field) {
26487
      case SUCCESS:
26488
        return isSetSuccess();
26489
      }
26490
      throw new IllegalStateException();
26491
    }
26492
 
26493
    public boolean isSet(int fieldID) {
26494
      return isSet(_Fields.findByThriftIdOrThrow(fieldID));
26495
    }
26496
 
26497
    @Override
26498
    public boolean equals(Object that) {
26499
      if (that == null)
26500
        return false;
26501
      if (that instanceof getValidOrderCount_result)
26502
        return this.equals((getValidOrderCount_result)that);
26503
      return false;
26504
    }
26505
 
26506
    public boolean equals(getValidOrderCount_result that) {
26507
      if (that == null)
26508
        return false;
26509
 
26510
      boolean this_present_success = true;
26511
      boolean that_present_success = true;
26512
      if (this_present_success || that_present_success) {
26513
        if (!(this_present_success && that_present_success))
26514
          return false;
26515
        if (this.success != that.success)
26516
          return false;
26517
      }
26518
 
26519
      return true;
26520
    }
26521
 
26522
    @Override
26523
    public int hashCode() {
26524
      return 0;
26525
    }
26526
 
26527
    public int compareTo(getValidOrderCount_result other) {
26528
      if (!getClass().equals(other.getClass())) {
26529
        return getClass().getName().compareTo(other.getClass().getName());
26530
      }
26531
 
26532
      int lastComparison = 0;
26533
      getValidOrderCount_result typedOther = (getValidOrderCount_result)other;
26534
 
26535
      lastComparison = Boolean.valueOf(isSetSuccess()).compareTo(isSetSuccess());
26536
      if (lastComparison != 0) {
26537
        return lastComparison;
26538
      }
26539
      lastComparison = TBaseHelper.compareTo(success, typedOther.success);
26540
      if (lastComparison != 0) {
26541
        return lastComparison;
26542
      }
26543
      return 0;
26544
    }
26545
 
26546
    public void read(TProtocol iprot) throws TException {
26547
      TField field;
26548
      iprot.readStructBegin();
26549
      while (true)
26550
      {
26551
        field = iprot.readFieldBegin();
26552
        if (field.type == TType.STOP) { 
26553
          break;
26554
        }
26555
        _Fields fieldId = _Fields.findByThriftId(field.id);
26556
        if (fieldId == null) {
26557
          TProtocolUtil.skip(iprot, field.type);
26558
        } else {
26559
          switch (fieldId) {
26560
            case SUCCESS:
26561
              if (field.type == TType.I64) {
26562
                this.success = iprot.readI64();
26563
                setSuccessIsSet(true);
26564
              } else { 
26565
                TProtocolUtil.skip(iprot, field.type);
26566
              }
26567
              break;
26568
          }
26569
          iprot.readFieldEnd();
26570
        }
26571
      }
26572
      iprot.readStructEnd();
26573
      validate();
26574
    }
26575
 
26576
    public void write(TProtocol oprot) throws TException {
26577
      oprot.writeStructBegin(STRUCT_DESC);
26578
 
26579
      if (this.isSetSuccess()) {
26580
        oprot.writeFieldBegin(SUCCESS_FIELD_DESC);
26581
        oprot.writeI64(this.success);
26582
        oprot.writeFieldEnd();
26583
      }
26584
      oprot.writeFieldStop();
26585
      oprot.writeStructEnd();
26586
    }
26587
 
26588
    @Override
26589
    public String toString() {
26590
      StringBuilder sb = new StringBuilder("getValidOrderCount_result(");
26591
      boolean first = true;
26592
 
26593
      sb.append("success:");
26594
      sb.append(this.success);
26595
      first = false;
26596
      sb.append(")");
26597
      return sb.toString();
26598
    }
26599
 
26600
    public void validate() throws TException {
26601
      // check for required fields
26602
    }
26603
 
26604
  }
26605
 
68 ashish 26606
}